function getErrorMessageFromIPStatus(n){switch(n){case IPStatus.DESTINATIONNETWORKUNREACHABLE:return"Destination network is not reachable.";case IPStatus.DESTINATIONHOSTUNREACHABLE:return"Destination host is not reachable.";case IPStatus.DESTINATIONPROHIBITED:return"Contact with the destination machine is prohibited.";case IPStatus.DESTINATIONPROTOCOLUNREACHABLE:return"Destination machine does not support the specified protocol";case IPStatus.DESTINATIONPORTUNREACHABLE:return"Specified port is not available on the destination machine";case IPStatus.NORESOURCES:return"Insufficient network resources";case IPStatus.BADOPTION:return"Request contained an invalid option.";case IPStatus.HARDWAREERROR:return"Hardware error occurred.";case IPStatus.PACKETTOOBIG:return"Request packet is too large.";case IPStatus.TIMEDOUT:return"Request timed out.";case IPStatus.BADROUTE:return"No valid route is available.";case IPStatus.TIMEEXCEEDED:case IPStatus.TTLEXPIRED:return"TTL expired.";case IPStatus.TTLREASSEMBLYTIMEEXCEEDED:return"Fragments were not reassembled before TTL expired.";case IPStatus.PARAMETERPROBLEM:return"Node encountered a problem in the request.";case IPStatus.SOURCEQUENCH:return"Packet was discarded.";case IPStatus.BADDESTINATION:return"Destination is invalid.";case IPStatus.DESTINATIONUNREACHABLE:return"Destination is unavailable.";case IPStatus.BADHEADER:return"Header is invalid.";case IPStatus.UNRECOGNIZEDNEXTHEADER:return"Next Header Field of request is invalid.";case IPStatus.ICMPERROR:return"ICMP error occurred.";case IPStatus.DESTINATIONSCOPEMISMATCH:return"Source and destination not in the same scope.";case null:return"Destination could not be resolved.";default:return"Unknown error occurred."}}function validateAddress(n){return iPv4Regex.test(n)||iPv6Regex.test(n)||urlRegex.test(n)}function resizeToolsFrame(){window.requestAnimationFrame(function(){FrameEventsBus.notify("SIZE",{height:document.body.scrollHeight})})}function handleSignupFrameEvents(){var i=this,n="#signupFrame",t;typeof ResizeObserver!="undefined"&&(t=new window.ResizeObserver(function(){FrameEventsBus.notify(FrameEventType.RESIZE,{height:document.body.scrollHeight})}),t.observe(document.body));FrameEventsBus.subscribe(FrameEventType.RESIZE,n,function(n){n.frame.style.height=n.params.height+"px";FrameEventsBus.notify(FrameEventType.RESIZE,{height:document.body.scrollHeight})});FrameEventsBus.subscribe(FrameEventType.SIGNUPANALYTICS,n,function(n){i.showSignupFormIntro(!1);FrameEventsBus.notify(FrameEventType.SIGNUPANALYTICS,n.params)});FrameEventsBus.subscribe(FrameEventType.GETMETADATA,n,function(n){FrameEventsBus.notify(FrameEventType.GETMETADATA,n.params)});FrameEventsBus.subscribe(FrameEventType.SIZEREQUEST,null,function(){FrameEventsBus.notify(FrameEventType.RESIZE,{height:document.body.scrollHeight})})}var ToolsHelpers=function(){function n(){}return n.getQueryStringParameter=function(n){n=n.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+n+"=([^&#]*)").exec(location.search);return null==t?"":decodeURIComponent(t[1].replace(/\+/g," "))},n.FormatDecimalsAccordingToCulture=function(n){return n.toString().replace(".",Formatting.DecimalSeparator)},n.FriendlyUtcDate=function(n){var t=n;return(t=t.replace("T"," ")).substr(0,16)},n}(),_this=this,ContentUpdateToolResultStatus,ToolResponseStatusEnum,ToolType,MessageType,IPStatus;(function(n){n.BUSY="status-busy";n.FINISHED="status-finished";n.TIMEOUT="status-timeout";n.ERROR="status-error";n.PENDING="status-pending";n.CANCELED="status-canceled"})(ContentUpdateToolResultStatus||(ContentUpdateToolResultStatus={})),function(n){n[n.Busy=1]="Busy";n[n.Finished=2]="Finished";n[n.Timeout=3]="Timeout";n[n.Error=4]="Error";n[n.Pending=5]="Pending";n[n.Canceled=6]="Canceled"}(ToolResponseStatusEnum||(ToolResponseStatusEnum={})),function(n){n.Http="HTTP";n.Fpc="FPC";n.TraceRoute="TraceRoute";n.Dns="DNS";n[n.Cdn=8]="Cdn";n[n.Ping=9]="Ping"}(ToolType||(ToolType={})),function(n){n.ERROR="ERROR";n.WARNING="WARNING"}(MessageType||(MessageType={})),function(n){n[n.UNKNOWN=-1]="UNKNOWN";n[n.SUCCESS=0]="SUCCESS";n[n.DESTINATIONNETWORKUNREACHABLE=11002]="DESTINATIONNETWORKUNREACHABLE";n[n.DESTINATIONHOSTUNREACHABLE=11003]="DESTINATIONHOSTUNREACHABLE";n[n.DESTINATIONPROHIBITED=11004]="DESTINATIONPROHIBITED";n[n.DESTINATIONPROTOCOLUNREACHABLE=11004]="DESTINATIONPROTOCOLUNREACHABLE";n[n.DESTINATIONPORTUNREACHABLE=11005]="DESTINATIONPORTUNREACHABLE";n[n.NORESOURCES=11006]="NORESOURCES";n[n.BADOPTION=11007]="BADOPTION";n[n.HARDWAREERROR=11008]="HARDWAREERROR";n[n.PACKETTOOBIG=11009]="PACKETTOOBIG";n[n.TIMEDOUT=11010]="TIMEDOUT";n[n.BADROUTE=11012]="BADROUTE";n[n.TTLEXPIRED=11013]="TTLEXPIRED";n[n.TTLREASSEMBLYTIMEEXCEEDED=11014]="TTLREASSEMBLYTIMEEXCEEDED";n[n.PARAMETERPROBLEM=11015]="PARAMETERPROBLEM";n[n.SOURCEQUENCH=11016]="SOURCEQUENCH";n[n.BADDESTINATION=11018]="BADDESTINATION";n[n.DESTINATIONUNREACHABLE=11040]="DESTINATIONUNREACHABLE";n[n.TIMEEXCEEDED=11041]="TIMEEXCEEDED";n[n.BADHEADER=11042]="BADHEADER";n[n.UNRECOGNIZEDNEXTHEADER=11043]="UNRECOGNIZEDNEXTHEADER";n[n.ICMPERROR=11044]="ICMPERROR";n[n.DESTINATIONSCOPEMISMATCH=11045]="DESTINATIONSCOPEMISMATCH"}(IPStatus||(IPStatus={}));var iPv4Regex=new RegExp("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"),iPv6Regex=new RegExp("^(\\[)?([0-9a-fA-F]{1,4}:{0,2}){1,8}(\\]:[0-9]{0,5})?$"),urlRegex=new RegExp("^(http(s)?://)?(www\\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\\.[a-zA-Z]{2,6}([-a-zA-Z0-9@:%_+.~#?&/=]*)$");ko.bindingHandlers.selectedText={init:function(n,t){var i=t();i($("option:selected",n).text());$(n).on("change",function(){i($("option:selected",this).text())})},update:function(n,t){var i=ko.utils.unwrapObservable(t());$("option",n).filter(function(n,t){return $(t).text()===i}).prop("selected","selected")}};ko.bindingHandlers.signupForm={init:function(n,t){var r=t(),i=toolscomponents.mount({component:toolscomponents.SignupForm,slotContainer:n,propsData:{appUrl:r.appUrl,cloudAmpData:"",productType:"Synthetics",origin:document.documentElement.lang}});FrameEventsBus.notify(FrameEventType.GETMETADATA);FrameEventsBus.subscribe(FrameEventType.SETMETADATA,null,function(n){i.cloudAmpData=n.params.CloudAmp});i.$on("signupAnalytics",function(n){FrameEventsBus.notify(FrameEventType.SIGNUPANALYTICS,{data:n})})}};ko.bindingHandlers.ToolsStartForm=createBindingHandler({init:function(n,t,i,r,u){var f=t(),e=f.checkpointOptions,o=f.checkpointSelection,c=f.checkpointName,s=f.address,l=f.message,a=f.busy,v=f.disabled,y=f.onStart,p=f.onReset,h=ko.unwrap(o)||e?ko.unwrap(e[Object.keys(e)[0]]):undefined;o&&o(h);_this.form=toolscomponents.mount({component:toolscomponents.StartForm,slot:n,propsData:{checkpointOptions:ko.unwrap(e),checkpointSelection:h,address:ko.unwrap(s),message:ko.unwrap(l),busy:ko.unwrap(a),disabled:ko.unwrap(v)}});_this.form.$on("address",function(n){s(n)});_this.form.$on("checkpointSelection",function(n){var t=n[0],i=n[1];o(i);c(t)});_this.form.$on("start",function(){y()});_this.form.$on("reset",function(){p.call(u)});_this.form.$on("resize",function(){FrameEventsBus.notify("SIZE",{height:document.body.scrollHeight})})},update:function(n,t){var i=t(),r=i.checkpointOptions,u=i.checkpointSelection,e=i.address,o=i.message,s=i.busy,h=i.disabled,f=ko.unwrap(u)||(r?ko.unwrap(r[Object.keys(r)[0]]):undefined);u&&u(f);_this.form.checkpointSelection=f;_this.form.address=ko.unwrap(e);_this.form.message=ko.unwrap(o);_this.form.busy=ko.unwrap(s);_this.form.disabled=ko.unwrap(h)}})