function HTTPViewModel(n,t){var i=this;this.TotalWidth=t;this.OrderBy="TotalTime";this.RequestDateTimeUtc=n.RequestDateTimeUtc;this.Checkpoints=ko.observableArray(n.checkpoints);this.slowestCheckpoint_TotalTime=ko.observable(n.slowestCheckpoint_TotalTime);this.fastestCheckpoint_TotalTime=ko.observable(n.fastestCheckpoint_TotalTime);this.finishedCheckpointsCount=ko.observable(n.finishedCheckpointsCount);this.averageTotalTime=ko.observable(n.averageMs);this.SetupTooltips=function(){$(".hoverHttptooltip").on("mouseenter",function(n){var t=createHttpToolTooltip($(n.currentTarget));t&&t.fadeIn("fast")}).on("mouseleave",function(){$(".tooltipStyle").fadeOut("fast")})};this.OrderedCheckpoints=ko.computed(function(){var n=[],t,r;switch(i.OrderBy){case"TotalTime":var u=[],f=[],e=i.Checkpoints().length;for(t=0;t<e;t++)r=i.Checkpoints()[t],r.StatusId!==2?u.push(r):f.push(r);n=f.sort(function(n,t){return n.MsTotalTime===0?1e3:n.MsTotalTime===t.MsTotalTime?0:n.MsTotalTime<t.MsTotalTime?-1:1});n=n.concat(u);break;case"Alphabetically":n=i.Checkpoints().sort(function(n,t){return n.CheckPointName<t.CheckPointName?-1:n.CheckPointName>t.CheckPointName?1:0})}return setTimeout(function(){i.SetupTooltips()},50),n},this);this.getStatusText=function(n,t){switch(n){case 1:return Resources.Tools["HTTP.Result.Status.Busy"];case 2:return Resources.Tools["HTTP.Result.Status.Ok"];case 3:return Resources.Tools["HTTP.Result.Status.Timeout"];case 4:return t||Resources.Tools["HTTP.Result.Status.Error"];default:return""}};this.getPxValue=function(n,t,i){if(!t)return this.toPercentageString(i||0);if(!n)return this.toPercentageString(0);var u=n*this.TotalWidth,r=n/(t/100);return this.toPercentageString(Math.min(100,r))};this.toPixelString=function(n){return n.toString()+"px"};this.toPercentageString=function(n){return n.toString()+"%"};this.getMsToString=function(n){return n?n<6e4?ToolsHelpers.FormatDecimalsAccordingToCulture((n/1e3).toFixed(1).toString())+"s":n>6e4?ToolsHelpers.FormatDecimalsAccordingToCulture((n/6e4).toFixed(1).toString())+"m":void 0:"--"};this.sortitems=function(){};this.FriendlyUtcDate=ToolsHelpers.FriendlyUtcDate}function HttpToolWrapData(n){var e=n,t={},r,i;t.checkpoints=[];t.RequestDateTimeUtc=e[0].RequestDateTimeUtc;t.fastestCheckpoint_TotalTime={MsTotalTime:0,CheckPointName:"--"};t.slowestCheckpoint_TotalTime={MsTotalTime:0,CheckPointName:"--"};t.finishedCheckpointsCount=0;var o=0,u=0,f=e;for(r=0;r<f.length;r++)if((i=f[r].ResultJson,i.StatusId=f[r].StatusId,t.checkpoints.push(i),o+=i.MsTotalTime,i.StatusId!==1)&&(t.finishedCheckpointsCount++,i.StatusId===2)){if(u++,r===0){t.fastestCheckpoint_TotalTime=i;t.slowestCheckpoint_TotalTime=i;continue}t.fastestCheckpoint_TotalTime=i.MsTotalTime<t.fastestCheckpoint_TotalTime.MsTotalTime?i:t.fastestCheckpoint_TotalTime;t.slowestCheckpoint_TotalTime=i.MsTotalTime>t.slowestCheckpoint_TotalTime.MsTotalTime?i:t.slowestCheckpoint_TotalTime}return t.averageMs=u?o/u:0,t}function createHttpToolTooltip(n){var i,o,t;$("body .HttpTooltip").remove();i=$('<p class="tooltipStyle HttpTooltip"><\/p>').show().appendTo("body").css("top",n.offset().top+n.height()-20+"px").css("left",n.offset().left+10+"px");i.append("<div class='tooltip-tippy' />");var u=parseInt(n.find(".timeline .resolve").attr("data-value"))/1e3,f=parseInt(n.find(".timeline .connect").attr("data-value"))/1e3,e=parseInt(n.find(".timeline .download").attr("data-value"))/1e3,r=parseInt(n.find(".httpResultContent").attr("data-totalbytes"))/1e3;if(r=Math.round(r),o=(u+f+e).toFixed(3),t=$("<table  width='100%'/>"),t.append("<tr><td class='blockholder'><div class='resolve block'><\/div><\/td><td>"+Resources.Tools["HTTP.Result.ResolveTime"]+"<\/td><td class='toolvalue'>"+ToolsHelpers.FormatDecimalsAccordingToCulture(u.toFixed(3))+"s<\/td><\/tr>"),t.append("<tr><td><div class='connect block'><\/div><\/td><td>"+Resources.Tools["HTTP.Result.ConnectionTime"]+"<\/td><td class='toolvalue'>"+ToolsHelpers.FormatDecimalsAccordingToCulture(f.toFixed(3))+"s<\/td><\/tr>"),t.append("<tr><td><div class='download block'><\/div><\/td><td>"+Resources.Tools["HTTP.Result.DownloadTime"]+"<\/td><td class='toolvalue'>"+ToolsHelpers.FormatDecimalsAccordingToCulture(e.toFixed(3))+"s<\/td><\/tr>"),t.append("<tr><td colspan=3><div class='tooltip-hr'><\/div><\/td><\/tr>"),t.append("<tr><td colspan=2>"+Resources.Tools["HTTP.Result.TotalTime"]+"<\/td><td class='toolvalue'>"+ToolsHelpers.FormatDecimalsAccordingToCulture(o)+"s<\/td><\/tr>"),t.append("<tr><td colspan=2>"+Resources.Tools["HTTP.Result.TotalSize"]+"<\/td><td class='toolvalue'>"+r+"kB<\/td><\/tr>"),i.append(t),n.hasClass("error")){var s=n.find(".httpResultContent").attr("data-httperrorcode"),h=n.find(".httpResultContent").attr("data-errorcode"),c=n.find(".httpResultContent").attr("data-errormessage");i.append("<div class='httpcode'>"+(s!=="0"?s:h)+"<\/div>");i.append("<div class='httperrormessage'>"+c+"<\/div>")}return i}function TraceRouteViewModel(n){var t=this;this.RequestDateTimeUtc=n.RequestDateTimeUtc;this.Hops=ko.observableArray(n.ResultJson.Hops||[]);this.OrderedHops=ko.computed(function(){var n=t.Hops()||[];return n.sort(function(n,t){return n.Index-t.Index})},this);this.getTimingsDisplayValue=function(n,t){if(n[t]){var i=n[t];return i.ResponseReceived&&i.ResponseTime<1?"<1":i.ResponseReceived&&i.ResponseTime?i.ResponseTime.toString():i.ResponseReceived?void 0:"*"}};this.FriendlyUtcDate=function(n){var t=n;return t=t.replace("T"," "),t.substr(0,16)};this.getTimingCssClass=function(n,t){var i;if(n[t])return i=n[t],i.ResponseReceived?i.ResponseTime<2?"fast":i.ResponseTime<300?"normal":"slow":"timeout"};this.getTimingTooltip=function(n,t){var i;if(n[t])return i=n[t],i.ResponseReceived?"TTL: "+i.ResponseTimeToLive.toString():Resources.Tools["TRACEROUTE.Results.TimeOut"]};this.GetHopsCount=function(){return this.Hops().length};this.getServerName=function(n){return n.Timings.filter(function(n){return n.ResponseReceived}).length>0?n.serverName:Resources.Tools["HTTP.Result.Status.Timeout"]};this.averageTime=function(){for(var r,t,e,u=0,f=0,i=this.Hops(),o=i.length-1,n=0;n<o;n++)for(r=i[n].Timings.length,u+=r,t=0;t<r-1;t++)f+=i[n].Timings[t].ResponseTime;return e=(f/u).toFixed(1),ToolsHelpers.FormatDecimalsAccordingToCulture(e)};this.slowestTime=function(){for(var f,i,r=0,u={ServerAddress:"",MsTotalTime:"0"},t=this.Hops(),e=t.length-1,n=0;n<e;n++)for(f=t[n].Timings.length,i=0;i<f-1;i++)t[n].Timings[i].ResponseTime>r&&(u.ServerAddress=t[n].ServerAddress,r=t[n].Timings[i].ResponseTime);return u.MsTotalTime=ToolsHelpers.FormatDecimalsAccordingToCulture(r.toFixed(0)),r===1&&(u.MsTotalTime="<1"),u}}function DNSViewModel(n){var t=this;this.RequestDateTimeUtc=n.RequestDateTimeUtc;this.Sections=ko.observableArray(n.ResultJson.Sections);this.TxtRecords=ko.observableArray(n.ResultJson.TxtRecords);this.OrderedSections=ko.computed(function(){return setTimeout(function(){t.SetupTooltips()},50),t.Sections()},this);this.FriendlyUtcDate=function(n){var t=n;return t=t.replace("T"," "),t.substr(0,16)};this.SetupTooltips=function(){var n=this;$(".hoverHttptooltip").on("mouseenter",function(t){var i=createDNSToolTooltip($(n),t);i&&i.fadeIn("fast")}).on("mouseleave",function(){$(".tooltipStyle").fadeOut("fast")})};this.getStatusText=function(n){switch(n){case 0:return Resources.Tools["DNS.Results.Status.Ok"];case 1:return Resources.Tools["DNS.Results.Status.Warning"];case 2:return Resources.Tools["DNS.Results.Status.Error"]}}}function createDNSToolTooltip(n,t){var r=n.attr("tippy"),i;return r?(i=$('<p class="tooltipStyle HttpTooltip"><\/p>').appendTo("body").css("top",n.offset().top+n.height()-10+"px").css("left",n.offset().left+20+"px"),i.append("<div class='tooltip-tippy' />"),i.append("<div>"+r+"<\/div>"),i.offset().left+220+30>$("body").width()&&i.css("left",t.pageX-220),i):null}var DataRichness,Tools;(function(n){n[n.None=0]="None";n[n.BasicData=1]="BasicData";n[n.ChromeDevToolsData=2]="ChromeDevToolsData"})(DataRichness||(DataRichness={}));Tools=function(){function n(){var n=this,t;this.fromMarketingSite=ko.observable(!0);this.selectedCheckpointsDescription=ko.observable("");this.url=ko.observable("");this.checkpointSelection=ko.observable("");this.busy=ko.observable(!1);this.hasError=ko.observable(!1);this.isFinished=ko.observable(!1);this.message=ko.observable("");this.helpUrl=ko.observable("");this.messageType=ko.observable();this.toolRequestGuid=ko.observable("");this.sharedResult=ko.observable(!1);this.sharedResultInfo=ko.observable(null);this.ctaContentParams=ko.observable({});this.showInputs=ko.observable(!0);this.currentRequestGuid=ko.observable("");this.hasBeenExecuted=ko.observable(!1);this.showSignupFormIntro=ko.observable(!0);this.userInputFormDisabled=ko.computed(function(){return n.busy()||n.isFinished()});this.signupFrameUrl=ko.computed(function(){var t=n.url(),i;return t.indexOf("http://")===-1&&t.indexOf("https://")===-1&&(t="https://"+t),i=document.documentElement.lang,window.location.origin+"/Account/Register?lang="+i+"&mode=50&formtype=TwoStepForm&url="+t});this.busy(!1);this.hasError(!1);this.defineDomElements();ToolsHelpers.getQueryStringParameter("app")==="1"&&(this.fromMarketingSite(!1),this.elements.signupButton.hide(),FrameEventsBus.subscribe("SIZEREQUEST",null,function(){n.emitSize()}));this.toolType=$("#PageWrapper").attr("tooltypeenum");this.toolType===ToolType.Fpc&&this.initFpc($("#PageWrapper").attr("requesttype"));t=$("#tools-binder")[0];t&&ko.applyBindings(this,t);this.emitSize();FrameEventsBus.notify(FrameEventType.RequestParentParams,{paramNames:["toolRequestGuid","ctaTitle","ctaText","ctaButtonText"]});FrameEventsBus.subscribe(FrameEventType.ParentParamsResponse,null,function(t){t.params.toolRequestGuid?(n.sharedResult(!0),n.initTool(),n.toolRequestGuid(t.params.toolRequestGuid),n.getResponses(),n.showInputs(!1)):(n.sharedResult(!1),n.showInputs(!0));n.ctaContentParams({title:t.params.ctaTitle,text:t.params.ctaText,buttonText:t.params.ctaButtonText})})}return n.prototype.getResponses=function(){var n=this;$.ajax({type:"GET",url:UrlHelper.ToolResponses,data:{toolRequestGuid:this.toolRequestGuid,toolType:this.toolType},success:function(t){var r,u,f,e,o,i;if(t){if(n.toolType===ToolType.Fpc){for(r="",u="",f=0,e=t;f<e.length;f++)o=e[f],i=o.ResultJson.SummaryData,r=i&&i.Url?i.Url:r,u=i&&i.SelectedCheckpointName?i.SelectedCheckpointName:u;n.sharedResultInfo({timeStamp:parseDateFromBackendString(t[0].RequestDateTimeUtc),url:r,multipleCheckpoints:!1,allCheckpoints:!1,checkpointName:u})}else n.sharedResultInfo({timeStamp:parseDateFromBackendString(t[0].RequestDateTimeUtc),url:t[0].ResultJson.Url,multipleCheckpoints:t.length>1,checkpointName:t[0].ResultJson.SelectedCheckpointName,allCheckpoints:t[0].ResultJson.SelectedAllCheckpoints});n.parseResponses(t);n.isFinished(!0)}},error:function(t){n.showMessage(t.statusText,MessageType.ERROR);n.emitSize();n.finishTool()}})},n.prototype.parseResponses=function(n){var i,r,u,t;if(n){this.hideMessage();this.hasError(!1);switch(this.toolType){case ToolType.Http:this.httpProgress(n);break;case ToolType.Fpc:n.length===1?this.updateFpcVm(n[0].ResultJson):(i=n.filter(function(n){return n.ResultJson.Type==="FpcTool"})[0],r=n.filter(function(n){return n.ResultJson.Type==="GooglePageSpeedInsights"})[0],i&&this.updateFpcVm(i.ResultJson),r&&this.googlePageResult(r.ResultJson));break;case ToolType.TraceRoute:u=n[0];this.vm?this.vm.Hops(u.ResultJson.Hops):(this.vm=new TraceRouteViewModel(u),ko.applyBindings(this.vm,this.resultsWrapper[0]));break;case ToolType.Dns:t=n[0];this.vm?(this.vm.Sections(t.ResultJson.Sections),this.vm.TxtRecords(t.ResultJson.TxtRecords)):(this.vm=new DNSViewModel(t),ko.applyBindings(this.vm,this.resultsWrapper[0]))}this.resultsWrapper.show();this.emitSize();this.finishTool()}},n.prototype.forceQuit=function(){this.client&&this.client.stop()},n.prototype.defineDomElements=function(){this.elements={signupButton:$(".button.signup"),reqCheckPointSingleSelector:$("#UI_Tools_CheckPoinSelector")}},n.prototype.executeTool=function(){if(this.tryStartTool()){this.initTool();var n=this.getRequestDefinition();this.setupSignalRClient();this.client.start("Tool"+this.toolType.toString().toUpperCase(),JSON.stringify(n),"undefined",window.Formatting.Culture);this.hasBeenExecuted(!0)}},n.prototype.tryStartTool=function(){return this.busy()?!1:(this.busy(!0),$(".test-options").hide(),!0)},n.prototype.setupSignalRClient=function(){var n=this;this.client=new SignalRClient.Client({onException:function(t){t.Message&&(n.showMessage(t.Message,MessageType.ERROR),n.hasError(!0),n.emitSize());setTimeout(function(){n.finishTool()},200)},onSignalRError:function(t){t&&t.Message&&n.showMessage(t.Message,MessageType.ERROR);setTimeout(function(){n.finishTool()},200)},onFinish:function(t){var i;t.Data.length>0&&n.currentRequestGuid(t.Data[0].RequestGuid);switch(n.toolType){case ToolType.Http:t.Message?n.showMessage(t.Message,MessageType.WARNING,t.HelpUrl):(n.hasError(!1),n.httpProgress(t.Data));break;case ToolType.Fpc:t.Message?n.showMessage(t.Message,MessageType.WARNING,t.HelpUrl):(n.hasError(!1),n.hideMessage(),n.updateFpcVm(t.Data[0].ResultJson),t.Data.length>1&&n.googlePageResult(t.Data[1].ResultJson));break;case ToolType.TraceRoute:if(!t)return;n.showMessage(t.message);t.Data&&(i=t.Data[0],n.vm?n.vm.Hops(i.ResultJson.Hops):(n.vm=new TraceRouteViewModel(i),ko.applyBindings(n.vm,n.resultsWrapper[0])),n.resultsWrapper.show(),n.emitSize());break;case ToolType.Dns:if(!t)return;n.showMessage(t.message);t.Data&&(i=t.Data[0],n.vm?(n.vm.Sections(i.ResultJson.Sections),n.vm.TxtRecords(i.ResultJson.TxtRecords)):(n.vm=new DNSViewModel(i),ko.applyBindings(n.vm,n.resultsWrapper[0])),n.resultsWrapper.show(),n.emitSize())}n.resultsWrapper.show();n.finishTool()},onProgress:function(t){if(t){t.Message&&n.showMessage(t.Message);var i=!0;switch(n.toolType){case ToolType.Http:i=n.httpProgress(t.Data);break;case ToolType.Fpc:i=n.fpcProgress(t);t.Data&&t.Data.length>1&&n.googlePageResult(t.Data[1].ResultJson);break;case ToolType.TraceRoute:i=t.Data&&t.Data.Message;t.Data&&t.Data.Message&&n.fromMarketingSite()&&n.message(t.Data.Message);break;case ToolType.Dns:i=t.Data!==null}i&&n.resultsWrapper.show();n.emitSize()}}})},n.prototype.getRequestDefinition=function(){var i=this.url(),n=this.checkpointSelection(),r={Url:i,CheckPointId:n,SelectedCheckpointName:this.selectedCheckpointsDescription()},u,t;switch(this.toolType){case ToolType.Http:return u=n.length?n.split(",").filter(function(n){return!!n}):[],{Url:i,CheckPointIds:u,SelectedCheckpointName:this.selectedCheckpointsDescription()};case ToolType.Fpc:return t=ko.viewmodel.toModel(this.fpcVm),$.extend(t,r),t;default:return r}},n.prototype.reset=function(){this.sharedResult(!1);this.initTool()},n.prototype.initTool=function(){this.isFinished(!1);this.showInputs(!0);this.hideMessage();switch(this.toolType){case ToolType.Http:this.resultsWrapper=$("#httptool-resultswithwrap");this.vm&&(this.vm.Checkpoints([]),this.vm.slowestCheckpoint_TotalTime([]),this.vm.fastestCheckpoint_TotalTime([]),this.vm.finishedCheckpointsCount([]),this.vm.averageTotalTime([]));break;case ToolType.Fpc:this.resultsWrapper=$(".fpc-wrapper");this.vm&&(this.vm.Elements([]),this.vm.TotalTime(0),this.vm.DisplayMode(!0),this.vm.DomainGroupNames([]),this.vm.DomainGroupStyles([]),this.vm.SummaryData(null),this.vm.pageSpeedVM(new Waterfall.PageSpeedViewModel({})),this.vm.setDataFromChromeDevTools(!1),this.vm.fromMarketingSite(this.fromMarketingSite()),this.vm.setPageLoadMetrics(undefined),this.vm.filmStripScreenShots([]),this.vm.pageSource(undefined),this.vm.consoleLog(undefined));break;case ToolType.TraceRoute:this.resultsWrapper=$("#tracerouteTool-results");this.vm&&this.vm.Hops([]);break;case ToolType.Dns:this.resultsWrapper=$("#DNS-Results")}$(".tool-content").removeClass("overlayed");$(".test-options").show();this.resultsWrapper.hide();this.emitSize()},n.prototype.finishTool=function(){var n=this;if(this.hasError()||this.hideMessage(),this.busy(!1),this.hasBeenExecuted()&&this.isFinished(!0),(this.fromMarketingSite()||this.hasError())&&$(".cta").length>0){$(".cta").show(400);$(".tool-content").addClass("overlayed");setTimeout(function(){n.emitSize()},500);$(".button.signup").off("click");$(".button.signup").on("click",function(){$(".cta-resultintro").hide();var n=$("#UI_Tools_Url").val();/^((http|https):\/\/)/.test(n)||(n="http://"+n);$(".signup #Url").val(n);$(".cta-signup").show()})}window.requestAnimationFrame(function(){n.emitSize()})},n.prototype.initFpc=function(n){var t=this;$.ajax({url:"getfpcdefaults",type:"GET",data:{type:n},success:function(n){t.fpcVm=ko.viewmodel.fromModel(n);ko.applyBindings(t.fpcVm,$(".test-wrapper.fpc #options")[0])}});$(".fields-toggle img").on("click",function(){t.fpcVm.RequestType($(t).siblings("input").val())});$(".browser-button img").on("click",function(){t.fpcVm.BrowserType($(t).siblings("input").val())})},n.prototype.emitSize=function(){var n=document.body.scrollHeight;FrameEventsBus.notify("SIZE",{height:n})},n.prototype.googlePageResult=function(n){var i=this,t;this.vm&&(t=new Waterfall.PageSpeedViewModel(n,function(){return i.emitSize()}),this.vm.pageSpeedVM(t))},n.prototype.httpProgress=function(n){if(n){var t=HttpToolWrapData(n);return this.vm?(this.vm.Checkpoints(t.checkpoints),this.vm.slowestCheckpoint_TotalTime(t.slowestCheckpoint_TotalTime),this.vm.fastestCheckpoint_TotalTime(t.fastestCheckpoint_TotalTime),this.vm.finishedCheckpointsCount(t.finishedCheckpointsCount),this.vm.averageTotalTime(t.averageMs)):(this.vm=new HTTPViewModel(t,$(".httpCheckPointResult").width()),ko.applyBindings(this.vm,this.resultsWrapper[0])),!0}return!1},n.prototype.fpcProgress=function(n){var i,r,t;if(n.Data&&n.Data.length>0){for(i=0,r=n.Data;i<r.length;i++)t=r[i],(t.Elements&&t.Elements.length>0||t.SummaryData&&t.SummaryData.BrowserInfo)&&this.updateFpcVm(t,!0);return!0}return!1},n.prototype.dataRichnessIncludesChromeDevTools=function(n){return typeof n!="undefined"&&(n&DataRichness.ChromeDevToolsData)!=0},n.prototype.updateFpcVm=function(n,t){var s=this,i,r,u,f,e,h,c,o;t===void 0&&(t=!1);this.vm||(this.vm=new WFViewModel(n,this.resultsWrapper.width()-350,null,!0),ko.applyBindings(this.vm,this.resultsWrapper[0]));t?(this.vm.TotalTime(n.TotalTime),this.vm.addIncrementalElements(n.Elements,n.TotalTime),ko.utils.arrayPushAll(this.vm.DomainGroupNames,n.DomainGroupNames),ko.utils.arrayPushAll(this.vm.DomainGroupStyles,n.DomainGroupStyles),n.SummaryData&&n.SummaryData.BrowserInfo&&this.vm.SummaryData(n.SummaryData),this.vm.Init(),this.vm.emitSize=function(){return s.emitSize()}):(h=this.dataRichnessIncludesChromeDevTools((i=n.PageLoadSummary)===null||i===void 0?void 0:i.DataRichness),this.vm.setDataFromChromeDevTools(h),this.vm.fromMarketingSite(this.fromMarketingSite()),this.vm.setPageLoadMetrics((r=n.PageLoadSummary)===null||r===void 0?void 0:r.PageLoadMetricsCollection),this.vm.filmStripScreenShots((u=n.PageLoadSummary)===null||u===void 0?void 0:u.FilmStripScreenShots),this.vm.pageSource((f=n.PageLoadSummary)===null||f===void 0?void 0:f.Html),this.vm.consoleLog((e=n.PageLoadSummary)===null||e===void 0?void 0:e.ConsoleLog),this.vm.TotalTime(n.TotalTime),this.vm.Elements(n.Elements),this.vm.DomainGroupNames(n.DomainGroupNames),this.vm.DomainGroupStyles(n.DomainGroupStyles),this.vm.SummaryData(n.SummaryData),this.vm.colors=n.ChartColors,c=this.fpcVm.ScreenSizeOptions().filter(function(n){return n.Value()===this.fpcVm.ScreenSizeOption()},this)[0].Text,o="",o=this.fpcVm.RequestType()===0?this.fpcVm.DesktopThrottlingOptions().filter(function(n){return n.Value()===this.fpcVm.DesktopThrottlingValue()},this)[0].Text:this.fpcVm.MobileThrottlingOptions().filter(function(n){return n.Value()===this.fpcVm.MobileThrottlingValue()},this)[0].Text,this.vm.RequestData({RequestType:ko.observable(this.fpcVm.RequestType()),MobileDevice:ko.observable(this.fpcVm.MobileDevice()),DesktopResolution:ko.observable(c),BandwidthLimit:ko.observable(o)}),this.vm.Init(),this.vm.emitSize=function(){return s.emitSize()},this.emitSize())},n.prototype.hideMessage=function(){this.message("");this.messageType(null);this.helpUrl("")},n.prototype.showMessage=function(n,t,i){this.message(n);this.messageType(t);this.helpUrl(i)},n.prototype.setErrorUi=function(){this.hasError(!1);$(".cta").addClass("cta-error-result");$(".cta-success, .image-container, .signup").hide();$(".cta-error-errormessage, .cta-error-warningmessage").html("").hide();$(".cta-error-warningTitle").hide();$(".cta-error-helplinkprefix").hide();$(".cta-error-helplink").hide()},n}();$(document).ready(function(){window.toolsViewModel=new Tools});$(window).on("unload",function(){window.toolsViewModel.forceQuit()});ko.bindingHandlers.stopBinding={init:function(){return{controlsDescendantBindings:!0}}};ko.virtualElements.allowedBindings.stopBinding=!0