text: /*!
   * OpenUI5
   * (c) Copyright 2009-2019 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(["../Plugin","../Support","../ToolsAPI","sap/base/security/encodeXML"],function(e,t,o,i){"use strict";var r=e.extend("sap.ui.core.support.plugins.TechInfo",{constructor:function(t){e.apply(this,["sapUiSupportTechInfo","Technical Information",t]);this._aEventIds=this.runsAsToolPlugin()?[this.getId()+"Data",this.getId()+"FinishedE2ETrace"]:[this.getId()+"ToggleDebug",this.getId()+"SetReboot",this.getId()+"Refresh",this.getId()+"StartE2ETrace",this.getId()+"ToggleStatistics"];if(this.runsAsToolPlugin()){this.e2eLogLevel="medium";this.e2eTraceStarted=false}}});r.prototype.onsapUiSupportTechInfoData=function(e){var o=this;var i=e.getParameter("data");i.modules.sort();this.e2eTraceStarted=i["e2e-trace"].isStarted;var r=["<div class='sapUiSupportToolbar'>","<button id='",o.getId(),"-Refresh' class='sapUiSupportRoundedButton'>Refresh</button>","<div><div class='sapUiSupportTechInfoCntnt'>","<table border='0' cellpadding='3' class='infoTable'>"];function a(e,t){var o=[];if(e){var i=/^(\d{4})(\d{2})(\d{2})-?(\d{2})(\d{2})$/.exec(e);if(i){e=i[1]+"-"+i[2]+"-"+i[3]+"T"+i[4]+":"+i[5]}o.push("built at "+n(e))}if(t){o.push("last change "+n(t))}return o.length===0?"":" ("+o.join(", ")+")"}var p="SAPUI5";var c="not available";try{var l=sap.ui.getVersionInfo();p=l.name;c="<a href='"+sap.ui.resource("","sap-ui-version.json")+"' target='_blank' class='sapUiSupportLink' title='Open Version Info'>"+n(l.version)+"</a>"+a(l.buildTimestamp,l.scmRevision)}catch(e){}s(r,true,true,p,function(e){e.push(c)});if(!/openui5/i.test(p)){s(r,true,true,"OpenUI5 Version",function(e){e.push(n(i.version)+a(i.build,i.change))})}s(r,true,true,"Loaded jQuery Version",function(e){return i.jquery});s(r,true,true,"User Agent",function(e){return i.useragent+(i.docmode?", Document Mode '"+i.docmode+"'":"")});s(r,true,true,"Debug Sources",function(e){e.push(i.debug?"ON":"OFF","<a href='#' id='",o.getId(),"-tggleDbgSrc' class='sapUiSupportLink'>Toggle</a>")});s(r,true,true,"Application",i.appurl);u(r,true,true,"Configuration (bootstrap)",i.bootconfig);u(r,true,true,"Configuration (computed)",i.config);if(!jQuery.isEmptyObject(i.libraries)){u(r,true,true,"Libraries",i.libraries)}u(r,true,true,"Loaded Libraries",i.loadedLibraries);s(r,true,true,"Loaded Modules",function(e){jQuery.each(i.modules,function(t,o){if(o.indexOf("sap.ui.core.support")<0){e.push("<span>",n(o),"</span>");if(t<i.modules.length-1){e.push(", ")}}})});u(r,true,true,"URI Parameters",i.uriparams);s(r,true,true,"E2E Trace",function(e){e.push("<label class='sapUiSupportLabel'>Trace Level:</label>","<select id='",o.getId(),"-logLevelE2ETrace' class='sapUiSupportTxtFld sapUiSupportSelect'>","<option value='low'"+(o.e2eLogLevel==="low"?" selected":"")+">LOW</option>","<option value='medium'"+(o.e2eLogLevel==="medium"?" selected":"")+">MEDIUM</option>","<option value='high'"+(o.e2eLogLevel==="hight"?" selected":"")+">HIGH</option>","</select>");e.push("<button id='"+o.getId()+"-startE2ETrace' class='sapUiSupportRoundedButton "+(i["e2e-trace"].isStarted?" active":"")+"' style='margin-left: 10px;'>"+(i["e2e-trace"].isStarted?"Running...":"Start")+"</button>");e.push("<div style='margin-top:5px'>");e.push("<label class='sapUiSupportLabel'>XML Output:</label>");e.push("<textarea id='"+o.getId()+"-outputE2ETrace' style='width:100%;height:50px;margin-top:5px;resize:none;box-sizing:border-box'></textarea>");e.push("</div>")});r.push("</table></div>");this.$().html(r.join(""));this.$("tggleDbgSrc").bind("click",function(e){e.preventDefault();t.getStub().sendEvent(o.getId()+"ToggleDebug",{})});this.$("Refresh").bind("click",function(e){e.preventDefault();t.getStub().sendEvent(o.getId()+"Refresh",{})});this.$("outputE2ETrace").bind("click",function(){this.focus();this.select()});this.$("startE2ETrace").bind("click",function(){if(!o.e2eTraceStarted){o.e2eLogLevel=o.$("logLevelE2ETrace").val();o.$("startE2ETrace").addClass("active").text("Running...");o.$("outputE2ETrace").text("");t.getStub().sendEvent(o.getId()+"StartE2ETrace",{level:o.e2eLogLevel});o.e2eTraceStarted=true}});document.title="UI5 Diagnostics - "+i.title};r.prototype.onsapUiSupportTechInfoToggleDebug=function(e){jQuery.sap.debug(!jQuery.sap.debug());a(this)};r.prototype.onsapUiSupportTechInfoSetReboot=function(e){jQuery.sap.setReboot(e.getParameter("rebootUrl"))};r.prototype.onsapUiSupportTechInfoStartE2ETrace=function(e){var o=this,i=e.getParameter("level");sap.ui.require(["sap/ui/core/support/trace/E2eTraceLib"],function(e){e.start(i,function(e){t.getStub().sendEvent(o.getId()+"FinishedE2ETrace",{trace:e})})})};r.prototype.onsapUiSupportTechInfoFinishedE2ETrace=function(e){this.$("startE2ETrace").removeClass("active").text("Start");this.$("outputE2ETrace").text(e.getParameter("trace"));this.e2eTraceStarted=false};r.prototype.onsapUiSupportTechInfoRefresh=function(e){a(this)};r.prototype.onsapUiSupportTechInfoToggleStatistics=function(e){jQuery.sap.statistics(!jQuery.sap.statistics());a(this)};r.prototype.init=function(t){e.prototype.init.apply(this,arguments);if(!this.runsAsToolPlugin()){a(this);return}this.$().html("No Information available")};function a(e){var i=o.getFrameworkInformation();var r={version:i.commonInformation.version,build:i.commonInformation.buildTime,change:i.commonInformation.lastChange,jquery:i.commonInformation.jquery,useragent:i.commonInformation.userAgent,docmode:i.commonInformation.documentMode,debug:i.commonInformation.debugMode,bootconfig:i.configurationBootstrap,config:i.configurationComputed,libraries:i.libraries,loadedLibraries:i.loadedLibraries,modules:i.loadedModules,uriparams:i.URLParameters,appurl:i.commonInformation.applicationHREF,title:i.commonInformation.documentTitle,statistics:i.commonInformation.statistics};var a=sap.ui.require("sap/ui/core/support/trace/E2eTraceLib");r["e2e-trace"]={isStarted:a?a.isStarted():false};t.getStub().sendEvent(e.getId()+"Data",{data:r})}function n(e){return e==null?"":i(String(e))}function s(e,t,o,i,r){e.push("<tr><td ",t?"align='right' ":"","valign='top'>","<label class='sapUiSupportLabel'>",n(i),"</label></td><td",o?" class='sapUiSupportTechInfoBorder'":"",">");var a=r;if(typeof r==="function"){a=r(e)}e.push(n(a));e.push("</td></tr>")}function u(e,t,o,i,r){s(e,t,o,i,function(e){e.push("<table border='0' cellspacing='0' cellpadding='3' style='width: 100%'>");jQuery.each(r,function(t,o){var i="";if(o){if(typeof o==="string"||typeof o==="string"||typeof o==="boolean"){i=o}else if((Array.isArray(o)||jQuery.isPlainObject(o))&&window.JSON){i=window.JSON.stringify(o)}}s(e,false,false,t,""+i)});e.push("</table>")})}return r});