diff --git a/public/Images/Images.js b/public/Images/Images.js index aad59c2a6..7e0bf6319 100644 --- a/public/Images/Images.js +++ b/public/Images/Images.js @@ -174,6 +174,7 @@ style.setProperty('--image-file-mediumIcons', 'url(\"' + new URL(new URL('medium style.setProperty('--image-file-memory', 'url(\"' + new URL(new URL('memory.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-minus', 'url(\"' + new URL(new URL('minus.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-minus_icon', 'url(\"' + new URL(new URL('minus_icon.svg', import.meta.url).href, import.meta.url).toString() + '\")'); +style.setProperty('--image-file-mop', 'url(\"' + new URL(new URL('mop.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-mouse', 'url(\"' + new URL(new URL('mouse.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-network-settings', 'url(\"' + new URL(new URL('network-settings.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-node_search_icon', 'url(\"' + new URL(new URL('node_search_icon.svg', import.meta.url).href, import.meta.url).toString() + '\")'); diff --git a/public/Images/Images.prebundle.js b/public/Images/Images.prebundle.js index b15071036..a5f9400a1 100644 --- a/public/Images/Images.prebundle.js +++ b/public/Images/Images.prebundle.js @@ -175,6 +175,7 @@ style.setProperty('--image-file-mediumIcons', 'url(\"' + new URL('./src/mediumIc style.setProperty('--image-file-memory', 'url(\"' + new URL('./src/memory.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-minus', 'url(\"' + new URL('./src/minus.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-minus_icon', 'url(\"' + new URL('./src/minus_icon.svg', import.meta.url).toString() + '\")'); +style.setProperty('--image-file-mop', 'url(\"' + new URL('./src/mop.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-mouse', 'url(\"' + new URL('./src/mouse.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-network-settings', 'url(\"' + new URL('./src/network-settings.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-node_search_icon', 'url(\"' + new URL('./src/node_search_icon.svg', import.meta.url).toString() + '\")'); diff --git a/public/Images/mop.svg b/public/Images/mop.svg new file mode 100644 index 000000000..ec4fd4208 --- /dev/null +++ b/public/Images/mop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/Images/src/mop.svg b/public/Images/src/mop.svg new file mode 100644 index 000000000..cc7b52219 --- /dev/null +++ b/public/Images/src/mop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/core/common/Revealer.js b/public/core/common/Revealer.js index 5700fce09..b92451fa2 100644 --- a/public/core/common/Revealer.js +++ b/public/core/common/Revealer.js @@ -34,7 +34,7 @@ const UIStrings = { /** *@description The UI destination when right clicking an item that can be revealed */ - memoryInspectorPanel: 'Memory Inspector panel', + memoryInspectorPanel: 'Memory inspector panel', }; const str_ = i18n.i18n.registerUIStrings('core/common/Revealer.ts', UIStrings); const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_); diff --git a/public/core/common/Revealer.js.map b/public/core/common/Revealer.js.map index 25c4b415f..5867f2022 100644 --- a/public/core/common/Revealer.js.map +++ b/public/core/common/Revealer.js.map @@ -1 +1 @@ -{"version":3,"file":"Revealer.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/Revealer.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAC/B;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAC/B;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAC/B;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,YAAY,EAAE,eAAe;IAC7B;;OAEG;IACH,gBAAgB,EAAE,mBAAmB;IACrC;;OAEG;IACH,YAAY,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CAAC;AAED,SAAS,gCAAgC,CAAC,UAAmB;IAC3D,OAAO,mBAAmB,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE;QACvD,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE;YACtC,OAAO,IAAI,CAAC;SACb;QACD,KAAK,MAAM,WAAW,IAAI,oBAAoB,CAAC,YAAY,EAAE,EAAE;YAC7D,IAAI,UAAU,YAAY,WAAW,EAAE;gBACrC,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC;AAQD,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,cAAc,EAAE,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;IACvD,cAAc,EAAE,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;IACvD,cAAc,EAAE,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;IACvD,WAAW,EAAE,cAAc,CAAC,SAAS,CAAC,UAAU,CAAC;IACjD,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,YAAY,CAAC;IACrD,iBAAiB,EAAE,cAAc,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC7D,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,YAAY,CAAC;IACrD,sBAAsB,EAAE,cAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC;CACvE,CAAC","sourcesContent":["// Copyright 2014 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../i18n/i18n.js';\nimport type * as Platform from '../platform/platform.js';\n\nconst UIStrings = {\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n elementsPanel: 'Elements panel',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n stylesSidebar: 'styles sidebar',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n changesDrawer: 'Changes drawer',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n issuesView: 'Issues view',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n networkPanel: 'Network panel',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n applicationPanel: 'Application panel',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n sourcesPanel: 'Sources panel',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n memoryInspectorPanel: 'Memory Inspector panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/common/Revealer.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nexport interface Revealer {\n reveal(revealable: T, omitFocus?: boolean): Promise;\n}\n\nexport let reveal = async function reveal(revealable: unknown, omitFocus?: boolean): Promise {\n const promises =\n await Promise.all(getApplicableRegisteredRevealers(revealable).map(registration => registration.loadRevealer()));\n if (!promises.length) {\n throw new Error('Can\\'t reveal ' + revealable);\n }\n return await Promise.race(promises.map(revealer => revealer.reveal(revealable, omitFocus)));\n};\n\nexport function setRevealForTest(newReveal: (revealable: unknown, omitFocus?: boolean) => Promise): void {\n reveal = newReveal;\n}\n\nexport function revealDestination(revealable: unknown): string|null {\n for (const {destination} of getApplicableRegisteredRevealers(revealable)) {\n if (destination) {\n return destination();\n }\n }\n return null;\n}\n\nconst registeredRevealers: RevealerRegistration[] = [];\n\nexport function registerRevealer(registration: RevealerRegistration): void {\n registeredRevealers.push(registration);\n}\n\nfunction getApplicableRegisteredRevealers(revealable: unknown): RevealerRegistration[] {\n return registeredRevealers.filter(revealerRegistration => {\n if (!revealerRegistration.contextTypes) {\n return true;\n }\n for (const contextType of revealerRegistration.contextTypes()) {\n if (revealable instanceof contextType) {\n return true;\n }\n }\n return false;\n });\n}\nexport interface RevealerRegistration {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n contextTypes: () => Array T>;\n loadRevealer: () => Promise>;\n destination?: RevealerDestination;\n}\n\nexport const RevealerDestination = {\n ELEMENTS_PANEL: i18nLazyString(UIStrings.elementsPanel),\n STYLES_SIDEBAR: i18nLazyString(UIStrings.stylesSidebar),\n CHANGES_DRAWER: i18nLazyString(UIStrings.changesDrawer),\n ISSUES_VIEW: i18nLazyString(UIStrings.issuesView),\n NETWORK_PANEL: i18nLazyString(UIStrings.networkPanel),\n APPLICATION_PANEL: i18nLazyString(UIStrings.applicationPanel),\n SOURCES_PANEL: i18nLazyString(UIStrings.sourcesPanel),\n MEMORY_INSPECTOR_PANEL: i18nLazyString(UIStrings.memoryInspectorPanel),\n};\n\nexport type RevealerDestination = () => Platform.UIString.LocalizedString;\n"]} \ No newline at end of file +{"version":3,"file":"Revealer.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/Revealer.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAC/B;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAC/B;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAC/B;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,YAAY,EAAE,eAAe;IAC7B;;OAEG;IACH,gBAAgB,EAAE,mBAAmB;IACrC;;OAEG;IACH,YAAY,EAAE,eAAe;IAC7B;;OAEG;IACH,oBAAoB,EAAE,wBAAwB;CAC/C,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAC/E,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAMxF,MAAM,CAAC,IAAI,MAAM,GAAG,KAAK,UAAU,MAAM,CAAC,UAAmB,EAAE,SAAmB;IAChF,MAAM,QAAQ,GACV,MAAM,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,UAAU,CAA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AC,SAAS,CAAC,aAAa,CAAC;IACvD,cAAc,EAAE,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;IACvD,cAAc,EAAE,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;IACvD,WAAW,EAAE,cAAc,CAAC,SAAS,CAAC,UAAU,CAAC;IACjD,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,YAAY,CAAC;IACrD,iBAAiB,EAAE,cAAc,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC7D,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,YAAY,CAAC;IACrD,sBAAsB,EAAE,cAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC;CACvE,CAAC","sourcesContent":["// Copyright 2014 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../i18n/i18n.js';\nimport type * as Platform from '../platform/platform.js';\n\nconst UIStrings = {\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n elementsPanel: 'Elements panel',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n stylesSidebar: 'styles sidebar',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n changesDrawer: 'Changes drawer',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n issuesView: 'Issues view',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n networkPanel: 'Network panel',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n applicationPanel: 'Application panel',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n sourcesPanel: 'Sources panel',\n /**\n *@description The UI destination when right clicking an item that can be revealed\n */\n memoryInspectorPanel: 'Memory inspector panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/common/Revealer.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nexport interface Revealer {\n reveal(revealable: T, omitFocus?: boolean): Promise;\n}\n\nexport let reveal = async function reveal(revealable: unknown, omitFocus?: boolean): Promise {\n const promises =\n await Promise.all(getApplicableRegisteredRevealers(revealable).map(registration => registration.loadRevealer()));\n if (!promises.length) {\n throw new Error('Can\\'t reveal ' + revealable);\n }\n return await Promise.race(promises.map(revealer => revealer.reveal(revealable, omitFocus)));\n};\n\nexport function setRevealForTest(newReveal: (revealable: unknown, omitFocus?: boolean) => Promise): void {\n reveal = newReveal;\n}\n\nexport function revealDestination(revealable: unknown): string|null {\n for (const {destination} of getApplicableRegisteredRevealers(revealable)) {\n if (destination) {\n return destination();\n }\n }\n return null;\n}\n\nconst registeredRevealers: RevealerRegistration[] = [];\n\nexport function registerRevealer(registration: RevealerRegistration): void {\n registeredRevealers.push(registration);\n}\n\nfunction getApplicableRegisteredRevealers(revealable: unknown): RevealerRegistration[] {\n return registeredRevealers.filter(revealerRegistration => {\n if (!revealerRegistration.contextTypes) {\n return true;\n }\n for (const contextType of revealerRegistration.contextTypes()) {\n if (revealable instanceof contextType) {\n return true;\n }\n }\n return false;\n });\n}\nexport interface RevealerRegistration {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n contextTypes: () => Array T>;\n loadRevealer: () => Promise>;\n destination?: RevealerDestination;\n}\n\nexport const RevealerDestination = {\n ELEMENTS_PANEL: i18nLazyString(UIStrings.elementsPanel),\n STYLES_SIDEBAR: i18nLazyString(UIStrings.stylesSidebar),\n CHANGES_DRAWER: i18nLazyString(UIStrings.changesDrawer),\n ISSUES_VIEW: i18nLazyString(UIStrings.issuesView),\n NETWORK_PANEL: i18nLazyString(UIStrings.networkPanel),\n APPLICATION_PANEL: i18nLazyString(UIStrings.applicationPanel),\n SOURCES_PANEL: i18nLazyString(UIStrings.sourcesPanel),\n MEMORY_INSPECTOR_PANEL: i18nLazyString(UIStrings.memoryInspectorPanel),\n};\n\nexport type RevealerDestination = () => Platform.UIString.LocalizedString;\n"]} \ No newline at end of file diff --git a/public/core/host/UserMetrics.d.ts b/public/core/host/UserMetrics.d.ts index 511eb94c7..52b67304b 100644 --- a/public/core/host/UserMetrics.d.ts +++ b/public/core/host/UserMetrics.d.ts @@ -472,7 +472,6 @@ export declare enum DevtoolsExperiments { 'protocolMonitor' = 13, 'samplingHeapProfilerTimeline' = 17, 'showOptionToExposeInternalsInHeapSnapshot' = 18, - 'timelineEventInitiators' = 24, 'timelineInvalidationTracking' = 26, 'timelineShowAllEvents' = 27, 'timelineV8RuntimeCallStats' = 28, diff --git a/public/core/host/UserMetrics.js b/public/core/host/UserMetrics.js index f5698806b..a087a3412 100644 --- a/public/core/host/UserMetrics.js +++ b/public/core/host/UserMetrics.js @@ -823,7 +823,6 @@ export var DevtoolsExperiments; DevtoolsExperiments[DevtoolsExperiments["protocolMonitor"] = 13] = "protocolMonitor"; DevtoolsExperiments[DevtoolsExperiments["samplingHeapProfilerTimeline"] = 17] = "samplingHeapProfilerTimeline"; DevtoolsExperiments[DevtoolsExperiments["showOptionToExposeInternalsInHeapSnapshot"] = 18] = "showOptionToExposeInternalsInHeapSnapshot"; - DevtoolsExperiments[DevtoolsExperiments["timelineEventInitiators"] = 24] = "timelineEventInitiators"; DevtoolsExperiments[DevtoolsExperiments["timelineInvalidationTracking"] = 26] = "timelineInvalidationTracking"; DevtoolsExperiments[DevtoolsExperiments["timelineShowAllEvents"] = 27] = "timelineShowAllEvents"; DevtoolsExperiments[DevtoolsExperiments["timelineV8RuntimeCallStats"] = 28] = "timelineV8RuntimeCallStats"; diff --git a/public/core/host/UserMetrics.js.map b/public/core/host/UserMetrics.js.map index 50f158822..5a363b1bb 100644 --- a/public/core/host/UserMetrics.js.map +++ b/public/core/host/UserMetrics.js.map @@ -1 +1 @@ -{"version":3,"file":"UserMetrics.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/UserMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAC,mBAAmB,EAAC,MAAM,+BAA+B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AARD,WAAY,sBAAsB;IAChC,iFAAe,CAAA;IACf,qFAAiB,CAAA;IACjB,qFAAiB,CAAA;IACjB,iEAAO,CAAA;IACP,iEAAO,CAAA;IACP,uEAAU,CAAA;IACV,2EAAY,CAAA;AACd,CAAC,EARW,sBAAsB,KAAtB,sBAAsB,QAQjC","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {EnumeratedHistogram} from './InspectorFrontendHostAPI.js';\n\nexport class UserMetrics {\n #panelChangedSinceLaunch: boolean;\n #firedLaunchHistogram: boolean;\n #launchPanelName: string;\n constructor() {\n this.#panelChangedSinceLaunch = false;\n this.#firedLaunchHistogram = false;\n this.#launchPanelName = '';\n }\n\n breakpointWithConditionAdded(breakpointWithConditionAdded: BreakpointWithConditionAdded): void {\n if (breakpointWithConditionAdded >= BreakpointWithConditionAdded.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointWithConditionAdded, breakpointWithConditionAdded,\n BreakpointWithConditionAdded.MaxValue);\n }\n\n breakpointEditDialogRevealedFrom(breakpointEditDialogRevealedFrom: BreakpointEditDialogRevealedFrom): void {\n if (breakpointEditDialogRevealedFrom >= BreakpointEditDialogRevealedFrom.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointEditDialogRevealedFrom, breakpointEditDialogRevealedFrom,\n BreakpointEditDialogRevealedFrom.MaxValue);\n }\n\n panelShown(panelName: string, isLaunching?: boolean): void {\n const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelShown, code, PanelCodes.MaxValue);\n InspectorFrontendHostInstance.recordUserMetricsAction('DevTools_PanelShown_' + panelName);\n // Store that the user has changed the panel so we know launch histograms should not be fired.\n if (!isLaunching) {\n this.#panelChangedSinceLaunch = true;\n }\n }\n\n /**\n * Fired when a panel is closed (regardless if it exists in the main panel or the drawer)\n */\n panelClosed(panelName: string): void {\n const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelClosed, code, PanelCodes.MaxValue);\n // Store that the user has changed the panel so we know launch histograms should not be fired.\n this.#panelChangedSinceLaunch = true;\n }\n\n elementsSidebarTabShown(sidebarPaneName: string): void {\n const code = ElementsSidebarTabCodes[sidebarPaneName as keyof typeof ElementsSidebarTabCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ElementsSidebarTabShown, code, ElementsSidebarTabCodes.MaxValue);\n }\n\n sourcesSidebarTabShown(sidebarPaneName: string): void {\n const code = SourcesSidebarTabCodes[sidebarPaneName as keyof typeof SourcesSidebarTabCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesSidebarTabShown, code, SourcesSidebarTabCodes.MaxValue);\n }\n\n settingsPanelShown(settingsViewId: string): void {\n this.panelShown('settings-' + settingsViewId);\n }\n\n sourcesPanelFileDebugged(mediaType?: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesPanelFileDebugged, code, MediaTypes.MaxValue);\n }\n\n sourcesPanelFileOpened(mediaType?: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesPanelFileOpened, code, MediaTypes.MaxValue);\n }\n\n networkPanelResponsePreviewOpened(mediaType: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelResponsePreviewOpened, code, MediaTypes.MaxValue);\n }\n\n actionTaken(action: Action): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MaxValue);\n }\n\n panelLoaded(panelName: string, histogramName: string): void {\n if (this.#firedLaunchHistogram || panelName !== this.#launchPanelName) {\n return;\n }\n\n this.#firedLaunchHistogram = true;\n // Use rAF and window.setTimeout to ensure the marker is fired after layout and rendering.\n // This will give the most accurate representation of the tool being ready for a user.\n requestAnimationFrame(() => {\n window.setTimeout(() => {\n // Mark the load time so that we can pinpoint it more easily in a trace.\n performance.mark(histogramName);\n // If the user has switched panel before we finished loading, ignore the histogram,\n // since the launch timings will have been affected and are no longer valid.\n if (this.#panelChangedSinceLaunch) {\n return;\n }\n // This fires the event for the appropriate launch histogram.\n // The duration is measured as the time elapsed since the time origin of the document.\n InspectorFrontendHostInstance.recordPerformanceHistogram(histogramName, performance.now());\n }, 0);\n });\n }\n\n setLaunchPanel(panelName: string|null): void {\n this.#launchPanelName = (panelName as string);\n }\n\n performanceTraceLoad(measure: PerformanceMeasure): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram('DevTools.TraceLoad', measure.duration);\n }\n\n keybindSetSettingChanged(keybindSet: string): void {\n const value = KeybindSetSettings[keybindSet as keyof typeof KeybindSetSettings] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.KeybindSetSettingChanged, value, KeybindSetSettings.MaxValue);\n }\n\n keyboardShortcutFired(actionId: string): void {\n const action =\n KeyboardShortcutAction[actionId as keyof typeof KeyboardShortcutAction] || KeyboardShortcutAction.OtherShortcut;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.KeyboardShortcutFired, action, KeyboardShortcutAction.MaxValue);\n }\n\n issuesPanelOpenedFrom(issueOpener: IssueOpener): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelOpenedFrom, issueOpener, IssueOpener.MaxValue);\n }\n\n issuesPanelIssueExpanded(issueExpandedCategory: string|undefined): void {\n if (issueExpandedCategory === undefined) {\n return;\n }\n\n const issueExpanded = IssueExpanded[issueExpandedCategory as keyof typeof IssueExpanded];\n\n if (issueExpanded === undefined) {\n return;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelIssueExpanded, issueExpanded, IssueExpanded.MaxValue);\n }\n\n issuesPanelResourceOpened(issueCategory: string, type: string): void {\n const key = issueCategory + type;\n const value = IssueResourceOpened[key as keyof typeof IssueResourceOpened];\n\n if (value === undefined) {\n return;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelResourceOpened, value, IssueResourceOpened.MaxValue);\n }\n\n issueCreated(code: string): void {\n const issueCreated = IssueCreated[code as keyof typeof IssueCreated];\n if (issueCreated === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssueCreated, issueCreated, IssueCreated.MaxValue);\n }\n\n experimentEnabledAtLaunch(experimentId: string): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ExperimentEnabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);\n }\n\n experimentDisabledAtLaunch(experimentId: string): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ExperimentDisabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);\n }\n\n experimentChanged(experimentId: string, isEnabled: boolean): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n const actionName = isEnabled ? EnumeratedHistogram.ExperimentEnabled : EnumeratedHistogram.ExperimentDisabled;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(actionName, experiment, DevtoolsExperiments.MaxValue);\n }\n\n developerResourceLoaded(developerResourceLoaded: DeveloperResourceLoaded): void {\n if (developerResourceLoaded >= DeveloperResourceLoaded.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceLoaded, developerResourceLoaded, DeveloperResourceLoaded.MaxValue);\n }\n\n developerResourceScheme(developerResourceScheme: DeveloperResourceScheme): void {\n if (developerResourceScheme >= DeveloperResourceScheme.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceScheme, developerResourceScheme, DeveloperResourceScheme.MaxValue);\n }\n\n inlineScriptParsed(inlineScriptType: VMInlineScriptType): void {\n if (inlineScriptType >= VMInlineScriptType.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.InlineScriptParsed, inlineScriptType, VMInlineScriptType.MaxValue);\n }\n\n vmInlineScriptContentShown(inlineScriptType: VMInlineScriptType): void {\n if (inlineScriptType >= VMInlineScriptType.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.VMInlineScriptTypeShown, inlineScriptType, VMInlineScriptType.MaxValue);\n }\n\n linearMemoryInspectorRevealedFrom(linearMemoryInspectorRevealedFrom: LinearMemoryInspectorRevealedFrom): void {\n if (linearMemoryInspectorRevealedFrom >= LinearMemoryInspectorRevealedFrom.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LinearMemoryInspectorRevealedFrom, linearMemoryInspectorRevealedFrom,\n LinearMemoryInspectorRevealedFrom.MaxValue);\n }\n\n linearMemoryInspectorTarget(linearMemoryInspectorTarget: LinearMemoryInspectorTarget): void {\n if (linearMemoryInspectorTarget >= LinearMemoryInspectorTarget.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LinearMemoryInspectorTarget, linearMemoryInspectorTarget,\n LinearMemoryInspectorTarget.MaxValue);\n }\n\n language(language: Intl.UnicodeBCP47LocaleIdentifier): void {\n const languageCode = Language[language as keyof typeof Language];\n if (languageCode === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.Language, languageCode, Language.MaxValue);\n }\n\n syncSetting(devtoolsSyncSettingEnabled: boolean): void {\n InspectorFrontendHostInstance.getSyncInformation(syncInfo => {\n let settingValue = SyncSetting.ChromeSyncDisabled;\n if (syncInfo.isSyncActive && !syncInfo.arePreferencesSynced) {\n settingValue = SyncSetting.ChromeSyncSettingsDisabled;\n } else if (syncInfo.isSyncActive && syncInfo.arePreferencesSynced) {\n settingValue = devtoolsSyncSettingEnabled ? SyncSetting.DevToolsSyncSettingEnabled :\n SyncSetting.DevToolsSyncSettingDisabled;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SyncSetting, settingValue, SyncSetting.MaxValue);\n });\n }\n\n recordingAssertion(value: RecordingAssertion): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingAssertion, value, RecordingAssertion.MaxValue);\n }\n\n recordingToggled(value: RecordingToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingToggled, value, RecordingToggled.MaxValue);\n }\n\n recordingReplayFinished(value: RecordingReplayFinished): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayFinished, value, RecordingReplayFinished.MaxValue);\n }\n\n recordingReplaySpeed(value: RecordingReplaySpeed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplaySpeed, value, RecordingReplaySpeed.MaxValue);\n }\n\n recordingReplayStarted(value: RecordingReplayStarted): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayStarted, value, RecordingReplayStarted.MaxValue);\n }\n\n recordingEdited(value: RecordingEdited): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingEdited, value, RecordingEdited.MaxValue);\n }\n\n recordingExported(value: RecordingExported): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingExported, value, RecordingExported.MaxValue);\n }\n\n recordingCodeToggled(value: RecordingCodeToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCodeToggled, value, RecordingCodeToggled.MaxValue);\n }\n\n recordingCopiedToClipboard(value: RecordingCopiedToClipboard): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCopiedToClipboard, value, RecordingCopiedToClipboard.MaxValue);\n }\n\n styleTextCopied(value: StyleTextCopied): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.StyleTextCopied, value, StyleTextCopied.MaxValue);\n }\n\n manifestSectionSelected(sectionTitle: string): void {\n const code =\n ManifestSectionCodes[sectionTitle as keyof typeof ManifestSectionCodes] || ManifestSectionCodes.OtherSection;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ManifestSectionSelected, code, ManifestSectionCodes.MaxValue);\n }\n\n cssHintShown(type: CSSHintType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSHintShown, type, CSSHintType.MaxValue);\n }\n\n lighthouseModeRun(type: LighthouseModeRun): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseModeRun, type, LighthouseModeRun.MaxValue);\n }\n\n lighthouseCategoryUsed(type: LighthouseCategoryUsed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseCategoryUsed, type, LighthouseCategoryUsed.MaxValue);\n }\n\n colorConvertedFrom(type: ColorConvertedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorConvertedFrom, type, ColorConvertedFrom.MaxValue);\n }\n\n colorPickerOpenedFrom(type: ColorPickerOpenedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorPickerOpenedFrom, type, ColorPickerOpenedFrom.MaxValue);\n }\n\n cssPropertyDocumentation(type: CSSPropertyDocumentation): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSPropertyDocumentation, type, CSSPropertyDocumentation.MaxValue);\n }\n\n swatchActivated(swatch: SwatchType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SwatchActivated, swatch, SwatchType.MaxValue);\n }\n\n badgeActivated(badge: BadgeType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BadgeActivated, badge, BadgeType.MaxValue);\n }\n\n breakpointsRestoredFromStorage(count: number): void {\n const countBucket = this.#breakpointCountToBucket(count);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointsRestoredFromStorageCount, countBucket,\n BreakpointsRestoredFromStorageCount.MaxValue);\n }\n\n animationPlaybackRateChanged(playbackRate: AnimationsPlaybackRate): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPlaybackRateChanged, playbackRate, AnimationsPlaybackRate.MaxValue);\n }\n\n animationPointDragged(dragType: AnimationPointDragType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPointDragged, dragType, AnimationPointDragType.MaxValue);\n }\n\n #breakpointCountToBucket(count: number): BreakpointsRestoredFromStorageCount {\n if (count < 100) {\n return BreakpointsRestoredFromStorageCount.LessThan100;\n }\n if (count < 300) {\n return BreakpointsRestoredFromStorageCount.LessThan300;\n }\n if (count < 1000) {\n return BreakpointsRestoredFromStorageCount.LessThan1000;\n }\n if (count < 3000) {\n return BreakpointsRestoredFromStorageCount.LessThan3000;\n }\n if (count < 10000) {\n return BreakpointsRestoredFromStorageCount.LessThan10000;\n }\n if (count < 30000) {\n return BreakpointsRestoredFromStorageCount.LessThan30000;\n }\n if (count < 100000) {\n return BreakpointsRestoredFromStorageCount.LessThan100000;\n }\n if (count < 300000) {\n return BreakpointsRestoredFromStorageCount.LessThan300000;\n }\n if (count < 1000000) {\n return BreakpointsRestoredFromStorageCount.LessThan1000000;\n }\n return BreakpointsRestoredFromStorageCount.Above1000000;\n }\n\n workspacesPopulated(wallClockTimeInMilliseconds: number): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram(\n 'DevTools.Workspaces.PopulateWallClocktime', wallClockTimeInMilliseconds);\n }\n\n visualLoggingProcessingDone(timeInMilliseconds: number): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram(\n 'DevTools.VisualLogging.ProcessingTime', timeInMilliseconds);\n }\n\n legacyResourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MaxValue - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MaxValue);\n }\n\n legacyResourceTypeFilterItemSelected(resourceTypeName: string): void {\n const resourceType = ResourceType[resourceTypeName as keyof typeof ResourceType];\n if (resourceType === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterItemSelected, resourceType, ResourceType.MaxValue);\n }\n\n resourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MaxValue - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MaxValue);\n }\n\n resourceTypeFilterItemSelected(resourceTypeName: string): void {\n const resourceType = ResourceType[resourceTypeName as keyof typeof ResourceType];\n if (resourceType === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterItemSelected, resourceType, ResourceType.MaxValue);\n }\n\n networkPanelMoreFiltersNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, NetworkPanelMoreFilters.MaxValue), 0);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersNumberOfSelectedChanged, boundItemCount,\n NetworkPanelMoreFilters.MaxValue);\n }\n\n networkPanelMoreFiltersItemSelected(filterName: string): void {\n const filter = NetworkPanelMoreFilters[filterName as keyof typeof NetworkPanelMoreFilters];\n if (filter === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersItemSelected, filter, NetworkPanelMoreFilters.MaxValue);\n }\n}\n\n/**\n * The numeric enum values are not necessarily continuous! It is possible that\n * values have been removed, which results in gaps in the sequence of values.\n * When adding a new value:\n * 1. Add an entry to the bottom of the enum before 'MaxValue'.\n * 2. Set the value of the new entry to the current value of 'MaxValue'.\n * 2. Increment the value of 'MaxValue' by 1.\n * When removing a value which is no longer needed:\n * 1. Delete the line with the unneeded value\n * 2. Do not update any 'MaxValue' or any other value.\n */\n\n// Codes below are used to collect UMA histograms in the Chromium port.\n// Do not change the values below, additional actions are needed on the Chromium side\n// in order to add more codes.\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Action {\n WindowDocked = 1,\n WindowUndocked = 2,\n ScriptsBreakpointSet = 3,\n TimelineStarted = 4,\n ProfilesCPUProfileTaken = 5,\n ProfilesHeapProfileTaken = 6,\n ConsoleEvaluated = 8,\n FileSavedInWorkspace = 9,\n DeviceModeEnabled = 10,\n AnimationsPlaybackRateChanged = 11,\n RevisionApplied = 12,\n FileSystemDirectoryContentReceived = 13,\n StyleRuleEdited = 14,\n CommandEvaluatedInConsolePanel = 15,\n DOMPropertiesExpanded = 16,\n ResizedViewInResponsiveMode = 17,\n TimelinePageReloadStarted = 18,\n ConnectToNodeJSFromFrontend = 19,\n ConnectToNodeJSDirectly = 20,\n CpuThrottlingEnabled = 21,\n CpuProfileNodeFocused = 22,\n CpuProfileNodeExcluded = 23,\n SelectFileFromFilePicker = 24,\n SelectCommandFromCommandMenu = 25,\n ChangeInspectedNodeInElementsPanel = 26,\n StyleRuleCopied = 27,\n CoverageStarted = 28,\n LighthouseStarted = 29,\n LighthouseFinished = 30,\n ShowedThirdPartyBadges = 31,\n LighthouseViewTrace = 32,\n FilmStripStartedRecording = 33,\n CoverageReportFiltered = 34,\n CoverageStartedPerBlock = 35,\n 'SettingsOpenedFromGear-deprecated' = 36,\n 'SettingsOpenedFromMenu-deprecated' = 37,\n 'SettingsOpenedFromCommandMenu-deprecated' = 38,\n TabMovedToDrawer = 39,\n TabMovedToMainPanel = 40,\n CaptureCssOverviewClicked = 41,\n VirtualAuthenticatorEnvironmentEnabled = 42,\n SourceOrderViewActivated = 43,\n UserShortcutAdded = 44,\n ShortcutRemoved = 45,\n ShortcutModified = 46,\n CustomPropertyLinkClicked = 47,\n CustomPropertyEdited = 48,\n ServiceWorkerNetworkRequestClicked = 49,\n ServiceWorkerNetworkRequestClosedQuickly = 50,\n NetworkPanelServiceWorkerRespondWith = 51,\n NetworkPanelCopyValue = 52,\n ConsoleSidebarOpened = 53,\n PerfPanelTraceImported = 54,\n PerfPanelTraceExported = 55,\n StackFrameRestarted = 56,\n CaptureTestProtocolClicked = 57,\n BreakpointRemovedFromRemoveButton = 58,\n BreakpointGroupExpandedStateChanged = 59,\n HeaderOverrideFileCreated = 60,\n HeaderOverrideEnableEditingClicked = 61,\n HeaderOverrideHeaderAdded = 62,\n HeaderOverrideHeaderEdited = 63,\n HeaderOverrideHeaderRemoved = 64,\n HeaderOverrideHeadersFileEdited = 65,\n PersistenceNetworkOverridesEnabled = 66,\n PersistenceNetworkOverridesDisabled = 67,\n BreakpointRemovedFromContextMenu = 68,\n BreakpointsInFileRemovedFromRemoveButton = 69,\n BreakpointsInFileRemovedFromContextMenu = 70,\n BreakpointsInFileCheckboxToggled = 71,\n BreakpointsInFileEnabledDisabledFromContextMenu = 72,\n BreakpointConditionEditedFromSidebar = 73,\n WorkspaceTabAddFolder = 74,\n WorkspaceTabRemoveFolder = 75,\n OverrideTabAddFolder = 76,\n OverrideTabRemoveFolder = 77,\n WorkspaceSourceSelected = 78,\n OverridesSourceSelected = 79,\n StyleSheetInitiatorLinkClicked = 80,\n BreakpointRemovedFromGutterContextMenu = 81,\n BreakpointRemovedFromGutterToggle = 82,\n StylePropertyInsideKeyframeEdited = 83,\n OverrideContentFromSourcesContextMenu = 84,\n OverrideContentFromNetworkContextMenu = 85,\n OverrideScript = 86,\n OverrideStyleSheet = 87,\n OverrideDocument = 88,\n OverrideFetchXHR = 89,\n OverrideImage = 90,\n OverrideFont = 91,\n OverrideContentContextMenuSetup = 92,\n OverrideContentContextMenuAbandonSetup = 93,\n OverrideContentContextMenuActivateDisabled = 94,\n OverrideContentContextMenuOpenExistingFile = 95,\n OverrideContentContextMenuSaveNewFile = 96,\n ShowAllOverridesFromSourcesContextMenu = 97,\n ShowAllOverridesFromNetworkContextMenu = 98,\n AnimationGroupsCleared = 99,\n AnimationsPaused = 100,\n AnimationsResumed = 101,\n AnimatedNodeDescriptionClicked = 102,\n AnimationGroupScrubbed = 103,\n AnimationGroupReplayed = 104,\n OverrideTabDeleteFolderContextMenu = 105,\n WorkspaceDropFolder = 107,\n WorkspaceSelectFolder = 108,\n OverrideContentContextMenuSourceMappedWarning = 109,\n OverrideContentContextMenuRedirectToDeployed = 110,\n NewStyleRuleAdded = 111,\n TraceExpanded = 112,\n InsightConsoleMessageShown = 113,\n InsightRequestedViaContextMenu = 114,\n InsightRequestedViaHoverButton = 115,\n InsightRefined = 116,\n InsightRatedPositive = 117,\n InsightRatedNegative = 118,\n InsightClosed = 119,\n InsightErrored = 120,\n InsightHoverButtonShown = 121,\n MaxValue = 122,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum PanelCodes {\n elements = 1,\n resources = 2,\n network = 3,\n sources = 4,\n timeline = 5,\n heap_profiler = 6,\n console = 8,\n layers = 9,\n 'console-view' = 10,\n 'animations' = 11,\n 'network.config' = 12,\n 'rendering' = 13,\n 'sensors' = 14,\n 'sources.search' = 15,\n security = 16,\n js_profiler = 17,\n lighthouse = 18,\n 'coverage' = 19,\n 'protocol-monitor' = 20,\n 'remote-devices' = 21,\n 'web-audio' = 22,\n 'changes.changes' = 23,\n 'performance.monitor' = 24,\n 'release-note' = 25,\n 'live_heap_profile' = 26,\n 'sources.quick' = 27,\n 'network.blocked-urls' = 28,\n 'settings-preferences' = 29,\n 'settings-workspace' = 30,\n 'settings-experiments' = 31,\n 'settings-blackbox' = 32,\n 'settings-devices' = 33,\n 'settings-throttling-conditions' = 34,\n 'settings-emulation-locations' = 35,\n 'settings-shortcuts' = 36,\n 'issues-pane' = 37,\n 'settings-keybinds' = 38,\n 'cssoverview' = 39,\n 'chrome_recorder' = 40,\n 'trust_tokens' = 41,\n 'reporting_api' = 42,\n 'interest_groups' = 43,\n 'back_forward_cache' = 44,\n 'service_worker_cache' = 45,\n 'background_service_backgroundFetch' = 46,\n 'background_service_backgroundSync' = 47,\n 'background_service_pushMessaging' = 48,\n 'background_service_notifications' = 49,\n 'background_service_paymentHandler' = 50,\n 'background_service_periodicBackgroundSync' = 51,\n 'service_workers' = 52,\n 'app_manifest' = 53,\n 'storage' = 54,\n 'cookies' = 55,\n 'frame_details' = 56,\n 'frame_resource' = 57,\n 'frame_window' = 58,\n 'frame_worker' = 59,\n 'dom_storage' = 60,\n 'indexed_db' = 61,\n 'web_sql' = 62,\n 'performance_insights' = 63,\n 'preloading' = 64,\n 'bounce_tracking_mitigations' = 65,\n 'developer-resources' = 66,\n 'autofill-view' = 67,\n MaxValue = 68,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ElementsSidebarTabCodes {\n 'OtherSidebarPane' = 0,\n 'Styles' = 1,\n 'Computed' = 2,\n 'elements.layout' = 3,\n 'elements.eventListeners' = 4,\n 'elements.domBreakpoints' = 5,\n 'elements.domProperties' = 6,\n 'accessibility.view' = 7,\n MaxValue = 8,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum SourcesSidebarTabCodes {\n 'OtherSidebarPane' = 0,\n 'navigator-network' = 1,\n 'navigator-files' = 2,\n 'navigator-overrides' = 3,\n 'navigator-contentScripts' = 4,\n 'navigator-snippets' = 5,\n MaxValue = 6,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum MediaTypes {\n Unknown = 0,\n 'text/css' = 2,\n 'text/html' = 3,\n 'application/xml' = 4,\n 'application/wasm' = 5,\n 'application/manifest+json' = 6,\n 'application/x-aspx' = 7,\n 'application/jsp' = 8,\n 'text/x-c++src' = 9,\n 'text/x-coffeescript' = 10,\n 'application/vnd.dart' = 11,\n 'text/typescript' = 12,\n 'text/typescript-jsx' = 13,\n 'application/json' = 14,\n 'text/x-csharp' = 15,\n 'text/x-java' = 16,\n 'text/x-less' = 17,\n 'application/x-httpd-php' = 18,\n 'text/x-python' = 19,\n 'text/x-sh' = 20,\n 'text/x-gss' = 21,\n 'text/x-sass' = 22,\n 'text/x-scss' = 23,\n 'text/markdown' = 24,\n 'text/x-clojure' = 25,\n 'text/jsx' = 26,\n 'text/x-go' = 27,\n 'text/x-kotlin' = 28,\n 'text/x-scala' = 29,\n 'text/x.svelte' = 30,\n 'text/javascript+plain' = 31,\n 'text/javascript+minified' = 32,\n 'text/javascript+sourcemapped' = 33,\n 'text/x.angular' = 34,\n 'text/x.vue' = 35,\n MaxValue = 36,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum KeybindSetSettings {\n 'devToolsDefault' = 0,\n 'vsCode' = 1,\n MaxValue = 2,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum KeyboardShortcutAction {\n OtherShortcut = 0,\n 'commandMenu.show' = 1,\n 'console.clear' = 2,\n 'console.toggle' = 3,\n 'debugger.step' = 4,\n 'debugger.step-into' = 5,\n 'debugger.step-out' = 6,\n 'debugger.step-over' = 7,\n 'debugger.toggle-breakpoint' = 8,\n 'debugger.toggle-breakpoint-enabled' = 9,\n 'debugger.toggle-pause' = 10,\n 'elements.edit-as-html' = 11,\n 'elements.hide-element' = 12,\n 'elements.redo' = 13,\n 'elements.toggle-element-search' = 14,\n 'elements.undo' = 15,\n 'main.search-in-panel.find' = 16,\n 'main.toggle-drawer' = 17,\n 'network.hide-request-details' = 18,\n 'network.search' = 19,\n 'network.toggle-recording' = 20,\n 'quickOpen.show' = 21,\n 'settings.show' = 22,\n 'sources.search' = 23,\n 'background-service.toggle-recording' = 24,\n 'components.collect-garbage' = 25,\n 'console.clear.history' = 26,\n 'console.create-pin' = 27,\n 'coverage.start-with-reload' = 28,\n 'coverage.toggle-recording' = 29,\n 'debugger.breakpoint-input-window' = 30,\n 'debugger.evaluate-selection' = 31,\n 'debugger.next-call-frame' = 32,\n 'debugger.previous-call-frame' = 33,\n 'debugger.run-snippet' = 34,\n 'debugger.toggle-breakpoints-active' = 35,\n 'elements.capture-area-screenshot' = 36,\n 'emulation.capture-full-height-screenshot' = 37,\n 'emulation.capture-node-screenshot' = 38,\n 'emulation.capture-screenshot' = 39,\n 'emulation.show-sensors' = 40,\n 'emulation.toggle-device-mode' = 41,\n 'help.release-notes' = 42,\n 'help.report-issue' = 43,\n 'input.start-replaying' = 44,\n 'input.toggle-pause' = 45,\n 'input.toggle-recording' = 46,\n 'inspector_main.focus-debuggee' = 47,\n 'inspector_main.hard-reload' = 48,\n 'inspector_main.reload' = 49,\n 'live-heap-profile.start-with-reload' = 50,\n 'live-heap-profile.toggle-recording' = 51,\n 'main.debug-reload' = 52,\n 'main.next-tab' = 53,\n 'main.previous-tab' = 54,\n 'main.search-in-panel.cancel' = 55,\n 'main.search-in-panel.find-next' = 56,\n 'main.search-in-panel.find-previous' = 57,\n 'main.toggle-dock' = 58,\n 'main.zoom-in' = 59,\n 'main.zoom-out' = 60,\n 'main.zoom-reset' = 61,\n 'network-conditions.network-low-end-mobile' = 62,\n 'network-conditions.network-mid-tier-mobile' = 63,\n 'network-conditions.network-offline' = 64,\n 'network-conditions.network-online' = 65,\n 'profiler.heap-toggle-recording' = 66,\n 'profiler.js-toggle-recording' = 67,\n 'resources.clear' = 68,\n 'settings.documentation' = 69,\n 'settings.shortcuts' = 70,\n 'sources.add-folder-to-workspace' = 71,\n 'sources.add-to-watch' = 72,\n 'sources.close-all' = 73,\n 'sources.close-editor-tab' = 74,\n 'sources.create-snippet' = 75,\n 'sources.go-to-line' = 76,\n 'sources.go-to-member' = 77,\n 'sources.jump-to-next-location' = 78,\n 'sources.jump-to-previous-location' = 79,\n 'sources.rename' = 80,\n 'sources.save' = 81,\n 'sources.save-all' = 82,\n 'sources.switch-file' = 83,\n 'timeline.jump-to-next-frame' = 84,\n 'timeline.jump-to-previous-frame' = 85,\n 'timeline.load-from-file' = 86,\n 'timeline.next-recording' = 87,\n 'timeline.previous-recording' = 88,\n 'timeline.record-reload' = 89,\n 'timeline.save-to-file' = 90,\n 'timeline.show-history' = 91,\n 'timeline.toggle-recording' = 92,\n 'sources.increment-css' = 93,\n 'sources.increment-css-by-ten' = 94,\n 'sources.decrement-css' = 95,\n 'sources.decrement-css-by-ten' = 96,\n 'layers.reset-view' = 97,\n 'layers.pan-mode' = 98,\n 'layers.rotate-mode' = 99,\n 'layers.zoom-in' = 100,\n 'layers.zoom-out' = 101,\n 'layers.up' = 102,\n 'layers.down' = 103,\n 'layers.left' = 104,\n 'layers.right' = 105,\n 'help.report-translation-issue' = 106,\n 'rendering.toggle-prefers-color-scheme' = 107,\n 'chrome_recorder.start-recording' = 108,\n 'chrome_recorder.replay-recording' = 109,\n 'chrome_recorder.toggle-code-view' = 110,\n 'chrome_recorder.copy-recording-or-step' = 111,\n 'changes.revert' = 112,\n 'changes.copy' = 113,\n 'elements.new-style-rule' = 114,\n 'elements.refresh-event-listeners' = 115,\n 'coverage.clear' = 116,\n 'coverage.export' = 117,\n MaxValue = 118,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum IssueOpener {\n ConsoleInfoBar = 0,\n LearnMoreLinkCOEP = 1,\n StatusBarIssuesCounter = 2,\n HamburgerMenu = 3,\n Adorner = 4,\n CommandMenu = 5,\n MaxValue = 6,\n}\n\n/**\n * This list should contain the currently active Devtools Experiments,\n * gaps are expected.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum DevtoolsExperiments {\n 'applyCustomStylesheet' = 0,\n 'captureNodeCreationStacks' = 1,\n 'liveHeapProfile' = 11,\n 'protocolMonitor' = 13,\n 'samplingHeapProfilerTimeline' = 17,\n 'showOptionToExposeInternalsInHeapSnapshot' = 18,\n 'timelineEventInitiators' = 24,\n 'timelineInvalidationTracking' = 26,\n 'timelineShowAllEvents' = 27,\n 'timelineV8RuntimeCallStats' = 28,\n 'APCA' = 39,\n 'fontEditor' = 41,\n 'fullAccessibilityTree' = 42,\n 'ignoreListJSFramesOnTimeline' = 43,\n 'contrastIssues' = 44,\n 'experimentalCookieFeatures' = 45,\n 'stylesPaneCSSChanges' = 55,\n 'evaluateExpressionsWithSourceMaps' = 58,\n 'instrumentationBreakpoints' = 61,\n 'authoredDeployedGrouping' = 63,\n 'importantDOMProperties' = 64,\n 'justMyCode' = 65,\n 'timelineAsConsoleProfileResultPanel' = 67,\n 'preloadingStatusPanel' = 68,\n 'outermostTargetSelector' = 71,\n 'jsProfilerTemporarilyEnable' = 72,\n 'highlightErrorsElementsPanel' = 73,\n 'setAllBreakpointsEagerly' = 74,\n 'selfXssWarning' = 75,\n 'useSourceMapScopes' = 76,\n 'storageBucketsTree' = 77,\n 'networkPanelFilterBarRedesign' = 79,\n 'breadcrumbsPerformancePanel' = 80,\n 'trackContextMenu' = 81,\n 'autofillView' = 82,\n 'sourcesFrameIndentationMarkersTemporarilyDisable' = 83,\n\n // Increment this when new experiments are added.\n 'MaxValue' = 84,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum BreakpointWithConditionAdded {\n Logpoint = 0,\n ConditionalBreakpoint = 1,\n MaxValue = 2,\n}\n\nexport const enum BreakpointEditDialogRevealedFrom {\n BreakpointSidebarContextMenu = 0,\n BreakpointSidebarEditButton = 1,\n BreakpointMarkerContextMenu = 2,\n LineGutterContextMenu = 3,\n KeyboardShortcut = 4,\n Linkifier = 5,\n MouseClick = 6,\n MaxValue = 7,\n}\n\nexport const enum ColorConvertedFrom {\n ColorSwatch = 0,\n ColorPicker = 1,\n MaxValue = 2,\n}\n\nexport const enum ColorPickerOpenedFrom {\n SourcesPanel = 0,\n StylesPane = 1,\n MaxValue = 2,\n}\n\nexport const enum CSSPropertyDocumentation {\n Shown = 0,\n ToggledOn = 1,\n ToggledOff = 2,\n MaxValue = 3,\n}\n\nexport const enum BreakpointsRestoredFromStorageCount {\n LessThan100 = 0,\n LessThan300 = 1,\n LessThan1000 = 2,\n LessThan3000 = 3,\n LessThan10000 = 4,\n LessThan30000 = 5,\n LessThan100000 = 6,\n LessThan300000 = 7,\n LessThan1000000 = 8,\n Above1000000 = 9,\n MaxValue = 10,\n}\n\n// Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added.\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum IssueExpanded {\n CrossOriginEmbedderPolicy = 0,\n MixedContent = 1,\n SameSiteCookie = 2,\n HeavyAd = 3,\n ContentSecurityPolicy = 4,\n Other = 5,\n Generic = 6,\n ThirdPartyPhaseoutCookie = 7,\n GenericCookie = 8,\n MaxValue = 9,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum IssueResourceOpened {\n CrossOriginEmbedderPolicyRequest = 0,\n CrossOriginEmbedderPolicyElement = 1,\n MixedContentRequest = 2,\n SameSiteCookieCookie = 3,\n SameSiteCookieRequest = 4,\n HeavyAdElement = 5,\n ContentSecurityPolicyDirective = 6,\n ContentSecurityPolicyElement = 7,\n CrossOriginEmbedderPolicyLearnMore = 8,\n MixedContentLearnMore = 9,\n SameSiteCookieLearnMore = 10,\n HeavyAdLearnMore = 11,\n ContentSecurityPolicyLearnMore = 12,\n MaxValue = 13,\n}\n\n/**\n * This list should contain the currently active issue types,\n * gaps are expected.\n */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum IssueCreated {\n MixedContentIssue = 0,\n 'ContentSecurityPolicyIssue::kInlineViolation' = 1,\n 'ContentSecurityPolicyIssue::kEvalViolation' = 2,\n 'ContentSecurityPolicyIssue::kURLViolation' = 3,\n 'ContentSecurityPolicyIssue::kTrustedTypesSinkViolation' = 4,\n 'ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation' = 5,\n 'HeavyAdIssue::NetworkTotalLimit' = 6,\n 'HeavyAdIssue::CpuTotalLimit' = 7,\n 'HeavyAdIssue::CpuPeakLimit' = 8,\n 'CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader' = 9,\n 'CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage' = 10,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin' = 11,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep' = 12,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameSite' = 13,\n 'CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie' = 14,\n 'CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie' = 15,\n 'CookieIssue::WarnSameSiteNoneInsecure::ReadCookie' = 16,\n 'CookieIssue::WarnSameSiteNoneInsecure::SetCookie' = 17,\n 'CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure' = 18,\n 'CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure' = 19,\n 'CookieIssue::WarnCrossDowngrade::ReadCookie::Secure' = 20,\n 'CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure' = 21,\n 'CookieIssue::WarnCrossDowngrade::SetCookie::Secure' = 22,\n 'CookieIssue::WarnCrossDowngrade::SetCookie::Insecure' = 23,\n 'CookieIssue::ExcludeNavigationContextDowngrade::Secure' = 24,\n 'CookieIssue::ExcludeNavigationContextDowngrade::Insecure' = 25,\n 'CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure' = 26,\n 'CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure' = 27,\n 'CookieIssue::ExcludeContextDowngrade::SetCookie::Secure' = 28,\n 'CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure' = 29,\n 'CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie' = 30,\n 'CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie' = 31,\n 'CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie' = 32,\n 'CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie' = 33,\n 'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie' = 34,\n 'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie' = 35,\n 'SharedArrayBufferIssue::TransferIssue' = 36,\n 'SharedArrayBufferIssue::CreationIssue' = 37,\n LowTextContrastIssue = 41,\n 'CorsIssue::InsecurePrivateNetwork' = 42,\n 'CorsIssue::InvalidHeaders' = 44,\n 'CorsIssue::WildcardOriginWithCredentials' = 45,\n 'CorsIssue::PreflightResponseInvalid' = 46,\n 'CorsIssue::OriginMismatch' = 47,\n 'CorsIssue::AllowCredentialsRequired' = 48,\n 'CorsIssue::MethodDisallowedByPreflightResponse' = 49,\n 'CorsIssue::HeaderDisallowedByPreflightResponse' = 50,\n 'CorsIssue::RedirectContainsCredentials' = 51,\n 'CorsIssue::DisallowedByMode' = 52,\n 'CorsIssue::CorsDisabledScheme' = 53,\n 'CorsIssue::PreflightMissingAllowExternal' = 54,\n 'CorsIssue::PreflightInvalidAllowExternal' = 55,\n 'CorsIssue::NoCorsRedirectModeNotFollow' = 57,\n 'QuirksModeIssue::QuirksMode' = 58,\n 'QuirksModeIssue::LimitedQuirksMode' = 59,\n DeprecationIssue = 60,\n 'ClientHintIssue::MetaTagAllowListInvalidOrigin' = 61,\n 'ClientHintIssue::MetaTagModifiedHTML' = 62,\n 'CorsIssue::PreflightAllowPrivateNetworkError' = 63,\n 'GenericIssue::CrossOriginPortalPostMessageError' = 64,\n 'GenericIssue::FormLabelForNameError' = 65,\n 'GenericIssue::FormDuplicateIdForInputError' = 66,\n 'GenericIssue::FormInputWithNoLabelError' = 67,\n 'GenericIssue::FormAutocompleteAttributeEmptyError' = 68,\n 'GenericIssue::FormEmptyIdAndNameAttributesForInputError' = 69,\n 'GenericIssue::FormAriaLabelledByToNonExistingId' = 70,\n 'GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError' = 71,\n 'GenericIssue::FormLabelHasNeitherForNorNestedInput' = 72,\n 'GenericIssue::FormLabelForMatchesNonExistingIdError' = 73,\n 'GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError' = 74,\n 'GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError' = 75,\n 'StylesheetLoadingIssue::LateImportRule' = 76,\n 'StylesheetLoadingIssue::RequestFailed' = 77,\n 'CorsIssue::PreflightMissingPrivateNetworkAccessId' = 78,\n 'CorsIssue::PreflightMissingPrivateNetworkAccessName' = 79,\n 'CorsIssue::PrivateNetworkAccessPermissionUnavailable' = 80,\n 'CorsIssue::PrivateNetworkAccessPermissionDenied' = 81,\n 'CookieIssue::WarnThirdPartyPhaseout::ReadCookie' = 82,\n 'CookieIssue::WarnThirdPartyPhaseout::SetCookie' = 83,\n 'CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie' = 84,\n 'CookieIssue::ExcludeThirdPartyPhaseout::SetCookie' = 85,\n MaxValue = 86,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum DeveloperResourceLoaded {\n LoadThroughPageViaTarget = 0,\n LoadThroughPageViaFrame = 1,\n LoadThroughPageFailure = 2,\n LoadThroughPageFallback = 3,\n FallbackAfterFailure = 4,\n FallbackPerOverride = 5,\n FallbackPerProtocol = 6,\n FallbackFailure = 7,\n MaxValue = 8,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum DeveloperResourceScheme {\n SchemeOther = 0,\n SchemeUnknown = 1,\n SchemeHttp = 2,\n SchemeHttps = 3,\n SchemeHttpLocalhost = 4,\n SchemeHttpsLocalhost = 5,\n SchemeData = 6,\n SchemeFile = 7,\n SchemeBlob = 8,\n MaxValue = 9,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ResourceType {\n /* eslint-disable @typescript-eslint/naming-convention */\n all = 0,\n /* eslint-enable @typescript-eslint/naming-convention */\n Documents = 1,\n Scripts = 2,\n 'XHR and Fetch' = 3,\n Stylesheets = 4,\n Fonts = 5,\n Images = 6,\n Media = 7,\n Manifest = 8,\n WebSockets = 9,\n WebAssembly = 10,\n Other = 11,\n MaxValue = 12,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n/* eslint-disable @typescript-eslint/naming-convention */\n// eslint-disable-next-line rulesdir/const_enum\nexport enum NetworkPanelMoreFilters {\n 'Hide data URLs' = 0,\n 'Hide extension URLs' = 1,\n 'Blocked response cookies' = 2,\n 'Blocked requests' = 3,\n '3rd-party requests' = 4,\n MaxValue = 5,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum LinearMemoryInspectorRevealedFrom {\n ContextMenu = 0,\n MemoryIcon = 1,\n MaxValue = 2,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum LinearMemoryInspectorTarget {\n DWARFInspectableAddress = 0,\n ArrayBuffer = 1,\n DataView = 2,\n TypedArray = 3,\n WebAssemblyMemory = 4,\n MaxValue = 5,\n}\n\nexport const enum VMInlineScriptType {\n MODULE_SCRIPT = 0,\n CLASSIC_SCRIPT = 1,\n MaxValue = 2,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717) = Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Language {\n 'af' = 1,\n 'am' = 2,\n 'ar' = 3,\n 'as' = 4,\n 'az' = 5,\n 'be' = 6,\n 'bg' = 7,\n 'bn' = 8,\n 'bs' = 9,\n 'ca' = 10,\n 'cs' = 11,\n 'cy' = 12,\n 'da' = 13,\n 'de' = 14,\n 'el' = 15,\n 'en-GB' = 16,\n 'en-US' = 17,\n 'es-419' = 18,\n 'es' = 19,\n 'et' = 20,\n 'eu' = 21,\n 'fa' = 22,\n 'fi' = 23,\n 'fil' = 24,\n 'fr-CA' = 25,\n 'fr' = 26,\n 'gl' = 27,\n 'gu' = 28,\n 'he' = 29,\n 'hi' = 30,\n 'hr' = 31,\n 'hu' = 32,\n 'hy' = 33,\n 'id' = 34,\n 'is' = 35,\n 'it' = 36,\n 'ja' = 37,\n 'ka' = 38,\n 'kk' = 39,\n 'km' = 40,\n 'kn' = 41,\n 'ko' = 42,\n 'ky' = 43,\n 'lo' = 44,\n 'lt' = 45,\n 'lv' = 46,\n 'mk' = 47,\n 'ml' = 48,\n 'mn' = 49,\n 'mr' = 50,\n 'ms' = 51,\n 'my' = 52,\n 'ne' = 53,\n 'nl' = 54,\n 'no' = 55,\n 'or' = 56,\n 'pa' = 57,\n 'pl' = 58,\n 'pt-PT' = 59,\n 'pt' = 60,\n 'ro' = 61,\n 'ru' = 62,\n 'si' = 63,\n 'sk' = 64,\n 'sl' = 65,\n 'sq' = 66,\n 'sr-Latn' = 67,\n 'sr' = 68,\n 'sv' = 69,\n 'sw' = 70,\n 'ta' = 71,\n 'te' = 72,\n 'th' = 73,\n 'tr' = 74,\n 'uk' = 75,\n 'ur' = 76,\n 'uz' = 77,\n 'vi' = 78,\n 'zh' = 79,\n 'zh-HK' = 80,\n 'zh-TW' = 81,\n 'zu' = 82,\n MaxValue = 83,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum SyncSetting {\n ChromeSyncDisabled = 1,\n ChromeSyncSettingsDisabled = 2,\n DevToolsSyncSettingDisabled = 3,\n DevToolsSyncSettingEnabled = 4,\n MaxValue = 5,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingToggled {\n RecordingStarted = 1,\n RecordingFinished = 2,\n MaxValue = 3,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingAssertion {\n AssertionAdded = 1,\n PropertyAssertionEdited = 2,\n AttributeAssertionEdited = 3,\n MaxValue = 4,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingReplayFinished {\n Success = 1,\n TimeoutErrorSelectors = 2,\n TimeoutErrorTarget = 3,\n OtherError = 4,\n MaxValue = 5,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingReplaySpeed {\n Normal = 1,\n Slow = 2,\n VerySlow = 3,\n ExtremelySlow = 4,\n MaxValue = 5,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingReplayStarted {\n ReplayOnly = 1,\n ReplayWithPerformanceTracing = 2,\n ReplayViaExtension = 3,\n MaxValue = 4,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingEdited {\n SelectorPickerUsed = 1,\n StepAdded = 2,\n StepRemoved = 3,\n SelectorAdded = 4,\n SelectorRemoved = 5,\n SelectorPartAdded = 6,\n SelectorPartEdited = 7,\n SelectorPartRemoved = 8,\n TypeChanged = 9,\n OtherEditing = 10,\n MaxValue = 11,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingExported {\n ToPuppeteer = 1,\n ToJSON = 2,\n ToPuppeteerReplay = 3,\n ToExtension = 4,\n ToLighthouse = 5,\n MaxValue = 6,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingCodeToggled {\n CodeShown = 1,\n CodeHidden = 2,\n MaxValue = 3,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingCopiedToClipboard {\n CopiedRecordingWithPuppeteer = 1,\n CopiedRecordingWithJSON = 2,\n CopiedRecordingWithReplay = 3,\n CopiedRecordingWithExtension = 4,\n CopiedStepWithPuppeteer = 5,\n CopiedStepWithJSON = 6,\n CopiedStepWithReplay = 7,\n CopiedStepWithExtension = 8,\n MaxValue = 9,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ConsoleShowsCorsErrors {\n 'false' = 0,\n 'true' = 1,\n MaxValue = 2,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum StyleTextCopied {\n DeclarationViaChangedLine = 1,\n AllChangesViaStylesPane = 2,\n DeclarationViaContextMenu = 3,\n PropertyViaContextMenu = 4,\n ValueViaContextMenu = 5,\n DeclarationAsJSViaContextMenu = 6,\n RuleViaContextMenu = 7,\n AllDeclarationsViaContextMenu = 8,\n AllDeclarationsAsJSViaContextMenu = 9,\n SelectorViaContextMenu = 10,\n MaxValue = 11,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ManifestSectionCodes {\n OtherSection = 0,\n 'Identity' = 1,\n 'Presentation' = 2,\n 'Protocol Handlers' = 3,\n 'Icons' = 4,\n 'Window Controls Overlay' = 5,\n MaxValue = 6,\n}\n\n// The names here match the CSSRuleValidator names in CSSRuleValidator.ts.\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum CSSHintType {\n Other = 0,\n AlignContent = 1,\n FlexItem = 2,\n FlexContainer = 3,\n GridContainer = 4,\n GridItem = 5,\n FlexGrid = 6,\n MulticolFlexGrid = 7,\n Padding = 8,\n Position = 9,\n ZIndex = 10,\n Sizing = 11,\n FlexOrGridItem = 12,\n FontVariationSettings = 13,\n MaxValue = 14,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum LighthouseModeRun {\n Navigation = 0,\n Timespan = 1,\n Snapshot = 2,\n LegacyNavigation = 3,\n MaxValue = 4,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum LighthouseCategoryUsed {\n Performance = 0,\n Accessibility = 1,\n BestPractices = 2,\n SEO = 3,\n PWA = 4,\n PubAds = 5,\n MaxValue = 6,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\nexport const enum SwatchType {\n VarLink = 0,\n AnimationNameLink = 1,\n Color = 2,\n AnimationTiming = 3,\n Shadow = 4,\n Grid = 5,\n Flex = 6,\n Angle = 7,\n Length = 8,\n PositionFallbackLink = 9,\n MaxValue = 10,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\nexport const enum BadgeType {\n GRID = 0,\n SUBGRID = 1,\n FLEX = 2,\n AD = 3,\n SCROLL_SNAP = 4,\n CONTAINER = 5,\n SLOT = 6,\n TOP_LAYER = 7,\n REVEAL = 8,\n MaxValue = 9,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\nexport const enum AnimationsPlaybackRate {\n Percent100 = 0,\n Percent25 = 1,\n Percent10 = 2,\n Other = 3,\n MaxValue = 4,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\nexport const enum AnimationPointDragType {\n // Animation is dragged as a whole in the Animations panel.\n AnimationDrag = 0,\n // A keyframe point inside animation timeline is dragged.\n KeyframeMove = 1,\n // Start point of the animation inside animation timeline is dragged.\n StartEndpointMove = 2,\n // Finish point of the animation inside animation timeline is dragged.\n FinishEndpointMove = 3,\n Other = 4,\n MaxValue = 5,\n}\n"]} \ No newline at end of file +{"version":3,"file":"UserMetrics.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/UserMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAC,mBAAmB,EAAC,MAAM,+BAA+B,CAAC;AAElE,MAAM,OAAO,WAAW;IACtB,wBAAwB,CAAU;IAClC,qBAAqB,CAAU;IAC/B,gBAAgB,CAAS;IACzB;QACE,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC;QACtC,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;IAC7B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source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {EnumeratedHistogram} from './InspectorFrontendHostAPI.js';\n\nexport class UserMetrics {\n #panelChangedSinceLaunch: boolean;\n #firedLaunchHistogram: boolean;\n #launchPanelName: string;\n constructor() {\n this.#panelChangedSinceLaunch = false;\n this.#firedLaunchHistogram = false;\n this.#launchPanelName = '';\n }\n\n breakpointWithConditionAdded(breakpointWithConditionAdded: BreakpointWithConditionAdded): void {\n if (breakpointWithConditionAdded >= BreakpointWithConditionAdded.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointWithConditionAdded, breakpointWithConditionAdded,\n BreakpointWithConditionAdded.MaxValue);\n }\n\n breakpointEditDialogRevealedFrom(breakpointEditDialogRevealedFrom: BreakpointEditDialogRevealedFrom): void {\n if (breakpointEditDialogRevealedFrom >= BreakpointEditDialogRevealedFrom.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointEditDialogRevealedFrom, breakpointEditDialogRevealedFrom,\n BreakpointEditDialogRevealedFrom.MaxValue);\n }\n\n panelShown(panelName: string, isLaunching?: boolean): void {\n const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelShown, code, PanelCodes.MaxValue);\n InspectorFrontendHostInstance.recordUserMetricsAction('DevTools_PanelShown_' + panelName);\n // Store that the user has changed the panel so we know launch histograms should not be fired.\n if (!isLaunching) {\n this.#panelChangedSinceLaunch = true;\n }\n }\n\n /**\n * Fired when a panel is closed (regardless if it exists in the main panel or the drawer)\n */\n panelClosed(panelName: string): void {\n const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelClosed, code, PanelCodes.MaxValue);\n // Store that the user has changed the panel so we know launch histograms should not be fired.\n this.#panelChangedSinceLaunch = true;\n }\n\n elementsSidebarTabShown(sidebarPaneName: string): void {\n const code = ElementsSidebarTabCodes[sidebarPaneName as keyof typeof ElementsSidebarTabCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ElementsSidebarTabShown, code, ElementsSidebarTabCodes.MaxValue);\n }\n\n sourcesSidebarTabShown(sidebarPaneName: string): void {\n const code = SourcesSidebarTabCodes[sidebarPaneName as keyof typeof SourcesSidebarTabCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesSidebarTabShown, code, SourcesSidebarTabCodes.MaxValue);\n }\n\n settingsPanelShown(settingsViewId: string): void {\n this.panelShown('settings-' + settingsViewId);\n }\n\n sourcesPanelFileDebugged(mediaType?: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesPanelFileDebugged, code, MediaTypes.MaxValue);\n }\n\n sourcesPanelFileOpened(mediaType?: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesPanelFileOpened, code, MediaTypes.MaxValue);\n }\n\n networkPanelResponsePreviewOpened(mediaType: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelResponsePreviewOpened, code, MediaTypes.MaxValue);\n }\n\n actionTaken(action: Action): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MaxValue);\n }\n\n panelLoaded(panelName: string, histogramName: string): void {\n if (this.#firedLaunchHistogram || panelName !== this.#launchPanelName) {\n return;\n }\n\n this.#firedLaunchHistogram = true;\n // Use rAF and window.setTimeout to ensure the marker is fired after layout and rendering.\n // This will give the most accurate representation of the tool being ready for a user.\n requestAnimationFrame(() => {\n window.setTimeout(() => {\n // Mark the load time so that we can pinpoint it more easily in a trace.\n performance.mark(histogramName);\n // If the user has switched panel before we finished loading, ignore the histogram,\n // since the launch timings will have been affected and are no longer valid.\n if (this.#panelChangedSinceLaunch) {\n return;\n }\n // This fires the event for the appropriate launch histogram.\n // The duration is measured as the time elapsed since the time origin of the document.\n InspectorFrontendHostInstance.recordPerformanceHistogram(histogramName, performance.now());\n }, 0);\n });\n }\n\n setLaunchPanel(panelName: string|null): void {\n this.#launchPanelName = (panelName as string);\n }\n\n performanceTraceLoad(measure: PerformanceMeasure): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram('DevTools.TraceLoad', measure.duration);\n }\n\n keybindSetSettingChanged(keybindSet: string): void {\n const value = KeybindSetSettings[keybindSet as keyof typeof KeybindSetSettings] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.KeybindSetSettingChanged, value, KeybindSetSettings.MaxValue);\n }\n\n keyboardShortcutFired(actionId: string): void {\n const action =\n KeyboardShortcutAction[actionId as keyof typeof KeyboardShortcutAction] || KeyboardShortcutAction.OtherShortcut;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.KeyboardShortcutFired, action, KeyboardShortcutAction.MaxValue);\n }\n\n issuesPanelOpenedFrom(issueOpener: IssueOpener): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelOpenedFrom, issueOpener, IssueOpener.MaxValue);\n }\n\n issuesPanelIssueExpanded(issueExpandedCategory: string|undefined): void {\n if (issueExpandedCategory === undefined) {\n return;\n }\n\n const issueExpanded = IssueExpanded[issueExpandedCategory as keyof typeof IssueExpanded];\n\n if (issueExpanded === undefined) {\n return;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelIssueExpanded, issueExpanded, IssueExpanded.MaxValue);\n }\n\n issuesPanelResourceOpened(issueCategory: string, type: string): void {\n const key = issueCategory + type;\n const value = IssueResourceOpened[key as keyof typeof IssueResourceOpened];\n\n if (value === undefined) {\n return;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelResourceOpened, value, IssueResourceOpened.MaxValue);\n }\n\n issueCreated(code: string): void {\n const issueCreated = IssueCreated[code as keyof typeof IssueCreated];\n if (issueCreated === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssueCreated, issueCreated, IssueCreated.MaxValue);\n }\n\n experimentEnabledAtLaunch(experimentId: string): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ExperimentEnabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);\n }\n\n experimentDisabledAtLaunch(experimentId: string): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ExperimentDisabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);\n }\n\n experimentChanged(experimentId: string, isEnabled: boolean): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n const actionName = isEnabled ? EnumeratedHistogram.ExperimentEnabled : EnumeratedHistogram.ExperimentDisabled;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(actionName, experiment, DevtoolsExperiments.MaxValue);\n }\n\n developerResourceLoaded(developerResourceLoaded: DeveloperResourceLoaded): void {\n if (developerResourceLoaded >= DeveloperResourceLoaded.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceLoaded, developerResourceLoaded, DeveloperResourceLoaded.MaxValue);\n }\n\n developerResourceScheme(developerResourceScheme: DeveloperResourceScheme): void {\n if (developerResourceScheme >= DeveloperResourceScheme.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceScheme, developerResourceScheme, DeveloperResourceScheme.MaxValue);\n }\n\n inlineScriptParsed(inlineScriptType: VMInlineScriptType): void {\n if (inlineScriptType >= VMInlineScriptType.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.InlineScriptParsed, inlineScriptType, VMInlineScriptType.MaxValue);\n }\n\n vmInlineScriptContentShown(inlineScriptType: VMInlineScriptType): void {\n if (inlineScriptType >= VMInlineScriptType.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.VMInlineScriptTypeShown, inlineScriptType, VMInlineScriptType.MaxValue);\n }\n\n linearMemoryInspectorRevealedFrom(linearMemoryInspectorRevealedFrom: LinearMemoryInspectorRevealedFrom): void {\n if (linearMemoryInspectorRevealedFrom >= LinearMemoryInspectorRevealedFrom.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LinearMemoryInspectorRevealedFrom, linearMemoryInspectorRevealedFrom,\n LinearMemoryInspectorRevealedFrom.MaxValue);\n }\n\n linearMemoryInspectorTarget(linearMemoryInspectorTarget: LinearMemoryInspectorTarget): void {\n if (linearMemoryInspectorTarget >= LinearMemoryInspectorTarget.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LinearMemoryInspectorTarget, linearMemoryInspectorTarget,\n LinearMemoryInspectorTarget.MaxValue);\n }\n\n language(language: Intl.UnicodeBCP47LocaleIdentifier): void {\n const languageCode = Language[language as keyof typeof Language];\n if (languageCode === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.Language, languageCode, Language.MaxValue);\n }\n\n syncSetting(devtoolsSyncSettingEnabled: boolean): void {\n InspectorFrontendHostInstance.getSyncInformation(syncInfo => {\n let settingValue = SyncSetting.ChromeSyncDisabled;\n if (syncInfo.isSyncActive && !syncInfo.arePreferencesSynced) {\n settingValue = SyncSetting.ChromeSyncSettingsDisabled;\n } else if (syncInfo.isSyncActive && syncInfo.arePreferencesSynced) {\n settingValue = devtoolsSyncSettingEnabled ? SyncSetting.DevToolsSyncSettingEnabled :\n SyncSetting.DevToolsSyncSettingDisabled;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SyncSetting, settingValue, SyncSetting.MaxValue);\n });\n }\n\n recordingAssertion(value: RecordingAssertion): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingAssertion, value, RecordingAssertion.MaxValue);\n }\n\n recordingToggled(value: RecordingToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingToggled, value, RecordingToggled.MaxValue);\n }\n\n recordingReplayFinished(value: RecordingReplayFinished): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayFinished, value, RecordingReplayFinished.MaxValue);\n }\n\n recordingReplaySpeed(value: RecordingReplaySpeed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplaySpeed, value, RecordingReplaySpeed.MaxValue);\n }\n\n recordingReplayStarted(value: RecordingReplayStarted): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayStarted, value, RecordingReplayStarted.MaxValue);\n }\n\n recordingEdited(value: RecordingEdited): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingEdited, value, RecordingEdited.MaxValue);\n }\n\n recordingExported(value: RecordingExported): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingExported, value, RecordingExported.MaxValue);\n }\n\n recordingCodeToggled(value: RecordingCodeToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCodeToggled, value, RecordingCodeToggled.MaxValue);\n }\n\n recordingCopiedToClipboard(value: RecordingCopiedToClipboard): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCopiedToClipboard, value, RecordingCopiedToClipboard.MaxValue);\n }\n\n styleTextCopied(value: StyleTextCopied): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.StyleTextCopied, value, StyleTextCopied.MaxValue);\n }\n\n manifestSectionSelected(sectionTitle: string): void {\n const code =\n ManifestSectionCodes[sectionTitle as keyof typeof ManifestSectionCodes] || ManifestSectionCodes.OtherSection;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ManifestSectionSelected, code, ManifestSectionCodes.MaxValue);\n }\n\n cssHintShown(type: CSSHintType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSHintShown, type, CSSHintType.MaxValue);\n }\n\n lighthouseModeRun(type: LighthouseModeRun): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseModeRun, type, LighthouseModeRun.MaxValue);\n }\n\n lighthouseCategoryUsed(type: LighthouseCategoryUsed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseCategoryUsed, type, LighthouseCategoryUsed.MaxValue);\n }\n\n colorConvertedFrom(type: ColorConvertedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorConvertedFrom, type, ColorConvertedFrom.MaxValue);\n }\n\n colorPickerOpenedFrom(type: ColorPickerOpenedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorPickerOpenedFrom, type, ColorPickerOpenedFrom.MaxValue);\n }\n\n cssPropertyDocumentation(type: CSSPropertyDocumentation): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSPropertyDocumentation, type, CSSPropertyDocumentation.MaxValue);\n }\n\n swatchActivated(swatch: SwatchType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SwatchActivated, swatch, SwatchType.MaxValue);\n }\n\n badgeActivated(badge: BadgeType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BadgeActivated, badge, BadgeType.MaxValue);\n }\n\n breakpointsRestoredFromStorage(count: number): void {\n const countBucket = this.#breakpointCountToBucket(count);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointsRestoredFromStorageCount, countBucket,\n BreakpointsRestoredFromStorageCount.MaxValue);\n }\n\n animationPlaybackRateChanged(playbackRate: AnimationsPlaybackRate): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPlaybackRateChanged, playbackRate, AnimationsPlaybackRate.MaxValue);\n }\n\n animationPointDragged(dragType: AnimationPointDragType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPointDragged, dragType, AnimationPointDragType.MaxValue);\n }\n\n #breakpointCountToBucket(count: number): BreakpointsRestoredFromStorageCount {\n if (count < 100) {\n return BreakpointsRestoredFromStorageCount.LessThan100;\n }\n if (count < 300) {\n return BreakpointsRestoredFromStorageCount.LessThan300;\n }\n if (count < 1000) {\n return BreakpointsRestoredFromStorageCount.LessThan1000;\n }\n if (count < 3000) {\n return BreakpointsRestoredFromStorageCount.LessThan3000;\n }\n if (count < 10000) {\n return BreakpointsRestoredFromStorageCount.LessThan10000;\n }\n if (count < 30000) {\n return BreakpointsRestoredFromStorageCount.LessThan30000;\n }\n if (count < 100000) {\n return BreakpointsRestoredFromStorageCount.LessThan100000;\n }\n if (count < 300000) {\n return BreakpointsRestoredFromStorageCount.LessThan300000;\n }\n if (count < 1000000) {\n return BreakpointsRestoredFromStorageCount.LessThan1000000;\n }\n return BreakpointsRestoredFromStorageCount.Above1000000;\n }\n\n workspacesPopulated(wallClockTimeInMilliseconds: number): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram(\n 'DevTools.Workspaces.PopulateWallClocktime', wallClockTimeInMilliseconds);\n }\n\n visualLoggingProcessingDone(timeInMilliseconds: number): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram(\n 'DevTools.VisualLogging.ProcessingTime', timeInMilliseconds);\n }\n\n legacyResourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MaxValue - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MaxValue);\n }\n\n legacyResourceTypeFilterItemSelected(resourceTypeName: string): void {\n const resourceType = ResourceType[resourceTypeName as keyof typeof ResourceType];\n if (resourceType === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterItemSelected, resourceType, ResourceType.MaxValue);\n }\n\n resourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MaxValue - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MaxValue);\n }\n\n resourceTypeFilterItemSelected(resourceTypeName: string): void {\n const resourceType = ResourceType[resourceTypeName as keyof typeof ResourceType];\n if (resourceType === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterItemSelected, resourceType, ResourceType.MaxValue);\n }\n\n networkPanelMoreFiltersNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, NetworkPanelMoreFilters.MaxValue), 0);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersNumberOfSelectedChanged, boundItemCount,\n NetworkPanelMoreFilters.MaxValue);\n }\n\n networkPanelMoreFiltersItemSelected(filterName: string): void {\n const filter = NetworkPanelMoreFilters[filterName as keyof typeof NetworkPanelMoreFilters];\n if (filter === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersItemSelected, filter, NetworkPanelMoreFilters.MaxValue);\n }\n}\n\n/**\n * The numeric enum values are not necessarily continuous! It is possible that\n * values have been removed, which results in gaps in the sequence of values.\n * When adding a new value:\n * 1. Add an entry to the bottom of the enum before 'MaxValue'.\n * 2. Set the value of the new entry to the current value of 'MaxValue'.\n * 2. Increment the value of 'MaxValue' by 1.\n * When removing a value which is no longer needed:\n * 1. Delete the line with the unneeded value\n * 2. Do not update any 'MaxValue' or any other value.\n */\n\n// Codes below are used to collect UMA histograms in the Chromium port.\n// Do not change the values below, additional actions are needed on the Chromium side\n// in order to add more codes.\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Action {\n WindowDocked = 1,\n WindowUndocked = 2,\n ScriptsBreakpointSet = 3,\n TimelineStarted = 4,\n ProfilesCPUProfileTaken = 5,\n ProfilesHeapProfileTaken = 6,\n ConsoleEvaluated = 8,\n FileSavedInWorkspace = 9,\n DeviceModeEnabled = 10,\n AnimationsPlaybackRateChanged = 11,\n RevisionApplied = 12,\n FileSystemDirectoryContentReceived = 13,\n StyleRuleEdited = 14,\n CommandEvaluatedInConsolePanel = 15,\n DOMPropertiesExpanded = 16,\n ResizedViewInResponsiveMode = 17,\n TimelinePageReloadStarted = 18,\n ConnectToNodeJSFromFrontend = 19,\n ConnectToNodeJSDirectly = 20,\n CpuThrottlingEnabled = 21,\n CpuProfileNodeFocused = 22,\n CpuProfileNodeExcluded = 23,\n SelectFileFromFilePicker = 24,\n SelectCommandFromCommandMenu = 25,\n ChangeInspectedNodeInElementsPanel = 26,\n StyleRuleCopied = 27,\n CoverageStarted = 28,\n LighthouseStarted = 29,\n LighthouseFinished = 30,\n ShowedThirdPartyBadges = 31,\n LighthouseViewTrace = 32,\n FilmStripStartedRecording = 33,\n CoverageReportFiltered = 34,\n CoverageStartedPerBlock = 35,\n 'SettingsOpenedFromGear-deprecated' = 36,\n 'SettingsOpenedFromMenu-deprecated' = 37,\n 'SettingsOpenedFromCommandMenu-deprecated' = 38,\n TabMovedToDrawer = 39,\n TabMovedToMainPanel = 40,\n CaptureCssOverviewClicked = 41,\n VirtualAuthenticatorEnvironmentEnabled = 42,\n SourceOrderViewActivated = 43,\n UserShortcutAdded = 44,\n ShortcutRemoved = 45,\n ShortcutModified = 46,\n CustomPropertyLinkClicked = 47,\n CustomPropertyEdited = 48,\n ServiceWorkerNetworkRequestClicked = 49,\n ServiceWorkerNetworkRequestClosedQuickly = 50,\n NetworkPanelServiceWorkerRespondWith = 51,\n NetworkPanelCopyValue = 52,\n ConsoleSidebarOpened = 53,\n PerfPanelTraceImported = 54,\n PerfPanelTraceExported = 55,\n StackFrameRestarted = 56,\n CaptureTestProtocolClicked = 57,\n BreakpointRemovedFromRemoveButton = 58,\n BreakpointGroupExpandedStateChanged = 59,\n HeaderOverrideFileCreated = 60,\n HeaderOverrideEnableEditingClicked = 61,\n HeaderOverrideHeaderAdded = 62,\n HeaderOverrideHeaderEdited = 63,\n HeaderOverrideHeaderRemoved = 64,\n HeaderOverrideHeadersFileEdited = 65,\n PersistenceNetworkOverridesEnabled = 66,\n PersistenceNetworkOverridesDisabled = 67,\n BreakpointRemovedFromContextMenu = 68,\n BreakpointsInFileRemovedFromRemoveButton = 69,\n BreakpointsInFileRemovedFromContextMenu = 70,\n BreakpointsInFileCheckboxToggled = 71,\n BreakpointsInFileEnabledDisabledFromContextMenu = 72,\n BreakpointConditionEditedFromSidebar = 73,\n WorkspaceTabAddFolder = 74,\n WorkspaceTabRemoveFolder = 75,\n OverrideTabAddFolder = 76,\n OverrideTabRemoveFolder = 77,\n WorkspaceSourceSelected = 78,\n OverridesSourceSelected = 79,\n StyleSheetInitiatorLinkClicked = 80,\n BreakpointRemovedFromGutterContextMenu = 81,\n BreakpointRemovedFromGutterToggle = 82,\n StylePropertyInsideKeyframeEdited = 83,\n OverrideContentFromSourcesContextMenu = 84,\n OverrideContentFromNetworkContextMenu = 85,\n OverrideScript = 86,\n OverrideStyleSheet = 87,\n OverrideDocument = 88,\n OverrideFetchXHR = 89,\n OverrideImage = 90,\n OverrideFont = 91,\n OverrideContentContextMenuSetup = 92,\n OverrideContentContextMenuAbandonSetup = 93,\n OverrideContentContextMenuActivateDisabled = 94,\n OverrideContentContextMenuOpenExistingFile = 95,\n OverrideContentContextMenuSaveNewFile = 96,\n ShowAllOverridesFromSourcesContextMenu = 97,\n ShowAllOverridesFromNetworkContextMenu = 98,\n AnimationGroupsCleared = 99,\n AnimationsPaused = 100,\n AnimationsResumed = 101,\n AnimatedNodeDescriptionClicked = 102,\n AnimationGroupScrubbed = 103,\n AnimationGroupReplayed = 104,\n OverrideTabDeleteFolderContextMenu = 105,\n WorkspaceDropFolder = 107,\n WorkspaceSelectFolder = 108,\n OverrideContentContextMenuSourceMappedWarning = 109,\n OverrideContentContextMenuRedirectToDeployed = 110,\n NewStyleRuleAdded = 111,\n TraceExpanded = 112,\n InsightConsoleMessageShown = 113,\n InsightRequestedViaContextMenu = 114,\n InsightRequestedViaHoverButton = 115,\n InsightRefined = 116,\n InsightRatedPositive = 117,\n InsightRatedNegative = 118,\n InsightClosed = 119,\n InsightErrored = 120,\n InsightHoverButtonShown = 121,\n MaxValue = 122,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum PanelCodes {\n elements = 1,\n resources = 2,\n network = 3,\n sources = 4,\n timeline = 5,\n heap_profiler = 6,\n console = 8,\n layers = 9,\n 'console-view' = 10,\n 'animations' = 11,\n 'network.config' = 12,\n 'rendering' = 13,\n 'sensors' = 14,\n 'sources.search' = 15,\n security = 16,\n js_profiler = 17,\n lighthouse = 18,\n 'coverage' = 19,\n 'protocol-monitor' = 20,\n 'remote-devices' = 21,\n 'web-audio' = 22,\n 'changes.changes' = 23,\n 'performance.monitor' = 24,\n 'release-note' = 25,\n 'live_heap_profile' = 26,\n 'sources.quick' = 27,\n 'network.blocked-urls' = 28,\n 'settings-preferences' = 29,\n 'settings-workspace' = 30,\n 'settings-experiments' = 31,\n 'settings-blackbox' = 32,\n 'settings-devices' = 33,\n 'settings-throttling-conditions' = 34,\n 'settings-emulation-locations' = 35,\n 'settings-shortcuts' = 36,\n 'issues-pane' = 37,\n 'settings-keybinds' = 38,\n 'cssoverview' = 39,\n 'chrome_recorder' = 40,\n 'trust_tokens' = 41,\n 'reporting_api' = 42,\n 'interest_groups' = 43,\n 'back_forward_cache' = 44,\n 'service_worker_cache' = 45,\n 'background_service_backgroundFetch' = 46,\n 'background_service_backgroundSync' = 47,\n 'background_service_pushMessaging' = 48,\n 'background_service_notifications' = 49,\n 'background_service_paymentHandler' = 50,\n 'background_service_periodicBackgroundSync' = 51,\n 'service_workers' = 52,\n 'app_manifest' = 53,\n 'storage' = 54,\n 'cookies' = 55,\n 'frame_details' = 56,\n 'frame_resource' = 57,\n 'frame_window' = 58,\n 'frame_worker' = 59,\n 'dom_storage' = 60,\n 'indexed_db' = 61,\n 'web_sql' = 62,\n 'performance_insights' = 63,\n 'preloading' = 64,\n 'bounce_tracking_mitigations' = 65,\n 'developer-resources' = 66,\n 'autofill-view' = 67,\n MaxValue = 68,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ElementsSidebarTabCodes {\n 'OtherSidebarPane' = 0,\n 'Styles' = 1,\n 'Computed' = 2,\n 'elements.layout' = 3,\n 'elements.eventListeners' = 4,\n 'elements.domBreakpoints' = 5,\n 'elements.domProperties' = 6,\n 'accessibility.view' = 7,\n MaxValue = 8,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum SourcesSidebarTabCodes {\n 'OtherSidebarPane' = 0,\n 'navigator-network' = 1,\n 'navigator-files' = 2,\n 'navigator-overrides' = 3,\n 'navigator-contentScripts' = 4,\n 'navigator-snippets' = 5,\n MaxValue = 6,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum MediaTypes {\n Unknown = 0,\n 'text/css' = 2,\n 'text/html' = 3,\n 'application/xml' = 4,\n 'application/wasm' = 5,\n 'application/manifest+json' = 6,\n 'application/x-aspx' = 7,\n 'application/jsp' = 8,\n 'text/x-c++src' = 9,\n 'text/x-coffeescript' = 10,\n 'application/vnd.dart' = 11,\n 'text/typescript' = 12,\n 'text/typescript-jsx' = 13,\n 'application/json' = 14,\n 'text/x-csharp' = 15,\n 'text/x-java' = 16,\n 'text/x-less' = 17,\n 'application/x-httpd-php' = 18,\n 'text/x-python' = 19,\n 'text/x-sh' = 20,\n 'text/x-gss' = 21,\n 'text/x-sass' = 22,\n 'text/x-scss' = 23,\n 'text/markdown' = 24,\n 'text/x-clojure' = 25,\n 'text/jsx' = 26,\n 'text/x-go' = 27,\n 'text/x-kotlin' = 28,\n 'text/x-scala' = 29,\n 'text/x.svelte' = 30,\n 'text/javascript+plain' = 31,\n 'text/javascript+minified' = 32,\n 'text/javascript+sourcemapped' = 33,\n 'text/x.angular' = 34,\n 'text/x.vue' = 35,\n MaxValue = 36,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum KeybindSetSettings {\n 'devToolsDefault' = 0,\n 'vsCode' = 1,\n MaxValue = 2,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum KeyboardShortcutAction {\n OtherShortcut = 0,\n 'commandMenu.show' = 1,\n 'console.clear' = 2,\n 'console.toggle' = 3,\n 'debugger.step' = 4,\n 'debugger.step-into' = 5,\n 'debugger.step-out' = 6,\n 'debugger.step-over' = 7,\n 'debugger.toggle-breakpoint' = 8,\n 'debugger.toggle-breakpoint-enabled' = 9,\n 'debugger.toggle-pause' = 10,\n 'elements.edit-as-html' = 11,\n 'elements.hide-element' = 12,\n 'elements.redo' = 13,\n 'elements.toggle-element-search' = 14,\n 'elements.undo' = 15,\n 'main.search-in-panel.find' = 16,\n 'main.toggle-drawer' = 17,\n 'network.hide-request-details' = 18,\n 'network.search' = 19,\n 'network.toggle-recording' = 20,\n 'quickOpen.show' = 21,\n 'settings.show' = 22,\n 'sources.search' = 23,\n 'background-service.toggle-recording' = 24,\n 'components.collect-garbage' = 25,\n 'console.clear.history' = 26,\n 'console.create-pin' = 27,\n 'coverage.start-with-reload' = 28,\n 'coverage.toggle-recording' = 29,\n 'debugger.breakpoint-input-window' = 30,\n 'debugger.evaluate-selection' = 31,\n 'debugger.next-call-frame' = 32,\n 'debugger.previous-call-frame' = 33,\n 'debugger.run-snippet' = 34,\n 'debugger.toggle-breakpoints-active' = 35,\n 'elements.capture-area-screenshot' = 36,\n 'emulation.capture-full-height-screenshot' = 37,\n 'emulation.capture-node-screenshot' = 38,\n 'emulation.capture-screenshot' = 39,\n 'emulation.show-sensors' = 40,\n 'emulation.toggle-device-mode' = 41,\n 'help.release-notes' = 42,\n 'help.report-issue' = 43,\n 'input.start-replaying' = 44,\n 'input.toggle-pause' = 45,\n 'input.toggle-recording' = 46,\n 'inspector_main.focus-debuggee' = 47,\n 'inspector_main.hard-reload' = 48,\n 'inspector_main.reload' = 49,\n 'live-heap-profile.start-with-reload' = 50,\n 'live-heap-profile.toggle-recording' = 51,\n 'main.debug-reload' = 52,\n 'main.next-tab' = 53,\n 'main.previous-tab' = 54,\n 'main.search-in-panel.cancel' = 55,\n 'main.search-in-panel.find-next' = 56,\n 'main.search-in-panel.find-previous' = 57,\n 'main.toggle-dock' = 58,\n 'main.zoom-in' = 59,\n 'main.zoom-out' = 60,\n 'main.zoom-reset' = 61,\n 'network-conditions.network-low-end-mobile' = 62,\n 'network-conditions.network-mid-tier-mobile' = 63,\n 'network-conditions.network-offline' = 64,\n 'network-conditions.network-online' = 65,\n 'profiler.heap-toggle-recording' = 66,\n 'profiler.js-toggle-recording' = 67,\n 'resources.clear' = 68,\n 'settings.documentation' = 69,\n 'settings.shortcuts' = 70,\n 'sources.add-folder-to-workspace' = 71,\n 'sources.add-to-watch' = 72,\n 'sources.close-all' = 73,\n 'sources.close-editor-tab' = 74,\n 'sources.create-snippet' = 75,\n 'sources.go-to-line' = 76,\n 'sources.go-to-member' = 77,\n 'sources.jump-to-next-location' = 78,\n 'sources.jump-to-previous-location' = 79,\n 'sources.rename' = 80,\n 'sources.save' = 81,\n 'sources.save-all' = 82,\n 'sources.switch-file' = 83,\n 'timeline.jump-to-next-frame' = 84,\n 'timeline.jump-to-previous-frame' = 85,\n 'timeline.load-from-file' = 86,\n 'timeline.next-recording' = 87,\n 'timeline.previous-recording' = 88,\n 'timeline.record-reload' = 89,\n 'timeline.save-to-file' = 90,\n 'timeline.show-history' = 91,\n 'timeline.toggle-recording' = 92,\n 'sources.increment-css' = 93,\n 'sources.increment-css-by-ten' = 94,\n 'sources.decrement-css' = 95,\n 'sources.decrement-css-by-ten' = 96,\n 'layers.reset-view' = 97,\n 'layers.pan-mode' = 98,\n 'layers.rotate-mode' = 99,\n 'layers.zoom-in' = 100,\n 'layers.zoom-out' = 101,\n 'layers.up' = 102,\n 'layers.down' = 103,\n 'layers.left' = 104,\n 'layers.right' = 105,\n 'help.report-translation-issue' = 106,\n 'rendering.toggle-prefers-color-scheme' = 107,\n 'chrome_recorder.start-recording' = 108,\n 'chrome_recorder.replay-recording' = 109,\n 'chrome_recorder.toggle-code-view' = 110,\n 'chrome_recorder.copy-recording-or-step' = 111,\n 'changes.revert' = 112,\n 'changes.copy' = 113,\n 'elements.new-style-rule' = 114,\n 'elements.refresh-event-listeners' = 115,\n 'coverage.clear' = 116,\n 'coverage.export' = 117,\n MaxValue = 118,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum IssueOpener {\n ConsoleInfoBar = 0,\n LearnMoreLinkCOEP = 1,\n StatusBarIssuesCounter = 2,\n HamburgerMenu = 3,\n Adorner = 4,\n CommandMenu = 5,\n MaxValue = 6,\n}\n\n/**\n * This list should contain the currently active Devtools Experiments,\n * gaps are expected.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum DevtoolsExperiments {\n 'applyCustomStylesheet' = 0,\n 'captureNodeCreationStacks' = 1,\n 'liveHeapProfile' = 11,\n 'protocolMonitor' = 13,\n 'samplingHeapProfilerTimeline' = 17,\n 'showOptionToExposeInternalsInHeapSnapshot' = 18,\n 'timelineInvalidationTracking' = 26,\n 'timelineShowAllEvents' = 27,\n 'timelineV8RuntimeCallStats' = 28,\n 'APCA' = 39,\n 'fontEditor' = 41,\n 'fullAccessibilityTree' = 42,\n 'ignoreListJSFramesOnTimeline' = 43,\n 'contrastIssues' = 44,\n 'experimentalCookieFeatures' = 45,\n 'stylesPaneCSSChanges' = 55,\n 'evaluateExpressionsWithSourceMaps' = 58,\n 'instrumentationBreakpoints' = 61,\n 'authoredDeployedGrouping' = 63,\n 'importantDOMProperties' = 64,\n 'justMyCode' = 65,\n 'timelineAsConsoleProfileResultPanel' = 67,\n 'preloadingStatusPanel' = 68,\n 'outermostTargetSelector' = 71,\n 'jsProfilerTemporarilyEnable' = 72,\n 'highlightErrorsElementsPanel' = 73,\n 'setAllBreakpointsEagerly' = 74,\n 'selfXssWarning' = 75,\n 'useSourceMapScopes' = 76,\n 'storageBucketsTree' = 77,\n 'networkPanelFilterBarRedesign' = 79,\n 'breadcrumbsPerformancePanel' = 80,\n 'trackContextMenu' = 81,\n 'autofillView' = 82,\n 'sourcesFrameIndentationMarkersTemporarilyDisable' = 83,\n\n // Increment this when new experiments are added.\n 'MaxValue' = 84,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum BreakpointWithConditionAdded {\n Logpoint = 0,\n ConditionalBreakpoint = 1,\n MaxValue = 2,\n}\n\nexport const enum BreakpointEditDialogRevealedFrom {\n BreakpointSidebarContextMenu = 0,\n BreakpointSidebarEditButton = 1,\n BreakpointMarkerContextMenu = 2,\n LineGutterContextMenu = 3,\n KeyboardShortcut = 4,\n Linkifier = 5,\n MouseClick = 6,\n MaxValue = 7,\n}\n\nexport const enum ColorConvertedFrom {\n ColorSwatch = 0,\n ColorPicker = 1,\n MaxValue = 2,\n}\n\nexport const enum ColorPickerOpenedFrom {\n SourcesPanel = 0,\n StylesPane = 1,\n MaxValue = 2,\n}\n\nexport const enum CSSPropertyDocumentation {\n Shown = 0,\n ToggledOn = 1,\n ToggledOff = 2,\n MaxValue = 3,\n}\n\nexport const enum BreakpointsRestoredFromStorageCount {\n LessThan100 = 0,\n LessThan300 = 1,\n LessThan1000 = 2,\n LessThan3000 = 3,\n LessThan10000 = 4,\n LessThan30000 = 5,\n LessThan100000 = 6,\n LessThan300000 = 7,\n LessThan1000000 = 8,\n Above1000000 = 9,\n MaxValue = 10,\n}\n\n// Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added.\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum IssueExpanded {\n CrossOriginEmbedderPolicy = 0,\n MixedContent = 1,\n SameSiteCookie = 2,\n HeavyAd = 3,\n ContentSecurityPolicy = 4,\n Other = 5,\n Generic = 6,\n ThirdPartyPhaseoutCookie = 7,\n GenericCookie = 8,\n MaxValue = 9,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum IssueResourceOpened {\n CrossOriginEmbedderPolicyRequest = 0,\n CrossOriginEmbedderPolicyElement = 1,\n MixedContentRequest = 2,\n SameSiteCookieCookie = 3,\n SameSiteCookieRequest = 4,\n HeavyAdElement = 5,\n ContentSecurityPolicyDirective = 6,\n ContentSecurityPolicyElement = 7,\n CrossOriginEmbedderPolicyLearnMore = 8,\n MixedContentLearnMore = 9,\n SameSiteCookieLearnMore = 10,\n HeavyAdLearnMore = 11,\n ContentSecurityPolicyLearnMore = 12,\n MaxValue = 13,\n}\n\n/**\n * This list should contain the currently active issue types,\n * gaps are expected.\n */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum IssueCreated {\n MixedContentIssue = 0,\n 'ContentSecurityPolicyIssue::kInlineViolation' = 1,\n 'ContentSecurityPolicyIssue::kEvalViolation' = 2,\n 'ContentSecurityPolicyIssue::kURLViolation' = 3,\n 'ContentSecurityPolicyIssue::kTrustedTypesSinkViolation' = 4,\n 'ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation' = 5,\n 'HeavyAdIssue::NetworkTotalLimit' = 6,\n 'HeavyAdIssue::CpuTotalLimit' = 7,\n 'HeavyAdIssue::CpuPeakLimit' = 8,\n 'CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader' = 9,\n 'CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage' = 10,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin' = 11,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep' = 12,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameSite' = 13,\n 'CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie' = 14,\n 'CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie' = 15,\n 'CookieIssue::WarnSameSiteNoneInsecure::ReadCookie' = 16,\n 'CookieIssue::WarnSameSiteNoneInsecure::SetCookie' = 17,\n 'CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure' = 18,\n 'CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure' = 19,\n 'CookieIssue::WarnCrossDowngrade::ReadCookie::Secure' = 20,\n 'CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure' = 21,\n 'CookieIssue::WarnCrossDowngrade::SetCookie::Secure' = 22,\n 'CookieIssue::WarnCrossDowngrade::SetCookie::Insecure' = 23,\n 'CookieIssue::ExcludeNavigationContextDowngrade::Secure' = 24,\n 'CookieIssue::ExcludeNavigationContextDowngrade::Insecure' = 25,\n 'CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure' = 26,\n 'CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure' = 27,\n 'CookieIssue::ExcludeContextDowngrade::SetCookie::Secure' = 28,\n 'CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure' = 29,\n 'CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie' = 30,\n 'CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie' = 31,\n 'CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie' = 32,\n 'CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie' = 33,\n 'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie' = 34,\n 'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie' = 35,\n 'SharedArrayBufferIssue::TransferIssue' = 36,\n 'SharedArrayBufferIssue::CreationIssue' = 37,\n LowTextContrastIssue = 41,\n 'CorsIssue::InsecurePrivateNetwork' = 42,\n 'CorsIssue::InvalidHeaders' = 44,\n 'CorsIssue::WildcardOriginWithCredentials' = 45,\n 'CorsIssue::PreflightResponseInvalid' = 46,\n 'CorsIssue::OriginMismatch' = 47,\n 'CorsIssue::AllowCredentialsRequired' = 48,\n 'CorsIssue::MethodDisallowedByPreflightResponse' = 49,\n 'CorsIssue::HeaderDisallowedByPreflightResponse' = 50,\n 'CorsIssue::RedirectContainsCredentials' = 51,\n 'CorsIssue::DisallowedByMode' = 52,\n 'CorsIssue::CorsDisabledScheme' = 53,\n 'CorsIssue::PreflightMissingAllowExternal' = 54,\n 'CorsIssue::PreflightInvalidAllowExternal' = 55,\n 'CorsIssue::NoCorsRedirectModeNotFollow' = 57,\n 'QuirksModeIssue::QuirksMode' = 58,\n 'QuirksModeIssue::LimitedQuirksMode' = 59,\n DeprecationIssue = 60,\n 'ClientHintIssue::MetaTagAllowListInvalidOrigin' = 61,\n 'ClientHintIssue::MetaTagModifiedHTML' = 62,\n 'CorsIssue::PreflightAllowPrivateNetworkError' = 63,\n 'GenericIssue::CrossOriginPortalPostMessageError' = 64,\n 'GenericIssue::FormLabelForNameError' = 65,\n 'GenericIssue::FormDuplicateIdForInputError' = 66,\n 'GenericIssue::FormInputWithNoLabelError' = 67,\n 'GenericIssue::FormAutocompleteAttributeEmptyError' = 68,\n 'GenericIssue::FormEmptyIdAndNameAttributesForInputError' = 69,\n 'GenericIssue::FormAriaLabelledByToNonExistingId' = 70,\n 'GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError' = 71,\n 'GenericIssue::FormLabelHasNeitherForNorNestedInput' = 72,\n 'GenericIssue::FormLabelForMatchesNonExistingIdError' = 73,\n 'GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError' = 74,\n 'GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError' = 75,\n 'StylesheetLoadingIssue::LateImportRule' = 76,\n 'StylesheetLoadingIssue::RequestFailed' = 77,\n 'CorsIssue::PreflightMissingPrivateNetworkAccessId' = 78,\n 'CorsIssue::PreflightMissingPrivateNetworkAccessName' = 79,\n 'CorsIssue::PrivateNetworkAccessPermissionUnavailable' = 80,\n 'CorsIssue::PrivateNetworkAccessPermissionDenied' = 81,\n 'CookieIssue::WarnThirdPartyPhaseout::ReadCookie' = 82,\n 'CookieIssue::WarnThirdPartyPhaseout::SetCookie' = 83,\n 'CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie' = 84,\n 'CookieIssue::ExcludeThirdPartyPhaseout::SetCookie' = 85,\n MaxValue = 86,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum DeveloperResourceLoaded {\n LoadThroughPageViaTarget = 0,\n LoadThroughPageViaFrame = 1,\n LoadThroughPageFailure = 2,\n LoadThroughPageFallback = 3,\n FallbackAfterFailure = 4,\n FallbackPerOverride = 5,\n FallbackPerProtocol = 6,\n FallbackFailure = 7,\n MaxValue = 8,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum DeveloperResourceScheme {\n SchemeOther = 0,\n SchemeUnknown = 1,\n SchemeHttp = 2,\n SchemeHttps = 3,\n SchemeHttpLocalhost = 4,\n SchemeHttpsLocalhost = 5,\n SchemeData = 6,\n SchemeFile = 7,\n SchemeBlob = 8,\n MaxValue = 9,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ResourceType {\n /* eslint-disable @typescript-eslint/naming-convention */\n all = 0,\n /* eslint-enable @typescript-eslint/naming-convention */\n Documents = 1,\n Scripts = 2,\n 'XHR and Fetch' = 3,\n Stylesheets = 4,\n Fonts = 5,\n Images = 6,\n Media = 7,\n Manifest = 8,\n WebSockets = 9,\n WebAssembly = 10,\n Other = 11,\n MaxValue = 12,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n/* eslint-disable @typescript-eslint/naming-convention */\n// eslint-disable-next-line rulesdir/const_enum\nexport enum NetworkPanelMoreFilters {\n 'Hide data URLs' = 0,\n 'Hide extension URLs' = 1,\n 'Blocked response cookies' = 2,\n 'Blocked requests' = 3,\n '3rd-party requests' = 4,\n MaxValue = 5,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum LinearMemoryInspectorRevealedFrom {\n ContextMenu = 0,\n MemoryIcon = 1,\n MaxValue = 2,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum LinearMemoryInspectorTarget {\n DWARFInspectableAddress = 0,\n ArrayBuffer = 1,\n DataView = 2,\n TypedArray = 3,\n WebAssemblyMemory = 4,\n MaxValue = 5,\n}\n\nexport const enum VMInlineScriptType {\n MODULE_SCRIPT = 0,\n CLASSIC_SCRIPT = 1,\n MaxValue = 2,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717) = Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Language {\n 'af' = 1,\n 'am' = 2,\n 'ar' = 3,\n 'as' = 4,\n 'az' = 5,\n 'be' = 6,\n 'bg' = 7,\n 'bn' = 8,\n 'bs' = 9,\n 'ca' = 10,\n 'cs' = 11,\n 'cy' = 12,\n 'da' = 13,\n 'de' = 14,\n 'el' = 15,\n 'en-GB' = 16,\n 'en-US' = 17,\n 'es-419' = 18,\n 'es' = 19,\n 'et' = 20,\n 'eu' = 21,\n 'fa' = 22,\n 'fi' = 23,\n 'fil' = 24,\n 'fr-CA' = 25,\n 'fr' = 26,\n 'gl' = 27,\n 'gu' = 28,\n 'he' = 29,\n 'hi' = 30,\n 'hr' = 31,\n 'hu' = 32,\n 'hy' = 33,\n 'id' = 34,\n 'is' = 35,\n 'it' = 36,\n 'ja' = 37,\n 'ka' = 38,\n 'kk' = 39,\n 'km' = 40,\n 'kn' = 41,\n 'ko' = 42,\n 'ky' = 43,\n 'lo' = 44,\n 'lt' = 45,\n 'lv' = 46,\n 'mk' = 47,\n 'ml' = 48,\n 'mn' = 49,\n 'mr' = 50,\n 'ms' = 51,\n 'my' = 52,\n 'ne' = 53,\n 'nl' = 54,\n 'no' = 55,\n 'or' = 56,\n 'pa' = 57,\n 'pl' = 58,\n 'pt-PT' = 59,\n 'pt' = 60,\n 'ro' = 61,\n 'ru' = 62,\n 'si' = 63,\n 'sk' = 64,\n 'sl' = 65,\n 'sq' = 66,\n 'sr-Latn' = 67,\n 'sr' = 68,\n 'sv' = 69,\n 'sw' = 70,\n 'ta' = 71,\n 'te' = 72,\n 'th' = 73,\n 'tr' = 74,\n 'uk' = 75,\n 'ur' = 76,\n 'uz' = 77,\n 'vi' = 78,\n 'zh' = 79,\n 'zh-HK' = 80,\n 'zh-TW' = 81,\n 'zu' = 82,\n MaxValue = 83,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum SyncSetting {\n ChromeSyncDisabled = 1,\n ChromeSyncSettingsDisabled = 2,\n DevToolsSyncSettingDisabled = 3,\n DevToolsSyncSettingEnabled = 4,\n MaxValue = 5,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingToggled {\n RecordingStarted = 1,\n RecordingFinished = 2,\n MaxValue = 3,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingAssertion {\n AssertionAdded = 1,\n PropertyAssertionEdited = 2,\n AttributeAssertionEdited = 3,\n MaxValue = 4,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingReplayFinished {\n Success = 1,\n TimeoutErrorSelectors = 2,\n TimeoutErrorTarget = 3,\n OtherError = 4,\n MaxValue = 5,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingReplaySpeed {\n Normal = 1,\n Slow = 2,\n VerySlow = 3,\n ExtremelySlow = 4,\n MaxValue = 5,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingReplayStarted {\n ReplayOnly = 1,\n ReplayWithPerformanceTracing = 2,\n ReplayViaExtension = 3,\n MaxValue = 4,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingEdited {\n SelectorPickerUsed = 1,\n StepAdded = 2,\n StepRemoved = 3,\n SelectorAdded = 4,\n SelectorRemoved = 5,\n SelectorPartAdded = 6,\n SelectorPartEdited = 7,\n SelectorPartRemoved = 8,\n TypeChanged = 9,\n OtherEditing = 10,\n MaxValue = 11,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingExported {\n ToPuppeteer = 1,\n ToJSON = 2,\n ToPuppeteerReplay = 3,\n ToExtension = 4,\n ToLighthouse = 5,\n MaxValue = 6,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingCodeToggled {\n CodeShown = 1,\n CodeHidden = 2,\n MaxValue = 3,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum RecordingCopiedToClipboard {\n CopiedRecordingWithPuppeteer = 1,\n CopiedRecordingWithJSON = 2,\n CopiedRecordingWithReplay = 3,\n CopiedRecordingWithExtension = 4,\n CopiedStepWithPuppeteer = 5,\n CopiedStepWithJSON = 6,\n CopiedStepWithReplay = 7,\n CopiedStepWithExtension = 8,\n MaxValue = 9,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ConsoleShowsCorsErrors {\n 'false' = 0,\n 'true' = 1,\n MaxValue = 2,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum StyleTextCopied {\n DeclarationViaChangedLine = 1,\n AllChangesViaStylesPane = 2,\n DeclarationViaContextMenu = 3,\n PropertyViaContextMenu = 4,\n ValueViaContextMenu = 5,\n DeclarationAsJSViaContextMenu = 6,\n RuleViaContextMenu = 7,\n AllDeclarationsViaContextMenu = 8,\n AllDeclarationsAsJSViaContextMenu = 9,\n SelectorViaContextMenu = 10,\n MaxValue = 11,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ManifestSectionCodes {\n OtherSection = 0,\n 'Identity' = 1,\n 'Presentation' = 2,\n 'Protocol Handlers' = 3,\n 'Icons' = 4,\n 'Window Controls Overlay' = 5,\n MaxValue = 6,\n}\n\n// The names here match the CSSRuleValidator names in CSSRuleValidator.ts.\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum CSSHintType {\n Other = 0,\n AlignContent = 1,\n FlexItem = 2,\n FlexContainer = 3,\n GridContainer = 4,\n GridItem = 5,\n FlexGrid = 6,\n MulticolFlexGrid = 7,\n Padding = 8,\n Position = 9,\n ZIndex = 10,\n Sizing = 11,\n FlexOrGridItem = 12,\n FontVariationSettings = 13,\n MaxValue = 14,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum LighthouseModeRun {\n Navigation = 0,\n Timespan = 1,\n Snapshot = 2,\n LegacyNavigation = 3,\n MaxValue = 4,\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum LighthouseCategoryUsed {\n Performance = 0,\n Accessibility = 1,\n BestPractices = 2,\n SEO = 3,\n PWA = 4,\n PubAds = 5,\n MaxValue = 6,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\nexport const enum SwatchType {\n VarLink = 0,\n AnimationNameLink = 1,\n Color = 2,\n AnimationTiming = 3,\n Shadow = 4,\n Grid = 5,\n Flex = 6,\n Angle = 7,\n Length = 8,\n PositionFallbackLink = 9,\n MaxValue = 10,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\nexport const enum BadgeType {\n GRID = 0,\n SUBGRID = 1,\n FLEX = 2,\n AD = 3,\n SCROLL_SNAP = 4,\n CONTAINER = 5,\n SLOT = 6,\n TOP_LAYER = 7,\n REVEAL = 8,\n MaxValue = 9,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\nexport const enum AnimationsPlaybackRate {\n Percent100 = 0,\n Percent25 = 1,\n Percent10 = 2,\n Other = 3,\n MaxValue = 4,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\nexport const enum AnimationPointDragType {\n // Animation is dragged as a whole in the Animations panel.\n AnimationDrag = 0,\n // A keyframe point inside animation timeline is dragged.\n KeyframeMove = 1,\n // Start point of the animation inside animation timeline is dragged.\n StartEndpointMove = 2,\n // Finish point of the animation inside animation timeline is dragged.\n FinishEndpointMove = 3,\n Other = 4,\n MaxValue = 5,\n}\n"]} \ No newline at end of file diff --git a/public/core/i18n/locales/en-GB.json b/public/core/i18n/locales/en-GB.json index 732e7fad5..c2c25a30c 100644 --- a/public/core/i18n/locales/en-GB.json +++ b/public/core/i18n/locales/en-GB.json @@ -1 +1 @@ -{"core/common/ResourceType.ts | cspviolationreport":{"message":"CSPViolationReport"},"core/common/ResourceType.ts | css":{"message":"CSS"},"core/common/ResourceType.ts | doc":{"message":"Doc"},"core/common/ResourceType.ts | document":{"message":"Document"},"core/common/ResourceType.ts | documents":{"message":"Documents"},"core/common/ResourceType.ts | eventsource":{"message":"EventSource"},"core/common/ResourceType.ts | fetch":{"message":"Fetch"},"core/common/ResourceType.ts | font":{"message":"Font"},"core/common/ResourceType.ts | fonts":{"message":"Fonts"},"core/common/ResourceType.ts | image":{"message":"Image"},"core/common/ResourceType.ts | images":{"message":"Images"},"core/common/ResourceType.ts | img":{"message":"Img"},"core/common/ResourceType.ts | js":{"message":"JS"},"core/common/ResourceType.ts | manifest":{"message":"Manifest"},"core/common/ResourceType.ts | media":{"message":"Media"},"core/common/ResourceType.ts | other":{"message":"Other"},"core/common/ResourceType.ts | ping":{"message":"Ping"},"core/common/ResourceType.ts | preflight":{"message":"Pre-flight"},"core/common/ResourceType.ts | script":{"message":"Script"},"core/common/ResourceType.ts | scripts":{"message":"Scripts"},"core/common/ResourceType.ts | signedexchange":{"message":"SignedExchange"},"core/common/ResourceType.ts | stylesheet":{"message":"Stylesheet"},"core/common/ResourceType.ts | stylesheets":{"message":"Stylesheets"},"core/common/ResourceType.ts | texttrack":{"message":"TextTrack"},"core/common/ResourceType.ts | wasm":{"message":"Wasm"},"core/common/ResourceType.ts | webassembly":{"message":"WebAssembly"},"core/common/ResourceType.ts | webbundle":{"message":"Web bundle"},"core/common/ResourceType.ts | websocket":{"message":"WebSocket"},"core/common/ResourceType.ts | websockets":{"message":"WebSockets"},"core/common/ResourceType.ts | webtransport":{"message":"WebTransport"},"core/common/ResourceType.ts | ws":{"message":"WS"},"core/common/ResourceType.ts | xhrAndFetch":{"message":"XHR and Fetch"},"core/common/Revealer.ts | applicationPanel":{"message":"Application panel"},"core/common/Revealer.ts | changesDrawer":{"message":"Changes drawer"},"core/common/Revealer.ts | elementsPanel":{"message":"Elements panel"},"core/common/Revealer.ts | issuesView":{"message":"Issues view"},"core/common/Revealer.ts | networkPanel":{"message":"Network panel"},"core/common/Revealer.ts | sourcesPanel":{"message":"Sources panel"},"core/common/Revealer.ts | stylesSidebar":{"message":"styles sidebar"},"core/common/SettingRegistration.ts | adorner":{"message":"Adorner"},"core/common/SettingRegistration.ts | appearance":{"message":"Appearance"},"core/common/SettingRegistration.ts | console":{"message":"Console"},"core/common/SettingRegistration.ts | debugger":{"message":"Debugger"},"core/common/SettingRegistration.ts | elements":{"message":"Elements"},"core/common/SettingRegistration.ts | extension":{"message":"Extension"},"core/common/SettingRegistration.ts | global":{"message":"Global"},"core/common/SettingRegistration.ts | grid":{"message":"Grid"},"core/common/SettingRegistration.ts | memory":{"message":"Memory"},"core/common/SettingRegistration.ts | mobile":{"message":"Mobile"},"core/common/SettingRegistration.ts | network":{"message":"Network"},"core/common/SettingRegistration.ts | performance":{"message":"Performance"},"core/common/SettingRegistration.ts | persistence":{"message":"Persistence"},"core/common/SettingRegistration.ts | rendering":{"message":"Rendering"},"core/common/SettingRegistration.ts | sources":{"message":"Sources"},"core/common/SettingRegistration.ts | sync":{"message":"Sync"},"core/host/InspectorFrontendHost.ts | devtoolsS":{"message":"DevTools – {PH1}"},"core/host/ResourceLoader.ts | cacheError":{"message":"Cache error"},"core/host/ResourceLoader.ts | certificateError":{"message":"Certificate error"},"core/host/ResourceLoader.ts | certificateManagerError":{"message":"Certificate manager error"},"core/host/ResourceLoader.ts | connectionError":{"message":"Connection error"},"core/host/ResourceLoader.ts | decodingDataUrlFailed":{"message":"Decoding data URL failed"},"core/host/ResourceLoader.ts | dnsResolverError":{"message":"DNS resolver error"},"core/host/ResourceLoader.ts | ftpError":{"message":"FTP error"},"core/host/ResourceLoader.ts | httpError":{"message":"HTTP error"},"core/host/ResourceLoader.ts | httpErrorStatusCodeSS":{"message":"HTTP error: status code {PH1}, {PH2}"},"core/host/ResourceLoader.ts | invalidUrl":{"message":"Invalid URL"},"core/host/ResourceLoader.ts | signedExchangeError":{"message":"Signed exchange error"},"core/host/ResourceLoader.ts | systemError":{"message":"System error"},"core/host/ResourceLoader.ts | unknownError":{"message":"Unknown error"},"core/i18n/time-utilities.ts | fdays":{"message":"{PH1} days"},"core/i18n/time-utilities.ts | fhrs":{"message":"{PH1} hrs"},"core/i18n/time-utilities.ts | fmin":{"message":"{PH1} min"},"core/i18n/time-utilities.ts | fmms":{"message":"{PH1} μs"},"core/i18n/time-utilities.ts | fms":{"message":"{PH1} ms"},"core/i18n/time-utilities.ts | fs":{"message":"{PH1} s"},"core/sdk/CPUProfilerModel.ts | profileD":{"message":"Profile {PH1}"},"core/sdk/CSSStyleSheetHeader.ts | couldNotFindTheOriginalStyle":{"message":"Could not find the original style sheet."},"core/sdk/CSSStyleSheetHeader.ts | thereWasAnErrorRetrievingThe":{"message":"There was an error retrieving the source files."},"core/sdk/ChildTargetManager.ts | main":{"message":"Main"},"core/sdk/CompilerSourceMappingContentProvider.ts | couldNotLoadContentForSS":{"message":"Could not load content for {PH1} ({PH2})"},"core/sdk/ConsoleModel.ts | bfcacheNavigation":{"message":"Navigation to {PH1} was restored from back-forward cache (see https://web.dev/bfcache/)"},"core/sdk/ConsoleModel.ts | failedToSaveToTempVariable":{"message":"Failed to save to temp variable."},"core/sdk/ConsoleModel.ts | navigatedToS":{"message":"Navigated to {PH1}"},"core/sdk/ConsoleModel.ts | profileSFinished":{"message":"Profile '{PH1}' finished."},"core/sdk/ConsoleModel.ts | profileSStarted":{"message":"Profile '{PH1}' started."},"core/sdk/DebuggerModel.ts | block":{"message":"Block"},"core/sdk/DebuggerModel.ts | catchBlock":{"message":"Catch block"},"core/sdk/DebuggerModel.ts | closure":{"message":"Closure"},"core/sdk/DebuggerModel.ts | expression":{"message":"Expression"},"core/sdk/DebuggerModel.ts | global":{"message":"Global"},"core/sdk/DebuggerModel.ts | local":{"message":"Local"},"core/sdk/DebuggerModel.ts | module":{"message":"Module"},"core/sdk/DebuggerModel.ts | script":{"message":"Script"},"core/sdk/DebuggerModel.ts | withBlock":{"message":"With block"},"core/sdk/NetworkManager.ts | fastG":{"message":"Fast 3G"},"core/sdk/NetworkManager.ts | noContentForPreflight":{"message":"No content available for pre-flight request"},"core/sdk/NetworkManager.ts | noContentForRedirect":{"message":"No content available because this request was redirected"},"core/sdk/NetworkManager.ts | noContentForWebSocket":{"message":"Content for WebSockets is currently not supported"},"core/sdk/NetworkManager.ts | noThrottling":{"message":"No throttling"},"core/sdk/NetworkManager.ts | offline":{"message":"Offline"},"core/sdk/NetworkManager.ts | requestWasBlockedByDevtoolsS":{"message":"Request was blocked by DevTools: '{PH1}'"},"core/sdk/NetworkManager.ts | sFailedLoadingSS":{"message":"{PH1} failed loading: {PH2} '{PH3}'."},"core/sdk/NetworkManager.ts | sFinishedLoadingSS":{"message":"{PH1} finished loading: {PH2} '{PH3}'."},"core/sdk/NetworkManager.ts | slowG":{"message":"Slow 3G"},"core/sdk/NetworkRequest.ts | anUnknownErrorWasEncounteredWhenTrying":{"message":"An unknown error was encountered when trying to store this cookie."},"core/sdk/NetworkRequest.ts | binary":{"message":"(binary)"},"core/sdk/NetworkRequest.ts | blockedReasonInvalidDomain":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because its domain attribute was invalid with regards to the current host URL."},"core/sdk/NetworkRequest.ts | blockedReasonInvalidPrefix":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it used the '__Secure-' or '__Host-' prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in https://tools.ietf.org/html/draft-west-cookie-prefixes-05."},"core/sdk/NetworkRequest.ts | blockedReasonOverwriteSecure":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it was not sent over a secure connection and would have overwritten a cookie with the Secure attribute."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteNoneInsecure":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the 'SameSite=None' attribute but did not have the 'Secure' attribute, which is required in order to use 'SameSite=None'."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteStrictLax":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the '{PH1}' attribute but came from a cross-site response which was not the response to a top-level navigation."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteUnspecifiedTreatedAsLax":{"message":"This Set-Cookie header didn't specify a 'SameSite' attribute and was defaulted to 'SameSite=Lax,' and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The Set-Cookie had to have been set with 'SameSite=None' to enable cross-site usage."},"core/sdk/NetworkRequest.ts | blockedReasonSecureOnly":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the 'Secure' attribute but was not received over a secure connection."},"core/sdk/NetworkRequest.ts | domainMismatch":{"message":"This cookie was blocked because the request URL's domain did not exactly match the cookie's domain, nor was the request URL's domain a subdomain of the cookie's Domain attribute value."},"core/sdk/NetworkRequest.ts | nameValuePairExceedsMaxSize":{"message":"This cookie was blocked because it was too large. The combined size of the name and value must be less than or equal to 4,096 characters."},"core/sdk/NetworkRequest.ts | notOnPath":{"message":"This cookie was blocked because its path was not an exact match for, or a superdirectory of, the request URL's path."},"core/sdk/NetworkRequest.ts | samePartyFromCrossPartyContext":{"message":"This cookie was blocked because it had the 'SameParty' attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same first-party set."},"core/sdk/NetworkRequest.ts | sameSiteLax":{"message":"This cookie was blocked because it had the 'SameSite=Lax' attribute and the request was made from a different site and was not initiated by a top-level navigation."},"core/sdk/NetworkRequest.ts | sameSiteNoneInsecure":{"message":"This cookie was blocked because it had the 'SameSite=None' attribute but was not marked 'Secure'. Cookies without SameSite restrictions must be marked 'Secure' and sent over a secure connection."},"core/sdk/NetworkRequest.ts | sameSiteStrict":{"message":"This cookie was blocked because it had the 'SameSite=Strict' attribute and the request was made from a different site. This includes top-level navigation requests initiated by other sites."},"core/sdk/NetworkRequest.ts | sameSiteUnspecifiedTreatedAsLax":{"message":"This cookie didn't specify a 'SameSite' attribute when it was stored, was defaulted to 'SameSite=Lax', and was blocked because the request was made from a different site and was not initiated by a top-level navigation. The cookie had to have been set with 'SameSite=None' to enable cross-site usage."},"core/sdk/NetworkRequest.ts | schemefulSameSiteLax":{"message":"This cookie was blocked because it had the 'SameSite=Lax' attribute but the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | schemefulSameSiteStrict":{"message":"This cookie was blocked because it had the 'SameSite=Strict' attribute but the request was cross-site. This includes top-level navigation requests initiated by other sites. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | schemefulSameSiteUnspecifiedTreatedAsLax":{"message":"This cookie didn't specify a 'SameSite' attribute when it was stored, was defaulted to 'SameSite=Lax\"', and was blocked because the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | secureOnly":{"message":"This cookie was blocked because it had the 'Secure' attribute and the connection was not secure."},"core/sdk/NetworkRequest.ts | setcookieHeaderIsIgnoredIn":{"message":"Set-Cookie header is ignored in response from URL: {PH1}. The combined size of the name and value must be less than or equal to 4,096 characters."},"core/sdk/NetworkRequest.ts | theSchemeOfThisConnectionIsNot":{"message":"The scheme of this connection is not allowed to store cookies."},"core/sdk/NetworkRequest.ts | thisSetcookieDidntSpecifyASamesite":{"message":"This Set-Cookie header didn't specify a 'SameSite' attribute, was defaulted to 'SameSite=Lax\", and was blocked because it came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | thisSetcookieHadADisallowedCharacter":{"message":"This Set-Cookie header contained a disallowed character (a forbidden ASCII control character, or the tab character if it appears in the middle of the cookie name, value, an attribute name or an attribute value)."},"core/sdk/NetworkRequest.ts | thisSetcookieHadInvalidSyntax":{"message":"This Set-Cookie header had invalid syntax."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSameparty":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the 'SameParty' attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same first-party set."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the 'SameParty' attribute but also had other conflicting attributes. Chrome requires cookies that use the 'SameParty' attribute to also have the 'Secure' attribute, and not be restricted to 'SameSite=Strict'."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the '{PH1}' attribute but came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because the cookie was too large. The combined size of the name and value must be less than or equal to 4,096 characters."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedDueToUser":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked due to user preferences."},"core/sdk/NetworkRequest.ts | unknownError":{"message":"An unknown error was encountered when trying to send this cookie."},"core/sdk/NetworkRequest.ts | userPreferences":{"message":"This cookie was blocked due to user preferences."},"core/sdk/OverlayModel.ts | pausedInDebugger":{"message":"Paused in debugger"},"core/sdk/PageResourceLoader.ts | loadCanceledDueToReloadOf":{"message":"Load cancelled due to reload of inspected page"},"core/sdk/Script.ts | scriptRemovedOrDeleted":{"message":"Script removed or deleted."},"core/sdk/Script.ts | unableToFetchScriptSource":{"message":"Unable to fetch script source."},"core/sdk/ServerTiming.ts | deprecatedSyntaxFoundPleaseUse":{"message":"Deprecated syntax found. Please use: ;dur=;desc="},"core/sdk/ServerTiming.ts | duplicateParameterSIgnored":{"message":"Duplicate parameter '{PH1}' ignored."},"core/sdk/ServerTiming.ts | extraneousTrailingCharacters":{"message":"Extraneous trailing characters."},"core/sdk/ServerTiming.ts | noValueFoundForParameterS":{"message":"No value found for parameter '{PH1}'."},"core/sdk/ServerTiming.ts | unableToParseSValueS":{"message":"Unable to parse '{PH1}' value '{PH2}'."},"core/sdk/ServerTiming.ts | unrecognizedParameterS":{"message":"Unrecognised parameter '{PH1}'."},"core/sdk/ServiceWorkerCacheModel.ts | serviceworkercacheagentError":{"message":"ServiceWorkerCacheAgent error deleting cache entry {PH1} in cache: {PH2}"},"core/sdk/ServiceWorkerManager.ts | activated":{"message":"activated"},"core/sdk/ServiceWorkerManager.ts | activating":{"message":"activating"},"core/sdk/ServiceWorkerManager.ts | installed":{"message":"installed"},"core/sdk/ServiceWorkerManager.ts | installing":{"message":"installing"},"core/sdk/ServiceWorkerManager.ts | new":{"message":"new"},"core/sdk/ServiceWorkerManager.ts | redundant":{"message":"redundant"},"core/sdk/ServiceWorkerManager.ts | running":{"message":"running"},"core/sdk/ServiceWorkerManager.ts | sSS":{"message":"{PH1} #{PH2} ({PH3})"},"core/sdk/ServiceWorkerManager.ts | starting":{"message":"starting"},"core/sdk/ServiceWorkerManager.ts | stopped":{"message":"stopped"},"core/sdk/ServiceWorkerManager.ts | stopping":{"message":"stopping"},"core/sdk/sdk-meta.ts | achromatopsia":{"message":"Achromatopsia (no colour)"},"core/sdk/sdk-meta.ts | blurredVision":{"message":"Blurred vision"},"core/sdk/sdk-meta.ts | captureAsyncStackTraces":{"message":"Capture async stack traces"},"core/sdk/sdk-meta.ts | deuteranopia":{"message":"Deuteranopia (no green)"},"core/sdk/sdk-meta.ts | disableAsyncStackTraces":{"message":"Disable async stack traces"},"core/sdk/sdk-meta.ts | disableAvifFormat":{"message":"Disable AVIF format"},"core/sdk/sdk-meta.ts | disableCache":{"message":"Disable cache (while DevTools is open)"},"core/sdk/sdk-meta.ts | disableJavascript":{"message":"Disable JavaScript"},"core/sdk/sdk-meta.ts | disableLocalFonts":{"message":"Disable local fonts"},"core/sdk/sdk-meta.ts | disableNetworkRequestBlocking":{"message":"Disable network request blocking"},"core/sdk/sdk-meta.ts | disableWebpFormat":{"message":"Disable WebP format"},"core/sdk/sdk-meta.ts | doNotCaptureAsyncStackTraces":{"message":"Do not capture async stack traces"},"core/sdk/sdk-meta.ts | doNotEmulateAFocusedPage":{"message":"Do not emulate a focused page"},"core/sdk/sdk-meta.ts | doNotEmulateAnyVisionDeficiency":{"message":"Do not emulate any vision deficiency"},"core/sdk/sdk-meta.ts | doNotEmulateCss":{"message":"Do not emulate CSS {PH1}"},"core/sdk/sdk-meta.ts | doNotEmulateCssMediaType":{"message":"Do not emulate CSS media type"},"core/sdk/sdk-meta.ts | doNotExtendGridLines":{"message":"Do not extend grid lines"},"core/sdk/sdk-meta.ts | doNotHighlightAdFrames":{"message":"Do not highlight ad frames"},"core/sdk/sdk-meta.ts | doNotPauseOnExceptions":{"message":"Do not pause on exceptions"},"core/sdk/sdk-meta.ts | doNotPreserveLogUponNavigation":{"message":"Do not preserve log upon navigation"},"core/sdk/sdk-meta.ts | doNotShowGridNamedAreas":{"message":"Do not show grid-named areas"},"core/sdk/sdk-meta.ts | doNotShowGridTrackSizes":{"message":"Do not show grid track sizes"},"core/sdk/sdk-meta.ts | doNotShowRulersOnHover":{"message":"Do not show rulers on hover"},"core/sdk/sdk-meta.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"core/sdk/sdk-meta.ts | emulateAchromatopsia":{"message":"Emulate achromatopsia (no colour)"},"core/sdk/sdk-meta.ts | emulateAutoDarkMode":{"message":"Emulate auto dark mode"},"core/sdk/sdk-meta.ts | emulateBlurredVision":{"message":"Emulate blurred vision"},"core/sdk/sdk-meta.ts | emulateCss":{"message":"Emulate CSS {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaFeature":{"message":"Emulate CSS media feature {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaType":{"message":"Emulate CSS media type"},"core/sdk/sdk-meta.ts | emulateCssPrintMediaType":{"message":"Emulate CSS print media type"},"core/sdk/sdk-meta.ts | emulateCssScreenMediaType":{"message":"Emulate CSS screen media type"},"core/sdk/sdk-meta.ts | emulateDeuteranopia":{"message":"Emulate deuteranopia (no green)"},"core/sdk/sdk-meta.ts | emulateProtanopia":{"message":"Emulate protanopia (no red)"},"core/sdk/sdk-meta.ts | emulateReducedContrast":{"message":"Emulate reduced contrast"},"core/sdk/sdk-meta.ts | emulateTritanopia":{"message":"Emulate tritanopia (no blue)"},"core/sdk/sdk-meta.ts | emulateVisionDeficiencies":{"message":"Emulate vision deficiencies"},"core/sdk/sdk-meta.ts | enableAvifFormat":{"message":"Enable AVIF format"},"core/sdk/sdk-meta.ts | enableCache":{"message":"Enable cache"},"core/sdk/sdk-meta.ts | enableCustomFormatters":{"message":"Enable custom formatters"},"core/sdk/sdk-meta.ts | enableJavascript":{"message":"Enable JavaScript"},"core/sdk/sdk-meta.ts | enableLocalFonts":{"message":"Enable local fonts"},"core/sdk/sdk-meta.ts | enableNetworkRequestBlocking":{"message":"Enable network request blocking"},"core/sdk/sdk-meta.ts | enableRemoteFileLoading":{"message":"Allow DevTools to load resources, such as source maps, from remote file paths. Disabled by default for security reasons."},"core/sdk/sdk-meta.ts | enableWebpFormat":{"message":"Enable WebP format"},"core/sdk/sdk-meta.ts | extendGridLines":{"message":"Extend grid lines"},"core/sdk/sdk-meta.ts | hideCoreWebVitalsOverlay":{"message":"Hide Core Web Vitals overlay"},"core/sdk/sdk-meta.ts | hideFramesPerSecondFpsMeter":{"message":"Hide frames per second (FPS) meter"},"core/sdk/sdk-meta.ts | hideLayerBorders":{"message":"Hide layer borders"},"core/sdk/sdk-meta.ts | hideLayoutShiftRegions":{"message":"Hide layout shift regions"},"core/sdk/sdk-meta.ts | hideLineLabels":{"message":"Hide line labels"},"core/sdk/sdk-meta.ts | hidePaintFlashingRectangles":{"message":"Hide paint flashing rectangles"},"core/sdk/sdk-meta.ts | hideScrollPerformanceBottlenecks":{"message":"Hide scroll performance bottlenecks"},"core/sdk/sdk-meta.ts | highlightAdFrames":{"message":"Highlight ad frames"},"core/sdk/sdk-meta.ts | noEmulation":{"message":"No emulation"},"core/sdk/sdk-meta.ts | pauseOnExceptions":{"message":"Pause on exceptions"},"core/sdk/sdk-meta.ts | preserveLogUponNavigation":{"message":"Preserve log upon navigation"},"core/sdk/sdk-meta.ts | print":{"message":"print"},"core/sdk/sdk-meta.ts | protanopia":{"message":"Protanopia (no red)"},"core/sdk/sdk-meta.ts | query":{"message":"query"},"core/sdk/sdk-meta.ts | reducedContrast":{"message":"Reduced contrast"},"core/sdk/sdk-meta.ts | screen":{"message":"screen"},"core/sdk/sdk-meta.ts | showAreaNames":{"message":"Show area names"},"core/sdk/sdk-meta.ts | showCoreWebVitalsOverlay":{"message":"Show Core Web Vitals overlay"},"core/sdk/sdk-meta.ts | showFramesPerSecondFpsMeter":{"message":"Show frames per second (FPS) meter"},"core/sdk/sdk-meta.ts | showGridNamedAreas":{"message":"Show grid-named areas"},"core/sdk/sdk-meta.ts | showGridTrackSizes":{"message":"Show grid track sizes"},"core/sdk/sdk-meta.ts | showLayerBorders":{"message":"Show layer borders"},"core/sdk/sdk-meta.ts | showLayoutShiftRegions":{"message":"Show layout shift regions"},"core/sdk/sdk-meta.ts | showLineLabels":{"message":"Show line labels"},"core/sdk/sdk-meta.ts | showLineNames":{"message":"Show line names"},"core/sdk/sdk-meta.ts | showLineNumbers":{"message":"Show line numbers"},"core/sdk/sdk-meta.ts | showPaintFlashingRectangles":{"message":"Show paint flashing rectangles"},"core/sdk/sdk-meta.ts | showRulersOnHover":{"message":"Show rulers on hover"},"core/sdk/sdk-meta.ts | showScrollPerformanceBottlenecks":{"message":"Show scroll performance bottlenecks"},"core/sdk/sdk-meta.ts | showTrackSizes":{"message":"Show track sizes"},"core/sdk/sdk-meta.ts | tritanopia":{"message":"Tritanopia (no blue)"},"entrypoints/inspector_main/InspectorMain.ts | javascriptIsDisabled":{"message":"JavaScript is disabled"},"entrypoints/inspector_main/InspectorMain.ts | main":{"message":"Main"},"entrypoints/inspector_main/InspectorMain.ts | openDedicatedTools":{"message":"Open dedicated DevTools for Node.js"},"entrypoints/inspector_main/InspectorMain.ts | tab":{"message":"Tab"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetNotSelected":{"message":"Page: Not selected"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetS":{"message":"Page: {PH1}"},"entrypoints/inspector_main/RenderingOptions.ts | coreWebVitals":{"message":"Core Web Vitals"},"entrypoints/inspector_main/RenderingOptions.ts | disableAvifImageFormat":{"message":"Disable AVIF image format"},"entrypoints/inspector_main/RenderingOptions.ts | disableLocalFonts":{"message":"Disable local fonts"},"entrypoints/inspector_main/RenderingOptions.ts | disableWebpImageFormat":{"message":"Disable WebP image format"},"entrypoints/inspector_main/RenderingOptions.ts | disablesLocalSourcesInFontface":{"message":"Disables local() sources in @font-face rules. Requires a page reload to apply."},"entrypoints/inspector_main/RenderingOptions.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAutoDarkMode":{"message":"Enable automatic dark mode"},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAFocusedPage":{"message":"Emulates a focused page."},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAutoDarkMode":{"message":"Enables automatic dark mode and sets prefers-color-scheme to dark."},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssColorgamutMediaFeature":{"message":"Forces CSS color-gamut media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssForcedColors":{"message":"Forces CSS forced-colours media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscolorschemeMedia":{"message":"Forces CSS prefers-color-scheme media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscontrastMedia":{"message":"Forces CSS prefers-contrast media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreduceddataMedia":{"message":"Forces CSS prefers-reduced-data media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreducedmotion":{"message":"Forces CSS prefers-reduced-motion media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreducedtransparencyMedia":{"message":"Forces CSS prefers-reduced-transparency media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesMediaTypeForTestingPrint":{"message":"Forces media type for testing print and screen styles"},"entrypoints/inspector_main/RenderingOptions.ts | forcesVisionDeficiencyEmulation":{"message":"Forces vision deficiency emulation"},"entrypoints/inspector_main/RenderingOptions.ts | frameRenderingStats":{"message":"Frame rendering stats"},"entrypoints/inspector_main/RenderingOptions.ts | highlightAdFrames":{"message":"Highlight ad frames"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageBlueThat":{"message":"Highlights areas of the page (blue) that were shifted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageGreen":{"message":"Highlights areas of the page (green) that need to be repainted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsElementsTealThatCan":{"message":"Highlights elements (teal) that can slow down scrolling, including touch and wheel event handlers and other main-thread scrolling situations."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsFramesRedDetectedToBe":{"message":"Highlights frames (red) detected to be ads."},"entrypoints/inspector_main/RenderingOptions.ts | layerBorders":{"message":"Layer borders"},"entrypoints/inspector_main/RenderingOptions.ts | layoutShiftRegions":{"message":"Layout shift regions"},"entrypoints/inspector_main/RenderingOptions.ts | paintFlashing":{"message":"Paint flashing"},"entrypoints/inspector_main/RenderingOptions.ts | plotsFrameThroughputDropped":{"message":"Plots frame throughput, dropped frames distribution and GPU memory."},"entrypoints/inspector_main/RenderingOptions.ts | requiresAPageReloadToApplyAnd":{"message":"Requires a page reload to apply and disables caching for image requests."},"entrypoints/inspector_main/RenderingOptions.ts | scrollingPerformanceIssues":{"message":"Scrolling performance issues"},"entrypoints/inspector_main/RenderingOptions.ts | showsAnOverlayWithCoreWebVitals":{"message":"Shows an overlay with Core Web Vitals."},"entrypoints/inspector_main/RenderingOptions.ts | showsLayerBordersOrangeoliveAnd":{"message":"Shows layer borders (orange/olive) and tiles (cyan)."},"entrypoints/inspector_main/inspector_main-meta.ts | autoOpenDevTools":{"message":"Auto-open DevTools for pop-ups"},"entrypoints/inspector_main/inspector_main-meta.ts | blockAds":{"message":"Block ads on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | colorVisionDeficiency":{"message":"colour vision deficiency"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaFeature":{"message":"CSS media feature"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaType":{"message":"CSS media type"},"entrypoints/inspector_main/inspector_main-meta.ts | disablePaused":{"message":"Disable paused state overlay"},"entrypoints/inspector_main/inspector_main-meta.ts | doNotAutoOpen":{"message":"Do not auto-open DevTools for pop-ups"},"entrypoints/inspector_main/inspector_main-meta.ts | forceAdBlocking":{"message":"Force ad blocking on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | fps":{"message":"fps"},"entrypoints/inspector_main/inspector_main-meta.ts | hardReloadPage":{"message":"Hard reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | layout":{"message":"layout"},"entrypoints/inspector_main/inspector_main-meta.ts | paint":{"message":"paint"},"entrypoints/inspector_main/inspector_main-meta.ts | reloadPage":{"message":"Reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | rendering":{"message":"Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | showAds":{"message":"Show ads on this site, if allowed"},"entrypoints/inspector_main/inspector_main-meta.ts | showRendering":{"message":"Show Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia":{"message":"Toggle CSS media feature prefers-colour-scheme"},"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency":{"message":"vision deficiency"},"entrypoints/js_app/js_app.ts | main":{"message":"Main"},"entrypoints/main/MainImpl.ts | customizeAndControlDevtools":{"message":"Customise and control DevTools"},"entrypoints/main/MainImpl.ts | dockSide":{"message":"Dock side"},"entrypoints/main/MainImpl.ts | dockSideNaviation":{"message":"Use left and right arrow keys to navigate the options"},"entrypoints/main/MainImpl.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/MainImpl.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/MainImpl.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/MainImpl.ts | focusDebuggee":{"message":"Focus page"},"entrypoints/main/MainImpl.ts | help":{"message":"Help"},"entrypoints/main/MainImpl.ts | hideConsoleDrawer":{"message":"Hide console drawer"},"entrypoints/main/MainImpl.ts | moreTools":{"message":"More tools"},"entrypoints/main/MainImpl.ts | placementOfDevtoolsRelativeToThe":{"message":"Placement of DevTools relative to the page. ({PH1} to restore last position)"},"entrypoints/main/MainImpl.ts | showConsoleDrawer":{"message":"Show console drawer"},"entrypoints/main/MainImpl.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/main/main-meta.ts | auto":{"message":"auto"},"entrypoints/main/main-meta.ts | bottom":{"message":"Bottom"},"entrypoints/main/main-meta.ts | browserLanguage":{"message":"Browser UI language"},"entrypoints/main/main-meta.ts | cancelSearch":{"message":"Cancel search"},"entrypoints/main/main-meta.ts | darkCapital":{"message":"Dark"},"entrypoints/main/main-meta.ts | darkLower":{"message":"dark"},"entrypoints/main/main-meta.ts | devtoolsDefault":{"message":"DevTools (default)"},"entrypoints/main/main-meta.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/main-meta.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/main-meta.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/main-meta.ts | enableCtrlShortcutToSwitchPanels":{"message":"Enable Ctrl + 1–9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableShortcutToSwitchPanels":{"message":"Enable ⌘ + 1–9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableSync":{"message":"Enable settings sync"},"entrypoints/main/main-meta.ts | findNextResult":{"message":"Find next result"},"entrypoints/main/main-meta.ts | findPreviousResult":{"message":"Find previous result"},"entrypoints/main/main-meta.ts | focusDebuggee":{"message":"Focus page"},"entrypoints/main/main-meta.ts | horizontal":{"message":"horizontal"},"entrypoints/main/main-meta.ts | language":{"message":"Language:"},"entrypoints/main/main-meta.ts | left":{"message":"Left"},"entrypoints/main/main-meta.ts | lightCapital":{"message":"Light"},"entrypoints/main/main-meta.ts | lightLower":{"message":"light"},"entrypoints/main/main-meta.ts | nextPanel":{"message":"Next panel"},"entrypoints/main/main-meta.ts | panelLayout":{"message":"Panel layout:"},"entrypoints/main/main-meta.ts | previousPanel":{"message":"Previous panel"},"entrypoints/main/main-meta.ts | reloadDevtools":{"message":"Reload DevTools"},"entrypoints/main/main-meta.ts | resetZoomLevel":{"message":"Reset zoom level"},"entrypoints/main/main-meta.ts | restoreLastDockPosition":{"message":"Restore last dock position"},"entrypoints/main/main-meta.ts | right":{"message":"Right"},"entrypoints/main/main-meta.ts | searchAsYouTypeCommand":{"message":"Enable search as you type"},"entrypoints/main/main-meta.ts | searchAsYouTypeSetting":{"message":"Search as you type"},"entrypoints/main/main-meta.ts | searchInPanel":{"message":"Search in panel"},"entrypoints/main/main-meta.ts | searchOnEnterCommand":{"message":"Disable search as you type (press Enter to search)"},"entrypoints/main/main-meta.ts | switchToDarkTheme":{"message":"Switch to Dark theme"},"entrypoints/main/main-meta.ts | switchToLightTheme":{"message":"Switch to light theme"},"entrypoints/main/main-meta.ts | switchToSystemPreferredColor":{"message":"Switch to system-preferred colour theme"},"entrypoints/main/main-meta.ts | systemPreference":{"message":"System preference"},"entrypoints/main/main-meta.ts | theme":{"message":"Theme:"},"entrypoints/main/main-meta.ts | toggleDrawer":{"message":"Toggle drawer"},"entrypoints/main/main-meta.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/main/main-meta.ts | undocked":{"message":"Undocked"},"entrypoints/main/main-meta.ts | useAutomaticPanelLayout":{"message":"Use automatic panel layout"},"entrypoints/main/main-meta.ts | useHorizontalPanelLayout":{"message":"Use horizontal panel layout"},"entrypoints/main/main-meta.ts | useVerticalPanelLayout":{"message":"Use vertical panel layout"},"entrypoints/main/main-meta.ts | vertical":{"message":"vertical"},"entrypoints/main/main-meta.ts | zoomIn":{"message":"Zoom in"},"entrypoints/main/main-meta.ts | zoomOut":{"message":"Zoom out"},"entrypoints/node_app/NodeConnectionsPanel.ts | addConnection":{"message":"Add connection"},"entrypoints/node_app/NodeConnectionsPanel.ts | networkAddressEgLocalhost":{"message":"Network address (e.g. localhost:9229)"},"entrypoints/node_app/NodeConnectionsPanel.ts | noConnectionsSpecified":{"message":"No connections specified"},"entrypoints/node_app/NodeConnectionsPanel.ts | nodejsDebuggingGuide":{"message":"Node.js debugging guide"},"entrypoints/node_app/NodeConnectionsPanel.ts | specifyNetworkEndpointAnd":{"message":"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more."},"entrypoints/node_app/NodeMain.ts | main":{"message":"Main"},"entrypoints/node_app/NodeMain.ts | nodejsS":{"message":"Node.js: {PH1}"},"entrypoints/node_app/node_app.ts | connection":{"message":"Connection"},"entrypoints/node_app/node_app.ts | networkTitle":{"message":"Node"},"entrypoints/node_app/node_app.ts | node":{"message":"node"},"entrypoints/node_app/node_app.ts | showConnection":{"message":"Show connection"},"entrypoints/node_app/node_app.ts | showNode":{"message":"Show node"},"entrypoints/worker_app/WorkerMain.ts | main":{"message":"Main"},"generated/Deprecation.ts | AuthorizationCoveredByWildcard":{"message":"Authorisation will not be covered by the wildcard symbol (*) in CORS Access-Control-Allow-Headers handling."},"generated/Deprecation.ts | CSSSelectorInternalMediaControlsOverlayCastButton":{"message":"The disableRemotePlayback attribute should be used in order to disable the default Cast integration instead of using -internal-media-controls-overlay-cast-button selector."},"generated/Deprecation.ts | CSSValueAppearanceNonStandard":{"message":"CSS appearance values inner-spin-button, media-slider, media-sliderthumb, media-volume-slider, media-volume-sliderthumb, push-button, searchfield-cancel-button, slider-horizontal, sliderthumb-horizontal, sliderthumb-vertical, square-button are not standardised and will be removed."},"generated/Deprecation.ts | CSSValueAppearanceSliderVertical":{"message":"CSS appearance value slider-vertical is not standardised and will be removed."},"generated/Deprecation.ts | CanRequestURLHTTPContainingNewline":{"message":"Resource requests whose URLs contained both removed whitespace \\(n|r|t) characters and less-than characters (<) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources."},"generated/Deprecation.ts | ChromeLoadTimesConnectionInfo":{"message":"chrome.loadTimes() is deprecated. Instead, use standardised API: Navigation Timing 2."},"generated/Deprecation.ts | ChromeLoadTimesFirstPaintAfterLoadTime":{"message":"chrome.loadTimes() is deprecated. Instead, use standardised API: Paint Timing."},"generated/Deprecation.ts | ChromeLoadTimesWasAlternateProtocolAvailable":{"message":"chrome.loadTimes() is deprecated. Instead, use standardised API: nextHopProtocol in Navigation Timing 2."},"generated/Deprecation.ts | CookieWithTruncatingChar":{"message":"Cookies containing a \\(0|r|n) character will be rejected instead of truncated."},"generated/Deprecation.ts | CrossOriginAccessBasedOnDocumentDomain":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting document.domain."},"generated/Deprecation.ts | CrossOriginWindowAlert":{"message":"Triggering window.alert from cross-origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CrossOriginWindowConfirm":{"message":"Triggering window.confirm from cross-origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | DOMMutationEvents":{"message":"DOM mutation events, including DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMNodeInsertedIntoDocument and DOMCharacterDataModified are deprecated (https://w3c.github.io/uievents/#legacy-event-types) and will be removed. Please use MutationObserver instead."},"generated/Deprecation.ts | DataUrlInSvgUse":{"message":"Support for data: URLs in SVGUseElement is deprecated and it will be removed in the future."},"generated/Deprecation.ts | DocumentDomainSettingWithoutOriginAgentClusterHeader":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. To continue using this feature, please opt out of origin-keyed agent clusters by sending an Origin-Agent-Cluster: ?0 header along with the HTTP response for the document and frames. See https://developer.chrome.com/blog/immutable-document-domain/ for more details."},"generated/Deprecation.ts | ExpectCTHeader":{"message":"The Expect-CT header is deprecated and will be removed. Chrome requires Certificate Transparency for all publicly trusted certificates issued after 30 April 2018."},"generated/Deprecation.ts | GeolocationInsecureOrigin":{"message":"getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GeolocationInsecureOriginDeprecatedNotRemoved":{"message":"getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GetUserMediaInsecureOrigin":{"message":"getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | HostCandidateAttributeGetter":{"message":"RTCPeerConnectionIceErrorEvent.hostCandidate is deprecated. Please use RTCPeerConnectionIceErrorEvent.address or RTCPeerConnectionIceErrorEvent.port instead."},"generated/Deprecation.ts | IdentityInCanMakePaymentEvent":{"message":"The merchant origin and arbitrary data from the canmakepayment service worker event are deprecated and will be removed: topOrigin, paymentRequestOrigin, methodData, modifiers."},"generated/Deprecation.ts | InsecurePrivateNetworkSubresourceRequest":{"message":"The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the Internet, increasing the risk of a cross-site request forgery (CSRF) attack and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them."},"generated/Deprecation.ts | InterestGroupDailyUpdateUrl":{"message":"The dailyUpdateUrl field of InterestGroups passed to joinAdInterestGroup() has been renamed to updateUrl, to more accurately reflect its behaviour."},"generated/Deprecation.ts | LocalCSSFileExtensionRejected":{"message":"CSS cannot be loaded from file: URLs unless they end in a .css file extension."},"generated/Deprecation.ts | MediaSourceAbortRemove":{"message":"Using SourceBuffer.abort() to abort remove()'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the updateend event instead. abort() is intended to only abort an asynchronous media append or reset parser state."},"generated/Deprecation.ts | MediaSourceDurationTruncatingBuffered":{"message":"Setting MediaSource.duration below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit remove(newDuration, oldDuration) on all sourceBuffers, where newDuration < oldDuration."},"generated/Deprecation.ts | NoSysexWebMIDIWithoutPermission":{"message":"Web MIDI will ask permission to use even if the sysex is not specified in the MIDIOptions."},"generated/Deprecation.ts | NonStandardDeclarativeShadowDOM":{"message":"The older, non-standardized shadowroot attribute is deprecated and will *no longer function* in M119. Please use the new, standardised shadowrootmode attribute instead."},"generated/Deprecation.ts | NotificationInsecureOrigin":{"message":"The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | NotificationPermissionRequestedIframe":{"message":"Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead."},"generated/Deprecation.ts | ObsoleteCreateImageBitmapImageOrientationNone":{"message":"Option imageOrientation: 'none' in createImageBitmap is deprecated. Please use createImageBitmap with option {imageOrientation: 'from-image'} instead."},"generated/Deprecation.ts | ObsoleteWebRtcCipherSuite":{"message":"Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed."},"generated/Deprecation.ts | OverflowVisibleOnReplacedElement":{"message":"Specifying overflow: visible on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md."},"generated/Deprecation.ts | PaymentInstruments":{"message":"paymentManager.instruments is deprecated. Please use just-in-time install for payment handlers instead."},"generated/Deprecation.ts | PaymentRequestCSPViolation":{"message":"Your PaymentRequest call bypassed Content-Security-Policy (CSP) connect-src directive. This bypass is deprecated. Please add the payment method identifier from the PaymentRequest API (in supportedMethods field) to your CSP connect-src directive."},"generated/Deprecation.ts | PersistentQuotaType":{"message":"StorageType.persistent is deprecated. Please use standardised navigator.storage instead."},"generated/Deprecation.ts | PictureSourceSrc":{"message":" with a parent is invalid and therefore ignored. Please use instead."},"generated/Deprecation.ts | PrefixedCancelAnimationFrame":{"message":"webkitCancelAnimationFrame is vendor-specific. Please use the standard cancelAnimationFrame instead."},"generated/Deprecation.ts | PrefixedRequestAnimationFrame":{"message":"webkitRequestAnimationFrame is vendor-specific. Please use the standard requestAnimationFrame instead."},"generated/Deprecation.ts | PrefixedVideoDisplayingFullscreen":{"message":"HTMLVideoElement.webkitDisplayingFullscreen is deprecated. Please use Document.fullscreenElement instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullScreen":{"message":"HTMLVideoElement.webkitEnterFullScreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullscreen":{"message":"HTMLVideoElement.webkitEnterFullscreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullScreen":{"message":"HTMLVideoElement.webkitExitFullScreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullscreen":{"message":"HTMLVideoElement.webkitExitFullscreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoSupportsFullscreen":{"message":"HTMLVideoElement.webkitSupportsFullscreen is deprecated. Please use Document.fullscreenEnabled instead."},"generated/Deprecation.ts | PrivacySandboxExtensionsAPI":{"message":"We're deprecating the API chrome.privacy.websites.privacySandboxEnabled, though it will remain active for backward compatibility until release M113. Instead, please use chrome.privacy.websites.topicsEnabled, chrome.privacy.websites.fledgeEnabled and chrome.privacy.websites.adMeasurementEnabled. See https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpFalse":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a false value for this constraint, which is interpreted as an attempt to use the removed SDES key negotiation method. This functionality is removed; use a service that supports DTLS key negotiation instead."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpTrue":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a true value for this constraint, which had no effect, but you can remove this constraint for tidiness."},"generated/Deprecation.ts | RTCPeerConnectionGetStatsLegacyNonCompliant":{"message":"The callback-based getStats() is deprecated and will be removed. Use the spec-compliant getStats() instead."},"generated/Deprecation.ts | RangeExpand":{"message":"Range.expand() is deprecated. Please use Selection.modify() instead."},"generated/Deprecation.ts | RequestedSubresourceWithEmbeddedCredentials":{"message":"Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/) are blocked."},"generated/Deprecation.ts | RtcpMuxPolicyNegotiate":{"message":"The rtcpMuxPolicy option is deprecated and will be removed."},"generated/Deprecation.ts | SharedArrayBufferConstructedWithoutIsolation":{"message":"SharedArrayBuffer will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details."},"generated/Deprecation.ts | TextToSpeech_DisallowedByAutoplay":{"message":"speechSynthesis.speak() without user activation is deprecated and will be removed."},"generated/Deprecation.ts | V8SharedArrayBufferConstructedInExtensionWithoutIsolation":{"message":"Extensions should opt in to cross-origin isolation to continue using SharedArrayBuffer. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/."},"generated/Deprecation.ts | WebSQL":{"message":"Web SQL is deprecated. Please use SQLite WebAssembly or Indexed Database"},"generated/Deprecation.ts | WindowPlacementPermissionDescriptorUsed":{"message":"The permission descriptor window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | WindowPlacementPermissionPolicyParsed":{"message":"The permission policy window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | XHRJSONEncodingDetection":{"message":"UTF-16 is not supported by response JSON in XMLHttpRequest"},"generated/Deprecation.ts | XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload":{"message":"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects on the end user's experience. For more help, check https://xhr.spec.whatwg.org/."},"generated/Deprecation.ts | XRSupportsSession":{"message":"supportsSession() is deprecated. Please use isSessionSupported() and check the resolved Boolean value instead."},"models/bindings/ContentProviderBasedProject.ts | unknownErrorLoadingFile":{"message":"Unknown error loading file"},"models/bindings/DebuggerLanguagePlugins.ts | debugSymbolsIncomplete":{"message":"The debug information for function {PH1} is incomplete"},"models/bindings/DebuggerLanguagePlugins.ts | errorInDebuggerLanguagePlugin":{"message":"Error in debugger language plug-in: {PH1}"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsFor":{"message":"[{PH1}] Failed to load debug symbols for {PH2} ({PH3})"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsForFunction":{"message":"No debug information for function '{PH1}'"},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForButDidnt":{"message":"[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files"},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForFound":{"message":"[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)"},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsFor":{"message":"[{PH1}] Loading debug symbols for {PH2}…"},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsForVia":{"message":"[{PH1}] Loading debug symbols for {PH2} (via {PH3})…"},"models/bindings/IgnoreListManager.ts | addAllContentScriptsToIgnoreList":{"message":"Add all extension scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addAllThirdPartyScriptsToIgnoreList":{"message":"Add all third-party scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addDirectoryToIgnoreList":{"message":"Add directory to ignore list"},"models/bindings/IgnoreListManager.ts | addScriptToIgnoreList":{"message":"Add script to ignore list"},"models/bindings/IgnoreListManager.ts | removeFromIgnoreList":{"message":"Remove from ignore list"},"models/bindings/ResourceScriptMapping.ts | liveEditCompileFailed":{"message":"LiveEdit compile failed: {PH1}"},"models/bindings/ResourceScriptMapping.ts | liveEditFailed":{"message":"LiveEdit failed: {PH1}"},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeANumberOr":{"message":"Device pixel ratio must be a number or blank."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeGreater":{"message":"Device pixel ratio must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeLessThanOr":{"message":"Device pixel ratio must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeANumber":{"message":"Height must be a number."},"models/emulation/DeviceModeModel.ts | heightMustBeGreaterThanOrEqualTo":{"message":"Height must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeLessThanOrEqualToS":{"message":"Height must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeANumber":{"message":"Width must be a number."},"models/emulation/DeviceModeModel.ts | widthMustBeGreaterThanOrEqualToS":{"message":"Width must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeLessThanOrEqualToS":{"message":"Width must be less than or equal to {PH1}."},"models/emulation/EmulatedDevices.ts | laptopWithHiDPIScreen":{"message":"Laptop with HiDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithMDPIScreen":{"message":"Laptop with MDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithTouch":{"message":"Laptop with touch"},"models/har/Writer.ts | collectingContent":{"message":"Collecting content…"},"models/har/Writer.ts | writingFile":{"message":"Writing file…"},"models/issues_manager/BounceTrackingIssue.ts | bounceTrackingMitigations":{"message":"Bounce tracking mitigations"},"models/issues_manager/ClientHintIssue.ts | clientHintsInfrastructure":{"message":"Client hints infrastructure"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyEval":{"message":"Content Security Policy – eval"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyInlineCode":{"message":"Content Security Policy – inline code"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicySource":{"message":"Content Security Policy – source allowlists"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesFixViolations":{"message":"Trusted Types – fix violations"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesPolicyViolation":{"message":"Trusted Types – policy violation"},"models/issues_manager/CookieDeprecationMetadataIssue.ts | thirdPartyPhaseoutExplained":{"message":"Prepare for phasing out third-party cookies"},"models/issues_manager/CookieIssue.ts | aSecure":{"message":"a secure"},"models/issues_manager/CookieIssue.ts | anInsecure":{"message":"an insecure"},"models/issues_manager/CookieIssue.ts | fileCrosSiteRedirectBug":{"message":"File a bug"},"models/issues_manager/CookieIssue.ts | firstPartySetsExplained":{"message":"First-Party Sets and the SameParty attribute"},"models/issues_manager/CookieIssue.ts | howSchemefulSamesiteWorks":{"message":"How Schemeful Same-Site works"},"models/issues_manager/CookieIssue.ts | samesiteCookiesExplained":{"message":"SameSite cookies explained"},"models/issues_manager/CookieIssue.ts | thirdPartyPhaseoutExplained":{"message":"Prepare for phasing out third-party cookies"},"models/issues_manager/CorsIssue.ts | CORS":{"message":"Cross-origin resource sharing (CORS)"},"models/issues_manager/CorsIssue.ts | corsPrivateNetworkAccess":{"message":"Private network access"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | coopAndCoep":{"message":"COOP and COEP"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | samesiteAndSameorigin":{"message":"SameSite and same-origin"},"models/issues_manager/DeprecationIssue.ts | feature":{"message":"Check the feature status page for more details."},"models/issues_manager/DeprecationIssue.ts | milestone":{"message":"This change will go into effect with milestone {milestone}."},"models/issues_manager/DeprecationIssue.ts | title":{"message":"Deprecated feature used"},"models/issues_manager/FederatedAuthRequestIssue.ts | fedCm":{"message":"Federated Credential Management API"},"models/issues_manager/FederatedAuthUserInfoRequestIssue.ts | fedCmUserInfo":{"message":"Federated Credential Management user info API"},"models/issues_manager/GenericIssue.ts | autocompleteAttributePageTitle":{"message":"HTML attribute: Autocomplete"},"models/issues_manager/GenericIssue.ts | corbExplainerPageTitle":{"message":"CORB explainer"},"models/issues_manager/GenericIssue.ts | crossOriginPortalPostMessage":{"message":"Portals – same-origin communication channels"},"models/issues_manager/GenericIssue.ts | howDoesAutofillWorkPageTitle":{"message":"How does auto-fill work?"},"models/issues_manager/GenericIssue.ts | inputFormElementPageTitle":{"message":"The form input element"},"models/issues_manager/GenericIssue.ts | labelFormlementsPageTitle":{"message":"The label elements"},"models/issues_manager/HeavyAdIssue.ts | handlingHeavyAdInterventions":{"message":"Handling heavy ad interventions"},"models/issues_manager/Issue.ts | breakingChangeIssue":{"message":"A breaking change issue: the page may stop working in an upcoming version of Chrome"},"models/issues_manager/Issue.ts | breakingChanges":{"message":"Breaking changes"},"models/issues_manager/Issue.ts | improvementIssue":{"message":"An improvement issue: there is an opportunity to improve the page"},"models/issues_manager/Issue.ts | improvements":{"message":"Improvements"},"models/issues_manager/Issue.ts | pageErrorIssue":{"message":"A page error issue: the page is not working correctly"},"models/issues_manager/Issue.ts | pageErrors":{"message":"Page errors"},"models/issues_manager/LowTextContrastIssue.ts | colorAndContrastAccessibility":{"message":"Colour and contrast accessibility"},"models/issues_manager/MixedContentIssue.ts | preventingMixedContent":{"message":"Preventing mixed content"},"models/issues_manager/QuirksModeIssue.ts | documentCompatibilityMode":{"message":"Document compatibility mode"},"models/issues_manager/SharedArrayBufferIssue.ts | enablingSharedArrayBuffer":{"message":"Enabling SharedArrayBuffer"},"models/logs/NetworkLog.ts | anonymous":{"message":""},"models/logs/logs-meta.ts | clear":{"message":"clear"},"models/logs/logs-meta.ts | doNotPreserveLogOnPageReload":{"message":"Do not preserve log on page reload/navigation"},"models/logs/logs-meta.ts | preserve":{"message":"preserve"},"models/logs/logs-meta.ts | preserveLog":{"message":"Preserve log"},"models/logs/logs-meta.ts | preserveLogOnPageReload":{"message":"Preserve log on page reload/navigation"},"models/logs/logs-meta.ts | recordNetworkLog":{"message":"Record network log"},"models/logs/logs-meta.ts | reset":{"message":"reset"},"models/persistence/EditFileSystemView.ts | add":{"message":"Add"},"models/persistence/EditFileSystemView.ts | enterAPath":{"message":"Enter a path"},"models/persistence/EditFileSystemView.ts | enterAUniquePath":{"message":"Enter a unique path"},"models/persistence/EditFileSystemView.ts | excludedFolders":{"message":"Excluded folders"},"models/persistence/EditFileSystemView.ts | folderPath":{"message":"Folder path"},"models/persistence/EditFileSystemView.ts | none":{"message":"None"},"models/persistence/EditFileSystemView.ts | sViaDevtools":{"message":"{PH1} (via .devtools)"},"models/persistence/IsolatedFileSystem.ts | blobCouldNotBeLoaded":{"message":"Blob could not be loaded."},"models/persistence/IsolatedFileSystem.ts | cantReadFileSS":{"message":"Can't read file: {PH1}: {PH2}"},"models/persistence/IsolatedFileSystem.ts | fileSystemErrorS":{"message":"File system error: {PH1}"},"models/persistence/IsolatedFileSystem.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/IsolatedFileSystem.ts | unknownErrorReadingFileS":{"message":"Unknown error reading file: {PH1}"},"models/persistence/IsolatedFileSystemManager.ts | unableToAddFilesystemS":{"message":"Unable to add file system: {PH1}"},"models/persistence/PersistenceActions.ts | openInContainingFolder":{"message":"Open in containing folder"},"models/persistence/PersistenceActions.ts | overrideContent":{"message":"Override content"},"models/persistence/PersistenceActions.ts | overrideSourceMappedFileExplanation":{"message":"‘{PH1}’ is a source mapped file and cannot be overridden."},"models/persistence/PersistenceActions.ts | overrideSourceMappedFileWarning":{"message":"Override ‘{PH1}’ instead?"},"models/persistence/PersistenceActions.ts | saveAs":{"message":"Save as…"},"models/persistence/PersistenceActions.ts | saveImage":{"message":"Save image"},"models/persistence/PersistenceActions.ts | showOverrides":{"message":"Show all overrides"},"models/persistence/PersistenceUtils.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/PersistenceUtils.ts | linkedToSourceMapS":{"message":"Linked to source map: {PH1}"},"models/persistence/PlatformFileSystem.ts | unableToReadFilesWithThis":{"message":"PlatformFileSystem cannot read files."},"models/persistence/WorkspaceSettingsTab.ts | addFolder":{"message":"Add folder…"},"models/persistence/WorkspaceSettingsTab.ts | folderExcludePattern":{"message":"Folder exclude pattern"},"models/persistence/WorkspaceSettingsTab.ts | mappingsAreInferredAutomatically":{"message":"Mappings are inferred automatically."},"models/persistence/WorkspaceSettingsTab.ts | remove":{"message":"Remove"},"models/persistence/WorkspaceSettingsTab.ts | workspace":{"message":"Workspace"},"models/persistence/persistence-meta.ts | disableOverrideNetworkRequests":{"message":"Disable override network requests"},"models/persistence/persistence-meta.ts | enableLocalOverrides":{"message":"Enable local overrides"},"models/persistence/persistence-meta.ts | enableOverrideNetworkRequests":{"message":"Enable override network requests"},"models/persistence/persistence-meta.ts | interception":{"message":"interception"},"models/persistence/persistence-meta.ts | network":{"message":"network"},"models/persistence/persistence-meta.ts | override":{"message":"override"},"models/persistence/persistence-meta.ts | request":{"message":"request"},"models/persistence/persistence-meta.ts | rewrite":{"message":"rewrite"},"models/persistence/persistence-meta.ts | showWorkspace":{"message":"Show Workspace settings"},"models/persistence/persistence-meta.ts | workspace":{"message":"Workspace"},"models/timeline_model/TimelineJSProfile.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | dedicatedWorker":{"message":"Dedicated Worker"},"models/timeline_model/TimelineModel.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | workerS":{"message":"Worker — {PH1}"},"models/timeline_model/TimelineModel.ts | workerSS":{"message":"Worker: {PH1} — {PH2}"},"models/workspace/UISourceCode.ts | index":{"message":"(index)"},"models/workspace/UISourceCode.ts | thisFileWasChangedExternally":{"message":"This file was changed externally. Would you like to reload it?"},"panels/accessibility/ARIAAttributesView.ts | ariaAttributes":{"message":"ARIA attributes"},"panels/accessibility/ARIAAttributesView.ts | noAriaAttributes":{"message":"No ARIA attributes"},"panels/accessibility/AXBreadcrumbsPane.ts | accessibilityTree":{"message":"Accessibility tree"},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentDescription":{"message":"The accessibility tree moved to the top-right corner of the DOM tree."},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentName":{"message":"Enable full-page accessibility tree"},"panels/accessibility/AXBreadcrumbsPane.ts | ignored":{"message":"Ignored"},"panels/accessibility/AXBreadcrumbsPane.ts | reloadRequired":{"message":"Reload required before the change takes effect."},"panels/accessibility/AXBreadcrumbsPane.ts | scrollIntoView":{"message":"Scroll into view"},"panels/accessibility/AccessibilityNodeView.ts | accessibilityNodeNotExposed":{"message":"Accessibility node not exposed"},"panels/accessibility/AccessibilityNodeView.ts | ancestorChildrenAreAll":{"message":"Ancestor's children are all presentational: "},"panels/accessibility/AccessibilityNodeView.ts | computedProperties":{"message":"Computed properties"},"panels/accessibility/AccessibilityNodeView.ts | elementHasEmptyAltText":{"message":"Element has empty alt text."},"panels/accessibility/AccessibilityNodeView.ts | elementHasPlaceholder":{"message":"Element has {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsHiddenBy":{"message":"Element is hidden by active modal dialogue: "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInAnInertSubTree":{"message":"Element is in an inert subtree from "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInert":{"message":"Element is inert."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotRendered":{"message":"Element is not rendered."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotVisible":{"message":"Element is not visible."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPlaceholder":{"message":"Element is {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPresentational":{"message":"Element is presentational."},"panels/accessibility/AccessibilityNodeView.ts | elementNotInteresting":{"message":"Element not interesting for accessibility."},"panels/accessibility/AccessibilityNodeView.ts | elementsInheritsPresentational":{"message":"Element inherits presentational role from "},"panels/accessibility/AccessibilityNodeView.ts | invalidSource":{"message":"Invalid source."},"panels/accessibility/AccessibilityNodeView.ts | labelFor":{"message":"Label for "},"panels/accessibility/AccessibilityNodeView.ts | noAccessibilityNode":{"message":"No accessibility node"},"panels/accessibility/AccessibilityNodeView.ts | noNodeWithThisId":{"message":"No node with this ID."},"panels/accessibility/AccessibilityNodeView.ts | noTextContent":{"message":"No text content."},"panels/accessibility/AccessibilityNodeView.ts | notSpecified":{"message":"Not specified"},"panels/accessibility/AccessibilityNodeView.ts | partOfLabelElement":{"message":"Part of label element: "},"panels/accessibility/AccessibilityNodeView.ts | placeholderIsPlaceholderOnAncestor":{"message":"{PH1} is {PH2} on ancestor: "},"panels/accessibility/AccessibilityStrings.ts | aHumanreadableVersionOfTheValue":{"message":"A human-readable version of the value of a range widget (where necessary)."},"panels/accessibility/AccessibilityStrings.ts | activeDescendant":{"message":"Active descendant"},"panels/accessibility/AccessibilityStrings.ts | atomicLiveRegions":{"message":"Atomic (live regions)"},"panels/accessibility/AccessibilityStrings.ts | busyLiveRegions":{"message":"Busy (live regions)"},"panels/accessibility/AccessibilityStrings.ts | canSetValue":{"message":"Can set value"},"panels/accessibility/AccessibilityStrings.ts | checked":{"message":"Ticked"},"panels/accessibility/AccessibilityStrings.ts | contents":{"message":"Contents"},"panels/accessibility/AccessibilityStrings.ts | controls":{"message":"Controls"},"panels/accessibility/AccessibilityStrings.ts | describedBy":{"message":"Described by"},"panels/accessibility/AccessibilityStrings.ts | description":{"message":"Description"},"panels/accessibility/AccessibilityStrings.ts | disabled":{"message":"Disabled"},"panels/accessibility/AccessibilityStrings.ts | editable":{"message":"Editable"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichFormThe":{"message":"Element or elements which form the description of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichMayFormThe":{"message":"Element or elements which may form the name of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichShouldBe":{"message":"Element or elements which should be considered descendants of this element, despite not being descendants in the DOM."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhoseContentOr":{"message":"Element or elements whose content or presence is/are controlled by this widget."},"panels/accessibility/AccessibilityStrings.ts | elementToWhichTheUserMayChooseTo":{"message":"Element to which the user may choose to navigate after this one, instead of the next element in the DOM order."},"panels/accessibility/AccessibilityStrings.ts | expanded":{"message":"Expanded"},"panels/accessibility/AccessibilityStrings.ts | focusable":{"message":"Focusable"},"panels/accessibility/AccessibilityStrings.ts | focused":{"message":"Focused"},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMaximumAllowed":{"message":"For a range widget, the maximum allowed value."},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMinimumAllowed":{"message":"For a range widget, the minimum allowed value."},"panels/accessibility/AccessibilityStrings.ts | fromAttribute":{"message":"From attribute"},"panels/accessibility/AccessibilityStrings.ts | fromCaption":{"message":"From caption"},"panels/accessibility/AccessibilityStrings.ts | fromDescription":{"message":"From description"},"panels/accessibility/AccessibilityStrings.ts | fromLabel":{"message":"From label"},"panels/accessibility/AccessibilityStrings.ts | fromLabelFor":{"message":"From label (for= attribute)"},"panels/accessibility/AccessibilityStrings.ts | fromLabelWrapped":{"message":"From label (wrapped)"},"panels/accessibility/AccessibilityStrings.ts | fromLegend":{"message":"From legend"},"panels/accessibility/AccessibilityStrings.ts | fromNativeHtml":{"message":"From native HTML"},"panels/accessibility/AccessibilityStrings.ts | fromPlaceholderAttribute":{"message":"From placeholder attribute"},"panels/accessibility/AccessibilityStrings.ts | fromRubyAnnotation":{"message":"From ruby annotation"},"panels/accessibility/AccessibilityStrings.ts | fromStyle":{"message":"From style"},"panels/accessibility/AccessibilityStrings.ts | fromTitle":{"message":"From title"},"panels/accessibility/AccessibilityStrings.ts | hasAutocomplete":{"message":"Has auto-complete"},"panels/accessibility/AccessibilityStrings.ts | hasPopup":{"message":"Has pop-up"},"panels/accessibility/AccessibilityStrings.ts | help":{"message":"Help"},"panels/accessibility/AccessibilityStrings.ts | ifAndHowThisElementCanBeEdited":{"message":"If and how this element can be edited."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLive":{"message":"If this element may receive live updates, whether the entire live region should be presented to the user on changes, or only changed nodes."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdates":{"message":"If this element may receive live updates, what type of updates should trigger a notification."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdatesThe":{"message":"If this element may receive live updates, the root element of the containing live region."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCanReceiveFocus":{"message":"If true, this element can receive focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyCannot":{"message":"If true, this element currently cannot be interacted with."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyHas":{"message":"If true, this element currently has focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementMayBeInteracted":{"message":"If true, this element may be interacted with, but its value cannot be changed."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementsUserentered":{"message":"If true, this element's user-entered value does not conform to validation requirement."},"panels/accessibility/AccessibilityStrings.ts | implicit":{"message":"Implicit"},"panels/accessibility/AccessibilityStrings.ts | implicitValue":{"message":"Implicit value."},"panels/accessibility/AccessibilityStrings.ts | indicatesThePurposeOfThisElement":{"message":"Indicates the purpose of this element, such as a user interface idiom for a widget, or structural role within a document."},"panels/accessibility/AccessibilityStrings.ts | invalidUserEntry":{"message":"Invalid user entry"},"panels/accessibility/AccessibilityStrings.ts | labeledBy":{"message":"Labelled by"},"panels/accessibility/AccessibilityStrings.ts | level":{"message":"Level"},"panels/accessibility/AccessibilityStrings.ts | liveRegion":{"message":"Live region"},"panels/accessibility/AccessibilityStrings.ts | liveRegionRoot":{"message":"Live region root"},"panels/accessibility/AccessibilityStrings.ts | maximumValue":{"message":"Maximum value"},"panels/accessibility/AccessibilityStrings.ts | minimumValue":{"message":"Minimum value"},"panels/accessibility/AccessibilityStrings.ts | multiline":{"message":"Multi-line"},"panels/accessibility/AccessibilityStrings.ts | multiselectable":{"message":"Multi-selectable"},"panels/accessibility/AccessibilityStrings.ts | orientation":{"message":"Orientation"},"panels/accessibility/AccessibilityStrings.ts | pressed":{"message":"Pressed"},"panels/accessibility/AccessibilityStrings.ts | readonlyString":{"message":"Read-only"},"panels/accessibility/AccessibilityStrings.ts | relatedElement":{"message":"Related element"},"panels/accessibility/AccessibilityStrings.ts | relevantLiveRegions":{"message":"Relevant (live regions)"},"panels/accessibility/AccessibilityStrings.ts | requiredString":{"message":"Required"},"panels/accessibility/AccessibilityStrings.ts | role":{"message":"Role"},"panels/accessibility/AccessibilityStrings.ts | selectedString":{"message":"Selected"},"panels/accessibility/AccessibilityStrings.ts | theAccessibleDescriptionForThis":{"message":"The accessible description for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedHelpTextForThis":{"message":"The computed help text for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedNameOfThisElement":{"message":"The computed name of this element."},"panels/accessibility/AccessibilityStrings.ts | theDescendantOfThisElementWhich":{"message":"The descendant of this element which is active; i.e. the element to which focus should be delegated."},"panels/accessibility/AccessibilityStrings.ts | theHierarchicalLevelOfThis":{"message":"The hierarchical level of this element."},"panels/accessibility/AccessibilityStrings.ts | theValueOfThisElementThisMayBe":{"message":"The value of this element; this may be user-provided or developer-provided, depending on the element."},"panels/accessibility/AccessibilityStrings.ts | value":{"message":"Value"},"panels/accessibility/AccessibilityStrings.ts | valueDescription":{"message":"Value description"},"panels/accessibility/AccessibilityStrings.ts | valueFromAttribute":{"message":"Value from attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromDescriptionElement":{"message":"Value from description element."},"panels/accessibility/AccessibilityStrings.ts | valueFromElementContents":{"message":"Value from element contents."},"panels/accessibility/AccessibilityStrings.ts | valueFromFigcaptionElement":{"message":"Value from figcaption element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElement":{"message":"Value from label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWithFor":{"message":"Value from label element with for= attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWrapped":{"message":"Value from a wrapping label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLegendElement":{"message":"Value from legend element."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlRuby":{"message":"Value from plain HTML ruby annotation."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlUnknownSource":{"message":"Value from native HTML (unknown source)."},"panels/accessibility/AccessibilityStrings.ts | valueFromPlaceholderAttribute":{"message":"Value from placeholder attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromRelatedElement":{"message":"Value from related element."},"panels/accessibility/AccessibilityStrings.ts | valueFromStyle":{"message":"Value from style."},"panels/accessibility/AccessibilityStrings.ts | valueFromTableCaption":{"message":"Value from table caption."},"panels/accessibility/AccessibilityStrings.ts | valueFromTitleAttribute":{"message":"Value from title attribute."},"panels/accessibility/AccessibilityStrings.ts | whetherAUserMaySelectMoreThanOne":{"message":"Whether a user may select more than one option from this widget."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatPriorityOfLive":{"message":"Whether and what priority of live updates may be expected for this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatTypeOfAutocomplete":{"message":"Whether and what type of auto-complete suggestions are currently provided by this element."},"panels/accessibility/AccessibilityStrings.ts | whetherTheOptionRepresentedBy":{"message":"Whether the option represented by this element is currently selected."},"panels/accessibility/AccessibilityStrings.ts | whetherTheValueOfThisElementCan":{"message":"Whether the value of this element can be set."},"panels/accessibility/AccessibilityStrings.ts | whetherThisCheckboxRadioButtonOr":{"message":"Whether this tick box, radio button or tree item is ticked, unticked or mixed (e.g. has both ticked and unticked children)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementHasCausedSome":{"message":"Whether this element has caused some kind of pop-up (such as a menu) to appear."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementIsARequired":{"message":"Whether this element is a required field in a form."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrAnother":{"message":"Whether this element, or another grouping element it controls, is expanded."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrItsSubtree":{"message":"Whether this element or its subtree are currently being updated (and thus may be in an inconsistent state)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisLinearElements":{"message":"Whether this linear element's orientation is horizontal or vertical."},"panels/accessibility/AccessibilityStrings.ts | whetherThisTextBoxMayHaveMore":{"message":"Whether this text box may have more than one line."},"panels/accessibility/AccessibilityStrings.ts | whetherThisToggleButtonIs":{"message":"Whether this toggle button is currently in a pressed state."},"panels/accessibility/SourceOrderView.ts | noSourceOrderInformation":{"message":"No source order information available"},"panels/accessibility/SourceOrderView.ts | showSourceOrder":{"message":"Show source order"},"panels/accessibility/SourceOrderView.ts | sourceOrderViewer":{"message":"Source order viewer"},"panels/accessibility/SourceOrderView.ts | thereMayBeADelayInDisplaying":{"message":"There may be a delay in displaying source order for elements with many children"},"panels/accessibility/accessibility-meta.ts | accessibility":{"message":"Accessibility"},"panels/accessibility/accessibility-meta.ts | shoAccessibility":{"message":"Show accessibility"},"panels/animation/AnimationTimeline.ts | animationPreviewS":{"message":"Animation preview {PH1}"},"panels/animation/AnimationTimeline.ts | animationPreviews":{"message":"Animation previews"},"panels/animation/AnimationTimeline.ts | clearAll":{"message":"Clear all"},"panels/animation/AnimationTimeline.ts | pause":{"message":"Pause"},"panels/animation/AnimationTimeline.ts | pauseAll":{"message":"Pause all"},"panels/animation/AnimationTimeline.ts | pauseTimeline":{"message":"Pause timeline"},"panels/animation/AnimationTimeline.ts | playTimeline":{"message":"Play timeline"},"panels/animation/AnimationTimeline.ts | playbackRatePlaceholder":{"message":"{PH1}%"},"panels/animation/AnimationTimeline.ts | playbackRates":{"message":"Playback rates"},"panels/animation/AnimationTimeline.ts | replayTimeline":{"message":"Replay timeline"},"panels/animation/AnimationTimeline.ts | resumeAll":{"message":"Resume all"},"panels/animation/AnimationTimeline.ts | selectAnEffectAboveToInspectAnd":{"message":"Select an effect above to inspect and modify."},"panels/animation/AnimationTimeline.ts | setSpeedToS":{"message":"Set speed to {PH1}"},"panels/animation/AnimationTimeline.ts | waitingForAnimations":{"message":"Waiting for animations…"},"panels/animation/AnimationUI.ts | animationEndpointSlider":{"message":"Animation endpoint slider"},"panels/animation/AnimationUI.ts | animationKeyframeSlider":{"message":"Animation keyframe slider"},"panels/animation/AnimationUI.ts | sSlider":{"message":"{PH1} slider"},"panels/animation/animation-meta.ts | animations":{"message":"Animations"},"panels/animation/animation-meta.ts | showAnimations":{"message":"Show animations"},"panels/application/AppManifestView.ts | aUrlInTheManifestContainsA":{"message":"A URL in the manifest contains a username, password or port"},"panels/application/AppManifestView.ts | actualHeightSpxOfSSDoesNotMatch":{"message":"Actual height ({PH1}px) of {PH2} {PH3} does not match specified height ({PH4}px)"},"panels/application/AppManifestView.ts | actualSizeSspxOfSSDoesNotMatch":{"message":"Actual size ({PH1}×{PH2})px of {PH3} {PH4} does not match specified size ({PH5}×{PH6}px)"},"panels/application/AppManifestView.ts | actualWidthSpxOfSSDoesNotMatch":{"message":"Actual width ({PH1}px) of {PH2} {PH3} does not match specified width ({PH4}px)"},"panels/application/AppManifestView.ts | appIdExplainer":{"message":"This is used by the browser to know whether the manifest should be updating an existing application, or whether it refers to a new web app that can be installed."},"panels/application/AppManifestView.ts | appIdNote":{"message":"{PH1} {PH2} is not specified in the manifest; {PH3} is used instead. To specify an app ID that matches the current identity, set the {PH4} field to {PH5} {PH6}."},"panels/application/AppManifestView.ts | avoidPurposeAnyAndMaskable":{"message":"Declaring an icon with 'purpose: \"any maskable\"' is discouraged. It is likely to look incorrect on some platforms due to too much or too little padding."},"panels/application/AppManifestView.ts | backgroundColor":{"message":"Background colour"},"panels/application/AppManifestView.ts | computedAppId":{"message":"Computed app ID"},"panels/application/AppManifestView.ts | copiedToClipboard":{"message":"Copied suggested ID {PH1} to clipboard"},"panels/application/AppManifestView.ts | copyToClipboard":{"message":"Copy to clipboard"},"panels/application/AppManifestView.ts | couldNotCheckServiceWorker":{"message":"Could not check service worker without a 'start_url' field in the manifest"},"panels/application/AppManifestView.ts | couldNotDownloadARequiredIcon":{"message":"Could not download a required icon from the manifest"},"panels/application/AppManifestView.ts | customizePwaTitleBar":{"message":"Customise the window controls overlay of your PWA's title bar."},"panels/application/AppManifestView.ts | darkBackgroundColor":{"message":"Dark background colour"},"panels/application/AppManifestView.ts | darkThemeColor":{"message":"Dark theme colour"},"panels/application/AppManifestView.ts | description":{"message":"Description"},"panels/application/AppManifestView.ts | descriptionMayBeTruncated":{"message":"Description may be truncated."},"panels/application/AppManifestView.ts | display":{"message":"Display"},"panels/application/AppManifestView.ts | documentationOnMaskableIcons":{"message":"documentation on maskable icons"},"panels/application/AppManifestView.ts | downloadedIconWasEmptyOr":{"message":"Downloaded icon was empty or corrupted"},"panels/application/AppManifestView.ts | errorsAndWarnings":{"message":"Errors and warnings"},"panels/application/AppManifestView.ts | formFactor":{"message":"Form factor"},"panels/application/AppManifestView.ts | icon":{"message":"Icon"},"panels/application/AppManifestView.ts | icons":{"message":"Icons"},"panels/application/AppManifestView.ts | identity":{"message":"Identity"},"panels/application/AppManifestView.ts | imageFromS":{"message":"Image from {PH1}"},"panels/application/AppManifestView.ts | installability":{"message":"Installability"},"panels/application/AppManifestView.ts | label":{"message":"Label"},"panels/application/AppManifestView.ts | learnMore":{"message":"Learn more"},"panels/application/AppManifestView.ts | manifestContainsDisplayoverride":{"message":"Manifest contains 'display_override' field, and the first supported display mode must be one of 'standalone', 'fullscreen' or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestCouldNotBeFetchedIsEmpty":{"message":"Manifest could not be fetched, is empty or could not be parsed"},"panels/application/AppManifestView.ts | manifestDisplayPropertyMustBeOne":{"message":"Manifest 'display' property must be one of 'standalone', 'fullscreen' or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestDoesNotContainANameOr":{"message":"Manifest does not contain a 'name' or 'short_name' field"},"panels/application/AppManifestView.ts | manifestDoesNotContainASuitable":{"message":"Manifest does not contain a suitable icon – PNG, SVG or WebP format of at least {PH1}px is required, the 'sizes' attribute must be set, and the 'purpose' attribute, if set, must include 'any'."},"panels/application/AppManifestView.ts | manifestSpecifies":{"message":"Manifest specifies 'prefer_related_applications: true'"},"panels/application/AppManifestView.ts | manifestStartUrlIsNotValid":{"message":"Manifest 'start_URL' is not valid"},"panels/application/AppManifestView.ts | name":{"message":"Name"},"panels/application/AppManifestView.ts | needHelpReadOurS":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | newNoteUrl":{"message":"New note URL"},"panels/application/AppManifestView.ts | noPlayStoreIdProvided":{"message":"No Play Store ID provided"},"panels/application/AppManifestView.ts | noScreenshotsForRicherPWAInstallOnDesktop":{"message":"Richer PWA Install UI won’t be available on desktop. Please add at least one screenshot with the 'form_factor' set to 'wide'."},"panels/application/AppManifestView.ts | noScreenshotsForRicherPWAInstallOnMobile":{"message":"Richer PWA Install UI won’t be available on mobile. Please add at least one screenshot for which 'form_factor' is not set or set to a value other than 'wide'."},"panels/application/AppManifestView.ts | noSuppliedIconIsAtLeastSpxSquare":{"message":"No supplied icon is at least {PH1} pixels square in PNG, SVG or WebP format, with the purpose attribute unset or set to 'any'."},"panels/application/AppManifestView.ts | note":{"message":"Note:"},"panels/application/AppManifestView.ts | orientation":{"message":"Orientation"},"panels/application/AppManifestView.ts | pageDoesNotWorkOffline":{"message":"Page does not work offline"},"panels/application/AppManifestView.ts | pageDoesNotWorkOfflineThePage":{"message":"Page does not work offline. Starting in Chrome 93, the installability criteria is changing, and this site will not be installable. See {PH1} for more information."},"panels/application/AppManifestView.ts | pageHasNoManifestLinkUrl":{"message":"Page has no manifest URL"},"panels/application/AppManifestView.ts | pageIsLoadedInAnIncognitoWindow":{"message":"Page is loaded in an incognito window"},"panels/application/AppManifestView.ts | pageIsNotLoadedInTheMainFrame":{"message":"Page is not loaded in the main frame"},"panels/application/AppManifestView.ts | pageIsNotServedFromASecureOrigin":{"message":"Page is not served from a secure origin"},"panels/application/AppManifestView.ts | platform":{"message":"Platform"},"panels/application/AppManifestView.ts | preferrelatedapplicationsIsOnly":{"message":"'prefer_related_applications' is only supported on Chrome beta and Stable channels on Android."},"panels/application/AppManifestView.ts | presentation":{"message":"Presentation"},"panels/application/AppManifestView.ts | protocolHandlers":{"message":"Protocol handlers"},"panels/application/AppManifestView.ts | sSDoesNotSpecifyItsSizeInThe":{"message":"{PH1} {PH2} does not specify its size in the manifest"},"panels/application/AppManifestView.ts | sSFailedToLoad":{"message":"{PH1} {PH2} failed to load"},"panels/application/AppManifestView.ts | sSHeightDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} height can't be more than 2.3 times as long as the width"},"panels/application/AppManifestView.ts | sSShouldHaveSquareIcon":{"message":"Most operating systems require square icons. Please include at least one square icon in the array."},"panels/application/AppManifestView.ts | sSShouldSpecifyItsSizeAs":{"message":"{PH1} {PH2} should specify its size as [width]x[height]"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtLeast320":{"message":"{PH1} {PH2} size should be at least 320×320"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtMost3840":{"message":"{PH1} {PH2} size should be at most 3840 × 3840"},"panels/application/AppManifestView.ts | sSWidthDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} width can't be more than 2.3 times as long as the height"},"panels/application/AppManifestView.ts | sSrcIsNotSet":{"message":"{PH1} 'src' is not set"},"panels/application/AppManifestView.ts | sUrlSFailedToParse":{"message":"{PH1} URL '{PH2}' failed to parse"},"panels/application/AppManifestView.ts | screenshot":{"message":"Screenshot"},"panels/application/AppManifestView.ts | screenshotPixelSize":{"message":"Screenshot {url} should specify a pixel size [width]x[height] instead of \"any\" as first size."},"panels/application/AppManifestView.ts | screenshotS":{"message":"Screenshot no. {PH1}"},"panels/application/AppManifestView.ts | screenshotsMustHaveSameAspectRatio":{"message":"All screenshots with the same 'form_factor' must have the same aspect ratio as the first screenshot with that 'form_factor'. Some screenshots will be ignored."},"panels/application/AppManifestView.ts | shortName":{"message":"Short name"},"panels/application/AppManifestView.ts | shortcutS":{"message":"Shortcut no. {PH1}"},"panels/application/AppManifestView.ts | shortcutSShouldIncludeAXPixel":{"message":"Shortcut no. {PH1} should include a 96x96 pixel icon"},"panels/application/AppManifestView.ts | shortcutsMayBeNotAvailable":{"message":"The maximum number of shortcuts is platform-dependent. Some shortcuts may be not available."},"panels/application/AppManifestView.ts | showOnlyTheMinimumSafeAreaFor":{"message":"Show only the minimum safe area for maskable icons"},"panels/application/AppManifestView.ts | startUrl":{"message":"Start URL"},"panels/application/AppManifestView.ts | theAppIsAlreadyInstalled":{"message":"The app is already installed"},"panels/application/AppManifestView.ts | thePlayStoreAppUrlAndPlayStoreId":{"message":"The Play Store app URL and Play Store ID do not match"},"panels/application/AppManifestView.ts | theSpecifiedApplicationPlatform":{"message":"The specified application platform is not supported on Android"},"panels/application/AppManifestView.ts | themeColor":{"message":"Theme colour"},"panels/application/AppManifestView.ts | tooManyScreenshotsForDesktop":{"message":"No more than eight screenshots will be displayed on desktop. The rest will be ignored."},"panels/application/AppManifestView.ts | tooManyScreenshotsForMobile":{"message":"No more than five screenshots will be displayed on mobile. The rest will be ignored."},"panels/application/AppManifestView.ts | url":{"message":"URL"},"panels/application/AppManifestView.ts | wcoFound":{"message":"Chrome has successfully found the {PH1} value for the {PH2} field in the {PH3}."},"panels/application/AppManifestView.ts | wcoNeedHelpReadMore":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | wcoNotFound":{"message":"Define {PH1} in the manifest to use the Window Controls Overlay API and customise your app's title bar."},"panels/application/AppManifestView.ts | windowControlsOverlay":{"message":"Window Controls Overlay"},"panels/application/ApplicationPanelSidebar.ts | appManifest":{"message":"App manifest"},"panels/application/ApplicationPanelSidebar.ts | application":{"message":"Application"},"panels/application/ApplicationPanelSidebar.ts | applicationSidebarPanel":{"message":"Application panel sidebar"},"panels/application/ApplicationPanelSidebar.ts | backgroundServices":{"message":"Background services"},"panels/application/ApplicationPanelSidebar.ts | beforeInvokeAlert":{"message":"{PH1}: Invoke to scroll to this section in manifest"},"panels/application/ApplicationPanelSidebar.ts | clear":{"message":"Clear"},"panels/application/ApplicationPanelSidebar.ts | cookies":{"message":"Cookies"},"panels/application/ApplicationPanelSidebar.ts | cookiesUsedByFramesFromS":{"message":"Cookies used by frames from {PH1}"},"panels/application/ApplicationPanelSidebar.ts | documentNotAvailable":{"message":"Document not available"},"panels/application/ApplicationPanelSidebar.ts | frames":{"message":"Frames"},"panels/application/ApplicationPanelSidebar.ts | indexeddb":{"message":"IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | keyPathS":{"message":"Key path: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | localFiles":{"message":"Local files"},"panels/application/ApplicationPanelSidebar.ts | localStorage":{"message":"Local storage"},"panels/application/ApplicationPanelSidebar.ts | manifest":{"message":"Manifest"},"panels/application/ApplicationPanelSidebar.ts | noManifestDetected":{"message":"No manifest detected"},"panels/application/ApplicationPanelSidebar.ts | onInvokeAlert":{"message":"Scrolled to {PH1}"},"panels/application/ApplicationPanelSidebar.ts | onInvokeManifestAlert":{"message":"Manifest: Invoke to scroll to the top of manifest"},"panels/application/ApplicationPanelSidebar.ts | openedWindows":{"message":"Opened windows"},"panels/application/ApplicationPanelSidebar.ts | refreshIndexeddb":{"message":"Refresh IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | sessionStorage":{"message":"Session storage"},"panels/application/ApplicationPanelSidebar.ts | storage":{"message":"Storage"},"panels/application/ApplicationPanelSidebar.ts | theContentOfThisDocumentHasBeen":{"message":"The content of this document has been generated dynamically via 'document.write()'."},"panels/application/ApplicationPanelSidebar.ts | versionS":{"message":"Version: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | versionSEmpty":{"message":"Version: {PH1} (empty)"},"panels/application/ApplicationPanelSidebar.ts | webSql":{"message":"Web SQL"},"panels/application/ApplicationPanelSidebar.ts | webWorkers":{"message":"Web workers"},"panels/application/ApplicationPanelSidebar.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/ApplicationPanelSidebar.ts | worker":{"message":"worker"},"panels/application/BackForwardCacheTreeElement.ts | backForwardCache":{"message":"Back-forward cache"},"panels/application/BackgroundServiceView.ts | backgroundFetch":{"message":"Background fetch"},"panels/application/BackgroundServiceView.ts | backgroundServices":{"message":"Background services"},"panels/application/BackgroundServiceView.ts | backgroundSync":{"message":"Background sync"},"panels/application/BackgroundServiceView.ts | clear":{"message":"Clear"},"panels/application/BackgroundServiceView.ts | clickTheRecordButtonSOrHitSTo":{"message":"Click the record button {PH1} or hit {PH2} to start recording."},"panels/application/BackgroundServiceView.ts | devtoolsWillRecordAllSActivity":{"message":"DevTools will record all {PH1} activity for up to three days, even when closed."},"panels/application/BackgroundServiceView.ts | empty":{"message":"empty"},"panels/application/BackgroundServiceView.ts | event":{"message":"Event"},"panels/application/BackgroundServiceView.ts | instanceId":{"message":"Instance ID"},"panels/application/BackgroundServiceView.ts | learnMore":{"message":"Learn more"},"panels/application/BackgroundServiceView.ts | noMetadataForThisEvent":{"message":"No metadata for this event"},"panels/application/BackgroundServiceView.ts | notifications":{"message":"Notifications"},"panels/application/BackgroundServiceView.ts | origin":{"message":"Origin"},"panels/application/BackgroundServiceView.ts | paymentHandler":{"message":"Payment handler"},"panels/application/BackgroundServiceView.ts | periodicBackgroundSync":{"message":"Periodic background sync"},"panels/application/BackgroundServiceView.ts | pushMessaging":{"message":"Push messaging"},"panels/application/BackgroundServiceView.ts | recordingSActivity":{"message":"Recording {PH1} activity…"},"panels/application/BackgroundServiceView.ts | saveEvents":{"message":"Save events"},"panels/application/BackgroundServiceView.ts | selectAnEntryToViewMetadata":{"message":"Select an entry to view metadata"},"panels/application/BackgroundServiceView.ts | showEventsForOtherStorageKeys":{"message":"Show events from other storage partitions"},"panels/application/BackgroundServiceView.ts | showEventsFromOtherDomains":{"message":"Show events from other domains"},"panels/application/BackgroundServiceView.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/BackgroundServiceView.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/BackgroundServiceView.ts | storageKey":{"message":"Storage key"},"panels/application/BackgroundServiceView.ts | swScope":{"message":"Service worker scope"},"panels/application/BackgroundServiceView.ts | timestamp":{"message":"Timestamp"},"panels/application/BounceTrackingMitigationsTreeElement.ts | bounceTrackingMitigations":{"message":"Bounce tracking mitigations"},"panels/application/CookieItemsView.ts | clearAllCookies":{"message":"Clear all cookies"},"panels/application/CookieItemsView.ts | clearFilteredCookies":{"message":"Clear filtered cookies"},"panels/application/CookieItemsView.ts | cookies":{"message":"Cookies"},"panels/application/CookieItemsView.ts | numberOfCookiesShownInTableS":{"message":"Number of cookies shown in table: {PH1}"},"panels/application/CookieItemsView.ts | onlyShowCookiesWhichHaveAn":{"message":"Only show cookies that have an associated issue"},"panels/application/CookieItemsView.ts | onlyShowCookiesWithAnIssue":{"message":"Only show cookies with an issue"},"panels/application/CookieItemsView.ts | selectACookieToPreviewItsValue":{"message":"Select a cookie to preview its value"},"panels/application/CookieItemsView.ts | showUrlDecoded":{"message":"Show URL-decoded"},"panels/application/DOMStorageItemsView.ts | domStorage":{"message":"DOM storage"},"panels/application/DOMStorageItemsView.ts | domStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/DOMStorageItemsView.ts | domStorageItems":{"message":"DOM storage items"},"panels/application/DOMStorageItemsView.ts | domStorageItemsCleared":{"message":"DOM storage items cleared"},"panels/application/DOMStorageItemsView.ts | domStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/DOMStorageItemsView.ts | key":{"message":"Key"},"panels/application/DOMStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/DOMStorageItemsView.ts | value":{"message":"Value"},"panels/application/DatabaseModel.ts | anUnexpectedErrorSOccurred":{"message":"An unexpected error {PH1} occurred."},"panels/application/DatabaseModel.ts | databaseNoLongerHasExpected":{"message":"Database no longer has expected version."},"panels/application/DatabaseQueryView.ts | databaseQuery":{"message":"Database query"},"panels/application/DatabaseQueryView.ts | queryS":{"message":"Query: {PH1}"},"panels/application/DatabaseTableView.ts | anErrorOccurredTryingToreadTheS":{"message":"An error occurred trying to read the '{PH1}' table."},"panels/application/DatabaseTableView.ts | database":{"message":"Database"},"panels/application/DatabaseTableView.ts | refresh":{"message":"Refresh"},"panels/application/DatabaseTableView.ts | theStableIsEmpty":{"message":"The '{PH1}' table is empty."},"panels/application/DatabaseTableView.ts | visibleColumns":{"message":"Visible columns"},"panels/application/IndexedDBViews.ts | clearObjectStore":{"message":"Clear object store"},"panels/application/IndexedDBViews.ts | collapse":{"message":"Collapse"},"panels/application/IndexedDBViews.ts | dataMayBeStale":{"message":"Data may be stale"},"panels/application/IndexedDBViews.ts | deleteDatabase":{"message":"Delete database"},"panels/application/IndexedDBViews.ts | deleteSelected":{"message":"Delete selected"},"panels/application/IndexedDBViews.ts | expandRecursively":{"message":"Expand recursively"},"panels/application/IndexedDBViews.ts | idb":{"message":"IDB"},"panels/application/IndexedDBViews.ts | indexedDb":{"message":"Indexed dB"},"panels/application/IndexedDBViews.ts | keyGeneratorValueS":{"message":"Key generator value: {PH1}"},"panels/application/IndexedDBViews.ts | keyPath":{"message":"Key path: "},"panels/application/IndexedDBViews.ts | keyString":{"message":"Key"},"panels/application/IndexedDBViews.ts | objectStores":{"message":"Object stores"},"panels/application/IndexedDBViews.ts | pleaseConfirmDeleteOfSDatabase":{"message":"Please confirm deletion of '{PH1}' database."},"panels/application/IndexedDBViews.ts | primaryKey":{"message":"Primary key"},"panels/application/IndexedDBViews.ts | refresh":{"message":"Refresh"},"panels/application/IndexedDBViews.ts | refreshDatabase":{"message":"Refresh database"},"panels/application/IndexedDBViews.ts | showNextPage":{"message":"Show next page"},"panels/application/IndexedDBViews.ts | showPreviousPage":{"message":"Show previous page"},"panels/application/IndexedDBViews.ts | someEntriesMayHaveBeenModified":{"message":"Some entries may have been modified"},"panels/application/IndexedDBViews.ts | startFromKey":{"message":"Start from key"},"panels/application/IndexedDBViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/IndexedDBViews.ts | valueString":{"message":"Value"},"panels/application/IndexedDBViews.ts | version":{"message":"Version"},"panels/application/InterestGroupStorageView.ts | clickToDisplayBody":{"message":"Click on any interest group event to display the group's current state"},"panels/application/InterestGroupStorageView.ts | noDataAvailable":{"message":"No details available for the selected interest group. The browser may have left the group."},"panels/application/InterestGroupTreeElement.ts | interestGroups":{"message":"Interest groups"},"panels/application/OpenedWindowDetailsView.ts | accessToOpener":{"message":"Access to opener"},"panels/application/OpenedWindowDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in elements panel"},"panels/application/OpenedWindowDetailsView.ts | closed":{"message":"closed"},"panels/application/OpenedWindowDetailsView.ts | crossoriginEmbedderPolicy":{"message":"Cross-origin embedder policy"},"panels/application/OpenedWindowDetailsView.ts | document":{"message":"Document"},"panels/application/OpenedWindowDetailsView.ts | no":{"message":"No"},"panels/application/OpenedWindowDetailsView.ts | openerFrame":{"message":"Opener frame"},"panels/application/OpenedWindowDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/OpenedWindowDetailsView.ts | security":{"message":"Security"},"panels/application/OpenedWindowDetailsView.ts | securityIsolation":{"message":"Security and isolation"},"panels/application/OpenedWindowDetailsView.ts | showsWhetherTheOpenedWindowIs":{"message":"Shows whether the opened window is able to access its opener and vice versa"},"panels/application/OpenedWindowDetailsView.ts | type":{"message":"Type"},"panels/application/OpenedWindowDetailsView.ts | unknown":{"message":"Unknown"},"panels/application/OpenedWindowDetailsView.ts | url":{"message":"URL"},"panels/application/OpenedWindowDetailsView.ts | webWorker":{"message":"Web worker"},"panels/application/OpenedWindowDetailsView.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/OpenedWindowDetailsView.ts | worker":{"message":"worker"},"panels/application/OpenedWindowDetailsView.ts | yes":{"message":"Yes"},"panels/application/ReportingApiReportsView.ts | clickToDisplayBody":{"message":"Click on any report to display its body"},"panels/application/ReportingApiTreeElement.ts | reportingApi":{"message":"Reporting API"},"panels/application/ResourcesPanel.ts | webSqlDeprecation":{"message":"Web SQL is deprecated. You can join the deprecation trial to keep using it until Chrome 123."},"panels/application/ServiceWorkerCacheTreeElement.ts | cacheStorage":{"message":"Cache storage"},"panels/application/ServiceWorkerCacheTreeElement.ts | delete":{"message":"Delete"},"panels/application/ServiceWorkerCacheTreeElement.ts | refreshCaches":{"message":"Refresh caches"},"panels/application/ServiceWorkerCacheViews.ts | cache":{"message":"Cache"},"panels/application/ServiceWorkerCacheViews.ts | deleteSelected":{"message":"Delete selected"},"panels/application/ServiceWorkerCacheViews.ts | filterByPath":{"message":"Filter by path"},"panels/application/ServiceWorkerCacheViews.ts | headers":{"message":"Headers"},"panels/application/ServiceWorkerCacheViews.ts | matchingEntriesS":{"message":"Matching entries: {PH1}"},"panels/application/ServiceWorkerCacheViews.ts | name":{"message":"Name"},"panels/application/ServiceWorkerCacheViews.ts | preview":{"message":"Preview"},"panels/application/ServiceWorkerCacheViews.ts | refresh":{"message":"Refresh"},"panels/application/ServiceWorkerCacheViews.ts | selectACacheEntryAboveToPreview":{"message":"Select a cache entry above to preview"},"panels/application/ServiceWorkerCacheViews.ts | serviceWorkerCache":{"message":"Service Worker cache"},"panels/application/ServiceWorkerCacheViews.ts | timeCached":{"message":"Time cached"},"panels/application/ServiceWorkerCacheViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/ServiceWorkerCacheViews.ts | varyHeaderWarning":{"message":"⚠️ Set ignoreVary to true when matching this entry"},"panels/application/ServiceWorkerUpdateCycleView.ts | endTimeS":{"message":"End time: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | startTimeS":{"message":"Start time: {PH1}"},"panels/application/ServiceWorkerUpdateCycleView.ts | timeline":{"message":"Timeline"},"panels/application/ServiceWorkerUpdateCycleView.ts | updateActivity":{"message":"Update activity"},"panels/application/ServiceWorkerUpdateCycleView.ts | version":{"message":"Version"},"panels/application/ServiceWorkersView.ts | bypassForNetwork":{"message":"Bypass for network"},"panels/application/ServiceWorkersView.ts | bypassTheServiceWorkerAndLoad":{"message":"Bypass the service worker and load resources from the network"},"panels/application/ServiceWorkersView.ts | clients":{"message":"Clients"},"panels/application/ServiceWorkersView.ts | focus":{"message":"focus"},"panels/application/ServiceWorkersView.ts | inspect":{"message":"inspect"},"panels/application/ServiceWorkersView.ts | networkRequests":{"message":"Network requests"},"panels/application/ServiceWorkersView.ts | onPageReloadForceTheService":{"message":"On page reload, force the service worker to update and activate it"},"panels/application/ServiceWorkersView.ts | periodicSync":{"message":"Periodic sync"},"panels/application/ServiceWorkersView.ts | periodicSyncTag":{"message":"Periodic sync tag"},"panels/application/ServiceWorkersView.ts | pushData":{"message":"Push data"},"panels/application/ServiceWorkersView.ts | pushString":{"message":"Push"},"panels/application/ServiceWorkersView.ts | receivedS":{"message":"Received {PH1}"},"panels/application/ServiceWorkersView.ts | sActivatedAndIsS":{"message":"No. {PH1} activated and is {PH2}"},"panels/application/ServiceWorkersView.ts | sDeleted":{"message":"{PH1} – deleted"},"panels/application/ServiceWorkersView.ts | sIsRedundant":{"message":"No. {PH1} is redundant"},"panels/application/ServiceWorkersView.ts | sRegistrationErrors":{"message":"{PH1} registration errors"},"panels/application/ServiceWorkersView.ts | sTryingToInstall":{"message":"No. {PH1} trying to install"},"panels/application/ServiceWorkersView.ts | sWaitingToActivate":{"message":"No. {PH1} waiting to activate"},"panels/application/ServiceWorkersView.ts | seeAllRegistrations":{"message":"See all registrations"},"panels/application/ServiceWorkersView.ts | serviceWorkerForS":{"message":"Service worker for {PH1}"},"panels/application/ServiceWorkersView.ts | serviceWorkersFromOtherOrigins":{"message":"Service workers from other origins"},"panels/application/ServiceWorkersView.ts | source":{"message":"Source"},"panels/application/ServiceWorkersView.ts | startString":{"message":"start"},"panels/application/ServiceWorkersView.ts | status":{"message":"Status"},"panels/application/ServiceWorkersView.ts | stopString":{"message":"stop"},"panels/application/ServiceWorkersView.ts | syncString":{"message":"Sync"},"panels/application/ServiceWorkersView.ts | syncTag":{"message":"Sync tag"},"panels/application/ServiceWorkersView.ts | testPushMessageFromDevtools":{"message":"Test push message from DevTools."},"panels/application/ServiceWorkersView.ts | unregister":{"message":"Unregister"},"panels/application/ServiceWorkersView.ts | unregisterServiceWorker":{"message":"Unregister service worker"},"panels/application/ServiceWorkersView.ts | update":{"message":"Update"},"panels/application/ServiceWorkersView.ts | updateCycle":{"message":"Update cycle"},"panels/application/ServiceWorkersView.ts | updateOnReload":{"message":"Update on reload"},"panels/application/ServiceWorkersView.ts | workerS":{"message":"Worker: {PH1}"},"panels/application/SharedStorageEventsView.ts | clickToDisplayBody":{"message":"Click on any shared storage event to display the event parameters."},"panels/application/SharedStorageItemsView.ts | key":{"message":"Key"},"panels/application/SharedStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/SharedStorageItemsView.ts | sharedStorage":{"message":"Shared storage"},"panels/application/SharedStorageItemsView.ts | sharedStorageFilteredItemsCleared":{"message":"Shared storage filtered items cleared"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEditCanceled":{"message":"The storage item edit was cancelled."},"panels/application/SharedStorageItemsView.ts | sharedStorageItemEdited":{"message":"The storage item was edited."},"panels/application/SharedStorageItemsView.ts | sharedStorageItems":{"message":"Shared storage items"},"panels/application/SharedStorageItemsView.ts | sharedStorageItemsCleared":{"message":"Shared storage items cleared"},"panels/application/SharedStorageItemsView.ts | sharedStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/SharedStorageItemsView.ts | value":{"message":"Value"},"panels/application/SharedStorageListTreeElement.ts | sharedStorage":{"message":"Shared storage"},"panels/application/StorageBucketsTreeElement.ts | storageBuckets":{"message":"Storage buckets"},"panels/application/StorageItemsView.ts | clearAll":{"message":"Clear all"},"panels/application/StorageItemsView.ts | deleteSelected":{"message":"Delete selected"},"panels/application/StorageItemsView.ts | filter":{"message":"Filter"},"panels/application/StorageItemsView.ts | refresh":{"message":"Refresh"},"panels/application/StorageItemsView.ts | refreshedStatus":{"message":"Table refreshed"},"panels/application/StorageView.ts | SiteDataCleared":{"message":"Site data cleared"},"panels/application/StorageView.ts | application":{"message":"Application"},"panels/application/StorageView.ts | cacheStorage":{"message":"Cache storage"},"panels/application/StorageView.ts | clearSiteData":{"message":"Clear site data"},"panels/application/StorageView.ts | clearing":{"message":"Clearing…"},"panels/application/StorageView.ts | cookies":{"message":"Cookies"},"panels/application/StorageView.ts | fileSystem":{"message":"File system"},"panels/application/StorageView.ts | includingThirdPartyCookies":{"message":"including third-party cookies"},"panels/application/StorageView.ts | indexDB":{"message":"IndexedDB"},"panels/application/StorageView.ts | internalError":{"message":"Internal error"},"panels/application/StorageView.ts | learnMore":{"message":"Learn more"},"panels/application/StorageView.ts | localAndSessionStorage":{"message":"Local and session storage"},"panels/application/StorageView.ts | mb":{"message":"MB"},"panels/application/StorageView.ts | numberMustBeNonNegative":{"message":"Number must be non-negative"},"panels/application/StorageView.ts | numberMustBeSmaller":{"message":"Number must be smaller than {PH1}"},"panels/application/StorageView.ts | other":{"message":"Other"},"panels/application/StorageView.ts | pleaseEnterANumber":{"message":"Please enter a number"},"panels/application/StorageView.ts | sFailedToLoad":{"message":"{PH1} (failed to load)"},"panels/application/StorageView.ts | serviceWorkers":{"message":"Service workers"},"panels/application/StorageView.ts | simulateCustomStorage":{"message":"Simulate custom storage quota"},"panels/application/StorageView.ts | storageQuotaIsLimitedIn":{"message":"Storage quota is limited in Incognito mode"},"panels/application/StorageView.ts | storageQuotaUsed":{"message":"{PH1} used out of {PH2} storage quota"},"panels/application/StorageView.ts | storageQuotaUsedWithBytes":{"message":"{PH1} bytes used out of {PH2} bytes storage quota"},"panels/application/StorageView.ts | storageTitle":{"message":"Storage"},"panels/application/StorageView.ts | storageUsage":{"message":"Storage usage"},"panels/application/StorageView.ts | storageWithCustomMarker":{"message":"{PH1} (custom)"},"panels/application/StorageView.ts | unregisterServiceWorker":{"message":"Unregister service workers"},"panels/application/StorageView.ts | usage":{"message":"Usage"},"panels/application/StorageView.ts | webSql":{"message":"Web SQL"},"panels/application/TrustTokensTreeElement.ts | trustTokens":{"message":"Private state tokens"},"panels/application/application-meta.ts | application":{"message":"Application"},"panels/application/application-meta.ts | clearSiteData":{"message":"Clear site data"},"panels/application/application-meta.ts | clearSiteDataIncludingThirdparty":{"message":"Clear site data (including third-party cookies)"},"panels/application/application-meta.ts | pwa":{"message":"PWA"},"panels/application/application-meta.ts | showApplication":{"message":"Show application"},"panels/application/application-meta.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/application-meta.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/components/BackForwardCacheStrings.ts | CookieFlushed":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | HTTPAuthRequired":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | HTTPMethodNotGET":{"message":"Only pages loaded via a GET request are eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPStatusNotOK":{"message":"Only pages with a status code of 2XX can be cached."},"panels/application/components/BackForwardCacheStrings.ts | JavaScriptExecution":{"message":"Chrome detected an attempt to execute JavaScript while in the cache."},"panels/application/components/BackForwardCacheStrings.ts | appBanner":{"message":"Pages that requested an AppBanner are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabled":{"message":"Back-forward cache is disabled by flags. Visit chrome://flags/#back-forward-cache to enable it locally on this device."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByCommandLine":{"message":"Back-forward cache is disabled by the command line."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByLowMemory":{"message":"Back-forward cache is disabled due to insufficient memory."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForDelegate":{"message":"Back-forward cache is not supported by delegate."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForPrerender":{"message":"Back-forward cache is disabled for pre-renderer."},"panels/application/components/BackForwardCacheStrings.ts | broadcastChannel":{"message":"The page cannot be cached because it has a BroadcastChannel instance with registered listeners."},"panels/application/components/BackForwardCacheStrings.ts | cacheControlNoStore":{"message":"Pages with cache-control:no-store header cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cacheFlushed":{"message":"The cache was intentionally cleared."},"panels/application/components/BackForwardCacheStrings.ts | cacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | containsPlugins":{"message":"Pages containing plug-ins are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileChooser":{"message":"Pages that use FileChooser API are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileSystemAccess":{"message":"Pages that use file system access API are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaDevicesDispatcherHost":{"message":"Pages that use media device dispatcher are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaPlay":{"message":"A media player was playing upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSession":{"message":"Pages that use MediaSession API and set a playback state are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSessionService":{"message":"Pages that use MediaSession API and set action handlers are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentScreenReader":{"message":"Back-forward cache is disabled due to screen reader."},"panels/application/components/BackForwardCacheStrings.ts | contentSecurityHandler":{"message":"Pages that use SecurityHandler are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentSerial":{"message":"Pages that use Serial API are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebAuthenticationAPI":{"message":"Pages that use WebAuthentication API are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebBluetooth":{"message":"Pages that use WebBluetooth API are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebUSB":{"message":"Pages that use WebUSB API are not eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cookieDisabled":{"message":"Back/forward cache is disabled because cookies are disabled on a page that uses Cache-Control: no-store."},"panels/application/components/BackForwardCacheStrings.ts | dedicatedWorkerOrWorklet":{"message":"Pages that use a dedicated worker or worklet are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | documentLoaded":{"message":"The document did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderAppBannerManager":{"message":"App banner was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderChromePasswordManagerClientBindCredentialManager":{"message":"Chrome Password Manager was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerSelfDeletingRequestDelegate":{"message":"DOM distillation was in progress upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerViewerSource":{"message":"DOM distiller viewer was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessaging":{"message":"Back-forward cache is disabled due to extensions using messaging API."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessagingForOpenPort":{"message":"Extensions with long-lived connection should close the connection before entering back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionSentMessageToCachedFrame":{"message":"Extensions with long-lived connection attempted to send messages to frames in back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensions":{"message":"Back-forward cache is disabled due to extensions."},"panels/application/components/BackForwardCacheStrings.ts | embedderModalDialog":{"message":"Modal dialogue such as form resubmission or HTTP password dialogue was shown for the page upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOfflinePage":{"message":"The offline page was shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOomInterventionTabHelper":{"message":"Out-of-memory intervention bar was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPermissionRequestManager":{"message":"There were permission requests upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPopupBlockerTabHelper":{"message":"Pop-up blocker was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingThreatDetails":{"message":"Safe Browsing details were shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingTriggeredPopupBlocker":{"message":"Safe Browsing considered this page to be abusive and blocked the pop-up."},"panels/application/components/BackForwardCacheStrings.ts | enteredBackForwardCacheBeforeServiceWorkerHostAdded":{"message":"A service worker was activated while the page was in back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | errorDocument":{"message":"Back-forward cache is disabled due to a document error."},"panels/application/components/BackForwardCacheStrings.ts | fencedFramesEmbedder":{"message":"Pages using FencedFrames cannot be stored in bfcache."},"panels/application/components/BackForwardCacheStrings.ts | foregroundCacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | grantedMediaStreamAccess":{"message":"Pages that have granted media stream access are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | haveInnerContents":{"message":"Pages that use portals are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | idleManager":{"message":"Pages that use IdleManager are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBConnection":{"message":"Pages that have an open IndexedDB connection are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBEvent":{"message":"Back/forward cache is disabled due to an IndexedDB event."},"panels/application/components/BackForwardCacheStrings.ts | ineligibleAPI":{"message":"Ineligible APIs were used."},"panels/application/components/BackForwardCacheStrings.ts | injectedJavascript":{"message":"Pages that JavaScript is injected into by extensions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | injectedStyleSheet":{"message":"Pages that a StyleSheet is injected into by extensions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | internalError":{"message":"Internal error."},"panels/application/components/BackForwardCacheStrings.ts | jsNetworkRequestReceivedCacheControlNoStoreResource":{"message":"Back/forward cache is disabled because some JavaScript network request received resource with Cache-Control: no-store header."},"panels/application/components/BackForwardCacheStrings.ts | keepaliveRequest":{"message":"Back/forward cache is disabled due to a keepalive request."},"panels/application/components/BackForwardCacheStrings.ts | keyboardLock":{"message":"Pages that use keyboard lock are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | loading":{"message":"The page did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoCache":{"message":"Pages whose main resource has cache-control:no-cache cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoStore":{"message":"Pages whose main resource has cache-control:no-store cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | navigationCancelledWhileRestoring":{"message":"Navigation was cancelled before the page could be restored from back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkExceedsBufferLimit":{"message":"The page was evicted from the cache because an active network connection received too much data. Chrome limits the amount of data that a page may receive while cached."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestDatapipeDrainedAsBytesConsumer":{"message":"Pages that have inflight fetch() or XHR are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestRedirected":{"message":"The page was evicted from back-forward cache because an active network request involved a redirect."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestTimeout":{"message":"The page was evicted from the cache because a network connection was open too long. Chrome limits the amount of time that a page may receive data while cached."},"panels/application/components/BackForwardCacheStrings.ts | noResponseHead":{"message":"Pages that do not have a valid response head cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | notMainFrame":{"message":"Navigation happened in a frame other than the main frame."},"panels/application/components/BackForwardCacheStrings.ts | outstandingIndexedDBTransaction":{"message":"Pages with ongoing indexed DB transactions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestDirectSocket":{"message":"Pages with an in-flight network request are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestFetch":{"message":"Pages with an in-flight fetch network request are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestOthers":{"message":"Pages with an in-flight network request are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestXHR":{"message":"Pages with an in-flight XHR network request are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | paymentManager":{"message":"Pages that use PaymentManager are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | pictureInPicture":{"message":"Pages that use picture-in-picture are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | portal":{"message":"Pages that use portals are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | printing":{"message":"Pages that show Printing UI are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | relatedActiveContentsExist":{"message":"The page was opened using 'window.open()' and another tab has a reference to it, or the page opened a window."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessCrashed":{"message":"The renderer process for the page in back-forward cache crashed."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessKilled":{"message":"The renderer process for the page in back-forward cache was killed."},"panels/application/components/BackForwardCacheStrings.ts | requestedAudioCapturePermission":{"message":"Pages that have requested audio capture permissions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackForwardCacheBlockedSensors":{"message":"Pages that have requested sensor permissions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackgroundWorkPermission":{"message":"Pages that have requested background sync or fetch permissions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedMIDIPermission":{"message":"Pages that have requested MIDI permissions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedNotificationsPermission":{"message":"Pages that have requested notifications permissions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedStorageAccessGrant":{"message":"Pages that have requested storage access are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedVideoCapturePermission":{"message":"Pages that have requested video capture permissions are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | schemeNotHTTPOrHTTPS":{"message":"Only pages whose URL scheme is HTTP/HTTPS can be cached."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerClaim":{"message":"The page was claimed by a service worker while it is in back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerPostMessage":{"message":"A service worker attempted to send the page in back-forward cache a MessageEvent."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerUnregistration":{"message":"ServiceWorker was unregistered while a page was in back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerVersionActivation":{"message":"The page was evicted from back-forward cache due to a service worker activation."},"panels/application/components/BackForwardCacheStrings.ts | sessionRestored":{"message":"Chrome restarted and cleared the back-forward cache entries."},"panels/application/components/BackForwardCacheStrings.ts | sharedWorker":{"message":"Pages that use SharedWorker are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechRecognizer":{"message":"Pages that use SpeechRecogniser are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechSynthesis":{"message":"Pages that use SpeechSynthesis are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subframeIsNavigating":{"message":"An iframe on the page started a navigation that did not complete."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoCache":{"message":"Pages whose subresource has cache-control:no-cache cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoStore":{"message":"Pages whose subresource has cache-control:no-store cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | timeout":{"message":"The page exceeded the maximum time in back-forward cache and expired."},"panels/application/components/BackForwardCacheStrings.ts | timeoutPuttingInCache":{"message":"The page timed out entering back-forward cache (likely due to long-running page-hide handlers)."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInMainFrame":{"message":"The page has an unload handler in the main frame."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInSubFrame":{"message":"The page has an unload handler in a sub frame."},"panels/application/components/BackForwardCacheStrings.ts | userAgentOverrideDiffers":{"message":"Browser has changed the user agent override header."},"panels/application/components/BackForwardCacheStrings.ts | wasGrantedMediaAccess":{"message":"Pages that have granted access to record video or audio are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webDatabase":{"message":"Pages that use WebDatabase are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webHID":{"message":"Pages that use WebHID are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webLocks":{"message":"Pages that use WebLocks are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webNfc":{"message":"Pages that use WebNfc are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webOTPService":{"message":"Pages that use WebOTPService are not currently eligible for bfcache."},"panels/application/components/BackForwardCacheStrings.ts | webRTC":{"message":"Pages with WebRTC cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webRTCSticky":{"message":"Back-forward cache is disabled because WebRTC has been used."},"panels/application/components/BackForwardCacheStrings.ts | webShare":{"message":"Pages that use WebShare are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocket":{"message":"Pages with WebSocket cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocketSticky":{"message":"Back-forward cache is disabled because WebSocket has been used."},"panels/application/components/BackForwardCacheStrings.ts | webTransport":{"message":"Pages with WebTransport cannot enter back-forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webTransportSticky":{"message":"Back-forward cache is disabled because WebTransport has been used."},"panels/application/components/BackForwardCacheStrings.ts | webXR":{"message":"Pages that use WebXR are not currently eligible for back-forward cache."},"panels/application/components/BackForwardCacheView.ts | backForwardCacheTitle":{"message":"Back-forward cache"},"panels/application/components/BackForwardCacheView.ts | blankURLTitle":{"message":"Blank URL [{PH1}]"},"panels/application/components/BackForwardCacheView.ts | blockingExtensionId":{"message":"Extension ID: "},"panels/application/components/BackForwardCacheView.ts | circumstantial":{"message":"Not actionable"},"panels/application/components/BackForwardCacheView.ts | circumstantialExplanation":{"message":"These reasons are not actionable, i.e. caching was prevented by something outside of the direct control of the page."},"panels/application/components/BackForwardCacheView.ts | framesPerIssue":{"message":"{n,plural, =1{# frame}other{# frames}}"},"panels/application/components/BackForwardCacheView.ts | framesTitle":{"message":"Frames"},"panels/application/components/BackForwardCacheView.ts | issuesInMultipleFrames":{"message":"{n,plural, =1{# issue found in {m} frames.}other{# issues found in {m} frames.}}"},"panels/application/components/BackForwardCacheView.ts | issuesInSingleFrame":{"message":"{n,plural, =1{# issue found in 1 frame.}other{# issues found in 1 frame.}}"},"panels/application/components/BackForwardCacheView.ts | learnMore":{"message":"Learn more: back/forward cache eligibility"},"panels/application/components/BackForwardCacheView.ts | mainFrame":{"message":"Main frame"},"panels/application/components/BackForwardCacheView.ts | neverUseUnload":{"message":"Learn more: Never use unload handler"},"panels/application/components/BackForwardCacheView.ts | normalNavigation":{"message":"Not served from back/forward cache: to trigger back/forward cache, use Chrome's back/forward buttons, or use the test button below to automatically navigate away and back."},"panels/application/components/BackForwardCacheView.ts | pageSupportNeeded":{"message":"Actionable"},"panels/application/components/BackForwardCacheView.ts | pageSupportNeededExplanation":{"message":"These reasons are actionable i.e. they can be cleaned up to make the page eligible for back-forward cache."},"panels/application/components/BackForwardCacheView.ts | restoredFromBFCache":{"message":"Successfully served from back/forward cache."},"panels/application/components/BackForwardCacheView.ts | runTest":{"message":"Test back/forward cache"},"panels/application/components/BackForwardCacheView.ts | runningTest":{"message":"Running test"},"panels/application/components/BackForwardCacheView.ts | supportPending":{"message":"Pending support"},"panels/application/components/BackForwardCacheView.ts | supportPendingExplanation":{"message":"Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for back-forward cache in a future version of Chrome."},"panels/application/components/BackForwardCacheView.ts | unavailable":{"message":"unavailable"},"panels/application/components/BackForwardCacheView.ts | unknown":{"message":"Unknown status"},"panels/application/components/BackForwardCacheView.ts | url":{"message":"URL:"},"panels/application/components/BounceTrackingMitigationsView.ts | bounceTrackingMitigationsTitle":{"message":"Bounce tracking mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | checkingPotentialTrackers":{"message":"Checking for potential bounce tracking sites."},"panels/application/components/BounceTrackingMitigationsView.ts | featureDisabled":{"message":"Bounce tracking mitigations are disabled. To enable them, set the flag at {PH1} to 'Enabled with deletion'."},"panels/application/components/BounceTrackingMitigationsView.ts | featureFlag":{"message":"Bounce tracking mitigations feature flag"},"panels/application/components/BounceTrackingMitigationsView.ts | forceRun":{"message":"Force run"},"panels/application/components/BounceTrackingMitigationsView.ts | learnMore":{"message":"Learn more: Bounce tracking mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | noPotentialBounceTrackersIdentified":{"message":"State was not cleared for any potential bounce tracking sites. Either none were identified, or third-party cookies are not blocked."},"panels/application/components/BounceTrackingMitigationsView.ts | runningMitigations":{"message":"Running"},"panels/application/components/BounceTrackingMitigationsView.ts | stateDeletedFor":{"message":"State was deleted for the following sites:"},"panels/application/components/EndpointsGrid.ts | noEndpointsToDisplay":{"message":"No endpoints to display"},"panels/application/components/FrameDetailsView.ts | aFrameAncestorIsAnInsecure":{"message":"A frame ancestor is an insecure context"},"panels/application/components/FrameDetailsView.ts | adStatus":{"message":"Ad status"},"panels/application/components/FrameDetailsView.ts | additionalInformation":{"message":"Additional information"},"panels/application/components/FrameDetailsView.ts | apiAvailability":{"message":"API availability"},"panels/application/components/FrameDetailsView.ts | availabilityOfCertainApisDepends":{"message":"Availability of certain APIs depends on the document being cross-origin isolated."},"panels/application/components/FrameDetailsView.ts | available":{"message":"available"},"panels/application/components/FrameDetailsView.ts | availableNotTransferable":{"message":"available, not transferable"},"panels/application/components/FrameDetailsView.ts | availableTransferable":{"message":"available, transferable"},"panels/application/components/FrameDetailsView.ts | child":{"message":"child"},"panels/application/components/FrameDetailsView.ts | childDescription":{"message":"This frame has been identified as a child frame of an ad"},"panels/application/components/FrameDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in elements panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanel":{"message":"Click to reveal in Network panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanelMight":{"message":"Click to reveal in network panel (might require page reload)"},"panels/application/components/FrameDetailsView.ts | clickToRevealInSourcesPanel":{"message":"Click to reveal in sources panel"},"panels/application/components/FrameDetailsView.ts | contentSecurityPolicy":{"message":"Content Security Policy (CSP)"},"panels/application/components/FrameDetailsView.ts | createdByAdScriptExplanation":{"message":"There was an ad script in the (async) stack when this frame was created. Examining the creation stack trace of this frame might provide more insight."},"panels/application/components/FrameDetailsView.ts | creationStackTrace":{"message":"Frame creation Stack Trace"},"panels/application/components/FrameDetailsView.ts | creationStackTraceExplanation":{"message":"This frame was created programmatically. The stack trace shows where this happened."},"panels/application/components/FrameDetailsView.ts | creatorAdScript":{"message":"Creator ad script"},"panels/application/components/FrameDetailsView.ts | crossoriginIsolated":{"message":"Cross-origin isolated"},"panels/application/components/FrameDetailsView.ts | document":{"message":"Document"},"panels/application/components/FrameDetailsView.ts | frameId":{"message":"Frame ID"},"panels/application/components/FrameDetailsView.ts | learnMore":{"message":"Learn more"},"panels/application/components/FrameDetailsView.ts | localhostIsAlwaysASecureContext":{"message":"Localhost is always a secure context"},"panels/application/components/FrameDetailsView.ts | matchedBlockingRuleExplanation":{"message":"This frame is considered an ad frame because its current (or previous) main document is an ad resource."},"panels/application/components/FrameDetailsView.ts | measureMemory":{"message":"Measure memory"},"panels/application/components/FrameDetailsView.ts | no":{"message":"No"},"panels/application/components/FrameDetailsView.ts | none":{"message":"None"},"panels/application/components/FrameDetailsView.ts | origin":{"message":"Origin"},"panels/application/components/FrameDetailsView.ts | ownerElement":{"message":"Owner element"},"panels/application/components/FrameDetailsView.ts | parentIsAdExplanation":{"message":"This frame is considered an ad frame because its parent frame is an ad frame."},"panels/application/components/FrameDetailsView.ts | refresh":{"message":"Refresh"},"panels/application/components/FrameDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/components/FrameDetailsView.ts | requiresCrossoriginIsolated":{"message":"requires cross-origin isolated context"},"panels/application/components/FrameDetailsView.ts | root":{"message":"root"},"panels/application/components/FrameDetailsView.ts | rootDescription":{"message":"This frame has been identified as the root frame of an ad"},"panels/application/components/FrameDetailsView.ts | secureContext":{"message":"Secure context"},"panels/application/components/FrameDetailsView.ts | securityIsolation":{"message":"Security and isolation"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIs":{"message":"SharedArrayBuffer constructor is available and SABs can be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIsAvailable":{"message":"SharedArrayBuffer constructor is available but SABs cannot be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | theFramesSchemeIsInsecure":{"message":"The frame's scheme is insecure"},"panels/application/components/FrameDetailsView.ts | thePerformanceAPI":{"message":"The performance.measureUserAgentSpecificMemory() API is available"},"panels/application/components/FrameDetailsView.ts | thePerformancemeasureuseragentspecificmemory":{"message":"The performance.measureUserAgentSpecificMemory() API is not available"},"panels/application/components/FrameDetailsView.ts | thisAdditionalDebugging":{"message":"This additional (debugging) information is shown because the 'Protocol monitor' experiment is enabled."},"panels/application/components/FrameDetailsView.ts | transferRequiresCrossoriginIsolatedPermission":{"message":"SharedArrayBuffer transfer requires enabling the permission policy:"},"panels/application/components/FrameDetailsView.ts | unavailable":{"message":"unavailable"},"panels/application/components/FrameDetailsView.ts | unreachableUrl":{"message":"Unreachable URL"},"panels/application/components/FrameDetailsView.ts | url":{"message":"URL"},"panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated":{"message":"⚠️ will require cross-origin isolated context in the future"},"panels/application/components/FrameDetailsView.ts | yes":{"message":"Yes"},"panels/application/components/InterestGroupAccessGrid.ts | allInterestGroupStorageEvents":{"message":"All interest group storage events."},"panels/application/components/InterestGroupAccessGrid.ts | eventTime":{"message":"Event time"},"panels/application/components/InterestGroupAccessGrid.ts | eventType":{"message":"Access type"},"panels/application/components/InterestGroupAccessGrid.ts | groupName":{"message":"Name"},"panels/application/components/InterestGroupAccessGrid.ts | groupOwner":{"message":"Owner"},"panels/application/components/InterestGroupAccessGrid.ts | noEvents":{"message":"No interest group events recorded."},"panels/application/components/OriginTrialTreeView.ts | expiryTime":{"message":"Expiry time"},"panels/application/components/OriginTrialTreeView.ts | isThirdParty":{"message":"Third party"},"panels/application/components/OriginTrialTreeView.ts | matchSubDomains":{"message":"Subdomain matching"},"panels/application/components/OriginTrialTreeView.ts | origin":{"message":"Origin"},"panels/application/components/OriginTrialTreeView.ts | rawTokenText":{"message":"Raw token"},"panels/application/components/OriginTrialTreeView.ts | status":{"message":"Token status"},"panels/application/components/OriginTrialTreeView.ts | token":{"message":"Token"},"panels/application/components/OriginTrialTreeView.ts | tokens":{"message":"{PH1} tokens"},"panels/application/components/OriginTrialTreeView.ts | trialName":{"message":"Trial name"},"panels/application/components/OriginTrialTreeView.ts | usageRestriction":{"message":"Usage restriction"},"panels/application/components/PermissionsPolicySection.ts | allowedFeatures":{"message":"Allowed features"},"panels/application/components/PermissionsPolicySection.ts | clickToShowHeader":{"message":"Click to reveal the request whose 'Permissions-Policy' HTTP header disables this feature."},"panels/application/components/PermissionsPolicySection.ts | clickToShowIframe":{"message":"Click to reveal the top-most iframe which does not allow this feature in the elements panel."},"panels/application/components/PermissionsPolicySection.ts | disabledByFencedFrame":{"message":"disabled inside a fencedframe"},"panels/application/components/PermissionsPolicySection.ts | disabledByHeader":{"message":"disabled by 'Permissions-Policy' header"},"panels/application/components/PermissionsPolicySection.ts | disabledByIframe":{"message":"missing in iframe 'allow' attribute"},"panels/application/components/PermissionsPolicySection.ts | disabledFeatures":{"message":"Disabled features"},"panels/application/components/PermissionsPolicySection.ts | hideDetails":{"message":"Hide details"},"panels/application/components/PermissionsPolicySection.ts | showDetails":{"message":"Show details"},"panels/application/components/ProtocolHandlersView.ts | dropdownLabel":{"message":"Select protocol handler"},"panels/application/components/ProtocolHandlersView.ts | manifest":{"message":"manifest"},"panels/application/components/ProtocolHandlersView.ts | needHelpReadOur":{"message":"Need help? Read {PH1}."},"panels/application/components/ProtocolHandlersView.ts | protocolDetected":{"message":"Found valid protocol handler registration in the {PH1}. With the app installed, test the registered protocols."},"panels/application/components/ProtocolHandlersView.ts | protocolHandlerRegistrations":{"message":"URL protocol handler registration for PWAs"},"panels/application/components/ProtocolHandlersView.ts | protocolNotDetected":{"message":"Define protocol handlers in the {PH1} to register your app as a handler for custom protocols when your app is installed."},"panels/application/components/ProtocolHandlersView.ts | testProtocol":{"message":"Test protocol"},"panels/application/components/ProtocolHandlersView.ts | textboxLabel":{"message":"Query parameter or endpoint for protocol handler"},"panels/application/components/ProtocolHandlersView.ts | textboxPlaceholder":{"message":"Enter URL"},"panels/application/components/ReportsGrid.ts | destination":{"message":"Destination"},"panels/application/components/ReportsGrid.ts | generatedAt":{"message":"Generated at"},"panels/application/components/ReportsGrid.ts | noReportsToDisplay":{"message":"No reports to display"},"panels/application/components/ReportsGrid.ts | status":{"message":"Status"},"panels/application/components/SharedStorageAccessGrid.ts | allSharedStorageEvents":{"message":"All shared storage events for this page."},"panels/application/components/SharedStorageAccessGrid.ts | eventParams":{"message":"Optional event params"},"panels/application/components/SharedStorageAccessGrid.ts | eventTime":{"message":"Event time"},"panels/application/components/SharedStorageAccessGrid.ts | eventType":{"message":"Access type"},"panels/application/components/SharedStorageAccessGrid.ts | mainFrameId":{"message":"Main frame ID"},"panels/application/components/SharedStorageAccessGrid.ts | noEvents":{"message":"No shared storage events recorded."},"panels/application/components/SharedStorageAccessGrid.ts | ownerOrigin":{"message":"Owner origin"},"panels/application/components/SharedStorageAccessGrid.ts | sharedStorage":{"message":"Shared storage"},"panels/application/components/SharedStorageMetadataView.ts | budgetExplanation":{"message":"Remaining data leakage allowed within a 24-hour period for this origin in bits of entropy"},"panels/application/components/SharedStorageMetadataView.ts | creation":{"message":"Creation time"},"panels/application/components/SharedStorageMetadataView.ts | entropyBudget":{"message":"Entropy budget for fenced frames"},"panels/application/components/SharedStorageMetadataView.ts | notYetCreated":{"message":"Not yet created"},"panels/application/components/SharedStorageMetadataView.ts | numEntries":{"message":"Number of entries"},"panels/application/components/SharedStorageMetadataView.ts | resetBudget":{"message":"Reset budget"},"panels/application/components/SharedStorageMetadataView.ts | sharedStorage":{"message":"Shared storage"},"panels/application/components/StackTrace.ts | cannotRenderStackTrace":{"message":"Cannot render stack trace"},"panels/application/components/StackTrace.ts | showLess":{"message":"Show less"},"panels/application/components/StackTrace.ts | showSMoreFrames":{"message":"{n,plural, =1{Show # more frame}other{Show # more frames}}"},"panels/application/components/StorageMetadataView.ts | bucketName":{"message":"Bucket name"},"panels/application/components/StorageMetadataView.ts | confirmBucketDeletion":{"message":"Delete the '{PH1}' bucket?"},"panels/application/components/StorageMetadataView.ts | defaultBucket":{"message":"Default bucket"},"panels/application/components/StorageMetadataView.ts | deleteBucket":{"message":"Delete bucket"},"panels/application/components/StorageMetadataView.ts | durability":{"message":"Durability"},"panels/application/components/StorageMetadataView.ts | expiration":{"message":"Expiry"},"panels/application/components/StorageMetadataView.ts | isOpaque":{"message":"Is opaque"},"panels/application/components/StorageMetadataView.ts | isThirdParty":{"message":"Is third-party"},"panels/application/components/StorageMetadataView.ts | loading":{"message":"Loading…"},"panels/application/components/StorageMetadataView.ts | no":{"message":"No"},"panels/application/components/StorageMetadataView.ts | none":{"message":"None"},"panels/application/components/StorageMetadataView.ts | opaque":{"message":"(opaque)"},"panels/application/components/StorageMetadataView.ts | origin":{"message":"Origin"},"panels/application/components/StorageMetadataView.ts | persistent":{"message":"Is persistent"},"panels/application/components/StorageMetadataView.ts | quota":{"message":"Quota"},"panels/application/components/StorageMetadataView.ts | topLevelSite":{"message":"Top-level site"},"panels/application/components/StorageMetadataView.ts | yes":{"message":"Yes"},"panels/application/components/StorageMetadataView.ts | yesBecauseAncestorChainHasCrossSite":{"message":"Yes, because the ancestry chain contains a third-party origin"},"panels/application/components/StorageMetadataView.ts | yesBecauseKeyIsOpaque":{"message":"Yes, because the storage key is opaque"},"panels/application/components/StorageMetadataView.ts | yesBecauseOriginNotInTopLevelSite":{"message":"Yes, because the origin is outside the top-level site"},"panels/application/components/StorageMetadataView.ts | yesBecauseTopLevelIsOpaque":{"message":"Yes, because the top-level site is opaque"},"panels/application/components/TrustTokensView.ts | allStoredTrustTokensAvailableIn":{"message":"All stored private state tokens available in this browser instance."},"panels/application/components/TrustTokensView.ts | deleteTrustTokens":{"message":"Delete all stored private state tokens issued by {PH1}."},"panels/application/components/TrustTokensView.ts | issuer":{"message":"Issuer"},"panels/application/components/TrustTokensView.ts | noTrustTokensStored":{"message":"No private state tokens are currently stored."},"panels/application/components/TrustTokensView.ts | storedTokenCount":{"message":"Stored token count"},"panels/application/components/TrustTokensView.ts | trustTokens":{"message":"Private state tokens"},"panels/application/preloading/PreloadingView.ts | filterAllPreloads":{"message":"All speculative loads"},"panels/application/preloading/PreloadingView.ts | filterFilterByRuleSet":{"message":"Filter by rule set"},"panels/application/preloading/PreloadingView.ts | statusFailure":{"message":"Failure"},"panels/application/preloading/PreloadingView.ts | statusNotTriggered":{"message":"Not triggered"},"panels/application/preloading/PreloadingView.ts | statusPending":{"message":"Pending"},"panels/application/preloading/PreloadingView.ts | statusReady":{"message":"Ready"},"panels/application/preloading/PreloadingView.ts | statusRunning":{"message":"Running"},"panels/application/preloading/PreloadingView.ts | statusSuccess":{"message":"Success"},"panels/application/preloading/PreloadingView.ts | validityInvalid":{"message":"Invalid"},"panels/application/preloading/PreloadingView.ts | validitySomeRulesInvalid":{"message":"Some rules invalid"},"panels/application/preloading/PreloadingView.ts | validityValid":{"message":"Valid"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | action":{"message":"Action"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | status":{"message":"Status"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusFailure":{"message":"Failure"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusNotTriggered":{"message":"Not triggered"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusPending":{"message":"Pending"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusReady":{"message":"Ready"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusRunning":{"message":"Running"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusSuccess":{"message":"Success"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | url":{"message":"URL"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | buttonClickToInspect":{"message":"Click to inspect prerendered page"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | buttonClickToRevealRuleSet":{"message":"Click to reveal rule set"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | buttonInspect":{"message":"Inspect"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusFailure":{"message":"Speculative load failed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusNotTriggered":{"message":"Speculative load attempt is not yet triggered."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusPending":{"message":"Speculative load attempt is eligible but pending."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusReady":{"message":"Speculative load finished and the result is ready for the next navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusRunning":{"message":"Speculative load is running."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusSuccess":{"message":"Speculative load finished and used for a navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsAction":{"message":"Action"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsDetailedInformation":{"message":"Detailed information"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsFailureReason":{"message":"Failure reason"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsRuleSet":{"message":"Rule set"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsStatus":{"message":"Status"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | selectAnElementForMoreDetails":{"message":"Select an element for more details"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByBatterySaver":{"message":"Speculative loading is disabled because of the operating system's Battery Saver mode."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByDataSaver":{"message":"Speculative loading is disabled because of the operating system's Data Saver mode."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByHoldbackPrefetchSpeculationRules":{"message":"Prefetch is forced-enabled because DevTools is open. When DevTools is closed, prefetchwill be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByHoldbackPrerenderSpeculationRules":{"message":"Prerendering is forced-enabled because DevTools is open. When DevTools is closed, prerendering will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByPreference":{"message":"Speculative loading is disabled because of user settings or an extension. Go to {PH1} to update your preference. Go to {PH2} to disable any extension that blocks speculative loading."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | extensionsSettings":{"message":"Extensions settings"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | footerLearnMore":{"message":"Learn more"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByBatterySaver":{"message":"Battery Saver"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByDataSaver":{"message":"Data Saver"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByHoldbackPrefetchSpeculationRules":{"message":"Prefetch was disabled, but is force-enabled now"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByHoldbackPrerenderSpeculationRules":{"message":"Prerendering was disabled, but is force-enabled now"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByPreference":{"message":"User settings or extensions"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | infobarPreloadingIsDisabled":{"message":"Speculative loading is disabled"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | infobarPreloadingIsForceEnabled":{"message":"Speculative loading is force-enabled"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | preloadingPagesSettings":{"message":"Preload pages settings"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | titleReasonsPreventingPreloading":{"message":"Reasons preventing speculative loading"},"panels/application/preloading/components/PreloadingGrid.ts | action":{"message":"Action"},"panels/application/preloading/components/PreloadingGrid.ts | ruleSet":{"message":"Rule set"},"panels/application/preloading/components/PreloadingGrid.ts | status":{"message":"Status"},"panels/application/preloading/components/PreloadingString.ts | PrefetchEvicted":{"message":"The prefetch was discarded for a newer prefetch because |kPrefetchNewLimits| is enabled"},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedIneligibleRedirect":{"message":"The prefetch was redirected but the redirect URL is not eligible for prefetch."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedInvalidRedirect":{"message":"The prefetch was redirected but there was a problem with the redirect."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedMIMENotSupported":{"message":"The prefetch failed because the response's Content-Type header was not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNetError":{"message":"The prefetch failed because of a network error."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNon2XX":{"message":"The prefetch failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedPerPageLimitExceeded":{"message":"The prefetch was not performed because the initiating page already has too many prefetches ongoing."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIneligibleRetryAfter":{"message":"A previous prefetch to the origin got a HTTP 503 response with a Retry-After header that has not elapsed yet."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsPrivacyDecoy":{"message":"The URL was not eligible to be prefetched because there was a registered service worker or cross-site cookies for that origin but the prefetch was put on the network anyway and not used to disguise that the user had some kind of previous relationship with the origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsStale":{"message":"Too much time elapsed between the prefetch and usage, so the prefetch was discarded."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBatterySaverEnabled":{"message":"The prefetch was not performed because the Battery Saver setting was enabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBrowserContextOffTheRecord":{"message":"The prefetch was not performed because the browser is in Incognito or Guest Mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleDataSaverEnabled":{"message":"The prefetch was not performed because the operating system is in Data Saver mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleExistingProxy":{"message":"The URL is not eligible to be prefetched because in the default network context it is configured to use a proxy server."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleHostIsNonUnique":{"message":"The URL was not eligible to be prefetched because its host was not unique (e.g., a non-publicly routable IP address or a hostname that is not registry-controlled), but the prefetch was required to be proxied."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleNonDefaultStoragePartition":{"message":"The URL was not eligible to be prefetched because it uses a non-default storage partition."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligiblePreloadingDisabled":{"message":"The prefetch was not performed because speculative loading was disabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy":{"message":"The URL was not eligible to be prefetched because the default network context cannot be configured to use the prefetch proxy for a same-site cross-origin prefetch request."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSchemeIsNotHttps":{"message":"The URL was not eligible to be prefetched because its scheme was not https:."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasCookies":{"message":"The URL was not eligible to be prefetched because it was cross-site but the user had cookies for that origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasServiceWorker":{"message":"The URL was not eligible to be prefetched because there was a registered service worker for that origin, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedCookiesChanged":{"message":"The prefetch was not used because it was a cross-site prefetch and cookies were added for that URL while the prefetch was ongoing so the prefetched response is now out of date."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedProbeFailed":{"message":"The prefetch was blocked by your Internet service provider or network administrator."},"panels/application/preloading/components/PreloadingString.ts | PrefetchProxyNotAvailable":{"message":"A network error was encountered when trying to set up a connection to the prefetching proxy."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivatedDuringMainFrameNavigation":{"message":"Prerendered page activated during initiating page's main frame navigation."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivatedWithAuxiliaryBrowsingContexts":{"message":"The prerender was not used because during activation time there were other windows with an active opener reference to the initiating page, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivationFramePolicyNotCompatible":{"message":"The prerender was not used because the sandboxing flags or permissions policy of the initiating page was not compatible with those of the prerendering page."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivationNavigationParameterMismatch":{"message":"The prerender was not used because during activation time, different navigation parameters (e.g. HTTP headers) were calculated than during the original prerendering navigation request."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivationUrlHasEffectiveUrl":{"message":"The prerender was not used because during activation time navigation has an effective URL that is different from its normal URL. (For example, the New Tab Page or hosted apps.)"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusAudioOutputDeviceRequested":{"message":"The prerendered page requested audio output, which is not currently supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusBatterySaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less battery."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusBlockedByClient":{"message":"Some resource load was blocked."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusClientCertRequested":{"message":"The prerendering navigation required an HTTP client certificate."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusCrossSiteNavigationInInitialNavigation":{"message":"The prerendering navigation failed because it targeted a cross-site URL."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusCrossSiteNavigationInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-site URL."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusCrossSiteRedirectInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusCrossSiteRedirectInMainFrameNavigation":{"message":"The prerendered page navigated to a URL that redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusDataSaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less data."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusDownload":{"message":"The prerendered page attempted to initiate a download, which is not currently supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusHasEffectiveUrl":{"message":"The initiating page cannot perform prerendering because it has an effective URL that is different from its normal URL. (For example, the New Tab Page or hosted apps.)"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusInvalidSchemeNavigation":{"message":"The URL was not eligible to be prerendered because its scheme was not http: or https:."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusInvalidSchemeRedirect":{"message":"The prerendering navigation failed because it redirected to a URL whose scheme was not http: or https:."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusLoginAuthRequested":{"message":"The prerendering navigation required HTTP authentication, which is not currently supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusLowEndDevice":{"message":"The prerender was not performed because this device does not have enough total system memory to support prerendering."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMainFrameNavigation":{"message":"The prerendered page navigated itself to another URL, which is not currently supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMaxNumOfRunningEagerPrerendersExceeded":{"message":"The prerender whose eagerness is 'eager' was not performed because the initiating page already has too many prerenders ongoing. Remove other speculation rules with 'eager' to enable further prerendering."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMaxNumOfRunningEmbedderPrerendersExceeded":{"message":"The browser-triggered prerender was not performed because the initiating page already has too many prerenders ongoing."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMaxNumOfRunningNonEagerPrerendersExceeded":{"message":"The old non-eager prerender (with a 'moderate' or 'conservative' eagerness and triggered by hovering or clicking links) was automatically cancelled due to starting a new non-eager prerender. It can be retriggered by interacting with the link again."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMemoryLimitExceeded":{"message":"The prerender was not performed because the browser exceeded the prerendering memory limit."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMemoryPressureAfterTriggered":{"message":"The prerendered page was unloaded because the browser came under critical memory pressure."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMemoryPressureOnTrigger":{"message":"The prerender was not performed because the browser was under critical memory pressure."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMixedContent":{"message":"The prerendered page contained mixed content."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMojoBinderPolicy":{"message":"The prerendered page used a forbidden JavaScript API that is not currently supported. (Internal Mojo interface: {PH1})"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusNavigationBadHttpStatus":{"message":"The prerendering navigation failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusNavigationRequestBlockedByCsp":{"message":"The prerendering navigation was blocked by a Content Security Policy."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusNavigationRequestNetworkError":{"message":"The prerendering navigation encountered a network error."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPreloadingDisabled":{"message":"The prerender was not performed because the user disabled preloading in their browser settings."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPrerenderingDisabledByDevTools":{"message":"The prerender was not performed because DevTools has been used to disable prerendering."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPrerenderingUrlHasEffectiveUrl":{"message":"The prerendering navigation failed because it has an effective URL that is different from its normal URL. (For example, the New Tab Page or hosted apps.)"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessCrashed":{"message":"The initiating page crashed."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessKilled":{"message":"The initiating page was killed."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusRedirectedPrerenderingUrlHasEffectiveUrl":{"message":"The prerendering navigation failed because it redirected to an effective URL that is different from its normal URL. (For example, the New Tab Page or hosted apps.)"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusRendererProcessCrashed":{"message":"The prerendered page crashed."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusRendererProcessKilled":{"message":"The prerendered page was killed."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation":{"message":"The prerendering navigation failed because it was to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a URL that redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSpeculationRuleRemoved":{"message":"The prerendered page was unloaded because the initiating page removed the corresponding prerender rule from \n
`,\n\n searchAnswers:\n `- You have to place the hello div before the script, so that it exists when the script is loaded.\n- Let us first try to understand the root cause as to why it is happening in first place. Why do I get an error or Uncaught TypeError: Cannot set property 'innerHTML' of null? The browser always...\n- You could tell javascript to perform the action \\\"onload\\\"... Try with this: \\u003cscript type =\\\"text/javascript\\\"\\u003e window.onload = function what(){ document.getElementById('hello').innerHTML = 'hi';...\n- Just put your JS in window.onload window.onload = function() { what(); function what() { document.getElementById('hello').innerHTML = 'hi'; }; }`,\n\n explanation:\n 'The error means that getElementById returns null instead of the div element. This happens because the script runs before the element is added to the DOM.',\n },\n {\n message: 'Uncaught SyntaxError: Unexpected token \\')\\' (at script.js:39:14)',\n\n relatedCode: `if (10 < 120)) {\n console.log('test')\n}`,\n\n searchAnswers:\n `- this is the way to re export default import as default export, export {default} from './Component'\n- In your index.js. export default from './component'\"\n- Unexpected token errors in ESLint parsing occur due to incompatibility between your development environment and ESLint's current parsing capabilities with the ongoing changes with JavaScripts...\n- In my case (im using Firebase Cloud Functions) i opened .eslintrc.json and changed: \\\"parserOptions\\\": { // Required for certain syntax usages \\\"ecmaVersion\\\": 2017 }, to: \\\"parserOptions\\\": { //...\"`,\n\n explanation: 'There is an extra closing `)`. Remove it to fix the issue.',\n },\n ];\n\n const formatExample = (example: {\n message: string,\n relatedCode?: string,\n relatedRequest?: string,\n searchAnswers?: string, explanation: string,\n }): string => {\n const result = [];\n result.push(messageHeader, example.message);\n if (relatedCode) {\n result.push(relatedCodeHeader, '```', example.relatedCode, '```');\n }\n if (relatedRequest && example.relatedRequest) {\n result.push(relatedRequestHeader, example.relatedRequest);\n }\n if (searchAnswers) {\n result.push(searchAnswersHeader, example.searchAnswers);\n }\n result.push(explanationHeader, example.explanation);\n return result.join('\\n');\n };\n\n return `${preamble}\n\n${fewShotExamples.map(formatExample).join('\\n\\n')}\n\n${formatExample({message, relatedCode, relatedRequest, searchAnswers, explanation: ''})}`;\n }\n}\n\nexport function allowHeader(header: SDK.NetworkRequest.NameValue): boolean {\n const normalizedName = header.name.toLowerCase().trim();\n // Skip custom headers.\n if (normalizedName.startsWith('x-')) {\n return false;\n }\n // Skip cookies as they might contain auth.\n if (normalizedName === 'cookie' || normalizedName === 'set-cookie') {\n return false;\n }\n if (normalizedName === 'authorization') {\n return false;\n }\n return true;\n}\n\nexport function formatRelatedCode(\n {text, columnNumber, lineNumber}: {text: string, columnNumber: number, lineNumber: number},\n maxCodeSize = MAX_CODE_SIZE): string {\n const relatedCode: string[] = [];\n let relatedCodeSize = 0;\n const lines = text.split('\\n');\n let currentLineNumber = lineNumber;\n if (lines[currentLineNumber].length >= maxCodeSize / 2) {\n const start = Math.max(columnNumber - maxCodeSize / 2, 0);\n const end = Math.min(columnNumber + maxCodeSize / 2, lines[currentLineNumber].length);\n relatedCode.push(lines[currentLineNumber].substring(start, end));\n relatedCodeSize += end - start;\n } else {\n while (lines[currentLineNumber] !== undefined &&\n (relatedCodeSize + lines[currentLineNumber].length <= maxCodeSize / 2)) {\n relatedCode.push(lines[currentLineNumber]);\n relatedCodeSize += lines[currentLineNumber].length;\n currentLineNumber--;\n }\n }\n relatedCode.reverse();\n currentLineNumber = lineNumber + 1;\n while (lines[currentLineNumber] !== undefined && (relatedCodeSize + lines[currentLineNumber].length <= maxCodeSize)) {\n relatedCode.push(lines[currentLineNumber]);\n relatedCodeSize += lines[currentLineNumber].length;\n currentLineNumber++;\n }\n return relatedCode.join('\\n');\n}\n\nexport function formatNetworkRequest(\n request:\n Pick):\n string {\n // TODO: anything else that might be relavant?\n // TODO: handle missing headers\n return `Request: ${request.url()}\n\nRequest headers:\n${request.requestHeaders().filter(allowHeader).map(header => `${header.name}: ${header.value}`).join('\\n')}\n\nResponse headers:\n${request.responseHeaders.filter(allowHeader).map(header => `${header.name}: ${header.value}`).join('\\n')}\n\nResponse status: ${request.statusCode} ${request.statusText}`;\n}\n\nexport function formatConsoleMessage(message: Console.ConsoleViewMessage.ConsoleViewMessage): string {\n return message.toMessageTextString();\n}\n\n/**\n * This formats the stacktrace from the console message which might or might not\n * match the content of stacktrace(s) in the console message arguments.\n */\nexport function formatStackTrace(message: Console.ConsoleViewMessage.ConsoleViewMessage): string {\n const previewContainer = message.contentElement().querySelector('.stack-preview-container');\n\n if (!previewContainer) {\n return '';\n }\n\n const preview = previewContainer.shadowRoot?.querySelector('.stack-preview-container') as HTMLElement;\n\n const nodes = preview.childTextNodes();\n // Gets application-level source mapped stack trace taking the ignore list\n // into account.\n const messageContent = nodes\n .filter(n => {\n return !n.parentElement?.closest('.show-all-link,.show-less-link,.hidden-row');\n })\n .map(Components.Linkifier.Linkifier.untruncatedNodeText)\n .join('');\n return messageContent.trim();\n}\n"]} \ No newline at end of file +{"version":3,"file":"PromptBuilder.js","sourceRoot":"","sources":["../../../../../../front_end/panels/explain/PromptBuilder.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM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CAAC;AAC/B,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Formatter from '../../models/formatter/formatter.js';\nimport * as Logs from '../../models/logs/logs.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport type * as Console from '../console/console.js';\n\nconst MAX_CODE_SIZE = 1000;\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum SourceType {\n MESSAGE = 'message',\n STACKTRACE = 'stacktrace',\n NETWORK_REQUEST = 'networkRequest',\n RELATED_CODE = 'relatedCode',\n SEARCH_ANSWERS = 'searchAnswers',\n}\n\nexport interface Source {\n type: SourceType;\n value: string;\n}\n\nexport class PromptBuilder {\n #consoleMessage: Console.ConsoleViewMessage.ConsoleViewMessage;\n #cachedSearchResults?: string;\n\n constructor(consoleMessage: Console.ConsoleViewMessage.ConsoleViewMessage) {\n this.#consoleMessage = consoleMessage;\n }\n\n async getSearchAnswers(): Promise {\n if (this.#cachedSearchResults !== undefined) {\n return this.#cachedSearchResults;\n }\n const apiKey = Root.Runtime.Runtime.queryParam('aidaApiKey');\n if (!apiKey) {\n return '';\n }\n const consoleMessage = this.#consoleMessage.consoleMessage().messageText;\n const response = await fetch(`https://customsearch.googleapis.com/customsearch/v1?cx=f499de4cd70e644b1&key=${\n apiKey}&q=\"${encodeURIComponent(consoleMessage)}\"`);\n const parsedResponse = await response.json();\n const result = [];\n for (const item of parsedResponse.items || []) {\n if (!item.pagemap?.question?.length || !item.pagemap?.answer) {\n continue;\n }\n for (let i = 0; i < Math.min(item.pagemap?.answer?.length, 3); ++i) {\n result.push(' * ' + item.pagemap?.answer[i].text);\n }\n if (result.length >= 4) {\n break;\n }\n }\n this.#cachedSearchResults = result.join('\\n');\n return this.#cachedSearchResults;\n }\n\n async getNetworkRequest(): Promise {\n const requestId = this.#consoleMessage.consoleMessage().getAffectedResources()?.requestId;\n if (!requestId) {\n return;\n }\n const log = Logs.NetworkLog.NetworkLog.instance();\n // TODO: we might try handling redirect requests too later.\n return log.requestsForId(requestId)[0];\n }\n\n /**\n * Gets the source file associated with the top of the message's stacktrace.\n * Returns an empty string if the source is not available for any reasons.\n */\n async getMessageSourceCode(): Promise<{text: string, columnNumber: number, lineNumber: number}> {\n const callframe = this.#consoleMessage.consoleMessage().stackTrace?.callFrames[0];\n const runtimeModel = this.#consoleMessage.consoleMessage().runtimeModel();\n const debuggerModel = runtimeModel?.debuggerModel();\n if (!debuggerModel || !runtimeModel || !callframe) {\n return {text: '', columnNumber: 0, lineNumber: 0};\n }\n const rawLocation =\n new SDK.DebuggerModel.Location(debuggerModel, callframe.scriptId, callframe.lineNumber, callframe.columnNumber);\n const mappedLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n rawLocation);\n const content = await mappedLocation?.uiSourceCode.requestContent();\n const text = !content?.isEncoded && content?.content ? content.content : '';\n const firstNewline = text.indexOf('\\n');\n if (text.length > MAX_CODE_SIZE && (firstNewline < 0 || firstNewline > MAX_CODE_SIZE)) {\n // Use formatter\n const {formattedContent, formattedMapping} = await Formatter.ScriptFormatter.formatScriptContent(\n mappedLocation?.uiSourceCode.mimeType() ?? 'text/javascript', text);\n const [lineNumber, columnNumber] =\n formattedMapping.originalToFormatted(mappedLocation?.lineNumber ?? 0, mappedLocation?.columnNumber ?? 0);\n return {text: formattedContent, columnNumber, lineNumber};\n }\n return {text, columnNumber: mappedLocation?.columnNumber ?? 0, lineNumber: mappedLocation?.lineNumber ?? 0};\n }\n\n async buildPrompt(sourcesTypes: SourceType[] = Object.values(SourceType)):\n Promise<{prompt: string, sources: Source[]}> {\n const [sourceCode, request, searchAnswers] = await Promise.all([\n sourcesTypes.includes(SourceType.RELATED_CODE) ? this.getMessageSourceCode() : undefined,\n sourcesTypes.includes(SourceType.NETWORK_REQUEST) ? this.getNetworkRequest() : undefined,\n sourcesTypes.includes(SourceType.SEARCH_ANSWERS) ? this.getSearchAnswers() : '',\n ]);\n\n const relatedCode = sourceCode?.text ? formatRelatedCode(sourceCode) : '';\n const relatedRequest = request ? formatNetworkRequest(request) : '';\n const stacktrace = sourcesTypes.includes(SourceType.STACKTRACE) ? formatStackTrace(this.#consoleMessage) : '';\n\n const message = formatConsoleMessage(this.#consoleMessage);\n\n const prompt = this.formatPrompt({\n message: [message, stacktrace].join('\\n').trim(),\n relatedCode,\n relatedRequest,\n searchAnswers,\n });\n\n const sources = [\n {\n type: SourceType.MESSAGE,\n value: message,\n },\n ];\n\n if (stacktrace) {\n sources.push({\n type: SourceType.STACKTRACE,\n value: stacktrace,\n });\n }\n\n if (relatedCode) {\n sources.push({\n type: SourceType.RELATED_CODE,\n value: relatedCode,\n });\n }\n\n if (relatedRequest) {\n sources.push({\n type: SourceType.NETWORK_REQUEST,\n value: relatedRequest,\n });\n }\n\n if (searchAnswers) {\n sources.push({\n type: SourceType.SEARCH_ANSWERS,\n value: searchAnswers,\n });\n }\n\n return {\n prompt,\n sources,\n };\n }\n\n formatPrompt({message, relatedCode, relatedRequest, searchAnswers}:\n {message: string, relatedCode: string, relatedRequest: string, searchAnswers: string}): string {\n const messageHeader = '### Console message:';\n const relatedCodeHeader = '### Code that generated the error:';\n const relatedRequestHeader = '### Related network request:';\n const searchAnswersHeader = '### Suggestions:';\n const explanationHeader = '### Summary:';\n\n const preamble = `\nYou are an expert software engineer looking at a console message in DevTools.\n\nYou will follow these rules strictly:\n- Answer the question as truthfully as possible using the provided context\n- if you don't have the answer, say \"I don't know\" and suggest looking for this information\n elsewhere\n- Start with the explanation immediately without repeating the given console message.\n- Always wrap code with three backticks (\\`\\`\\`)`;\n\n const fewShotExamples = [\n {\n message: `Uncaught TypeError: Cannot read properties of undefined (reading 'setState') at home.jsx:15\n at delta (home.jsx:15:14)\n at Object.Dc (react-dom.production.min.js:54:317)\n at Fc (react-dom.production.min.js:54:471)\n at jc (react-dom.production.min.js:55:35)\n at ai (react-dom.production.min.js:105:68)\n at Ks (react-dom.production.min.js:106:380)\n at react-dom.production.min.js:117:104\n at Pu (react-dom.production.min.js:274:42)\n at vs (react-dom.production.min.js:52:375)\n at Dl (react-dom.production.min.js:109:469)\ndelta @ home.jsx:15\n\n\nDc @ react-dom.production.min.js:54\nFc @ react-dom.production.min.js:54\njc @ react-dom.production.min.js:55\nai @ react-dom.production.min.js:105\nKs @ react-dom.production.min.js:106\n(anonymous) @ react-dom.production.min.js:117\nPu @ react-dom.production.min.js:274\nvs @ react-dom.production.min.js:52\nDl @ react-dom.production.min.js:109\neu @ react-dom.production.min.js:74\nbc @ react-dom.production.min.js:73`,\n\n relatedCode: `class Counter extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n count : 1\n };\n\n this.delta.bind(this);\n }\n\n delta() {\n this.setState({\n count : this.state.count++\n });\n }\n\n render() {\n return (\n
\n

{this.state.count}

\n \n
\n );\n }\n}`,\n searchAnswers:\n `- This is due to this.delta not being bound to this. In order to bind set this.delta = this.delta.bind(this) in the constructor: constructor(props) { super(props); this.state = { count : 1 };...\n- In ES7+ (ES2016) you can use the experimental function bind syntax operator :: to bind. It is a syntactic sugar and will do the same as Davin Tryon's answer. You can then rewrite this.delta...\n- There is a difference of context between ES5 and ES6 class. So, there will be a little difference between the implementations as well. Here is the ES5 version: var Counter = React.createClass({...\n- You dont have to bind anything, Just use Arrow functions like this: class Counter extends React.Component { constructor(props) { super(props); this.state = { count: 1 }; } //ARROW FUNCTION...`,\n\n explanation:\n 'The error occurs because this.delta is not bound to the instance of the Counter component. The fix is it to change the code to be ` this.delta = this.delta.bind(this);`',\n\n },\n {\n message: `Uncaught TypeError: Cannot set properties of null(setting 'innerHTML')\n at(index): 57: 49(anonymous) @(index): 57 `,\n\n relatedCode: `\n
`,\n\n searchAnswers:\n `- You have to place the hello div before the script, so that it exists when the script is loaded.\n- Let us first try to understand the root cause as to why it is happening in first place. Why do I get an error or Uncaught TypeError: Cannot set property 'innerHTML' of null? The browser always...\n- You could tell javascript to perform the action \\\"onload\\\"... Try with this: \\u003cscript type =\\\"text/javascript\\\"\\u003e window.onload = function what(){ document.getElementById('hello').innerHTML = 'hi';...\n- Just put your JS in window.onload window.onload = function() { what(); function what() { document.getElementById('hello').innerHTML = 'hi'; }; }`,\n\n explanation:\n 'The error means that getElementById returns null instead of the div element. This happens because the script runs before the element is added to the DOM.',\n },\n {\n message: 'Uncaught SyntaxError: Unexpected token \\')\\' (at script.js:39:14)',\n\n relatedCode: `if (10 < 120)) {\n console.log('test')\n}`,\n\n searchAnswers:\n `- this is the way to re export default import as default export, export {default} from './Component'\n- In your index.js. export default from './component'\"\n- Unexpected token errors in ESLint parsing occur due to incompatibility between your development environment and ESLint's current parsing capabilities with the ongoing changes with JavaScripts...\n- In my case (im using Firebase Cloud Functions) i opened .eslintrc.json and changed: \\\"parserOptions\\\": { // Required for certain syntax usages \\\"ecmaVersion\\\": 2017 }, to: \\\"parserOptions\\\": { //...\"`,\n\n explanation: 'There is an extra closing `)`. Remove it to fix the issue.',\n },\n ];\n\n const formatExample = (example: {\n message: string,\n relatedCode?: string,\n relatedRequest?: string,\n searchAnswers?: string, explanation: string,\n }): string => {\n const result = [];\n result.push(messageHeader, example.message);\n if (relatedCode) {\n result.push(relatedCodeHeader, '```', example.relatedCode, '```');\n }\n if (relatedRequest && example.relatedRequest) {\n result.push(relatedRequestHeader, example.relatedRequest);\n }\n if (searchAnswers) {\n result.push(searchAnswersHeader, example.searchAnswers);\n }\n result.push(explanationHeader, example.explanation);\n return result.join('\\n');\n };\n\n return `${preamble}\n\n${fewShotExamples.map(formatExample).join('\\n\\n')}\n\n${formatExample({message, relatedCode, relatedRequest, searchAnswers, explanation: ''})}`;\n }\n}\n\nexport function allowHeader(header: SDK.NetworkRequest.NameValue): boolean {\n const normalizedName = header.name.toLowerCase().trim();\n // Skip custom headers.\n if (normalizedName.startsWith('x-')) {\n return false;\n }\n // Skip cookies as they might contain auth.\n if (normalizedName === 'cookie' || normalizedName === 'set-cookie') {\n return false;\n }\n if (normalizedName === 'authorization') {\n return false;\n }\n return true;\n}\n\nexport function lineWhitespace(line: string): string|null {\n const matches = /^\\s*/.exec(line);\n if (!matches || !matches.length) {\n // This should not happen\n return null;\n }\n const whitespace = matches[0];\n if (whitespace === line) {\n return null;\n }\n return whitespace;\n}\n\nexport function formatRelatedCode(\n {text, columnNumber, lineNumber}: {text: string, columnNumber: number, lineNumber: number},\n maxCodeSize = MAX_CODE_SIZE): string {\n const lines = text.split('\\n');\n if (lines[lineNumber].length >= maxCodeSize / 2) {\n const start = Math.max(columnNumber - maxCodeSize / 2, 0);\n const end = Math.min(columnNumber + maxCodeSize / 2, lines[lineNumber].length);\n return lines[lineNumber].substring(start, end);\n }\n let relatedCodeSize = 0;\n let currentLineNumber = lineNumber;\n let currentWhitespace = lineWhitespace(lines[lineNumber]);\n const startByPrefix: Map = new Map();\n while (lines[currentLineNumber] !== undefined &&\n (relatedCodeSize + lines[currentLineNumber].length <= maxCodeSize / 2)) {\n const whitespace = lineWhitespace(lines[currentLineNumber]);\n if (whitespace !== null && currentWhitespace !== null &&\n (whitespace === currentWhitespace || !whitespace.startsWith(currentWhitespace))) {\n // Don't start on a line that begins with a closing character\n if (!/^\\s*[\\}\\)\\]]/.exec(lines[currentLineNumber])) {\n // Update map of where code should start based on its indentation\n startByPrefix.set(whitespace, currentLineNumber);\n }\n currentWhitespace = whitespace;\n }\n relatedCodeSize += lines[currentLineNumber].length + 1;\n currentLineNumber--;\n }\n currentLineNumber = lineNumber + 1;\n let startLine = lineNumber;\n let endLine = lineNumber;\n currentWhitespace = lineWhitespace(lines[lineNumber]);\n while (lines[currentLineNumber] !== undefined && (relatedCodeSize + lines[currentLineNumber].length <= maxCodeSize)) {\n relatedCodeSize += lines[currentLineNumber].length;\n const whitespace = lineWhitespace(lines[currentLineNumber]);\n if (whitespace !== null && currentWhitespace !== null &&\n (whitespace === currentWhitespace || !whitespace.startsWith(currentWhitespace))) {\n // We shouldn't end on a line if it is followed by an indented line\n const nextLine = lines[currentLineNumber + 1];\n const nextWhitespace = nextLine ? lineWhitespace(nextLine) : null;\n if (!nextWhitespace || nextWhitespace === whitespace || !nextWhitespace.startsWith(whitespace)) {\n // Look up where code should start based on its indentation\n if (startByPrefix.has(whitespace)) {\n startLine = startByPrefix.get(whitespace) ?? 0;\n endLine = currentLineNumber;\n }\n }\n currentWhitespace = whitespace;\n }\n currentLineNumber++;\n }\n return lines.slice(startLine, endLine + 1).join('\\n');\n}\n\nexport function formatNetworkRequest(\n request:\n Pick):\n string {\n // TODO: anything else that might be relavant?\n // TODO: handle missing headers\n return `Request: ${request.url()}\n\nRequest headers:\n${request.requestHeaders().filter(allowHeader).map(header => `${header.name}: ${header.value}`).join('\\n')}\n\nResponse headers:\n${request.responseHeaders.filter(allowHeader).map(header => `${header.name}: ${header.value}`).join('\\n')}\n\nResponse status: ${request.statusCode} ${request.statusText}`;\n}\n\nexport function formatConsoleMessage(message: Console.ConsoleViewMessage.ConsoleViewMessage): string {\n return message.toMessageTextString();\n}\n\n/**\n * This formats the stacktrace from the console message which might or might not\n * match the content of stacktrace(s) in the console message arguments.\n */\nexport function formatStackTrace(message: Console.ConsoleViewMessage.ConsoleViewMessage): string {\n const previewContainer = message.contentElement().querySelector('.stack-preview-container');\n\n if (!previewContainer) {\n return '';\n }\n\n const preview = previewContainer.shadowRoot?.querySelector('.stack-preview-container') as HTMLElement;\n\n const nodes = preview.childTextNodes();\n // Gets application-level source mapped stack trace taking the ignore list\n // into account.\n const messageContent = nodes\n .filter(n => {\n return !n.parentElement?.closest('.show-all-link,.show-less-link,.hidden-row');\n })\n .map(Components.Linkifier.Linkifier.untruncatedNodeText)\n .join('');\n return messageContent.trim();\n}\n"]} \ No newline at end of file diff --git a/public/panels/issues/AffectedDirectivesView.js b/public/panels/issues/AffectedDirectivesView.js index 6f827e1a2..f9b2063bc 100644 --- a/public/panels/issues/AffectedDirectivesView.js +++ b/public/panels/issues/AffectedDirectivesView.js @@ -32,13 +32,13 @@ const UIStrings = { */ directiveC: 'Directive', /** - *@description Label for the column in the element list in the CSS Overview report + *@description Label for the column in the element list in the CSS overview report */ element: 'Element', /** *@description Header for the source location column */ - sourceLocation: 'Source Location', + sourceLocation: 'Source location', /** *@description Text for the status of something */ diff --git a/public/panels/issues/AffectedDirectivesView.js.map b/public/panels/issues/AffectedDirectivesView.js.map index 932c75756..68463bb3c 100644 --- a/public/panels/issues/AffectedDirectivesView.js.map +++ b/public/panels/issues/AffectedDirectivesView.js.map @@ -1 +1 @@ -{"version":3,"file":"AffectedDirectivesView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/issues/AffectedDirectivesView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAE5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAe,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AAE/E,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,WAAW,EAAE,oDAAoD;IACjE;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,gCAAgC,EAAE,8DAA8D;IAChG;;OAEG;IACH,UAAU,EAAE,WAAW;IACvB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,cAAc,EAAE,iBAAiB;IACjC;;OA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K,aAAa,CAAC,0BAA0B,CAAC,+BAA+B,EAAE;YACzG,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;YAC1D,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;YAC1E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;SAC3D;aAAM;YACL,OAAO;SACR;QAED,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,2CAA2C,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as IssuesManager from '../../models/issues_manager/issues_manager.js';\nimport * as IssuesComponents from './components/components.js';\n\nimport {AffectedItem, AffectedResourcesView} from './AffectedResourcesView.js';\n\nconst UIStrings = {\n /**\n *@description Singular or plural label for number of affected CSP (content security policy,\n * see https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) directives in issue view.\n */\n nDirectives: '{n, plural, =1 {# directive} other {# directives}}',\n /**\n *@description Indicates that a CSP error should be treated as a warning\n */\n reportonly: 'report-only',\n /**\n *@description The kind of resolution for a mixed content issue\n */\n blocked: 'blocked',\n /**\n *@description Tooltip for button linking to the Elements panel\n */\n clickToRevealTheViolatingDomNode: 'Click to reveal the violating DOM node in the Elements panel',\n /**\n *@description Header for the section listing affected directives\n */\n directiveC: 'Directive',\n /**\n *@description Label for the column in the element list in the CSS Overview report\n */\n element: 'Element',\n /**\n *@description Header for the source location column\n */\n sourceLocation: 'Source Location',\n /**\n *@description Text for the status of something\n */\n status: 'Status',\n /**\n *@description Text that refers to the resources of the web page\n */\n resourceC: 'Resource',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/issues/AffectedDirectivesView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class AffectedDirectivesView extends AffectedResourcesView {\n #appendStatus(element: Element, isReportOnly: boolean): void {\n const status = document.createElement('td');\n if (isReportOnly) {\n status.classList.add('affected-resource-report-only-status');\n status.textContent = i18nString(UIStrings.reportonly);\n } else {\n status.classList.add('affected-resource-blocked-status');\n status.textContent = i18nString(UIStrings.blocked);\n }\n element.appendChild(status);\n }\n\n protected getResourceNameWithCount(count: number): Platform.UIString.LocalizedString {\n return i18nString(UIStrings.nDirectives, {n: count});\n }\n\n #appendViolatedDirective(element: Element, directive: string): void {\n const violatedDirective = document.createElement('td');\n violatedDirective.textContent = directive;\n element.appendChild(violatedDirective);\n }\n\n #appendBlockedURL(element: Element, url: Platform.DevToolsPath.UrlString): void {\n const info = document.createElement('td');\n info.classList.add('affected-resource-directive-info');\n info.textContent = url;\n element.appendChild(info);\n }\n\n #appendBlockedElement(\n element: Element, nodeId: Protocol.DOM.BackendNodeId|undefined, model: SDK.IssuesModel.IssuesModel): void {\n const elementsPanelLinkComponent = new IssuesComponents.ElementsPanelLink.ElementsPanelLink();\n if (nodeId) {\n const violatingNodeId = nodeId;\n elementsPanelLinkComponent.title = i18nString(UIStrings.clickToRevealTheViolatingDomNode);\n\n const onElementRevealIconClick: (arg0?: Event|undefined) => void = (): void => {\n const target = model.getTargetIfNotDisposed();\n if (target) {\n Host.userMetrics.issuesPanelResourceOpened(this.issue.getCategory(), AffectedItem.Element);\n const deferredDOMNode = new SDK.DOMModel.DeferredDOMNode(target, violatingNodeId);\n void Common.Revealer.reveal(deferredDOMNode);\n }\n };\n\n const onElementRevealIconMouseEnter: (arg0?: Event|undefined) => void = (): void => {\n const target = model.getTargetIfNotDisposed();\n if (target) {\n const deferredDOMNode = new SDK.DOMModel.DeferredDOMNode(target, violatingNodeId);\n if (deferredDOMNode) {\n deferredDOMNode.highlight();\n }\n }\n };\n\n const onElementRevealIconMouseLeave: (arg0?: Event|undefined) => void = (): void => {\n SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();\n };\n\n elementsPanelLinkComponent\n .data = {onElementRevealIconClick, onElementRevealIconMouseEnter, onElementRevealIconMouseLeave};\n }\n\n const violatingNode = document.createElement('td');\n violatingNode.classList.add('affected-resource-csp-info-node');\n violatingNode.appendChild(elementsPanelLinkComponent);\n element.appendChild(violatingNode);\n }\n\n #appendAffectedContentSecurityPolicyDetails(\n cspIssues: Iterable): void {\n const header = document.createElement('tr');\n if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.inlineViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.directiveC));\n this.appendColumnTitle(header, i18nString(UIStrings.element));\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.urlViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.resourceC), 'affected-resource-directive-info-header');\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n this.appendColumnTitle(header, i18nString(UIStrings.directiveC));\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.evalViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n this.appendColumnTitle(header, i18nString(UIStrings.directiveC));\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.trustedTypesSinkViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.trustedTypesPolicyViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n this.appendColumnTitle(header, i18nString(UIStrings.directiveC));\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n } else {\n this.updateAffectedResourceCount(0);\n return;\n }\n this.affectedResources.appendChild(header);\n let count = 0;\n for (const cspIssue of cspIssues) {\n count++;\n this.#appendAffectedContentSecurityPolicyDetail(cspIssue);\n }\n this.updateAffectedResourceCount(count);\n }\n\n #appendAffectedContentSecurityPolicyDetail(\n cspIssue: IssuesManager.ContentSecurityPolicyIssue.ContentSecurityPolicyIssue): void {\n const element = document.createElement('tr');\n element.classList.add('affected-resource-directive');\n\n const cspIssueDetails = cspIssue.details();\n const location = IssuesManager.Issue.toZeroBasedLocation(cspIssueDetails.sourceCodeLocation);\n const model = cspIssue.model();\n const maybeTarget = cspIssue.model()?.getTargetIfNotDisposed();\n if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.inlineViolationCode && model) {\n this.#appendViolatedDirective(element, cspIssueDetails.violatedDirective);\n this.#appendBlockedElement(element, cspIssueDetails.violatingNodeId, model);\n this.appendSourceLocation(element, location, maybeTarget);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.urlViolationCode) {\n const url = cspIssueDetails.blockedURL ? cspIssueDetails.blockedURL as Platform.DevToolsPath.UrlString :\n Platform.DevToolsPath.EmptyUrlString;\n this.#appendBlockedURL(element, url);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n this.#appendViolatedDirective(element, cspIssueDetails.violatedDirective);\n this.appendSourceLocation(element, location, maybeTarget);\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.evalViolationCode) {\n this.appendSourceLocation(element, location, maybeTarget);\n this.#appendViolatedDirective(element, cspIssueDetails.violatedDirective);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.trustedTypesSinkViolationCode) {\n this.appendSourceLocation(element, location, maybeTarget);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.trustedTypesPolicyViolationCode) {\n this.appendSourceLocation(element, location, maybeTarget);\n this.#appendViolatedDirective(element, cspIssueDetails.violatedDirective);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n } else {\n return;\n }\n\n this.affectedResources.appendChild(element);\n }\n\n update(): void {\n this.clear();\n this.#appendAffectedContentSecurityPolicyDetails(this.issue.getCspIssues());\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"AffectedDirectivesView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/issues/AffectedDirectivesView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAE5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAe,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AAE/E,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,WAAW,EAAE,oDAAoD;IACjE;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,gCAAgC,EAAE,8DAA8D;IAChG;;OAEG;IACH,UAAU,EAAE,WAAW;IACvB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,c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,KAAK,CAAC,IAAI,EAAE,KAAK,aAAa,CAAC,0BAA0B,CAAC,+BAA+B,EAAE;YACzG,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;YAC1D,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;YAC1E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;SAC3D;aAAM;YACL,OAAO;SACR;QAED,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,2CAA2C,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as IssuesManager from '../../models/issues_manager/issues_manager.js';\nimport * as IssuesComponents from './components/components.js';\n\nimport {AffectedItem, AffectedResourcesView} from './AffectedResourcesView.js';\n\nconst UIStrings = {\n /**\n *@description Singular or plural label for number of affected CSP (content security policy,\n * see https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) directives in issue view.\n */\n nDirectives: '{n, plural, =1 {# directive} other {# directives}}',\n /**\n *@description Indicates that a CSP error should be treated as a warning\n */\n reportonly: 'report-only',\n /**\n *@description The kind of resolution for a mixed content issue\n */\n blocked: 'blocked',\n /**\n *@description Tooltip for button linking to the Elements panel\n */\n clickToRevealTheViolatingDomNode: 'Click to reveal the violating DOM node in the Elements panel',\n /**\n *@description Header for the section listing affected directives\n */\n directiveC: 'Directive',\n /**\n *@description Label for the column in the element list in the CSS overview report\n */\n element: 'Element',\n /**\n *@description Header for the source location column\n */\n sourceLocation: 'Source location',\n /**\n *@description Text for the status of something\n */\n status: 'Status',\n /**\n *@description Text that refers to the resources of the web page\n */\n resourceC: 'Resource',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/issues/AffectedDirectivesView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class AffectedDirectivesView extends AffectedResourcesView {\n #appendStatus(element: Element, isReportOnly: boolean): void {\n const status = document.createElement('td');\n if (isReportOnly) {\n status.classList.add('affected-resource-report-only-status');\n status.textContent = i18nString(UIStrings.reportonly);\n } else {\n status.classList.add('affected-resource-blocked-status');\n status.textContent = i18nString(UIStrings.blocked);\n }\n element.appendChild(status);\n }\n\n protected getResourceNameWithCount(count: number): Platform.UIString.LocalizedString {\n return i18nString(UIStrings.nDirectives, {n: count});\n }\n\n #appendViolatedDirective(element: Element, directive: string): void {\n const violatedDirective = document.createElement('td');\n violatedDirective.textContent = directive;\n element.appendChild(violatedDirective);\n }\n\n #appendBlockedURL(element: Element, url: Platform.DevToolsPath.UrlString): void {\n const info = document.createElement('td');\n info.classList.add('affected-resource-directive-info');\n info.textContent = url;\n element.appendChild(info);\n }\n\n #appendBlockedElement(\n element: Element, nodeId: Protocol.DOM.BackendNodeId|undefined, model: SDK.IssuesModel.IssuesModel): void {\n const elementsPanelLinkComponent = new IssuesComponents.ElementsPanelLink.ElementsPanelLink();\n if (nodeId) {\n const violatingNodeId = nodeId;\n elementsPanelLinkComponent.title = i18nString(UIStrings.clickToRevealTheViolatingDomNode);\n\n const onElementRevealIconClick: (arg0?: Event|undefined) => void = (): void => {\n const target = model.getTargetIfNotDisposed();\n if (target) {\n Host.userMetrics.issuesPanelResourceOpened(this.issue.getCategory(), AffectedItem.Element);\n const deferredDOMNode = new SDK.DOMModel.DeferredDOMNode(target, violatingNodeId);\n void Common.Revealer.reveal(deferredDOMNode);\n }\n };\n\n const onElementRevealIconMouseEnter: (arg0?: Event|undefined) => void = (): void => {\n const target = model.getTargetIfNotDisposed();\n if (target) {\n const deferredDOMNode = new SDK.DOMModel.DeferredDOMNode(target, violatingNodeId);\n if (deferredDOMNode) {\n deferredDOMNode.highlight();\n }\n }\n };\n\n const onElementRevealIconMouseLeave: (arg0?: Event|undefined) => void = (): void => {\n SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();\n };\n\n elementsPanelLinkComponent\n .data = {onElementRevealIconClick, onElementRevealIconMouseEnter, onElementRevealIconMouseLeave};\n }\n\n const violatingNode = document.createElement('td');\n violatingNode.classList.add('affected-resource-csp-info-node');\n violatingNode.appendChild(elementsPanelLinkComponent);\n element.appendChild(violatingNode);\n }\n\n #appendAffectedContentSecurityPolicyDetails(\n cspIssues: Iterable): void {\n const header = document.createElement('tr');\n if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.inlineViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.directiveC));\n this.appendColumnTitle(header, i18nString(UIStrings.element));\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.urlViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.resourceC), 'affected-resource-directive-info-header');\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n this.appendColumnTitle(header, i18nString(UIStrings.directiveC));\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.evalViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n this.appendColumnTitle(header, i18nString(UIStrings.directiveC));\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.trustedTypesSinkViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.trustedTypesPolicyViolationCode) {\n this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));\n this.appendColumnTitle(header, i18nString(UIStrings.directiveC));\n this.appendColumnTitle(header, i18nString(UIStrings.status));\n } else {\n this.updateAffectedResourceCount(0);\n return;\n }\n this.affectedResources.appendChild(header);\n let count = 0;\n for (const cspIssue of cspIssues) {\n count++;\n this.#appendAffectedContentSecurityPolicyDetail(cspIssue);\n }\n this.updateAffectedResourceCount(count);\n }\n\n #appendAffectedContentSecurityPolicyDetail(\n cspIssue: IssuesManager.ContentSecurityPolicyIssue.ContentSecurityPolicyIssue): void {\n const element = document.createElement('tr');\n element.classList.add('affected-resource-directive');\n\n const cspIssueDetails = cspIssue.details();\n const location = IssuesManager.Issue.toZeroBasedLocation(cspIssueDetails.sourceCodeLocation);\n const model = cspIssue.model();\n const maybeTarget = cspIssue.model()?.getTargetIfNotDisposed();\n if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.inlineViolationCode && model) {\n this.#appendViolatedDirective(element, cspIssueDetails.violatedDirective);\n this.#appendBlockedElement(element, cspIssueDetails.violatingNodeId, model);\n this.appendSourceLocation(element, location, maybeTarget);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.urlViolationCode) {\n const url = cspIssueDetails.blockedURL ? cspIssueDetails.blockedURL as Platform.DevToolsPath.UrlString :\n Platform.DevToolsPath.EmptyUrlString;\n this.#appendBlockedURL(element, url);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n this.#appendViolatedDirective(element, cspIssueDetails.violatedDirective);\n this.appendSourceLocation(element, location, maybeTarget);\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.evalViolationCode) {\n this.appendSourceLocation(element, location, maybeTarget);\n this.#appendViolatedDirective(element, cspIssueDetails.violatedDirective);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.trustedTypesSinkViolationCode) {\n this.appendSourceLocation(element, location, maybeTarget);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n } else if (this.issue.code() === IssuesManager.ContentSecurityPolicyIssue.trustedTypesPolicyViolationCode) {\n this.appendSourceLocation(element, location, maybeTarget);\n this.#appendViolatedDirective(element, cspIssueDetails.violatedDirective);\n this.#appendStatus(element, cspIssueDetails.isReportOnly);\n } else {\n return;\n }\n\n this.affectedResources.appendChild(element);\n }\n\n update(): void {\n this.clear();\n this.#appendAffectedContentSecurityPolicyDetails(this.issue.getCspIssues());\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/issues/IssuesPane.d.ts b/public/panels/issues/IssuesPane.d.ts index e583f9443..31bac29f3 100644 --- a/public/panels/issues/IssuesPane.d.ts +++ b/public/panels/issues/IssuesPane.d.ts @@ -5,10 +5,7 @@ import { IssueView } from './IssueView.js'; export declare function getGroupIssuesByCategorySetting(): Common.Settings.Setting; export declare class IssuesPane extends UI.Widget.VBox { #private; - private constructor(); - static instance(opts?: { - forceNew: boolean | null; - }): IssuesPane; + constructor(); elementsToRestoreScrollPositionsFor(): Element[]; appendIssueViewToParent(issueView: IssueView, parent: UI.TreeOutline.TreeOutline | UI.TreeOutline.TreeElement): void; reveal(issue: IssuesManager.Issue.Issue): Promise; diff --git a/public/panels/issues/IssuesPane.js b/public/panels/issues/IssuesPane.js index f2ffe7c00..42f5a8f0e 100644 --- a/public/panels/issues/IssuesPane.js +++ b/public/panels/issues/IssuesPane.js @@ -150,7 +150,6 @@ class IssueCategoryView extends UI.TreeOutline.TreeElement { export function getGroupIssuesByCategorySetting() { return Common.Settings.Settings.instance().createSetting('groupIssuesByCategory', false); } -let issuesPaneInstance; export class IssuesPane extends UI.Widget.VBox { #categoryViews; #issueViews; @@ -188,13 +187,6 @@ export class IssuesPane extends UI.Widget.VBox { this.#onFullUpdate(); this.#issuesManager.addEventListener("IssuesCountUpdated" /* IssuesManager.IssuesManager.Events.IssuesCountUpdated */, this.#updateCounts, this); } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!issuesPaneInstance || forceNew) { - issuesPaneInstance = new IssuesPane(); - } - return issuesPaneInstance; - } elementsToRestoreScrollPositionsFor() { return [this.#issuesTree.element]; } diff --git a/public/panels/issues/IssuesPane.js.map b/public/panels/issues/IssuesPane.js.map index 62c2cab5b..60ba5ffa2 100644 --- a/public/panels/issues/IssuesPane.js.map +++ b/public/panels/issues/IssuesPane.js.map @@ -1 +1 @@ -{"version":3,"file":"IssuesPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/issues/IssuesPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,YAAY,MAAM,oDAAoD,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAIL,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,2BAA2B,EAAE,aAAa,EAAE,yBAAyB,EAAC,MAAM,oBAAoB,CAAC;AACzG,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,yBAAyB,EAAE,8BAA8B;IACzD;;OAEG;IACH,YAAY,EAAE,eAAe;IAC7B;;OAEG;IAC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CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC5C,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as IssuesManager from '../../models/issues_manager/issues_manager.js';\nimport * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {HiddenIssuesRow} from './HiddenIssuesRow.js';\nimport {\n type AggregatedIssue,\n type AggregationKey,\n Events as IssueAggregatorEvents,\n IssueAggregator,\n} from './IssueAggregator.js';\nimport {getGroupIssuesByKindSetting, IssueKindView, issueKindViewSortPriority} from './IssueKindView.js';\nimport issuesPaneStyles from './issuesPane.css.js';\nimport issuesTreeStyles from './issuesTree.css.js';\nimport {IssueView} from './IssueView.js';\n\nconst UIStrings = {\n /**\n * @description Category title for a group of cross origin embedder policy (COEP) issues\n */\n crossOriginEmbedderPolicy: 'Cross Origin Embedder Policy',\n /**\n * @description Category title for a group of mixed content issues\n */\n mixedContent: 'Mixed Content',\n /**\n * @description Category title for a group of SameSite cookie issues\n */\n samesiteCookie: 'SameSite Cookie',\n /**\n * @description Category title for a group of heavy ads issues\n */\n heavyAds: 'Heavy Ads',\n /**\n * @description Category title for a group of content security policy (CSP) issues\n */\n contentSecurityPolicy: 'Content Security Policy',\n /**\n * @description Text for other types of items\n */\n other: 'Other',\n /**\n * @description Category title for the different 'low text contrast' issues. Low text contrast refers\n * to the difference between the color of a text and the background color where that text\n * appears.\n */\n lowTextContrast: 'Low Text Contrast',\n /**\n * @description Category title for the different 'Cross-Origin Resource Sharing' (CORS) issues. CORS\n * refers to one origin (e.g 'a.com') loading resources from another origin (e.g. 'b.com').\n */\n cors: 'Cross Origin Resource Sharing',\n /**\n * @description Title for a checkbox which toggles grouping by category in the issues tab\n */\n groupDisplayedIssuesUnder: 'Group displayed issues under associated categories',\n /**\n * @description Label for a checkbox which toggles grouping by category in the issues tab\n */\n groupByCategory: 'Group by category',\n /**\n * @description Title for a checkbox which toggles grouping by kind in the issues tab\n */\n groupDisplayedIssuesUnderKind: 'Group displayed issues as Page errors, Breaking changes and Improvements',\n /**\n * @description Label for a checkbox which toggles grouping by kind in the issues tab\n */\n groupByKind: 'Group by kind',\n /**\n * @description Title for a checkbox. Whether the issues tab should include third-party issues or not.\n */\n includeCookieIssuesCausedBy: 'Include cookie Issues caused by third-party sites',\n /**\n * @description Label for a checkbox. Whether the issues tab should include third-party issues or not.\n */\n includeThirdpartyCookieIssues: 'Include third-party cookie issues',\n /**\n * @description Label on the issues tab\n */\n onlyThirdpartyCookieIssues: 'Only third-party cookie issues detected so far',\n /**\n * @description Label in the issues panel\n */\n noIssuesDetectedSoFar: 'No issues detected so far',\n /**\n * @description Category title for the different 'Attribution Reporting API' issues. The\n * Attribution Reporting API is a newly proposed web API (see https://github.com/WICG/conversion-measurement-api).\n */\n attributionReporting: 'Attribution Reporting `API`',\n /**\n * @description Category title for the different 'Quirks Mode' issues. Quirks Mode refers\n * to the legacy browser modes that displays web content according to outdated\n * browser behaviors.\n */\n quirksMode: 'Quirks Mode',\n /**\n * @description Category title for the different 'Generic' issues.\n */\n generic: 'Generic',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/issues/IssuesPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nclass IssueCategoryView extends UI.TreeOutline.TreeElement {\n #category: IssuesManager.Issue.IssueCategory;\n\n constructor(category: IssuesManager.Issue.IssueCategory) {\n super();\n this.#category = category;\n\n this.toggleOnClick = true;\n this.listItemElement.classList.add('issue-category');\n this.childrenListElement.classList.add('issue-category-body');\n }\n\n getCategoryName(): string {\n switch (this.#category) {\n case IssuesManager.Issue.IssueCategory.CrossOriginEmbedderPolicy:\n return i18nString(UIStrings.crossOriginEmbedderPolicy);\n case IssuesManager.Issue.IssueCategory.MixedContent:\n return i18nString(UIStrings.mixedContent);\n case IssuesManager.Issue.IssueCategory.Cookie:\n return i18nString(UIStrings.samesiteCookie);\n case IssuesManager.Issue.IssueCategory.HeavyAd:\n return i18nString(UIStrings.heavyAds);\n case IssuesManager.Issue.IssueCategory.ContentSecurityPolicy:\n return i18nString(UIStrings.contentSecurityPolicy);\n case IssuesManager.Issue.IssueCategory.LowTextContrast:\n return i18nString(UIStrings.lowTextContrast);\n case IssuesManager.Issue.IssueCategory.Cors:\n return i18nString(UIStrings.cors);\n case IssuesManager.Issue.IssueCategory.AttributionReporting:\n return i18nString(UIStrings.attributionReporting);\n case IssuesManager.Issue.IssueCategory.QuirksMode:\n return i18nString(UIStrings.quirksMode);\n case IssuesManager.Issue.IssueCategory.Generic:\n return i18nString(UIStrings.generic);\n case IssuesManager.Issue.IssueCategory.Other:\n return i18nString(UIStrings.other);\n }\n }\n\n override onattach(): void {\n this.#appendHeader();\n }\n\n #appendHeader(): void {\n const header = document.createElement('div');\n header.classList.add('header');\n\n const title = document.createElement('div');\n title.classList.add('title');\n title.textContent = this.getCategoryName();\n header.appendChild(title);\n\n this.listItemElement.appendChild(header);\n }\n}\n\nexport function getGroupIssuesByCategorySetting(): Common.Settings.Setting {\n return Common.Settings.Settings.instance().createSetting('groupIssuesByCategory', false);\n}\n\nlet issuesPaneInstance: IssuesPane;\n\nexport class IssuesPane extends UI.Widget.VBox {\n #categoryViews: Map;\n #issueViews: Map;\n #kindViews: Map;\n #showThirdPartyCheckbox: UI.Toolbar.ToolbarSettingCheckbox|null;\n #issuesTree: UI.TreeOutline.TreeOutlineInShadow;\n #hiddenIssuesRow: HiddenIssuesRow;\n #noIssuesMessageDiv: HTMLDivElement;\n #issuesManager: IssuesManager.IssuesManager.IssuesManager;\n #aggregator: IssueAggregator;\n #issueViewUpdatePromise: Promise = Promise.resolve();\n\n private constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('issues')}`);\n\n this.contentElement.classList.add('issues-pane');\n\n this.#categoryViews = new Map();\n this.#kindViews = new Map();\n this.#issueViews = new Map();\n this.#showThirdPartyCheckbox = null;\n\n this.#createToolbars();\n\n this.#issuesTree = new UI.TreeOutline.TreeOutlineInShadow();\n\n this.#issuesTree.setShowSelectionOnKeyboardFocus(true);\n this.#issuesTree.contentElement.classList.add('issues');\n this.contentElement.appendChild(this.#issuesTree.element);\n\n this.#hiddenIssuesRow = new HiddenIssuesRow();\n this.#issuesTree.appendChild(this.#hiddenIssuesRow);\n\n this.#noIssuesMessageDiv = document.createElement('div');\n this.#noIssuesMessageDiv.classList.add('issues-pane-no-issues');\n this.contentElement.appendChild(this.#noIssuesMessageDiv);\n\n this.#issuesManager = IssuesManager.IssuesManager.IssuesManager.instance();\n this.#aggregator = new IssueAggregator(this.#issuesManager);\n this.#aggregator.addEventListener(IssueAggregatorEvents.AggregatedIssueUpdated, this.#issueUpdated, this);\n this.#aggregator.addEventListener(IssueAggregatorEvents.FullUpdateRequired, this.#onFullUpdate, this);\n this.#hiddenIssuesRow.hidden = this.#issuesManager.numberOfHiddenIssues() === 0;\n this.#onFullUpdate();\n this.#issuesManager.addEventListener(\n IssuesManager.IssuesManager.Events.IssuesCountUpdated, this.#updateCounts, this);\n }\n\n static instance(opts: {forceNew: boolean|null} = {forceNew: null}): IssuesPane {\n const {forceNew} = opts;\n if (!issuesPaneInstance || forceNew) {\n issuesPaneInstance = new IssuesPane();\n }\n\n return issuesPaneInstance;\n }\n\n override elementsToRestoreScrollPositionsFor(): Element[] {\n return [this.#issuesTree.element];\n }\n\n #createToolbars(): {toolbarContainer: Element} {\n const toolbarContainer = this.contentElement.createChild('div', 'issues-toolbar-container');\n new UI.Toolbar.Toolbar('issues-toolbar-left', toolbarContainer);\n const rightToolbar = new UI.Toolbar.Toolbar('issues-toolbar-right', toolbarContainer);\n\n const groupByCategorySetting = getGroupIssuesByCategorySetting();\n const groupByCategoryCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n groupByCategorySetting, i18nString(UIStrings.groupDisplayedIssuesUnder), i18nString(UIStrings.groupByCategory));\n // Hide the option to toggle category grouping for now.\n groupByCategoryCheckbox.setVisible(false);\n rightToolbar.appendToolbarItem(groupByCategoryCheckbox);\n groupByCategorySetting.addChangeListener(() => {\n this.#fullUpdate(true);\n });\n\n const groupByKindSetting = getGroupIssuesByKindSetting();\n const groupByKindSettingCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n groupByKindSetting, i18nString(UIStrings.groupDisplayedIssuesUnderKind), i18nString(UIStrings.groupByKind));\n rightToolbar.appendToolbarItem(groupByKindSettingCheckbox);\n groupByKindSetting.addChangeListener(() => {\n this.#fullUpdate(true);\n });\n groupByKindSettingCheckbox.setVisible(true);\n\n const thirdPartySetting = IssuesManager.Issue.getShowThirdPartyIssuesSetting();\n this.#showThirdPartyCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n thirdPartySetting, i18nString(UIStrings.includeCookieIssuesCausedBy),\n i18nString(UIStrings.includeThirdpartyCookieIssues));\n rightToolbar.appendToolbarItem(this.#showThirdPartyCheckbox);\n this.setDefaultFocusedElement(this.#showThirdPartyCheckbox.inputElement);\n\n rightToolbar.appendSeparator();\n const issueCounter = new IssueCounter.IssueCounter.IssueCounter();\n issueCounter.data = {\n tooltipCallback: (): void => {\n const issueEnumeration = IssueCounter.IssueCounter.getIssueCountsEnumeration(\n IssuesManager.IssuesManager.IssuesManager.instance(), false);\n issueCounter.title = issueEnumeration;\n },\n displayMode: IssueCounter.IssueCounter.DisplayMode.ShowAlways,\n issuesManager: IssuesManager.IssuesManager.IssuesManager.instance(),\n };\n issueCounter.id = 'console-issues-counter';\n const issuesToolbarItem = new UI.Toolbar.ToolbarItem(issueCounter);\n rightToolbar.appendToolbarItem(issuesToolbarItem);\n\n return {toolbarContainer};\n }\n\n #issueUpdated(event: Common.EventTarget.EventTargetEvent): void {\n this.#scheduleIssueViewUpdate(event.data);\n }\n\n #scheduleIssueViewUpdate(issue: AggregatedIssue): void {\n this.#issueViewUpdatePromise = this.#issueViewUpdatePromise.then(() => this.#updateIssueView(issue));\n }\n\n /** Don't call directly. Use `scheduleIssueViewUpdate` instead. */\n async #updateIssueView(issue: AggregatedIssue): Promise {\n let issueView = this.#issueViews.get(issue.aggregationKey());\n if (!issueView) {\n const description = issue.getDescription();\n if (!description) {\n console.warn('Could not find description for issue code:', issue.code());\n return;\n }\n const markdownDescription =\n await IssuesManager.MarkdownIssueDescription.createIssueDescriptionFromMarkdown(description);\n issueView = new IssueView(issue, markdownDescription);\n this.#issueViews.set(issue.aggregationKey(), issueView);\n const parent = this.#getIssueViewParent(issue);\n this.appendIssueViewToParent(issueView, parent);\n } else {\n issueView.setIssue(issue);\n const newParent = this.#getIssueViewParent(issue);\n if (issueView.parent !== newParent &&\n !(newParent instanceof UI.TreeOutline.TreeOutline && issueView.parent === newParent.rootElement())) {\n issueView.parent?.removeChild(issueView);\n this.appendIssueViewToParent(issueView, newParent);\n }\n }\n issueView.update();\n this.#updateCounts();\n }\n\n appendIssueViewToParent(issueView: IssueView, parent: UI.TreeOutline.TreeOutline|UI.TreeOutline.TreeElement): void {\n parent.appendChild(issueView, (a, b) => {\n if (a instanceof HiddenIssuesRow) {\n return 1;\n }\n if (b instanceof HiddenIssuesRow) {\n return -1;\n }\n if (a instanceof IssueView && b instanceof IssueView) {\n return a.getIssueTitle().localeCompare(b.getIssueTitle());\n }\n console.error('The issues tree should only contain IssueView objects as direct children');\n return 0;\n });\n if (parent instanceof UI.TreeOutline.TreeElement) {\n // This is an aggregated view, so we need to update the label for position and size of the treeItem.\n this.#updateItemPositionAndSize(parent);\n }\n }\n\n #updateItemPositionAndSize(parent: UI.TreeOutline.TreeElement): void {\n const childNodes = parent.childrenListNode.children;\n let treeItemCount = 0;\n\n for (let i = 0; i < childNodes.length; i++) {\n const node = childNodes[i];\n if (node.classList.contains('issue')) {\n UI.ARIAUtils.setPositionInSet(node, ++treeItemCount);\n UI.ARIAUtils.setSetSize(node, childNodes.length / 2); // Each issue has 2 nodes (issue + description).\n }\n }\n }\n\n #getIssueViewParent(issue: AggregatedIssue): UI.TreeOutline.TreeOutline|UI.TreeOutline.TreeElement {\n if (issue.isHidden()) {\n return this.#hiddenIssuesRow;\n }\n if (getGroupIssuesByKindSetting().get()) {\n const kind = issue.getKind();\n const view = this.#kindViews.get(kind);\n if (view) {\n return view;\n }\n\n const newView = new IssueKindView(kind);\n this.#issuesTree.appendChild(newView, (a, b) => {\n if (a instanceof IssueKindView && b instanceof IssueKindView) {\n return issueKindViewSortPriority(a, b);\n }\n return 0;\n });\n this.#kindViews.set(kind, newView);\n return newView;\n }\n if (getGroupIssuesByCategorySetting().get()) {\n const category = issue.getCategory();\n const view = this.#categoryViews.get(category);\n if (view) {\n return view;\n }\n\n const newView = new IssueCategoryView(category);\n this.#issuesTree.appendChild(newView, (a, b) => {\n if (a instanceof IssueCategoryView && b instanceof IssueCategoryView) {\n return a.getCategoryName().localeCompare(b.getCategoryName());\n }\n return 0;\n });\n this.#categoryViews.set(category, newView);\n return newView;\n }\n return this.#issuesTree;\n }\n\n #clearViews(views: Map, preservedSet?: Set): void {\n for (const [key, view] of Array.from(views.entries())) {\n if (preservedSet?.has(key)) {\n continue;\n }\n view.parent && view.parent.removeChild(view);\n views.delete(key);\n }\n }\n\n #onFullUpdate(): void {\n this.#fullUpdate(false);\n }\n\n #fullUpdate(force: boolean): void {\n this.#clearViews(this.#categoryViews, force ? undefined : this.#aggregator.aggregatedIssueCategories());\n this.#clearViews(this.#kindViews, force ? undefined : this.#aggregator.aggregatedIssueKinds());\n this.#clearViews(this.#issueViews, force ? undefined : this.#aggregator.aggregatedIssueCodes());\n if (this.#aggregator) {\n for (const issue of this.#aggregator.aggregatedIssues()) {\n this.#scheduleIssueViewUpdate(issue);\n }\n }\n this.#updateCounts();\n }\n\n #updateIssueKindViewsCount(): void {\n for (const view of this.#kindViews.values()) {\n const count = this.#issuesManager.numberOfIssues(view.getKind());\n view.update(count);\n }\n }\n\n #updateCounts(): void {\n this.#showIssuesTreeOrNoIssuesDetectedMessage(\n this.#issuesManager.numberOfIssues(), this.#issuesManager.numberOfHiddenIssues());\n if (getGroupIssuesByKindSetting().get()) {\n this.#updateIssueKindViewsCount();\n }\n }\n\n #showIssuesTreeOrNoIssuesDetectedMessage(issuesCount: number, hiddenIssueCount: number): void {\n if (issuesCount > 0 || hiddenIssueCount > 0) {\n this.#hiddenIssuesRow.hidden = hiddenIssueCount === 0;\n this.#hiddenIssuesRow.update(hiddenIssueCount);\n this.#issuesTree.element.hidden = false;\n this.#noIssuesMessageDiv.style.display = 'none';\n const firstChild = this.#issuesTree.firstChild();\n if (firstChild) {\n firstChild.select(/* omitFocus= */ true);\n this.setDefaultFocusedElement(firstChild.listItemElement);\n }\n } else {\n this.#issuesTree.element.hidden = true;\n if (this.#showThirdPartyCheckbox) {\n this.setDefaultFocusedElement(this.#showThirdPartyCheckbox.inputElement);\n }\n // We alreay know that issesCount is zero here.\n const hasOnlyThirdPartyIssues = this.#issuesManager.numberOfAllStoredIssues() > 0;\n this.#noIssuesMessageDiv.textContent = hasOnlyThirdPartyIssues ?\n i18nString(UIStrings.onlyThirdpartyCookieIssues) :\n i18nString(UIStrings.noIssuesDetectedSoFar);\n this.#noIssuesMessageDiv.style.display = 'flex';\n }\n }\n\n async reveal(issue: IssuesManager.Issue.Issue): Promise {\n await this.#issueViewUpdatePromise;\n const key = this.#aggregator.keyForIssue(issue);\n const issueView = this.#issueViews.get(key);\n if (issueView) {\n if (issueView.isForHiddenIssue()) {\n this.#hiddenIssuesRow.expand();\n this.#hiddenIssuesRow.reveal();\n }\n if (getGroupIssuesByKindSetting().get() && !issueView.isForHiddenIssue()) {\n const kindView = this.#kindViews.get(issueView.getIssueKind());\n kindView?.expand();\n kindView?.reveal();\n }\n issueView.expand();\n issueView.reveal();\n issueView.select(false, true);\n }\n }\n\n override wasShown(): void {\n super.wasShown();\n this.#issuesTree.registerCSSFiles([issuesTreeStyles]);\n this.registerCSSFiles([issuesPaneStyles]);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"IssuesPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/issues/IssuesPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,YAAY,MAAM,oDAAoD,CAAC;AACnF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAIL,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,2BAA2B,EAAE,aAAa,EAAE,yBAAyB,EAAC,MAAM,oBAAoB,CAAC;AACzG,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,yBAAyB,EAAE,8BAA8B;IACzD;;OAEG;IACH,YAAY,EAAE,eAAe;IAC7B;;OAEG;IACH,cAAc,EAAE,iBAAiB;IACjC;;OAEG;IACH,QAAQ,EAAE,WAAW;IACrB;;OAEG;IACH,qBAAqB,EAAE,yBAAyB;IAChD;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;;;OAIG;IACH,eAAe,EAAE,mBAAmB;IACpC;;;OAGG;IACH,IAAI,EAAE,+BAA+B;IACrC;;OAEG;IACH,yBAAyB,EAAE,oDAAoD;IAC/E;;OAEG;IACH,eAAe,EAAE,mBAAmB;IACpC;;OAEG;IACH,6BAA6B,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E,CAAC;gBAC/B,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;aAChC;YACD,IAAI,2BAA2B,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,EAAE;gBACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC;gBAC/D,QAAQ,EAAE,MAAM,EAAE,CAAC;gBACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;aACpB;YACD,SAAS,CAAC,MAAM,EAAE,CAAC;YACnB,SAAS,CAAC,MAAM,EAAE,CAAC;YACnB,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;SAC/B;IACH,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACtD,IAAI,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC5C,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as IssuesManager from '../../models/issues_manager/issues_manager.js';\nimport * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {HiddenIssuesRow} from './HiddenIssuesRow.js';\nimport {\n type AggregatedIssue,\n type AggregationKey,\n Events as IssueAggregatorEvents,\n IssueAggregator,\n} from './IssueAggregator.js';\nimport {getGroupIssuesByKindSetting, IssueKindView, issueKindViewSortPriority} from './IssueKindView.js';\nimport issuesPaneStyles from './issuesPane.css.js';\nimport issuesTreeStyles from './issuesTree.css.js';\nimport {IssueView} from './IssueView.js';\n\nconst UIStrings = {\n /**\n * @description Category title for a group of cross origin embedder policy (COEP) issues\n */\n crossOriginEmbedderPolicy: 'Cross Origin Embedder Policy',\n /**\n * @description Category title for a group of mixed content issues\n */\n mixedContent: 'Mixed Content',\n /**\n * @description Category title for a group of SameSite cookie issues\n */\n samesiteCookie: 'SameSite Cookie',\n /**\n * @description Category title for a group of heavy ads issues\n */\n heavyAds: 'Heavy Ads',\n /**\n * @description Category title for a group of content security policy (CSP) issues\n */\n contentSecurityPolicy: 'Content Security Policy',\n /**\n * @description Text for other types of items\n */\n other: 'Other',\n /**\n * @description Category title for the different 'low text contrast' issues. Low text contrast refers\n * to the difference between the color of a text and the background color where that text\n * appears.\n */\n lowTextContrast: 'Low Text Contrast',\n /**\n * @description Category title for the different 'Cross-Origin Resource Sharing' (CORS) issues. CORS\n * refers to one origin (e.g 'a.com') loading resources from another origin (e.g. 'b.com').\n */\n cors: 'Cross Origin Resource Sharing',\n /**\n * @description Title for a checkbox which toggles grouping by category in the issues tab\n */\n groupDisplayedIssuesUnder: 'Group displayed issues under associated categories',\n /**\n * @description Label for a checkbox which toggles grouping by category in the issues tab\n */\n groupByCategory: 'Group by category',\n /**\n * @description Title for a checkbox which toggles grouping by kind in the issues tab\n */\n groupDisplayedIssuesUnderKind: 'Group displayed issues as Page errors, Breaking changes and Improvements',\n /**\n * @description Label for a checkbox which toggles grouping by kind in the issues tab\n */\n groupByKind: 'Group by kind',\n /**\n * @description Title for a checkbox. Whether the issues tab should include third-party issues or not.\n */\n includeCookieIssuesCausedBy: 'Include cookie Issues caused by third-party sites',\n /**\n * @description Label for a checkbox. Whether the issues tab should include third-party issues or not.\n */\n includeThirdpartyCookieIssues: 'Include third-party cookie issues',\n /**\n * @description Label on the issues tab\n */\n onlyThirdpartyCookieIssues: 'Only third-party cookie issues detected so far',\n /**\n * @description Label in the issues panel\n */\n noIssuesDetectedSoFar: 'No issues detected so far',\n /**\n * @description Category title for the different 'Attribution Reporting API' issues. The\n * Attribution Reporting API is a newly proposed web API (see https://github.com/WICG/conversion-measurement-api).\n */\n attributionReporting: 'Attribution Reporting `API`',\n /**\n * @description Category title for the different 'Quirks Mode' issues. Quirks Mode refers\n * to the legacy browser modes that displays web content according to outdated\n * browser behaviors.\n */\n quirksMode: 'Quirks Mode',\n /**\n * @description Category title for the different 'Generic' issues.\n */\n generic: 'Generic',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/issues/IssuesPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nclass IssueCategoryView extends UI.TreeOutline.TreeElement {\n #category: IssuesManager.Issue.IssueCategory;\n\n constructor(category: IssuesManager.Issue.IssueCategory) {\n super();\n this.#category = category;\n\n this.toggleOnClick = true;\n this.listItemElement.classList.add('issue-category');\n this.childrenListElement.classList.add('issue-category-body');\n }\n\n getCategoryName(): string {\n switch (this.#category) {\n case IssuesManager.Issue.IssueCategory.CrossOriginEmbedderPolicy:\n return i18nString(UIStrings.crossOriginEmbedderPolicy);\n case IssuesManager.Issue.IssueCategory.MixedContent:\n return i18nString(UIStrings.mixedContent);\n case IssuesManager.Issue.IssueCategory.Cookie:\n return i18nString(UIStrings.samesiteCookie);\n case IssuesManager.Issue.IssueCategory.HeavyAd:\n return i18nString(UIStrings.heavyAds);\n case IssuesManager.Issue.IssueCategory.ContentSecurityPolicy:\n return i18nString(UIStrings.contentSecurityPolicy);\n case IssuesManager.Issue.IssueCategory.LowTextContrast:\n return i18nString(UIStrings.lowTextContrast);\n case IssuesManager.Issue.IssueCategory.Cors:\n return i18nString(UIStrings.cors);\n case IssuesManager.Issue.IssueCategory.AttributionReporting:\n return i18nString(UIStrings.attributionReporting);\n case IssuesManager.Issue.IssueCategory.QuirksMode:\n return i18nString(UIStrings.quirksMode);\n case IssuesManager.Issue.IssueCategory.Generic:\n return i18nString(UIStrings.generic);\n case IssuesManager.Issue.IssueCategory.Other:\n return i18nString(UIStrings.other);\n }\n }\n\n override onattach(): void {\n this.#appendHeader();\n }\n\n #appendHeader(): void {\n const header = document.createElement('div');\n header.classList.add('header');\n\n const title = document.createElement('div');\n title.classList.add('title');\n title.textContent = this.getCategoryName();\n header.appendChild(title);\n\n this.listItemElement.appendChild(header);\n }\n}\n\nexport function getGroupIssuesByCategorySetting(): Common.Settings.Setting {\n return Common.Settings.Settings.instance().createSetting('groupIssuesByCategory', false);\n}\n\nexport class IssuesPane extends UI.Widget.VBox {\n #categoryViews: Map;\n #issueViews: Map;\n #kindViews: Map;\n #showThirdPartyCheckbox: UI.Toolbar.ToolbarSettingCheckbox|null;\n #issuesTree: UI.TreeOutline.TreeOutlineInShadow;\n #hiddenIssuesRow: HiddenIssuesRow;\n #noIssuesMessageDiv: HTMLDivElement;\n #issuesManager: IssuesManager.IssuesManager.IssuesManager;\n #aggregator: IssueAggregator;\n #issueViewUpdatePromise: Promise = Promise.resolve();\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('issues')}`);\n\n this.contentElement.classList.add('issues-pane');\n\n this.#categoryViews = new Map();\n this.#kindViews = new Map();\n this.#issueViews = new Map();\n this.#showThirdPartyCheckbox = null;\n\n this.#createToolbars();\n\n this.#issuesTree = new UI.TreeOutline.TreeOutlineInShadow();\n\n this.#issuesTree.setShowSelectionOnKeyboardFocus(true);\n this.#issuesTree.contentElement.classList.add('issues');\n this.contentElement.appendChild(this.#issuesTree.element);\n\n this.#hiddenIssuesRow = new HiddenIssuesRow();\n this.#issuesTree.appendChild(this.#hiddenIssuesRow);\n\n this.#noIssuesMessageDiv = document.createElement('div');\n this.#noIssuesMessageDiv.classList.add('issues-pane-no-issues');\n this.contentElement.appendChild(this.#noIssuesMessageDiv);\n\n this.#issuesManager = IssuesManager.IssuesManager.IssuesManager.instance();\n this.#aggregator = new IssueAggregator(this.#issuesManager);\n this.#aggregator.addEventListener(IssueAggregatorEvents.AggregatedIssueUpdated, this.#issueUpdated, this);\n this.#aggregator.addEventListener(IssueAggregatorEvents.FullUpdateRequired, this.#onFullUpdate, this);\n this.#hiddenIssuesRow.hidden = this.#issuesManager.numberOfHiddenIssues() === 0;\n this.#onFullUpdate();\n this.#issuesManager.addEventListener(\n IssuesManager.IssuesManager.Events.IssuesCountUpdated, this.#updateCounts, this);\n }\n\n override elementsToRestoreScrollPositionsFor(): Element[] {\n return [this.#issuesTree.element];\n }\n\n #createToolbars(): {toolbarContainer: Element} {\n const toolbarContainer = this.contentElement.createChild('div', 'issues-toolbar-container');\n new UI.Toolbar.Toolbar('issues-toolbar-left', toolbarContainer);\n const rightToolbar = new UI.Toolbar.Toolbar('issues-toolbar-right', toolbarContainer);\n\n const groupByCategorySetting = getGroupIssuesByCategorySetting();\n const groupByCategoryCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n groupByCategorySetting, i18nString(UIStrings.groupDisplayedIssuesUnder), i18nString(UIStrings.groupByCategory));\n // Hide the option to toggle category grouping for now.\n groupByCategoryCheckbox.setVisible(false);\n rightToolbar.appendToolbarItem(groupByCategoryCheckbox);\n groupByCategorySetting.addChangeListener(() => {\n this.#fullUpdate(true);\n });\n\n const groupByKindSetting = getGroupIssuesByKindSetting();\n const groupByKindSettingCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n groupByKindSetting, i18nString(UIStrings.groupDisplayedIssuesUnderKind), i18nString(UIStrings.groupByKind));\n rightToolbar.appendToolbarItem(groupByKindSettingCheckbox);\n groupByKindSetting.addChangeListener(() => {\n this.#fullUpdate(true);\n });\n groupByKindSettingCheckbox.setVisible(true);\n\n const thirdPartySetting = IssuesManager.Issue.getShowThirdPartyIssuesSetting();\n this.#showThirdPartyCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n thirdPartySetting, i18nString(UIStrings.includeCookieIssuesCausedBy),\n i18nString(UIStrings.includeThirdpartyCookieIssues));\n rightToolbar.appendToolbarItem(this.#showThirdPartyCheckbox);\n this.setDefaultFocusedElement(this.#showThirdPartyCheckbox.inputElement);\n\n rightToolbar.appendSeparator();\n const issueCounter = new IssueCounter.IssueCounter.IssueCounter();\n issueCounter.data = {\n tooltipCallback: (): void => {\n const issueEnumeration = IssueCounter.IssueCounter.getIssueCountsEnumeration(\n IssuesManager.IssuesManager.IssuesManager.instance(), false);\n issueCounter.title = issueEnumeration;\n },\n displayMode: IssueCounter.IssueCounter.DisplayMode.ShowAlways,\n issuesManager: IssuesManager.IssuesManager.IssuesManager.instance(),\n };\n issueCounter.id = 'console-issues-counter';\n const issuesToolbarItem = new UI.Toolbar.ToolbarItem(issueCounter);\n rightToolbar.appendToolbarItem(issuesToolbarItem);\n\n return {toolbarContainer};\n }\n\n #issueUpdated(event: Common.EventTarget.EventTargetEvent): void {\n this.#scheduleIssueViewUpdate(event.data);\n }\n\n #scheduleIssueViewUpdate(issue: AggregatedIssue): void {\n this.#issueViewUpdatePromise = this.#issueViewUpdatePromise.then(() => this.#updateIssueView(issue));\n }\n\n /** Don't call directly. Use `scheduleIssueViewUpdate` instead. */\n async #updateIssueView(issue: AggregatedIssue): Promise {\n let issueView = this.#issueViews.get(issue.aggregationKey());\n if (!issueView) {\n const description = issue.getDescription();\n if (!description) {\n console.warn('Could not find description for issue code:', issue.code());\n return;\n }\n const markdownDescription =\n await IssuesManager.MarkdownIssueDescription.createIssueDescriptionFromMarkdown(description);\n issueView = new IssueView(issue, markdownDescription);\n this.#issueViews.set(issue.aggregationKey(), issueView);\n const parent = this.#getIssueViewParent(issue);\n this.appendIssueViewToParent(issueView, parent);\n } else {\n issueView.setIssue(issue);\n const newParent = this.#getIssueViewParent(issue);\n if (issueView.parent !== newParent &&\n !(newParent instanceof UI.TreeOutline.TreeOutline && issueView.parent === newParent.rootElement())) {\n issueView.parent?.removeChild(issueView);\n this.appendIssueViewToParent(issueView, newParent);\n }\n }\n issueView.update();\n this.#updateCounts();\n }\n\n appendIssueViewToParent(issueView: IssueView, parent: UI.TreeOutline.TreeOutline|UI.TreeOutline.TreeElement): void {\n parent.appendChild(issueView, (a, b) => {\n if (a instanceof HiddenIssuesRow) {\n return 1;\n }\n if (b instanceof HiddenIssuesRow) {\n return -1;\n }\n if (a instanceof IssueView && b instanceof IssueView) {\n return a.getIssueTitle().localeCompare(b.getIssueTitle());\n }\n console.error('The issues tree should only contain IssueView objects as direct children');\n return 0;\n });\n if (parent instanceof UI.TreeOutline.TreeElement) {\n // This is an aggregated view, so we need to update the label for position and size of the treeItem.\n this.#updateItemPositionAndSize(parent);\n }\n }\n\n #updateItemPositionAndSize(parent: UI.TreeOutline.TreeElement): void {\n const childNodes = parent.childrenListNode.children;\n let treeItemCount = 0;\n\n for (let i = 0; i < childNodes.length; i++) {\n const node = childNodes[i];\n if (node.classList.contains('issue')) {\n UI.ARIAUtils.setPositionInSet(node, ++treeItemCount);\n UI.ARIAUtils.setSetSize(node, childNodes.length / 2); // Each issue has 2 nodes (issue + description).\n }\n }\n }\n\n #getIssueViewParent(issue: AggregatedIssue): UI.TreeOutline.TreeOutline|UI.TreeOutline.TreeElement {\n if (issue.isHidden()) {\n return this.#hiddenIssuesRow;\n }\n if (getGroupIssuesByKindSetting().get()) {\n const kind = issue.getKind();\n const view = this.#kindViews.get(kind);\n if (view) {\n return view;\n }\n\n const newView = new IssueKindView(kind);\n this.#issuesTree.appendChild(newView, (a, b) => {\n if (a instanceof IssueKindView && b instanceof IssueKindView) {\n return issueKindViewSortPriority(a, b);\n }\n return 0;\n });\n this.#kindViews.set(kind, newView);\n return newView;\n }\n if (getGroupIssuesByCategorySetting().get()) {\n const category = issue.getCategory();\n const view = this.#categoryViews.get(category);\n if (view) {\n return view;\n }\n\n const newView = new IssueCategoryView(category);\n this.#issuesTree.appendChild(newView, (a, b) => {\n if (a instanceof IssueCategoryView && b instanceof IssueCategoryView) {\n return a.getCategoryName().localeCompare(b.getCategoryName());\n }\n return 0;\n });\n this.#categoryViews.set(category, newView);\n return newView;\n }\n return this.#issuesTree;\n }\n\n #clearViews(views: Map, preservedSet?: Set): void {\n for (const [key, view] of Array.from(views.entries())) {\n if (preservedSet?.has(key)) {\n continue;\n }\n view.parent && view.parent.removeChild(view);\n views.delete(key);\n }\n }\n\n #onFullUpdate(): void {\n this.#fullUpdate(false);\n }\n\n #fullUpdate(force: boolean): void {\n this.#clearViews(this.#categoryViews, force ? undefined : this.#aggregator.aggregatedIssueCategories());\n this.#clearViews(this.#kindViews, force ? undefined : this.#aggregator.aggregatedIssueKinds());\n this.#clearViews(this.#issueViews, force ? undefined : this.#aggregator.aggregatedIssueCodes());\n if (this.#aggregator) {\n for (const issue of this.#aggregator.aggregatedIssues()) {\n this.#scheduleIssueViewUpdate(issue);\n }\n }\n this.#updateCounts();\n }\n\n #updateIssueKindViewsCount(): void {\n for (const view of this.#kindViews.values()) {\n const count = this.#issuesManager.numberOfIssues(view.getKind());\n view.update(count);\n }\n }\n\n #updateCounts(): void {\n this.#showIssuesTreeOrNoIssuesDetectedMessage(\n this.#issuesManager.numberOfIssues(), this.#issuesManager.numberOfHiddenIssues());\n if (getGroupIssuesByKindSetting().get()) {\n this.#updateIssueKindViewsCount();\n }\n }\n\n #showIssuesTreeOrNoIssuesDetectedMessage(issuesCount: number, hiddenIssueCount: number): void {\n if (issuesCount > 0 || hiddenIssueCount > 0) {\n this.#hiddenIssuesRow.hidden = hiddenIssueCount === 0;\n this.#hiddenIssuesRow.update(hiddenIssueCount);\n this.#issuesTree.element.hidden = false;\n this.#noIssuesMessageDiv.style.display = 'none';\n const firstChild = this.#issuesTree.firstChild();\n if (firstChild) {\n firstChild.select(/* omitFocus= */ true);\n this.setDefaultFocusedElement(firstChild.listItemElement);\n }\n } else {\n this.#issuesTree.element.hidden = true;\n if (this.#showThirdPartyCheckbox) {\n this.setDefaultFocusedElement(this.#showThirdPartyCheckbox.inputElement);\n }\n // We alreay know that issesCount is zero here.\n const hasOnlyThirdPartyIssues = this.#issuesManager.numberOfAllStoredIssues() > 0;\n this.#noIssuesMessageDiv.textContent = hasOnlyThirdPartyIssues ?\n i18nString(UIStrings.onlyThirdpartyCookieIssues) :\n i18nString(UIStrings.noIssuesDetectedSoFar);\n this.#noIssuesMessageDiv.style.display = 'flex';\n }\n }\n\n async reveal(issue: IssuesManager.Issue.Issue): Promise {\n await this.#issueViewUpdatePromise;\n const key = this.#aggregator.keyForIssue(issue);\n const issueView = this.#issueViews.get(key);\n if (issueView) {\n if (issueView.isForHiddenIssue()) {\n this.#hiddenIssuesRow.expand();\n this.#hiddenIssuesRow.reveal();\n }\n if (getGroupIssuesByKindSetting().get() && !issueView.isForHiddenIssue()) {\n const kindView = this.#kindViews.get(issueView.getIssueKind());\n kindView?.expand();\n kindView?.reveal();\n }\n issueView.expand();\n issueView.reveal();\n issueView.select(false, true);\n }\n }\n\n override wasShown(): void {\n super.wasShown();\n this.#issuesTree.registerCSSFiles([issuesTreeStyles]);\n this.registerCSSFiles([issuesPaneStyles]);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/issues/issues-meta.js b/public/panels/issues/issues-meta.js index c8ab039de..a24302edd 100644 --- a/public/panels/issues/issues-meta.js +++ b/public/panels/issues/issues-meta.js @@ -33,7 +33,7 @@ UI.ViewManager.registerViewExtension({ persistence: "closeable" /* UI.ViewManager.ViewPersistence.CLOSEABLE */, async loadView() { const Issues = await loadIssuesModule(); - return Issues.IssuesPane.IssuesPane.instance(); + return new Issues.IssuesPane.IssuesPane(); }, }); Common.Revealer.registerRevealer({ diff --git a/public/panels/issues/issues-meta.js.map b/public/panels/issues/issues-meta.js.map index 344c5df65..a3fba152a 100644 --- a/public/panels/issues/issues-meta.js.map +++ b/public/panels/issues/issues-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"issues-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/issues/issues-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,+CAA+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;QACxC,OAAO,IAAI,MAAM,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;IAClD,CAAC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as IssuesManager from '../../models/issues_manager/issues_manager.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Issues from './issues.js';\n\nconst UIStrings = {\n /**\n *@description Label for the issues pane\n */\n issues: 'Issues',\n /**\n *@description Command for showing the 'Issues' tool\n */\n showIssues: 'Show Issues',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/issues/issues-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\nlet loadedIssuesModule: (typeof Issues|undefined);\n\nasync function loadIssuesModule(): Promise {\n if (!loadedIssuesModule) {\n loadedIssuesModule = await import('./issues.js');\n }\n return loadedIssuesModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'issues-pane',\n title: i18nLazyString(UIStrings.issues),\n commandPrompt: i18nLazyString(UIStrings.showIssues),\n order: 100,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const Issues = await loadIssuesModule();\n return Issues.IssuesPane.IssuesPane.instance();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n IssuesManager.Issue.Issue,\n ];\n },\n destination: Common.Revealer.RevealerDestination.ISSUES_VIEW,\n async loadRevealer() {\n const Issues = await loadIssuesModule();\n return new Issues.IssueRevealer.IssueRevealer();\n },\n});\n"]} \ No newline at end of file +{"version":3,"file":"issues-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/issues/issues-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;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MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,WAAW;IAC5D,KAAK,CAAC,YAAY;QAChB,MAAM,MAAM,GAAG,MAAM,gBAAgB,EAAE,CAAC;QACxC,OAAO,IAAI,MAAM,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;IAClD,CAAC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as IssuesManager from '../../models/issues_manager/issues_manager.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Issues from './issues.js';\n\nconst UIStrings = {\n /**\n *@description Label for the issues pane\n */\n issues: 'Issues',\n /**\n *@description Command for showing the 'Issues' tool\n */\n showIssues: 'Show Issues',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/issues/issues-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\nlet loadedIssuesModule: (typeof Issues|undefined);\n\nasync function loadIssuesModule(): Promise {\n if (!loadedIssuesModule) {\n loadedIssuesModule = await import('./issues.js');\n }\n return loadedIssuesModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'issues-pane',\n title: i18nLazyString(UIStrings.issues),\n commandPrompt: i18nLazyString(UIStrings.showIssues),\n order: 100,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const Issues = await loadIssuesModule();\n return new Issues.IssuesPane.IssuesPane();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n IssuesManager.Issue.Issue,\n ];\n },\n destination: Common.Revealer.RevealerDestination.ISSUES_VIEW,\n async loadRevealer() {\n const Issues = await loadIssuesModule();\n return new Issues.IssueRevealer.IssueRevealer();\n },\n});\n"]} \ No newline at end of file diff --git a/public/panels/linear_memory_inspector/LinearMemoryInspectorController.js b/public/panels/linear_memory_inspector/LinearMemoryInspectorController.js index 8f28f4efc..fc2a58253 100644 --- a/public/panels/linear_memory_inspector/LinearMemoryInspectorController.js +++ b/public/panels/linear_memory_inspector/LinearMemoryInspectorController.js @@ -17,7 +17,7 @@ const UIStrings = { /** *@description A context menu item in the Scope View of the Sources Panel */ - revealInMemoryInspectorPanel: 'Reveal in Memory Inspector panel', + revealInMemoryInspectorPanel: 'Reveal in Memory inspector panel', }; const str_ = i18n.i18n.registerUIStrings('panels/linear_memory_inspector/LinearMemoryInspectorController.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); diff --git a/public/panels/linear_memory_inspector/LinearMemoryInspectorController.js.map b/public/panels/linear_memory_inspector/LinearMemoryInspectorController.js.map index 421097f0a..83534002c 100644 --- a/public/panels/linear_memory_inspector/LinearMemoryInspectorController.js.map +++ b/public/panels/linear_memory_inspector/LinearMemoryInspectorController.js.map @@ -1 +1 @@ -{"version":3,"file":"LinearMemoryInspectorController.js","sourceRoot":"","sources":["../../../../../../front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAE9D,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,KAAK,+BAA+B,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAsB,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AAE9F,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,wBAAwB,EAAE,iEAAiE;IAC3F;;OAEG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gBAAgB,CAAC,CAAC;SACnD;IACH,CAAC;IAED,wBAAwB,CACpB,cAAqF,EACrF,cAAqF;QACvF,OAAO,cAAc,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,IAAI,cAAc,CAAC,YAAY,KAAK,cAAc,CAAC,YAAY,CAAC;IACpH,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport type * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport * as LinearMemoryInspectorComponents from './components/components.js';\nimport {Events as LmiEvents, LinearMemoryInspectorPane} from './LinearMemoryInspectorPane.js';\n\nconst UIStrings = {\n /**\n *@description Error message that shows up in the console if a buffer to be opened in the linear memory inspector cannot be found.\n */\n couldNotOpenLinearMemory: 'Could not open linear memory inspector: failed locating buffer.',\n /**\n *@description A context menu item in the Scope View of the Sources Panel\n */\n revealInMemoryInspectorPanel: 'Reveal in Memory Inspector panel',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/LinearMemoryInspectorController.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst LINEAR_MEMORY_INSPECTOR_OBJECT_GROUP = 'linear-memory-inspector';\nconst MEMORY_TRANSFER_MIN_CHUNK_SIZE = 1000;\n\nlet controllerInstance: LinearMemoryInspectorController;\n\nexport interface LazyUint8Array {\n getRange(start: number, end: number): Promise;\n length(): number;\n}\n\nexport class RemoteArrayBufferWrapper implements LazyUint8Array {\n #remoteArrayBuffer: SDK.RemoteObject.RemoteArrayBuffer;\n\n constructor(arrayBuffer: SDK.RemoteObject.RemoteArrayBuffer) {\n this.#remoteArrayBuffer = arrayBuffer;\n }\n\n length(): number {\n return this.#remoteArrayBuffer.byteLength();\n }\n\n async getRange(start: number, end: number): Promise {\n const newEnd = Math.min(end, this.length());\n if (start < 0 || start > newEnd) {\n console.error(`Requesting invalid range of memory: (${start}, ${end})`);\n return new Uint8Array(0);\n }\n const array = await this.#remoteArrayBuffer.bytes(start, newEnd);\n return new Uint8Array(array);\n }\n}\n\nasync function getBufferFromObject(obj: SDK.RemoteObject.RemoteObject): Promise {\n const response = await obj.runtimeModel().agent.invoke_callFunctionOn({\n objectId: obj.objectId,\n functionDeclaration:\n 'function() { return this instanceof ArrayBuffer || (typeof SharedArrayBuffer !== \\'undefined\\' && this instanceof SharedArrayBuffer) ? this : this.buffer; }',\n silent: true,\n // Set object group in order to bind the object lifetime to the linear memory inspector.\n objectGroup: LINEAR_MEMORY_INSPECTOR_OBJECT_GROUP,\n });\n\n const error = response.getError();\n if (error) {\n throw new Error(`Remote object representing ArrayBuffer could not be retrieved: ${error}`);\n }\n obj = obj.runtimeModel().createRemoteObject(response.result);\n return new SDK.RemoteObject.RemoteArrayBuffer(obj);\n}\n\nexport function isDWARFMemoryObject(obj: SDK.RemoteObject.RemoteObject): boolean {\n if (obj instanceof Bindings.DebuggerLanguagePlugins.ExtensionRemoteObject) {\n return obj.linearMemoryAddress !== undefined;\n }\n return false;\n}\n\ntype SerializableSettings = {\n valueTypes: LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.ValueType[],\n valueTypeModes:\n [\n LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.ValueType,\n LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.ValueTypeMode,\n ][],\n endianness: LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.Endianness,\n};\n\nexport class LinearMemoryInspectorController extends SDK.TargetManager.SDKModelObserver\n implements Common.Revealer.Revealer,\n UI.ContextMenu.Provider {\n #paneInstance = LinearMemoryInspectorPane.instance();\n #bufferIdToRemoteObject: Map = new Map();\n #bufferIdToHighlightInfo: Map =\n new Map();\n #settings: Common.Settings.Setting;\n\n private constructor() {\n super();\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.RuntimeModel.RuntimeModel, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared, this.#onGlobalObjectClear, this);\n this.#paneInstance.addEventListener(LmiEvents.ViewClosed, this.#viewClosed.bind(this));\n\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerPaused, this.#onDebuggerPause, this);\n\n const defaultValueTypeModes =\n LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.getDefaultValueTypeMapping();\n const defaultSettings: SerializableSettings = {\n valueTypes: Array.from(defaultValueTypeModes.keys()),\n valueTypeModes: Array.from(defaultValueTypeModes),\n endianness: LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.Endianness.Little,\n };\n this.#settings = Common.Settings.Settings.instance().createSetting('lmiInterpreterSettings', defaultSettings);\n }\n\n static instance(): LinearMemoryInspectorController {\n if (controllerInstance) {\n return controllerInstance;\n }\n controllerInstance = new LinearMemoryInspectorController();\n return controllerInstance;\n }\n\n static async getMemoryForAddress(memoryWrapper: LazyUint8Array, address: number):\n Promise<{memory: Uint8Array, offset: number}> {\n // Provide a chunk of memory that covers the address to show and some before and after\n // as 1. the address shown is not necessarily at the beginning of a page and\n // 2. to allow for fewer memory requests.\n const memoryChunkStart = Math.max(0, address - MEMORY_TRANSFER_MIN_CHUNK_SIZE / 2);\n const memoryChunkEnd = memoryChunkStart + MEMORY_TRANSFER_MIN_CHUNK_SIZE;\n const memory = await memoryWrapper.getRange(memoryChunkStart, memoryChunkEnd);\n return {memory: memory, offset: memoryChunkStart};\n }\n\n static async getMemoryRange(memoryWrapper: LazyUint8Array, start: number, end: number): Promise {\n // Check that the requested start is within bounds.\n // If the requested end is larger than the actual\n // memory, it will be automatically capped when\n // requesting the range.\n if (start < 0 || start > end || start >= memoryWrapper.length()) {\n throw new Error('Requested range is out of bounds.');\n }\n const chunkEnd = Math.max(end, start + MEMORY_TRANSFER_MIN_CHUNK_SIZE);\n return await memoryWrapper.getRange(start, chunkEnd);\n }\n\n async evaluateExpression(callFrame: SDK.DebuggerModel.CallFrame, expressionName: string):\n Promise {\n const result = await callFrame.evaluate({expression: expressionName});\n if ('error' in result) {\n console.error(`Tried to evaluate the expression '${expressionName}' but got an error: ${result.error}`);\n return undefined;\n }\n if ('exceptionDetails' in result && result?.exceptionDetails?.text) {\n console.error(\n `Tried to evaluate the expression '${expressionName}' but got an exception: ${result.exceptionDetails.text}`);\n return undefined;\n }\n return result.object;\n }\n\n saveSettings(data: LinearMemoryInspectorComponents.LinearMemoryInspector.Settings): void {\n const valueTypes = Array.from(data.valueTypes);\n const modes = [...data.modes];\n this.#settings.set({valueTypes, valueTypeModes: modes, endianness: data.endianness});\n }\n\n loadSettings(): LinearMemoryInspectorComponents.LinearMemoryInspector.Settings {\n const settings = this.#settings.get();\n return {\n valueTypes: new Set(settings.valueTypes),\n modes: new Map(settings.valueTypeModes),\n endianness: settings.endianness,\n };\n }\n\n getHighlightInfo(bufferId: string): LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo|undefined {\n return this.#bufferIdToHighlightInfo.get(bufferId);\n }\n\n removeHighlight(\n bufferId: string, highlightInfo: LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo): void {\n const currentHighlight = this.getHighlightInfo(bufferId);\n if (currentHighlight === highlightInfo) {\n this.#bufferIdToHighlightInfo.delete(bufferId);\n }\n }\n\n setHighlightInfo(\n bufferId: string, highlightInfo: LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo): void {\n this.#bufferIdToHighlightInfo.set(bufferId, highlightInfo);\n }\n\n #resetHighlightInfo(bufferId: string): void {\n this.#bufferIdToHighlightInfo.delete(bufferId);\n }\n\n static async retrieveDWARFMemoryObjectAndAddress(obj: SDK.RemoteObject.RemoteObject):\n Promise<{obj: SDK.RemoteObject.RemoteObject, address: number}|undefined> {\n if (!(obj instanceof Bindings.DebuggerLanguagePlugins.ExtensionRemoteObject)) {\n return undefined;\n }\n const valueNode = obj;\n const address = obj.linearMemoryAddress;\n if (address === undefined) {\n return undefined;\n }\n const callFrame = valueNode.callFrame;\n const response = await obj.debuggerModel().agent.invoke_evaluateOnCallFrame({\n callFrameId: callFrame.id,\n expression: 'memories[0]',\n });\n const error = response.getError();\n if (error) {\n console.error(error);\n Common.Console.Console.instance().error(i18nString(UIStrings.couldNotOpenLinearMemory));\n }\n const runtimeModel = obj.debuggerModel().runtimeModel();\n return {obj: runtimeModel.createRemoteObject(response.result), address};\n }\n\n // This function returns the size of the source language value represented by the ValueNode or ExtensionRemoteObject.\n // If the value is a pointer, the function returns the size of the pointed-to value. If the pointed-to value is also a\n // pointer, it returns the size of the pointer (usually 4 bytes). This is the convention taken by the DWARF extension.\n // > double x = 42.0;\n // > double *ptr = &x;\n // > double **dblptr = &ptr;\n //\n // retrieveObjectSize(ptr_ValueNode) -> 8, the size of a double\n // retrieveObjectSize(dblptr_ValueNode) -> 4, the size of a pointer\n static extractObjectSize(obj: Bindings.DebuggerLanguagePlugins.ExtensionRemoteObject): number {\n return obj.linearMemorySize ?? 0;\n }\n\n // The object type description corresponds to the type of the highlighted memory\n // that the user sees in the memory inspector. For pointers, we highlight the pointed to object.\n //\n // Example: The variable `x` has the type `int *`. Assume that `x` points to the value 3.\n // -> The memory inspector will jump to the address where 3 is stored.\n // -> The memory inspector will highlight the bytes that represent the 3.\n // -> The object type description of what we show will thus be `int` and not `int *`.\n static extractObjectTypeDescription(obj: SDK.RemoteObject.RemoteObject): string {\n const objType = obj.description;\n if (!objType) {\n return '';\n }\n const lastChar = objType.charAt(objType.length - 1);\n const secondToLastChar = objType.charAt(objType.length - 2);\n const isPointerType = lastChar === '*' || lastChar === '&';\n const isOneLevelPointer = secondToLastChar === ' ';\n if (!isPointerType) {\n return objType;\n }\n if (isOneLevelPointer) {\n // For example, 'int *'and 'int &' become 'int'.\n return objType.slice(0, objType.length - 2);\n }\n // For example, 'int **' becomes 'int *'.\n return objType.slice(0, objType.length - 1);\n }\n\n // When inspecting a pointer variable, we indicate that we display the pointed-to object in the viewer\n // by prepending an asterisk to the pointer expression's name (mimicking C++ dereferencing).\n // If the object isn't a pointer, we return the expression unchanged.\n //\n // Examples:\n // (int *) myNumber -> (int) *myNumber\n // (int[]) numbers -> (int[]) numbers\n static extractObjectName(obj: SDK.RemoteObject.RemoteObject, expression: string): string {\n const lastChar = obj.description?.charAt(obj.description.length - 1);\n const isPointerType = lastChar === '*';\n if (isPointerType) {\n return '*' + expression;\n }\n return expression;\n }\n\n async reveal({object, expression}: SDK.RemoteObject.LinearMemoryInspectable, omitFocus?: boolean|undefined):\n Promise {\n const response = await LinearMemoryInspectorController.retrieveDWARFMemoryObjectAndAddress(object);\n let memoryObject = object;\n let memoryAddress = undefined;\n if (response !== undefined) {\n memoryAddress = response.address;\n memoryObject = response.obj;\n }\n\n if (memoryAddress !== undefined) {\n Host.userMetrics.linearMemoryInspectorTarget(\n Host.UserMetrics.LinearMemoryInspectorTarget.DWARFInspectableAddress);\n } else if (memoryObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Arraybuffer) {\n Host.userMetrics.linearMemoryInspectorTarget(Host.UserMetrics.LinearMemoryInspectorTarget.ArrayBuffer);\n } else if (memoryObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Dataview) {\n Host.userMetrics.linearMemoryInspectorTarget(Host.UserMetrics.LinearMemoryInspectorTarget.DataView);\n } else if (memoryObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Typedarray) {\n Host.userMetrics.linearMemoryInspectorTarget(Host.UserMetrics.LinearMemoryInspectorTarget.TypedArray);\n } else {\n console.assert(memoryObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Webassemblymemory);\n Host.userMetrics.linearMemoryInspectorTarget(Host.UserMetrics.LinearMemoryInspectorTarget.WebAssemblyMemory);\n }\n const buffer = await getBufferFromObject(memoryObject);\n const {internalProperties} = await buffer.object().getOwnProperties(false);\n const idProperty = internalProperties?.find(({name}) => name === '[[ArrayBufferData]]');\n const id = idProperty?.value?.value;\n if (!id) {\n throw new Error('Unable to find backing store id for array buffer');\n }\n const memoryProperty = internalProperties?.find(({name}) => name === '[[WebAssemblyMemory]]');\n const memory = memoryProperty?.value;\n const highlightInfo = LinearMemoryInspectorController.extractHighlightInfo(object, expression);\n if (highlightInfo) {\n this.setHighlightInfo(id, highlightInfo);\n } else {\n this.#resetHighlightInfo(id);\n }\n if (this.#bufferIdToRemoteObject.has(id)) {\n this.#paneInstance.reveal(id, memoryAddress);\n void UI.ViewManager.ViewManager.instance().showView('linear-memory-inspector', omitFocus);\n return;\n }\n\n const title = String(memory ? memory.description : buffer.object().description);\n this.#bufferIdToRemoteObject.set(id, buffer.object());\n const arrayBufferWrapper = new RemoteArrayBufferWrapper(buffer);\n\n this.#paneInstance.create(id, title, arrayBufferWrapper, memoryAddress);\n void UI.ViewManager.ViewManager.instance().showView('linear-memory-inspector', omitFocus);\n }\n\n appendApplicableItems(\n _event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement): void {\n if (target.property.value?.isLinearMemoryInspectable()) {\n const expression = target.path();\n const object = target.property.value;\n contextMenu.debugSection().appendItem(i18nString(UIStrings.revealInMemoryInspectorPanel), () => {\n Host.userMetrics.linearMemoryInspectorRevealedFrom(\n Host.UserMetrics.LinearMemoryInspectorRevealedFrom.ContextMenu);\n void this.reveal(new SDK.RemoteObject.LinearMemoryInspectable(object, expression));\n });\n }\n }\n static extractHighlightInfo(obj: SDK.RemoteObject.RemoteObject, expression?: string):\n LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo|undefined {\n if (!(obj instanceof Bindings.DebuggerLanguagePlugins.ExtensionRemoteObject)) {\n return undefined;\n }\n\n const startAddress = obj.linearMemoryAddress ?? 0;\n\n let highlightInfo;\n try {\n highlightInfo = {\n startAddress,\n size: LinearMemoryInspectorController.extractObjectSize(obj),\n name: expression ? LinearMemoryInspectorController.extractObjectName(obj, expression) : expression,\n type: LinearMemoryInspectorController.extractObjectTypeDescription(obj),\n };\n } catch (err) {\n highlightInfo = undefined;\n }\n return highlightInfo;\n }\n\n override modelRemoved(model: SDK.RuntimeModel.RuntimeModel): void {\n for (const [bufferId, remoteObject] of this.#bufferIdToRemoteObject) {\n if (model === remoteObject.runtimeModel()) {\n this.#bufferIdToRemoteObject.delete(bufferId);\n this.#resetHighlightInfo(bufferId);\n this.#paneInstance.close(bufferId);\n }\n }\n }\n\n #onDebuggerPause(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n for (const [bufferId, remoteObject] of this.#bufferIdToRemoteObject) {\n if (debuggerModel.runtimeModel() === remoteObject.runtimeModel()) {\n const topCallFrame = debuggerModel.debuggerPausedDetails()?.callFrames[0];\n if (topCallFrame) {\n void this\n .updateHighlightedMemory(bufferId, topCallFrame)\n // Need to call refreshView in the callback to trigger re-render.\n .then(() => this.#paneInstance.refreshView(bufferId));\n } else {\n this.#resetHighlightInfo(bufferId);\n this.#paneInstance.refreshView(bufferId);\n }\n }\n }\n }\n\n #onGlobalObjectClear(event: Common.EventTarget.EventTargetEvent): void {\n this.modelRemoved(event.data.runtimeModel());\n }\n\n #viewClosed({data: bufferId}: Common.EventTarget.EventTargetEvent): void {\n const remoteObj = this.#bufferIdToRemoteObject.get(bufferId);\n if (remoteObj) {\n remoteObj.release();\n }\n this.#bufferIdToRemoteObject.delete(bufferId);\n this.#resetHighlightInfo(bufferId);\n }\n\n async updateHighlightedMemory(bufferId: string, callFrame: SDK.DebuggerModel.CallFrame): Promise {\n const oldHighlightInfo = this.getHighlightInfo(bufferId);\n const expressionName = oldHighlightInfo?.name;\n if (!oldHighlightInfo || !expressionName) {\n this.#resetHighlightInfo(bufferId);\n return;\n }\n const obj = await this.evaluateExpression(callFrame, expressionName);\n if (!obj) {\n this.#resetHighlightInfo(bufferId);\n return;\n }\n\n const newHighlightInfo = LinearMemoryInspectorController.extractHighlightInfo(obj, expressionName);\n if (!newHighlightInfo || !this.#pointToSameMemoryObject(newHighlightInfo, oldHighlightInfo)) {\n this.#resetHighlightInfo(bufferId);\n } else {\n this.setHighlightInfo(bufferId, newHighlightInfo);\n }\n }\n\n #pointToSameMemoryObject(\n highlightInfoA: LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo,\n highlightInfoB: LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo): boolean {\n return highlightInfoA.type === highlightInfoB.type && highlightInfoA.startAddress === highlightInfoB.startAddress;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"LinearMemoryInspectorController.js","sourceRoot":"","sources":["../../../../../../front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAE9D,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,KAAK,+BAA+B,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAsB,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AAE9F,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,wBAAwB,EAAE,iEAAiE;IAC3F;;OAEG;IACH,4BAA4B,EAAE,kCAAkC;CACjE,CAAC;AACF,MAAM,IAAI,GACN,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,mEAAmE,EAAE,SAAS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AAC,IAAI,IAAI,cAAc,CAAC,YAAY,KAAK,cAAc,CAAC,YAAY,CAAC;IACpH,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport type * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport * as LinearMemoryInspectorComponents from './components/components.js';\nimport {Events as LmiEvents, LinearMemoryInspectorPane} from './LinearMemoryInspectorPane.js';\n\nconst UIStrings = {\n /**\n *@description Error message that shows up in the console if a buffer to be opened in the linear memory inspector cannot be found.\n */\n couldNotOpenLinearMemory: 'Could not open linear memory inspector: failed locating buffer.',\n /**\n *@description A context menu item in the Scope View of the Sources Panel\n */\n revealInMemoryInspectorPanel: 'Reveal in Memory inspector panel',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/LinearMemoryInspectorController.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst LINEAR_MEMORY_INSPECTOR_OBJECT_GROUP = 'linear-memory-inspector';\nconst MEMORY_TRANSFER_MIN_CHUNK_SIZE = 1000;\n\nlet controllerInstance: LinearMemoryInspectorController;\n\nexport interface LazyUint8Array {\n getRange(start: number, end: number): Promise;\n length(): number;\n}\n\nexport class RemoteArrayBufferWrapper implements LazyUint8Array {\n #remoteArrayBuffer: SDK.RemoteObject.RemoteArrayBuffer;\n\n constructor(arrayBuffer: SDK.RemoteObject.RemoteArrayBuffer) {\n this.#remoteArrayBuffer = arrayBuffer;\n }\n\n length(): number {\n return this.#remoteArrayBuffer.byteLength();\n }\n\n async getRange(start: number, end: number): Promise {\n const newEnd = Math.min(end, this.length());\n if (start < 0 || start > newEnd) {\n console.error(`Requesting invalid range of memory: (${start}, ${end})`);\n return new Uint8Array(0);\n }\n const array = await this.#remoteArrayBuffer.bytes(start, newEnd);\n return new Uint8Array(array);\n }\n}\n\nasync function getBufferFromObject(obj: SDK.RemoteObject.RemoteObject): Promise {\n const response = await obj.runtimeModel().agent.invoke_callFunctionOn({\n objectId: obj.objectId,\n functionDeclaration:\n 'function() { return this instanceof ArrayBuffer || (typeof SharedArrayBuffer !== \\'undefined\\' && this instanceof SharedArrayBuffer) ? this : this.buffer; }',\n silent: true,\n // Set object group in order to bind the object lifetime to the linear memory inspector.\n objectGroup: LINEAR_MEMORY_INSPECTOR_OBJECT_GROUP,\n });\n\n const error = response.getError();\n if (error) {\n throw new Error(`Remote object representing ArrayBuffer could not be retrieved: ${error}`);\n }\n obj = obj.runtimeModel().createRemoteObject(response.result);\n return new SDK.RemoteObject.RemoteArrayBuffer(obj);\n}\n\nexport function isDWARFMemoryObject(obj: SDK.RemoteObject.RemoteObject): boolean {\n if (obj instanceof Bindings.DebuggerLanguagePlugins.ExtensionRemoteObject) {\n return obj.linearMemoryAddress !== undefined;\n }\n return false;\n}\n\ntype SerializableSettings = {\n valueTypes: LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.ValueType[],\n valueTypeModes:\n [\n LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.ValueType,\n LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.ValueTypeMode,\n ][],\n endianness: LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.Endianness,\n};\n\nexport class LinearMemoryInspectorController extends SDK.TargetManager.SDKModelObserver\n implements Common.Revealer.Revealer,\n UI.ContextMenu.Provider {\n #paneInstance = LinearMemoryInspectorPane.instance();\n #bufferIdToRemoteObject: Map = new Map();\n #bufferIdToHighlightInfo: Map =\n new Map();\n #settings: Common.Settings.Setting;\n\n private constructor() {\n super();\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.RuntimeModel.RuntimeModel, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared, this.#onGlobalObjectClear, this);\n this.#paneInstance.addEventListener(LmiEvents.ViewClosed, this.#viewClosed.bind(this));\n\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerPaused, this.#onDebuggerPause, this);\n\n const defaultValueTypeModes =\n LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.getDefaultValueTypeMapping();\n const defaultSettings: SerializableSettings = {\n valueTypes: Array.from(defaultValueTypeModes.keys()),\n valueTypeModes: Array.from(defaultValueTypeModes),\n endianness: LinearMemoryInspectorComponents.ValueInterpreterDisplayUtils.Endianness.Little,\n };\n this.#settings = Common.Settings.Settings.instance().createSetting('lmiInterpreterSettings', defaultSettings);\n }\n\n static instance(): LinearMemoryInspectorController {\n if (controllerInstance) {\n return controllerInstance;\n }\n controllerInstance = new LinearMemoryInspectorController();\n return controllerInstance;\n }\n\n static async getMemoryForAddress(memoryWrapper: LazyUint8Array, address: number):\n Promise<{memory: Uint8Array, offset: number}> {\n // Provide a chunk of memory that covers the address to show and some before and after\n // as 1. the address shown is not necessarily at the beginning of a page and\n // 2. to allow for fewer memory requests.\n const memoryChunkStart = Math.max(0, address - MEMORY_TRANSFER_MIN_CHUNK_SIZE / 2);\n const memoryChunkEnd = memoryChunkStart + MEMORY_TRANSFER_MIN_CHUNK_SIZE;\n const memory = await memoryWrapper.getRange(memoryChunkStart, memoryChunkEnd);\n return {memory: memory, offset: memoryChunkStart};\n }\n\n static async getMemoryRange(memoryWrapper: LazyUint8Array, start: number, end: number): Promise {\n // Check that the requested start is within bounds.\n // If the requested end is larger than the actual\n // memory, it will be automatically capped when\n // requesting the range.\n if (start < 0 || start > end || start >= memoryWrapper.length()) {\n throw new Error('Requested range is out of bounds.');\n }\n const chunkEnd = Math.max(end, start + MEMORY_TRANSFER_MIN_CHUNK_SIZE);\n return await memoryWrapper.getRange(start, chunkEnd);\n }\n\n async evaluateExpression(callFrame: SDK.DebuggerModel.CallFrame, expressionName: string):\n Promise {\n const result = await callFrame.evaluate({expression: expressionName});\n if ('error' in result) {\n console.error(`Tried to evaluate the expression '${expressionName}' but got an error: ${result.error}`);\n return undefined;\n }\n if ('exceptionDetails' in result && result?.exceptionDetails?.text) {\n console.error(\n `Tried to evaluate the expression '${expressionName}' but got an exception: ${result.exceptionDetails.text}`);\n return undefined;\n }\n return result.object;\n }\n\n saveSettings(data: LinearMemoryInspectorComponents.LinearMemoryInspector.Settings): void {\n const valueTypes = Array.from(data.valueTypes);\n const modes = [...data.modes];\n this.#settings.set({valueTypes, valueTypeModes: modes, endianness: data.endianness});\n }\n\n loadSettings(): LinearMemoryInspectorComponents.LinearMemoryInspector.Settings {\n const settings = this.#settings.get();\n return {\n valueTypes: new Set(settings.valueTypes),\n modes: new Map(settings.valueTypeModes),\n endianness: settings.endianness,\n };\n }\n\n getHighlightInfo(bufferId: string): LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo|undefined {\n return this.#bufferIdToHighlightInfo.get(bufferId);\n }\n\n removeHighlight(\n bufferId: string, highlightInfo: LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo): void {\n const currentHighlight = this.getHighlightInfo(bufferId);\n if (currentHighlight === highlightInfo) {\n this.#bufferIdToHighlightInfo.delete(bufferId);\n }\n }\n\n setHighlightInfo(\n bufferId: string, highlightInfo: LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo): void {\n this.#bufferIdToHighlightInfo.set(bufferId, highlightInfo);\n }\n\n #resetHighlightInfo(bufferId: string): void {\n this.#bufferIdToHighlightInfo.delete(bufferId);\n }\n\n static async retrieveDWARFMemoryObjectAndAddress(obj: SDK.RemoteObject.RemoteObject):\n Promise<{obj: SDK.RemoteObject.RemoteObject, address: number}|undefined> {\n if (!(obj instanceof Bindings.DebuggerLanguagePlugins.ExtensionRemoteObject)) {\n return undefined;\n }\n const valueNode = obj;\n const address = obj.linearMemoryAddress;\n if (address === undefined) {\n return undefined;\n }\n const callFrame = valueNode.callFrame;\n const response = await obj.debuggerModel().agent.invoke_evaluateOnCallFrame({\n callFrameId: callFrame.id,\n expression: 'memories[0]',\n });\n const error = response.getError();\n if (error) {\n console.error(error);\n Common.Console.Console.instance().error(i18nString(UIStrings.couldNotOpenLinearMemory));\n }\n const runtimeModel = obj.debuggerModel().runtimeModel();\n return {obj: runtimeModel.createRemoteObject(response.result), address};\n }\n\n // This function returns the size of the source language value represented by the ValueNode or ExtensionRemoteObject.\n // If the value is a pointer, the function returns the size of the pointed-to value. If the pointed-to value is also a\n // pointer, it returns the size of the pointer (usually 4 bytes). This is the convention taken by the DWARF extension.\n // > double x = 42.0;\n // > double *ptr = &x;\n // > double **dblptr = &ptr;\n //\n // retrieveObjectSize(ptr_ValueNode) -> 8, the size of a double\n // retrieveObjectSize(dblptr_ValueNode) -> 4, the size of a pointer\n static extractObjectSize(obj: Bindings.DebuggerLanguagePlugins.ExtensionRemoteObject): number {\n return obj.linearMemorySize ?? 0;\n }\n\n // The object type description corresponds to the type of the highlighted memory\n // that the user sees in the memory inspector. For pointers, we highlight the pointed to object.\n //\n // Example: The variable `x` has the type `int *`. Assume that `x` points to the value 3.\n // -> The memory inspector will jump to the address where 3 is stored.\n // -> The memory inspector will highlight the bytes that represent the 3.\n // -> The object type description of what we show will thus be `int` and not `int *`.\n static extractObjectTypeDescription(obj: SDK.RemoteObject.RemoteObject): string {\n const objType = obj.description;\n if (!objType) {\n return '';\n }\n const lastChar = objType.charAt(objType.length - 1);\n const secondToLastChar = objType.charAt(objType.length - 2);\n const isPointerType = lastChar === '*' || lastChar === '&';\n const isOneLevelPointer = secondToLastChar === ' ';\n if (!isPointerType) {\n return objType;\n }\n if (isOneLevelPointer) {\n // For example, 'int *'and 'int &' become 'int'.\n return objType.slice(0, objType.length - 2);\n }\n // For example, 'int **' becomes 'int *'.\n return objType.slice(0, objType.length - 1);\n }\n\n // When inspecting a pointer variable, we indicate that we display the pointed-to object in the viewer\n // by prepending an asterisk to the pointer expression's name (mimicking C++ dereferencing).\n // If the object isn't a pointer, we return the expression unchanged.\n //\n // Examples:\n // (int *) myNumber -> (int) *myNumber\n // (int[]) numbers -> (int[]) numbers\n static extractObjectName(obj: SDK.RemoteObject.RemoteObject, expression: string): string {\n const lastChar = obj.description?.charAt(obj.description.length - 1);\n const isPointerType = lastChar === '*';\n if (isPointerType) {\n return '*' + expression;\n }\n return expression;\n }\n\n async reveal({object, expression}: SDK.RemoteObject.LinearMemoryInspectable, omitFocus?: boolean|undefined):\n Promise {\n const response = await LinearMemoryInspectorController.retrieveDWARFMemoryObjectAndAddress(object);\n let memoryObject = object;\n let memoryAddress = undefined;\n if (response !== undefined) {\n memoryAddress = response.address;\n memoryObject = response.obj;\n }\n\n if (memoryAddress !== undefined) {\n Host.userMetrics.linearMemoryInspectorTarget(\n Host.UserMetrics.LinearMemoryInspectorTarget.DWARFInspectableAddress);\n } else if (memoryObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Arraybuffer) {\n Host.userMetrics.linearMemoryInspectorTarget(Host.UserMetrics.LinearMemoryInspectorTarget.ArrayBuffer);\n } else if (memoryObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Dataview) {\n Host.userMetrics.linearMemoryInspectorTarget(Host.UserMetrics.LinearMemoryInspectorTarget.DataView);\n } else if (memoryObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Typedarray) {\n Host.userMetrics.linearMemoryInspectorTarget(Host.UserMetrics.LinearMemoryInspectorTarget.TypedArray);\n } else {\n console.assert(memoryObject.subtype === Protocol.Runtime.RemoteObjectSubtype.Webassemblymemory);\n Host.userMetrics.linearMemoryInspectorTarget(Host.UserMetrics.LinearMemoryInspectorTarget.WebAssemblyMemory);\n }\n const buffer = await getBufferFromObject(memoryObject);\n const {internalProperties} = await buffer.object().getOwnProperties(false);\n const idProperty = internalProperties?.find(({name}) => name === '[[ArrayBufferData]]');\n const id = idProperty?.value?.value;\n if (!id) {\n throw new Error('Unable to find backing store id for array buffer');\n }\n const memoryProperty = internalProperties?.find(({name}) => name === '[[WebAssemblyMemory]]');\n const memory = memoryProperty?.value;\n const highlightInfo = LinearMemoryInspectorController.extractHighlightInfo(object, expression);\n if (highlightInfo) {\n this.setHighlightInfo(id, highlightInfo);\n } else {\n this.#resetHighlightInfo(id);\n }\n if (this.#bufferIdToRemoteObject.has(id)) {\n this.#paneInstance.reveal(id, memoryAddress);\n void UI.ViewManager.ViewManager.instance().showView('linear-memory-inspector', omitFocus);\n return;\n }\n\n const title = String(memory ? memory.description : buffer.object().description);\n this.#bufferIdToRemoteObject.set(id, buffer.object());\n const arrayBufferWrapper = new RemoteArrayBufferWrapper(buffer);\n\n this.#paneInstance.create(id, title, arrayBufferWrapper, memoryAddress);\n void UI.ViewManager.ViewManager.instance().showView('linear-memory-inspector', omitFocus);\n }\n\n appendApplicableItems(\n _event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement): void {\n if (target.property.value?.isLinearMemoryInspectable()) {\n const expression = target.path();\n const object = target.property.value;\n contextMenu.debugSection().appendItem(i18nString(UIStrings.revealInMemoryInspectorPanel), () => {\n Host.userMetrics.linearMemoryInspectorRevealedFrom(\n Host.UserMetrics.LinearMemoryInspectorRevealedFrom.ContextMenu);\n void this.reveal(new SDK.RemoteObject.LinearMemoryInspectable(object, expression));\n });\n }\n }\n static extractHighlightInfo(obj: SDK.RemoteObject.RemoteObject, expression?: string):\n LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo|undefined {\n if (!(obj instanceof Bindings.DebuggerLanguagePlugins.ExtensionRemoteObject)) {\n return undefined;\n }\n\n const startAddress = obj.linearMemoryAddress ?? 0;\n\n let highlightInfo;\n try {\n highlightInfo = {\n startAddress,\n size: LinearMemoryInspectorController.extractObjectSize(obj),\n name: expression ? LinearMemoryInspectorController.extractObjectName(obj, expression) : expression,\n type: LinearMemoryInspectorController.extractObjectTypeDescription(obj),\n };\n } catch (err) {\n highlightInfo = undefined;\n }\n return highlightInfo;\n }\n\n override modelRemoved(model: SDK.RuntimeModel.RuntimeModel): void {\n for (const [bufferId, remoteObject] of this.#bufferIdToRemoteObject) {\n if (model === remoteObject.runtimeModel()) {\n this.#bufferIdToRemoteObject.delete(bufferId);\n this.#resetHighlightInfo(bufferId);\n this.#paneInstance.close(bufferId);\n }\n }\n }\n\n #onDebuggerPause(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n for (const [bufferId, remoteObject] of this.#bufferIdToRemoteObject) {\n if (debuggerModel.runtimeModel() === remoteObject.runtimeModel()) {\n const topCallFrame = debuggerModel.debuggerPausedDetails()?.callFrames[0];\n if (topCallFrame) {\n void this\n .updateHighlightedMemory(bufferId, topCallFrame)\n // Need to call refreshView in the callback to trigger re-render.\n .then(() => this.#paneInstance.refreshView(bufferId));\n } else {\n this.#resetHighlightInfo(bufferId);\n this.#paneInstance.refreshView(bufferId);\n }\n }\n }\n }\n\n #onGlobalObjectClear(event: Common.EventTarget.EventTargetEvent): void {\n this.modelRemoved(event.data.runtimeModel());\n }\n\n #viewClosed({data: bufferId}: Common.EventTarget.EventTargetEvent): void {\n const remoteObj = this.#bufferIdToRemoteObject.get(bufferId);\n if (remoteObj) {\n remoteObj.release();\n }\n this.#bufferIdToRemoteObject.delete(bufferId);\n this.#resetHighlightInfo(bufferId);\n }\n\n async updateHighlightedMemory(bufferId: string, callFrame: SDK.DebuggerModel.CallFrame): Promise {\n const oldHighlightInfo = this.getHighlightInfo(bufferId);\n const expressionName = oldHighlightInfo?.name;\n if (!oldHighlightInfo || !expressionName) {\n this.#resetHighlightInfo(bufferId);\n return;\n }\n const obj = await this.evaluateExpression(callFrame, expressionName);\n if (!obj) {\n this.#resetHighlightInfo(bufferId);\n return;\n }\n\n const newHighlightInfo = LinearMemoryInspectorController.extractHighlightInfo(obj, expressionName);\n if (!newHighlightInfo || !this.#pointToSameMemoryObject(newHighlightInfo, oldHighlightInfo)) {\n this.#resetHighlightInfo(bufferId);\n } else {\n this.setHighlightInfo(bufferId, newHighlightInfo);\n }\n }\n\n #pointToSameMemoryObject(\n highlightInfoA: LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo,\n highlightInfoB: LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo): boolean {\n return highlightInfoA.type === highlightInfoB.type && highlightInfoA.startAddress === highlightInfoB.startAddress;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/linear_memory_inspector/LinearMemoryInspectorPane.js b/public/panels/linear_memory_inspector/LinearMemoryInspectorPane.js index 3347f9d26..ae93ba094 100644 --- a/public/panels/linear_memory_inspector/LinearMemoryInspectorPane.js +++ b/public/panels/linear_memory_inspector/LinearMemoryInspectorPane.js @@ -9,7 +9,7 @@ import * as LinearMemoryInspectorComponents from './components/components.js'; import { LinearMemoryInspectorController } from './LinearMemoryInspectorController.js'; const UIStrings = { /** - *@description Label in the Linear Memory Inspector tool that serves as a placeholder if no inspections are open (i.e. nothing to see here). + *@description Label in the Linear Memory inspector tool that serves as a placeholder if no inspections are open (i.e. nothing to see here). * Inspection hereby refers to viewing, navigating and understanding the memory through this tool. */ noOpenInspections: 'No open inspections', diff --git a/public/panels/linear_memory_inspector/LinearMemoryInspectorPane.js.map b/public/panels/linear_memory_inspector/LinearMemoryInspectorPane.js.map index ec8c9f8b5..2f16354ab 100644 --- a/public/panels/linear_memory_inspector/LinearMemoryInspectorPane.js.map +++ b/public/panels/linear_memory_inspector/LinearMemoryInspectorPane.js.map @@ -1 +1 @@ -{"version":3,"file":"LinearMemoryInspectorPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,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K,+BAA+B,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACjG,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG;gBACrB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,OAAO;gBAChB,YAAY,EAAE,KAAK;gBACnB,iBAAiB,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;gBAC/C,aAAa,EAAE,IAAI,CAAC,iBAAiB,EAAE;aACxC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iBAAiB;QACf,MAAM,aAAa,GAAG,+BAA+B,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/F,IAAI,aAAa,KAAK,SAAS,EAAE;YAC/B,IAAI,aAAa,CAAC,YAAY,GAAG,CAAC,IAAI,aAAa,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE;gBAChG,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;aAClE;YACD,IAAI,aAAa,CAAC,IAAI,IAAI,CAAC,EAAE;gBAC3B,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;aAC9D;SACF;QACD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport * as LinearMemoryInspectorComponents from './components/components.js';\nimport {type LazyUint8Array, LinearMemoryInspectorController} from './LinearMemoryInspectorController.js';\n\nconst UIStrings = {\n /**\n *@description Label in the Linear Memory Inspector tool that serves as a placeholder if no inspections are open (i.e. nothing to see here).\n * Inspection hereby refers to viewing, navigating and understanding the memory through this tool.\n */\n noOpenInspections: 'No open inspections',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/linear_memory_inspector/LinearMemoryInspectorPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet inspectorInstance: LinearMemoryInspectorPane;\n\nexport class LinearMemoryInspectorPane extends Common.ObjectWrapper.eventMixin(\n UI.Widget.VBox) {\n readonly #tabbedPane: UI.TabbedPane.TabbedPane;\n\n constructor() {\n super(false);\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('linear-memory-inspector')}`);\n const placeholder = document.createElement('div');\n placeholder.textContent = i18nString(UIStrings.noOpenInspections);\n placeholder.style.display = 'flex';\n this.#tabbedPane = new UI.TabbedPane.TabbedPane();\n this.#tabbedPane.setPlaceholderElement(placeholder);\n this.#tabbedPane.setCloseableTabs(true);\n this.#tabbedPane.setAllowTabReorder(true, true);\n this.#tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this.#tabClosed, this);\n this.#tabbedPane.show(this.contentElement);\n }\n\n static instance(): LinearMemoryInspectorPane {\n if (!inspectorInstance) {\n inspectorInstance = new LinearMemoryInspectorPane();\n }\n return inspectorInstance;\n }\n\n #tabView(tabId: string): LinearMemoryInspectorView {\n const view = this.#tabbedPane.tabView(tabId);\n if (view === null) {\n throw new Error(`No linear memory inspector view for the given tab id: ${tabId}`);\n }\n return view as LinearMemoryInspectorView;\n }\n\n create(tabId: string, title: string, arrayWrapper: LazyUint8Array, address?: number): void {\n const inspectorView = new LinearMemoryInspectorView(arrayWrapper, address, tabId);\n this.#tabbedPane.appendTab(tabId, title, inspectorView, undefined, false, true);\n this.#tabbedPane.selectTab(tabId);\n }\n\n close(tabId: string): void {\n this.#tabbedPane.closeTab(tabId, false);\n }\n\n reveal(tabId: string, address?: number): void {\n const view = this.#tabView(tabId);\n\n if (address !== undefined) {\n view.updateAddress(address);\n }\n this.refreshView(tabId);\n this.#tabbedPane.selectTab(tabId);\n }\n\n refreshView(tabId: string): void {\n const view = this.#tabView(tabId);\n view.refreshData();\n }\n\n #tabClosed(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId} = event.data;\n this.dispatchEventToListeners(Events.ViewClosed, tabId);\n }\n}\n\nexport const enum Events {\n ViewClosed = 'ViewClosed',\n}\n\nexport type EventTypes = {\n [Events.ViewClosed]: string,\n};\n\nclass LinearMemoryInspectorView extends UI.Widget.VBox {\n #memoryWrapper: LazyUint8Array;\n #address: number;\n #tabId: string;\n #inspector: LinearMemoryInspectorComponents.LinearMemoryInspector.LinearMemoryInspector;\n firstTimeOpen: boolean;\n constructor(memoryWrapper: LazyUint8Array, address: number|undefined = 0, tabId: string) {\n super(false);\n\n if (address < 0 || address >= memoryWrapper.length()) {\n throw new Error('Requested address is out of bounds.');\n }\n\n this.#memoryWrapper = memoryWrapper;\n this.#address = address;\n this.#tabId = tabId;\n this.#inspector = new LinearMemoryInspectorComponents.LinearMemoryInspector.LinearMemoryInspector();\n this.#inspector.addEventListener(\n LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent.eventName,\n (event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent) => {\n this.#memoryRequested(event);\n });\n this.#inspector.addEventListener(\n LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent.eventName,\n (event: LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent) => {\n this.updateAddress(event.data);\n });\n this.#inspector.addEventListener(\n LinearMemoryInspectorComponents.LinearMemoryInspector.SettingsChangedEvent.eventName,\n (event: LinearMemoryInspectorComponents.LinearMemoryInspector.SettingsChangedEvent) => {\n // Stop event from bubbling up, since no element further up needs the event.\n event.stopPropagation();\n this.saveSettings(event.data);\n });\n this.#inspector.addEventListener(\n LinearMemoryInspectorComponents.LinearMemoryHighlightChipList.DeleteMemoryHighlightEvent.eventName,\n (event: LinearMemoryInspectorComponents.LinearMemoryHighlightChipList.DeleteMemoryHighlightEvent) => {\n LinearMemoryInspectorController.instance().removeHighlight(this.#tabId, event.data);\n this.refreshData();\n });\n this.contentElement.appendChild(this.#inspector);\n this.firstTimeOpen = true;\n }\n\n override wasShown(): void {\n this.refreshData();\n }\n\n saveSettings(settings: LinearMemoryInspectorComponents.LinearMemoryInspector.Settings): void {\n LinearMemoryInspectorController.instance().saveSettings(settings);\n }\n\n updateAddress(address: number): void {\n if (address < 0 || address >= this.#memoryWrapper.length()) {\n throw new Error('Requested address is out of bounds.');\n }\n this.#address = address;\n }\n\n refreshData(): void {\n void LinearMemoryInspectorController.getMemoryForAddress(this.#memoryWrapper, this.#address).then(({\n memory,\n offset,\n }) => {\n let valueTypes;\n let valueTypeModes;\n let endianness;\n if (this.firstTimeOpen) {\n const settings = LinearMemoryInspectorController.instance().loadSettings();\n valueTypes = settings.valueTypes;\n valueTypeModes = settings.modes;\n endianness = settings.endianness;\n this.firstTimeOpen = false;\n }\n this.#inspector.data = {\n memory,\n address: this.#address,\n memoryOffset: offset,\n outerMemoryLength: this.#memoryWrapper.length(),\n valueTypes,\n valueTypeModes,\n endianness,\n highlightInfo: this.#getHighlightInfo(),\n };\n });\n }\n\n #memoryRequested(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent): void {\n const {start, end, address} = event.data;\n if (address < start || address >= end) {\n throw new Error('Requested address is out of bounds.');\n }\n\n void LinearMemoryInspectorController.getMemoryRange(this.#memoryWrapper, start, end).then(memory => {\n this.#inspector.data = {\n memory: memory,\n address: address,\n memoryOffset: start,\n outerMemoryLength: this.#memoryWrapper.length(),\n highlightInfo: this.#getHighlightInfo(),\n };\n });\n }\n\n #getHighlightInfo(): LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo|undefined {\n const highlightInfo = LinearMemoryInspectorController.instance().getHighlightInfo(this.#tabId);\n if (highlightInfo !== undefined) {\n if (highlightInfo.startAddress < 0 || highlightInfo.startAddress >= this.#memoryWrapper.length()) {\n throw new Error('HighlightInfo start address is out of bounds.');\n }\n if (highlightInfo.size <= 0) {\n throw new Error('Highlight size must be a positive number.');\n }\n }\n return highlightInfo;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"LinearMemoryInspectorPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,KAAK,+BAA+B,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAsB,+BAA+B,EAAC,MAAM,sCAAsC,CAAC;AAE1G,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,iBAAiB,EAAE,qBAAqB;CACzC,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,6DAA6D,EAAE,SAAS,CAAC,CAAC;AACnH,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACtE,IAAI,iBAA4C,CAAC;AAEjD,MAAM,OAAO,yBAA0B,SAAQ,MAAM,CAAC,aAAa,CAAC,UAAU,CAC1E,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;IACR,WAAW,CAA2B;IAE/C;QACE,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;QAClG,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAClD,WAAW,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ACxC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB,CAAC,KAA+E;QAC9F,MAAM,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAC,GAAG,KAAK,CAAC,IAAI,CAAC;QACzC,IAAI,OAAO,GAAG,KAAK,IAAI,OAAO,IAAI,GAAG,EAAE;YACrC,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;SACxD;QAED,KAAK,+BAA+B,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACjG,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG;gBACrB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,OAAO;gBAChB,YAAY,EAAE,KAAK;gBACnB,iBAAiB,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;gBAC/C,aAAa,EAAE,IAAI,CAAC,iBAAiB,EAAE;aACxC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iBAAiB;QACf,MAAM,aAAa,GAAG,+BAA+B,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/F,IAAI,aAAa,KAAK,SAAS,EAAE;YAC/B,IAAI,aAAa,CAAC,YAAY,GAAG,CAAC,IAAI,aAAa,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE;gBAChG,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;aAClE;YACD,IAAI,aAAa,CAAC,IAAI,IAAI,CAAC,EAAE;gBAC3B,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;aAC9D;SACF;QACD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport * as LinearMemoryInspectorComponents from './components/components.js';\nimport {type LazyUint8Array, LinearMemoryInspectorController} from './LinearMemoryInspectorController.js';\n\nconst UIStrings = {\n /**\n *@description Label in the Linear Memory inspector tool that serves as a placeholder if no inspections are open (i.e. nothing to see here).\n * Inspection hereby refers to viewing, navigating and understanding the memory through this tool.\n */\n noOpenInspections: 'No open inspections',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/linear_memory_inspector/LinearMemoryInspectorPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet inspectorInstance: LinearMemoryInspectorPane;\n\nexport class LinearMemoryInspectorPane extends Common.ObjectWrapper.eventMixin(\n UI.Widget.VBox) {\n readonly #tabbedPane: UI.TabbedPane.TabbedPane;\n\n constructor() {\n super(false);\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('linear-memory-inspector')}`);\n const placeholder = document.createElement('div');\n placeholder.textContent = i18nString(UIStrings.noOpenInspections);\n placeholder.style.display = 'flex';\n this.#tabbedPane = new UI.TabbedPane.TabbedPane();\n this.#tabbedPane.setPlaceholderElement(placeholder);\n this.#tabbedPane.setCloseableTabs(true);\n this.#tabbedPane.setAllowTabReorder(true, true);\n this.#tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this.#tabClosed, this);\n this.#tabbedPane.show(this.contentElement);\n }\n\n static instance(): LinearMemoryInspectorPane {\n if (!inspectorInstance) {\n inspectorInstance = new LinearMemoryInspectorPane();\n }\n return inspectorInstance;\n }\n\n #tabView(tabId: string): LinearMemoryInspectorView {\n const view = this.#tabbedPane.tabView(tabId);\n if (view === null) {\n throw new Error(`No linear memory inspector view for the given tab id: ${tabId}`);\n }\n return view as LinearMemoryInspectorView;\n }\n\n create(tabId: string, title: string, arrayWrapper: LazyUint8Array, address?: number): void {\n const inspectorView = new LinearMemoryInspectorView(arrayWrapper, address, tabId);\n this.#tabbedPane.appendTab(tabId, title, inspectorView, undefined, false, true);\n this.#tabbedPane.selectTab(tabId);\n }\n\n close(tabId: string): void {\n this.#tabbedPane.closeTab(tabId, false);\n }\n\n reveal(tabId: string, address?: number): void {\n const view = this.#tabView(tabId);\n\n if (address !== undefined) {\n view.updateAddress(address);\n }\n this.refreshView(tabId);\n this.#tabbedPane.selectTab(tabId);\n }\n\n refreshView(tabId: string): void {\n const view = this.#tabView(tabId);\n view.refreshData();\n }\n\n #tabClosed(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId} = event.data;\n this.dispatchEventToListeners(Events.ViewClosed, tabId);\n }\n}\n\nexport const enum Events {\n ViewClosed = 'ViewClosed',\n}\n\nexport type EventTypes = {\n [Events.ViewClosed]: string,\n};\n\nclass LinearMemoryInspectorView extends UI.Widget.VBox {\n #memoryWrapper: LazyUint8Array;\n #address: number;\n #tabId: string;\n #inspector: LinearMemoryInspectorComponents.LinearMemoryInspector.LinearMemoryInspector;\n firstTimeOpen: boolean;\n constructor(memoryWrapper: LazyUint8Array, address: number|undefined = 0, tabId: string) {\n super(false);\n\n if (address < 0 || address >= memoryWrapper.length()) {\n throw new Error('Requested address is out of bounds.');\n }\n\n this.#memoryWrapper = memoryWrapper;\n this.#address = address;\n this.#tabId = tabId;\n this.#inspector = new LinearMemoryInspectorComponents.LinearMemoryInspector.LinearMemoryInspector();\n this.#inspector.addEventListener(\n LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent.eventName,\n (event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent) => {\n this.#memoryRequested(event);\n });\n this.#inspector.addEventListener(\n LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent.eventName,\n (event: LinearMemoryInspectorComponents.LinearMemoryInspector.AddressChangedEvent) => {\n this.updateAddress(event.data);\n });\n this.#inspector.addEventListener(\n LinearMemoryInspectorComponents.LinearMemoryInspector.SettingsChangedEvent.eventName,\n (event: LinearMemoryInspectorComponents.LinearMemoryInspector.SettingsChangedEvent) => {\n // Stop event from bubbling up, since no element further up needs the event.\n event.stopPropagation();\n this.saveSettings(event.data);\n });\n this.#inspector.addEventListener(\n LinearMemoryInspectorComponents.LinearMemoryHighlightChipList.DeleteMemoryHighlightEvent.eventName,\n (event: LinearMemoryInspectorComponents.LinearMemoryHighlightChipList.DeleteMemoryHighlightEvent) => {\n LinearMemoryInspectorController.instance().removeHighlight(this.#tabId, event.data);\n this.refreshData();\n });\n this.contentElement.appendChild(this.#inspector);\n this.firstTimeOpen = true;\n }\n\n override wasShown(): void {\n this.refreshData();\n }\n\n saveSettings(settings: LinearMemoryInspectorComponents.LinearMemoryInspector.Settings): void {\n LinearMemoryInspectorController.instance().saveSettings(settings);\n }\n\n updateAddress(address: number): void {\n if (address < 0 || address >= this.#memoryWrapper.length()) {\n throw new Error('Requested address is out of bounds.');\n }\n this.#address = address;\n }\n\n refreshData(): void {\n void LinearMemoryInspectorController.getMemoryForAddress(this.#memoryWrapper, this.#address).then(({\n memory,\n offset,\n }) => {\n let valueTypes;\n let valueTypeModes;\n let endianness;\n if (this.firstTimeOpen) {\n const settings = LinearMemoryInspectorController.instance().loadSettings();\n valueTypes = settings.valueTypes;\n valueTypeModes = settings.modes;\n endianness = settings.endianness;\n this.firstTimeOpen = false;\n }\n this.#inspector.data = {\n memory,\n address: this.#address,\n memoryOffset: offset,\n outerMemoryLength: this.#memoryWrapper.length(),\n valueTypes,\n valueTypeModes,\n endianness,\n highlightInfo: this.#getHighlightInfo(),\n };\n });\n }\n\n #memoryRequested(event: LinearMemoryInspectorComponents.LinearMemoryInspector.MemoryRequestEvent): void {\n const {start, end, address} = event.data;\n if (address < start || address >= end) {\n throw new Error('Requested address is out of bounds.');\n }\n\n void LinearMemoryInspectorController.getMemoryRange(this.#memoryWrapper, start, end).then(memory => {\n this.#inspector.data = {\n memory: memory,\n address: address,\n memoryOffset: start,\n outerMemoryLength: this.#memoryWrapper.length(),\n highlightInfo: this.#getHighlightInfo(),\n };\n });\n }\n\n #getHighlightInfo(): LinearMemoryInspectorComponents.LinearMemoryViewerUtils.HighlightInfo|undefined {\n const highlightInfo = LinearMemoryInspectorController.instance().getHighlightInfo(this.#tabId);\n if (highlightInfo !== undefined) {\n if (highlightInfo.startAddress < 0 || highlightInfo.startAddress >= this.#memoryWrapper.length()) {\n throw new Error('HighlightInfo start address is out of bounds.');\n }\n if (highlightInfo.size <= 0) {\n throw new Error('Highlight size must be a positive number.');\n }\n }\n return highlightInfo;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.js b/public/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.js index 0579f43f5..e1b5ce40b 100644 --- a/public/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.js +++ b/public/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.js @@ -10,12 +10,12 @@ import linearMemoryHighlightChipListStyles from './linearMemoryHighlightChipList const UIStrings = { /** *@description Tooltip text that appears when hovering over an inspected variable's button in the Linear Memory Highlight Chip List. - Clicking the button changes the displayed slice of computer memory in the Linear Memory Inspector to contain the inspected variable's bytes. + Clicking the button changes the displayed slice of computer memory in the Linear Memory inspector to contain the inspected variable's bytes. */ jumpToAddress: 'Jump to this memory', /** *@description Tooltip text that appears when hovering over an inspected variable's delete button in the Linear Memory Highlight Chip List. - Clicking the delete button stops highlighting the variable's memory in the Linear Memory Inspector. + Clicking the delete button stops highlighting the variable's memory in the Linear Memory inspector. 'Memory' is a slice of bytes in the computer memory. */ deleteHighlight: 'Stop highlighting this memory', diff --git a/public/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.js.map b/public/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.js.map index 8cc67e18c..d931e2fe5 100644 --- a/public/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.js.map +++ b/public/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.js.map @@ -1 +1 @@ -{"version":3,"file":"LinearMemoryHighlightChipList.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,8CAA8C,CAAC;AAE9E,OAAO,mCAAmC,MAAM,wCAAwC,CAAC;AAGzF,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,aAAa,EAAE,qBAAqB;IACpC;;;;OAIG;IACH,eAAe,EAAE,+BAA+B;CACjD,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CACpC,4EAA4E,EAAE,SAAS,CAAC,CAAC;AAC7F,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACtE,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;AAO/B,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IACnD,MAAM,CAAU,SAAS,GAAG,uBAAuB,CAAC;IACpD,IAAI,CAAgB;IAEpB,YAAY,aAA4B;QACtC,KAAK,CAAC,0BAA0B,CAAC,SAAS,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;;AAGH,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,MAAM,CAAU,SAAS,GAAG,yBAAyB,CAAC;IACtD,IAA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AC,eAAe,CAC3C,4CAA4C,EAAE,6BAA6B,CAAC,CAAC","sourcesContent":["// Copyright (c) 2022 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport linearMemoryHighlightChipListStyles from './linearMemoryHighlightChipList.css.js';\nimport {type HighlightInfo} from './LinearMemoryViewerUtils.js';\n\nconst UIStrings = {\n /**\n *@description Tooltip text that appears when hovering over an inspected variable's button in the Linear Memory Highlight Chip List.\n Clicking the button changes the displayed slice of computer memory in the Linear Memory Inspector to contain the inspected variable's bytes.\n */\n jumpToAddress: 'Jump to this memory',\n /**\n *@description Tooltip text that appears when hovering over an inspected variable's delete button in the Linear Memory Highlight Chip List.\n Clicking the delete button stops highlighting the variable's memory in the Linear Memory Inspector.\n 'Memory' is a slice of bytes in the computer memory.\n */\n deleteHighlight: 'Stop highlighting this memory',\n};\nconst str_ = i18n.i18n.registerUIStrings(\n 'panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst {render, html} = LitHtml;\n\nexport interface LinearMemoryHighlightChipListData {\n highlightInfos: Array;\n focusedMemoryHighlight?: HighlightInfo;\n}\n\nexport class DeleteMemoryHighlightEvent extends Event {\n static readonly eventName = 'deletememoryhighlight';\n data: HighlightInfo;\n\n constructor(highlightInfo: HighlightInfo) {\n super(DeleteMemoryHighlightEvent.eventName, {bubbles: true, composed: true});\n this.data = highlightInfo;\n }\n}\n\nexport class JumpToHighlightedMemoryEvent extends Event {\n static readonly eventName = 'jumptohighlightedmemory';\n data: number;\n\n constructor(address: number) {\n super(JumpToHighlightedMemoryEvent.eventName);\n this.data = address;\n }\n}\n\nexport class LinearMemoryHighlightChipList extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-linear-memory-highlight-chip-list`;\n\n readonly #shadow = this.attachShadow({mode: 'open'});\n #highlightedAreas: HighlightInfo[] = [];\n #focusedMemoryHighlight?: HighlightInfo;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [linearMemoryHighlightChipListStyles];\n }\n\n set data(data: LinearMemoryHighlightChipListData) {\n this.#highlightedAreas = data.highlightInfos;\n this.#focusedMemoryHighlight = data.focusedMemoryHighlight;\n this.#render();\n }\n\n #render(): void {\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n const chips = [];\n for (const highlightInfo of this.#highlightedAreas) {\n chips.push(this.#createChip(highlightInfo));\n }\n const result = html`\n
\n ${chips}\n
\n `;\n render(result, this.#shadow, { host: this });\n // clang-format on\n }\n\n #createChip(highlightInfo: HighlightInfo): LitHtml.TemplateResult {\n const expressionName = highlightInfo.name || '';\n const expressionType = highlightInfo.type;\n const isFocused = highlightInfo === this.#focusedMemoryHighlight;\n const classMap = {\n focused: isFocused,\n 'highlight-chip': true,\n };\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n
\n \n
\n \n
\n
\n `;\n // clang-format off\n }\n\n #onJumpToHighlightClick(startAddress: number): void {\n this.dispatchEvent(new JumpToHighlightedMemoryEvent(startAddress));\n }\n\n #onDeleteHighlightClick(highlight:HighlightInfo): void {\n this.dispatchEvent(new DeleteMemoryHighlightEvent(highlight));\n }\n}\n\nComponentHelpers.CustomElements.defineComponent(\n 'devtools-linear-memory-highlight-chip-list', LinearMemoryHighlightChipList);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-linear-memory-highlight-chip-list': LinearMemoryHighlightChipList;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"LinearMemoryHighlightChipList.js","sourceRoot":"","sources":["../../../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rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport linearMemoryHighlightChipListStyles from './linearMemoryHighlightChipList.css.js';\nimport {type HighlightInfo} from './LinearMemoryViewerUtils.js';\n\nconst UIStrings = {\n /**\n *@description Tooltip text that appears when hovering over an inspected variable's button in the Linear Memory Highlight Chip List.\n Clicking the button changes the displayed slice of computer memory in the Linear Memory inspector to contain the inspected variable's bytes.\n */\n jumpToAddress: 'Jump to this memory',\n /**\n *@description Tooltip text that appears when hovering over an inspected variable's delete button in the Linear Memory Highlight Chip List.\n Clicking the delete button stops highlighting the variable's memory in the Linear Memory inspector.\n 'Memory' is a slice of bytes in the computer memory.\n */\n deleteHighlight: 'Stop highlighting this memory',\n};\nconst str_ = i18n.i18n.registerUIStrings(\n 'panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst {render, html} = LitHtml;\n\nexport interface LinearMemoryHighlightChipListData {\n highlightInfos: Array;\n focusedMemoryHighlight?: HighlightInfo;\n}\n\nexport class DeleteMemoryHighlightEvent extends Event {\n static readonly eventName = 'deletememoryhighlight';\n data: HighlightInfo;\n\n constructor(highlightInfo: HighlightInfo) {\n super(DeleteMemoryHighlightEvent.eventName, {bubbles: true, composed: true});\n this.data = highlightInfo;\n }\n}\n\nexport class JumpToHighlightedMemoryEvent extends Event {\n static readonly eventName = 'jumptohighlightedmemory';\n data: number;\n\n constructor(address: number) {\n super(JumpToHighlightedMemoryEvent.eventName);\n this.data = address;\n }\n}\n\nexport class LinearMemoryHighlightChipList extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-linear-memory-highlight-chip-list`;\n\n readonly #shadow = this.attachShadow({mode: 'open'});\n #highlightedAreas: HighlightInfo[] = [];\n #focusedMemoryHighlight?: HighlightInfo;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [linearMemoryHighlightChipListStyles];\n }\n\n set data(data: LinearMemoryHighlightChipListData) {\n this.#highlightedAreas = data.highlightInfos;\n this.#focusedMemoryHighlight = data.focusedMemoryHighlight;\n this.#render();\n }\n\n #render(): void {\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n const chips = [];\n for (const highlightInfo of this.#highlightedAreas) {\n chips.push(this.#createChip(highlightInfo));\n }\n const result = html`\n
\n ${chips}\n
\n `;\n render(result, this.#shadow, { host: this });\n // clang-format on\n }\n\n #createChip(highlightInfo: HighlightInfo): LitHtml.TemplateResult {\n const expressionName = highlightInfo.name || '';\n const expressionType = highlightInfo.type;\n const isFocused = highlightInfo === this.#focusedMemoryHighlight;\n const classMap = {\n focused: isFocused,\n 'highlight-chip': true,\n };\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n
\n \n
\n \n
\n
\n `;\n // clang-format off\n }\n\n #onJumpToHighlightClick(startAddress: number): void {\n this.dispatchEvent(new JumpToHighlightedMemoryEvent(startAddress));\n }\n\n #onDeleteHighlightClick(highlight:HighlightInfo): void {\n this.dispatchEvent(new DeleteMemoryHighlightEvent(highlight));\n }\n}\n\nComponentHelpers.CustomElements.defineComponent(\n 'devtools-linear-memory-highlight-chip-list', LinearMemoryHighlightChipList);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-linear-memory-highlight-chip-list': LinearMemoryHighlightChipList;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/linear_memory_inspector/components/LinearMemoryInspector.js b/public/panels/linear_memory_inspector/components/LinearMemoryInspector.js index 4499732af..ed7e89d9f 100644 --- a/public/panels/linear_memory_inspector/components/LinearMemoryInspector.js +++ b/public/panels/linear_memory_inspector/components/LinearMemoryInspector.js @@ -15,7 +15,7 @@ import { LinearMemoryViewer, } from './LinearMemoryViewer.js'; import { LinearMemoryHighlightChipList, } from './LinearMemoryHighlightChipList.js'; const UIStrings = { /** - *@description Tooltip text that appears when hovering over an invalid address in the address line in the Linear Memory Inspector + *@description Tooltip text that appears when hovering over an invalid address in the address line in the Linear memory inspector *@example {0x00000000} PH1 *@example {0x00400000} PH2 */ diff --git a/public/panels/linear_memory_inspector/components/LinearMemoryInspector.js.map b/public/panels/linear_memory_inspector/components/LinearMemoryInspector.js.map index 5ec402434..6f3d16de0 100644 --- a/public/panels/linear_memory_inspector/components/LinearMemoryInspector.js.map +++ b/public/panels/linear_memory_inspector/components/LinearMemoryInspector.js.map @@ -1 +1 @@ -{"version":3,"file":"LinearMemoryInspector.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAE5D,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AAEzE,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;AAE/B,OAAO,EAGL,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,4BAA4B,GAI7B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,8BAA8B,EAE9B,0BAA0B,GAG3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAE5E,OAAO,EACL,kBAAkB,GAInB,MAAM,yBAAyB,CAAC;AACjC,OAAO,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AAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,aAAa,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,gGAAgG;IAChG,yHAAyH;IACzH,yDAAyD;IACzD,EAAE;IACF,yFAAyF;IACzF,qGAAqG;IACrG,gCAAgC;IAChC,oCAAoC,CAAC,sBAAuC,EAAE,OAAe;QAE3F,IAAI,0BAA0B,CAAC;QAC/B,KAAK,MAAM,iBAAiB,IAAI,sBAAsB,EAAE;YACtD,IAAI,iBAAiB,CAAC,YAAY,IAAI,OAAO;gBACzC,OAAO,GAAG,iBAAiB,CAAC,YAAY,GAAG,iBAAiB,CAAC,IAAI,EAAE;gBACrE,IAAI,CAAC,0BAA0B,EAAE;oBAC/B,0BAA0B,GAAG,iBAAiB,CAAC;iBAChD;qBAAM,IAAI,iBAAiB,CAAC,IAAI,GAAG,0BAA0B,CAAC,IAAI,EAAE;oBACnE,0BAA0B,GAAG,iBAAiB,CAAC;iBAChD;aACF;SACF;QACD,OAAO,0BAA0B,CAAC;IACpC,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,4CAA4C,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../../core/common/common.js';\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\n\nimport linearMemoryInspectorStyles from './linearMemoryInspector.css.js';\n\nconst {render, html} = LitHtml;\n\nimport {\n Mode,\n Navigation,\n LinearMemoryNavigator,\n type AddressInputChangedEvent,\n type HistoryNavigationEvent,\n type LinearMemoryNavigatorData,\n type PageNavigationEvent,\n} from './LinearMemoryNavigator.js';\n\nimport {\n LinearMemoryValueInterpreter,\n type EndiannessChangedEvent,\n type LinearMemoryValueInterpreterData,\n type ValueTypeToggledEvent,\n} from './LinearMemoryValueInterpreter.js';\n\nimport {\n VALUE_INTEPRETER_MAX_NUM_BYTES,\n Endianness,\n getDefaultValueTypeMapping,\n type ValueType,\n type ValueTypeMode,\n} from './ValueInterpreterDisplayUtils.js';\nimport {formatAddress, parseAddress} from './LinearMemoryInspectorUtils.js';\nimport {type JumpToPointerAddressEvent, type ValueTypeModeChangedEvent} from './ValueInterpreterDisplay.js';\nimport {\n LinearMemoryViewer,\n type ByteSelectedEvent,\n type LinearMemoryViewerData,\n type ResizeEvent,\n} from './LinearMemoryViewer.js';\nimport {\n LinearMemoryHighlightChipList,\n type LinearMemoryHighlightChipListData,\n type DeleteMemoryHighlightEvent,\n type JumpToHighlightedMemoryEvent,\n} from './LinearMemoryHighlightChipList.js';\nimport {type HighlightInfo} from './LinearMemoryViewerUtils.js';\n\nconst UIStrings = {\n /**\n *@description Tooltip text that appears when hovering over an invalid address in the address line in the Linear Memory Inspector\n *@example {0x00000000} PH1\n *@example {0x00400000} PH2\n */\n addressHasToBeANumberBetweenSAnd: 'Address has to be a number between {PH1} and {PH2}',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/components/LinearMemoryInspector.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n// If the LinearMemoryInspector only receives a portion\n// of the original Uint8Array to show, it requires information\n// on the 1. memoryOffset (at which index this portion starts),\n// and on the 2. outerMemoryLength (length of the original Uint8Array).\nexport interface LinearMemoryInspectorData {\n memory: Uint8Array;\n address: number;\n memoryOffset: number;\n outerMemoryLength: number;\n valueTypes?: Set;\n valueTypeModes?: Map;\n endianness?: Endianness;\n highlightInfo?: HighlightInfo;\n}\n\nexport type Settings = {\n valueTypes: Set,\n modes: Map,\n endianness: Endianness,\n};\n\nexport class MemoryRequestEvent extends Event {\n static readonly eventName = 'memoryrequest';\n data: {start: number, end: number, address: number};\n\n constructor(start: number, end: number, address: number) {\n super(MemoryRequestEvent.eventName);\n this.data = {start, end, address};\n }\n}\n\nexport class AddressChangedEvent extends Event {\n static readonly eventName = 'addresschanged';\n data: number;\n\n constructor(address: number) {\n super(AddressChangedEvent.eventName);\n this.data = address;\n }\n}\n\nexport class SettingsChangedEvent extends Event {\n static readonly eventName = 'settingschanged';\n data: Settings;\n\n constructor(settings: Settings) {\n super(SettingsChangedEvent.eventName);\n this.data = settings;\n }\n}\n\nclass AddressHistoryEntry implements Common.SimpleHistoryManager.HistoryEntry {\n #address = 0;\n #callback;\n\n constructor(address: number, callback: (x: number) => void) {\n if (address < 0) {\n throw new Error('Address should be a greater or equal to zero');\n }\n this.#address = address;\n this.#callback = callback;\n }\n\n valid(): boolean {\n return true;\n }\n\n reveal(): void {\n this.#callback(this.#address);\n }\n}\n\nexport class LinearMemoryInspector extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-inspector`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n readonly #history = new Common.SimpleHistoryManager.SimpleHistoryManager(10);\n\n #memory = new Uint8Array();\n #memoryOffset = 0;\n #outerMemoryLength = 0;\n\n #address = -1;\n #highlightInfo?: HighlightInfo;\n\n #currentNavigatorMode = Mode.Submitted;\n #currentNavigatorAddressLine = `${this.#address}`;\n\n #numBytesPerPage = 4;\n\n #valueTypeModes = getDefaultValueTypeMapping();\n #valueTypes = new Set(this.#valueTypeModes.keys());\n #endianness = Endianness.Little;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [linearMemoryInspectorStyles];\n }\n\n set data(data: LinearMemoryInspectorData) {\n if (data.address < data.memoryOffset || data.address > data.memoryOffset + data.memory.length || data.address < 0) {\n throw new Error('Address is out of bounds.');\n }\n\n if (data.memoryOffset < 0) {\n throw new Error('Memory offset has to be greater or equal to zero.');\n }\n\n if (data.highlightInfo) {\n if (data.highlightInfo.size < 0) {\n throw new Error('Object size has to be greater than or equal to zero');\n }\n if (data.highlightInfo.startAddress < 0 || data.highlightInfo.startAddress >= data.outerMemoryLength) {\n throw new Error('Object start address is out of bounds.');\n }\n }\n\n this.#memory = data.memory;\n this.#memoryOffset = data.memoryOffset;\n this.#outerMemoryLength = data.outerMemoryLength;\n this.#valueTypeModes = data.valueTypeModes || this.#valueTypeModes;\n this.#valueTypes = data.valueTypes || this.#valueTypes;\n this.#endianness = data.endianness || this.#endianness;\n this.#highlightInfo = data.highlightInfo;\n this.#setAddress(data.address);\n this.#render();\n }\n\n #render(): void {\n const {start, end} = this.#getPageRangeForAddress(this.#address, this.#numBytesPerPage);\n\n const navigatorAddressToShow = this.#currentNavigatorMode === Mode.Submitted ? formatAddress(this.#address) :\n this.#currentNavigatorAddressLine;\n const navigatorAddressIsValid = this.#isValidAddress(navigatorAddressToShow);\n\n const invalidAddressMsg = i18nString(\n UIStrings.addressHasToBeANumberBetweenSAnd,\n {PH1: formatAddress(0), PH2: formatAddress(this.#outerMemoryLength)});\n\n const errorMsg = navigatorAddressIsValid ? undefined : invalidAddressMsg;\n\n const canGoBackInHistory = this.#history.canRollback();\n const canGoForwardInHistory = this.#history.canRollover();\n\n const highlightedMemoryAreas = this.#highlightInfo ? [this.#highlightInfo] : [];\n const focusedMemoryHighlight = this.#getSmallestEnclosingMemoryHighlight(highlightedMemoryAreas, this.#address);\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n render(html`\n
\n <${LinearMemoryNavigator.litTagName}\n .data=${{address: navigatorAddressToShow, valid: navigatorAddressIsValid, mode: this.#currentNavigatorMode, error: errorMsg, canGoBackInHistory, canGoForwardInHistory} as LinearMemoryNavigatorData}\n @refreshrequested=${this.#onRefreshRequest}\n @addressinputchanged=${this.#onAddressChange}\n @pagenavigation=${this.#navigatePage}\n @historynavigation=${this.#navigateHistory}>\n <${LinearMemoryHighlightChipList.litTagName}\n .data=${{highlightInfos: highlightedMemoryAreas, focusedMemoryHighlight: focusedMemoryHighlight } as LinearMemoryHighlightChipListData}\n @jumptohighlightedmemory=${this.#onJumpToAddress}>\n \n <${LinearMemoryViewer.litTagName}\n .data=${{\n memory: this.#memory.slice(start - this.#memoryOffset,\n end - this.#memoryOffset),\n address: this.#address, memoryOffset: start,\n focus: this.#currentNavigatorMode === Mode.Submitted,\n highlightInfo: this.#highlightInfo,\n focusedMemoryHighlight: focusedMemoryHighlight } as LinearMemoryViewerData}\n @byteselected=${this.#onByteSelected}\n @resize=${this.#resize}>\n \n
\n
\n <${LinearMemoryValueInterpreter.litTagName}\n .data=${{\n value: this.#memory.slice(this.#address - this.#memoryOffset, this.#address + VALUE_INTEPRETER_MAX_NUM_BYTES).buffer,\n valueTypes: this.#valueTypes,\n valueTypeModes: this.#valueTypeModes,\n endianness: this.#endianness,\n memoryLength: this.#outerMemoryLength } as LinearMemoryValueInterpreterData}\n @valuetypetoggled=${this.#onValueTypeToggled}\n @valuetypemodechanged=${this.#onValueTypeModeChanged}\n @endiannesschanged=${this.#onEndiannessChanged}\n @jumptopointeraddress=${this.#onJumpToAddress}\n >\n \n
\n `, this.#shadow, {\n host: this,\n });\n // clang-format on\n }\n\n #onJumpToAddress(e: JumpToPointerAddressEvent|JumpToHighlightedMemoryEvent): void {\n // Stop event from bubbling up, since no element further up needs the event.\n e.stopPropagation();\n this.#currentNavigatorMode = Mode.Submitted;\n const addressInRange = Math.max(0, Math.min(e.data, this.#outerMemoryLength - 1));\n this.#jumpToAddress(addressInRange);\n }\n\n #onRefreshRequest(): void {\n const {start, end} = this.#getPageRangeForAddress(this.#address, this.#numBytesPerPage);\n this.dispatchEvent(new MemoryRequestEvent(start, end, this.#address));\n }\n\n #onByteSelected(e: ByteSelectedEvent): void {\n this.#currentNavigatorMode = Mode.Submitted;\n const addressInRange = Math.max(0, Math.min(e.data, this.#outerMemoryLength - 1));\n this.#jumpToAddress(addressInRange);\n }\n\n #createSettings(): Settings {\n return {valueTypes: this.#valueTypes, modes: this.#valueTypeModes, endianness: this.#endianness};\n }\n\n #onEndiannessChanged(e: EndiannessChangedEvent): void {\n this.#endianness = e.data;\n this.dispatchEvent(new SettingsChangedEvent(this.#createSettings()));\n this.#render();\n }\n\n #isValidAddress(address: string): boolean {\n const newAddress = parseAddress(address);\n return newAddress !== undefined && newAddress >= 0 && newAddress < this.#outerMemoryLength;\n }\n\n #onAddressChange(e: AddressInputChangedEvent): void {\n const {address, mode} = e.data;\n const isValid = this.#isValidAddress(address);\n const newAddress = parseAddress(address);\n this.#currentNavigatorAddressLine = address;\n\n if (newAddress !== undefined && isValid) {\n this.#currentNavigatorMode = mode;\n this.#jumpToAddress(newAddress);\n return;\n }\n\n if (mode === Mode.Submitted && !isValid) {\n this.#currentNavigatorMode = Mode.InvalidSubmit;\n } else {\n this.#currentNavigatorMode = Mode.Edit;\n }\n\n this.#render();\n }\n\n #onValueTypeToggled(e: ValueTypeToggledEvent): void {\n const {type, checked} = e.data;\n if (checked) {\n this.#valueTypes.add(type);\n } else {\n this.#valueTypes.delete(type);\n }\n this.dispatchEvent(new SettingsChangedEvent(this.#createSettings()));\n this.#render();\n }\n\n #onValueTypeModeChanged(e: ValueTypeModeChangedEvent): void {\n e.stopImmediatePropagation();\n const {type, mode} = e.data;\n this.#valueTypeModes.set(type, mode);\n this.dispatchEvent(new SettingsChangedEvent(this.#createSettings()));\n this.#render();\n }\n\n #navigateHistory(e: HistoryNavigationEvent): boolean {\n return e.data === Navigation.Forward ? this.#history.rollover() : this.#history.rollback();\n }\n\n #navigatePage(e: PageNavigationEvent): void {\n const newAddress =\n e.data === Navigation.Forward ? this.#address + this.#numBytesPerPage : this.#address - this.#numBytesPerPage;\n const addressInRange = Math.max(0, Math.min(newAddress, this.#outerMemoryLength - 1));\n this.#jumpToAddress(addressInRange);\n }\n\n #jumpToAddress(address: number): void {\n if (address < 0 || address >= this.#outerMemoryLength) {\n console.warn(`Specified address is out of bounds: ${address}`);\n return;\n }\n this.#setAddress(address);\n this.#update();\n }\n\n #getPageRangeForAddress(address: number, numBytesPerPage: number): {start: number, end: number} {\n const pageNumber = Math.floor(address / numBytesPerPage);\n const pageStartAddress = pageNumber * numBytesPerPage;\n const pageEndAddress = Math.min(pageStartAddress + numBytesPerPage, this.#outerMemoryLength);\n return {start: pageStartAddress, end: pageEndAddress};\n }\n\n #resize(event: ResizeEvent): void {\n this.#numBytesPerPage = event.data;\n this.#update();\n }\n\n #update(): void {\n const {start, end} = this.#getPageRangeForAddress(this.#address, this.#numBytesPerPage);\n if (start < this.#memoryOffset || end > this.#memoryOffset + this.#memory.length) {\n this.dispatchEvent(new MemoryRequestEvent(start, end, this.#address));\n } else {\n this.#render();\n }\n }\n\n #setAddress(address: number): void {\n // If we are already showing the address that is requested, no need to act upon it.\n if (this.#address === address) {\n return;\n }\n const historyEntry = new AddressHistoryEntry(address, () => this.#jumpToAddress(address));\n this.#history.push(historyEntry);\n this.#address = address;\n this.dispatchEvent(new AddressChangedEvent(this.#address));\n }\n\n // Returns the highlightInfo with the smallest size property that encloses the provided address.\n // If there are multiple smallest enclosing highlights, we pick the one appearing the earliest in highlightedMemoryAreas.\n // If no such highlightInfo exists, it returns undefined.\n //\n // Selecting the smallest enclosing memory highlight is a heuristic that aims to pick the\n // most specific highlight given a provided address. This way, objects contained in other objects are\n // potentially still accessible.\n #getSmallestEnclosingMemoryHighlight(highlightedMemoryAreas: HighlightInfo[], address: number): HighlightInfo\n |undefined {\n let smallestEnclosingHighlight;\n for (const highlightedMemory of highlightedMemoryAreas) {\n if (highlightedMemory.startAddress <= address &&\n address < highlightedMemory.startAddress + highlightedMemory.size) {\n if (!smallestEnclosingHighlight) {\n smallestEnclosingHighlight = highlightedMemory;\n } else if (highlightedMemory.size < smallestEnclosingHighlight.size) {\n smallestEnclosingHighlight = highlightedMemory;\n }\n }\n }\n return smallestEnclosingHighlight;\n }\n}\n\nComponentHelpers.CustomElements.defineComponent('devtools-linear-memory-inspector-inspector', LinearMemoryInspector);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'devtools-linear-memory-inspector-inspector': LinearMemoryInspector;\n }\n\n interface HTMLElementEventMap {\n 'memoryrequest': MemoryRequestEvent;\n 'addresschanged': AddressChangedEvent;\n 'settingschanged': SettingsChangedEvent;\n 'deletememoryhighlight': DeleteMemoryHighlightEvent;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"LinearMemoryInspector.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAE5D,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AAEzE,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;AAE/B,OAAO,EAGL,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,4BAA4B,GAI7B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,8BAA8B,EAE9B,0BAA0B,GAG3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAE5E,OAAO,EACL,kBAAkB,GAInB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,6BAA6B,GAI9B,MAAM,oCAAoC,CAAC;AAG5C,MAAM,SAAS,GAAG;IAChB;;;;OAIG;IACH,gCAAgC,EAAE,oDAAoD;CACvF,CAAC;AACF,MAAM,IAAI,GACN,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,oEAAoE,EAAE,SAAS,CAAC,CAAC;AACjH,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAsBtE,MAAM,OAAO,kBAA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IAAI,iBAAiB,CAAC,YAAY,IAAI,OAAO;gBACzC,OAAO,GAAG,iBAAiB,CAAC,YAAY,GAAG,iBAAiB,CAAC,IAAI,EAAE;gBACrE,IAAI,CAAC,0BAA0B,EAAE;oBAC/B,0BAA0B,GAAG,iBAAiB,CAAC;iBAChD;qBAAM,IAAI,iBAAiB,CAAC,IAAI,GAAG,0BAA0B,CAAC,IAAI,EAAE;oBACnE,0BAA0B,GAAG,iBAAiB,CAAC;iBAChD;aACF;SACF;QACD,OAAO,0BAA0B,CAAC;IACpC,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,4CAA4C,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../../core/common/common.js';\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\n\nimport linearMemoryInspectorStyles from './linearMemoryInspector.css.js';\n\nconst {render, html} = LitHtml;\n\nimport {\n Mode,\n Navigation,\n LinearMemoryNavigator,\n type AddressInputChangedEvent,\n type HistoryNavigationEvent,\n type LinearMemoryNavigatorData,\n type PageNavigationEvent,\n} from './LinearMemoryNavigator.js';\n\nimport {\n LinearMemoryValueInterpreter,\n type EndiannessChangedEvent,\n type LinearMemoryValueInterpreterData,\n type ValueTypeToggledEvent,\n} from './LinearMemoryValueInterpreter.js';\n\nimport {\n VALUE_INTEPRETER_MAX_NUM_BYTES,\n Endianness,\n getDefaultValueTypeMapping,\n type ValueType,\n type ValueTypeMode,\n} from './ValueInterpreterDisplayUtils.js';\nimport {formatAddress, parseAddress} from './LinearMemoryInspectorUtils.js';\nimport {type JumpToPointerAddressEvent, type ValueTypeModeChangedEvent} from './ValueInterpreterDisplay.js';\nimport {\n LinearMemoryViewer,\n type ByteSelectedEvent,\n type LinearMemoryViewerData,\n type ResizeEvent,\n} from './LinearMemoryViewer.js';\nimport {\n LinearMemoryHighlightChipList,\n type LinearMemoryHighlightChipListData,\n type DeleteMemoryHighlightEvent,\n type JumpToHighlightedMemoryEvent,\n} from './LinearMemoryHighlightChipList.js';\nimport {type HighlightInfo} from './LinearMemoryViewerUtils.js';\n\nconst UIStrings = {\n /**\n *@description Tooltip text that appears when hovering over an invalid address in the address line in the Linear memory inspector\n *@example {0x00000000} PH1\n *@example {0x00400000} PH2\n */\n addressHasToBeANumberBetweenSAnd: 'Address has to be a number between {PH1} and {PH2}',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/components/LinearMemoryInspector.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n// If the LinearMemoryInspector only receives a portion\n// of the original Uint8Array to show, it requires information\n// on the 1. memoryOffset (at which index this portion starts),\n// and on the 2. outerMemoryLength (length of the original Uint8Array).\nexport interface LinearMemoryInspectorData {\n memory: Uint8Array;\n address: number;\n memoryOffset: number;\n outerMemoryLength: number;\n valueTypes?: Set;\n valueTypeModes?: Map;\n endianness?: Endianness;\n highlightInfo?: HighlightInfo;\n}\n\nexport type Settings = {\n valueTypes: Set,\n modes: Map,\n endianness: Endianness,\n};\n\nexport class MemoryRequestEvent extends Event {\n static readonly eventName = 'memoryrequest';\n data: {start: number, end: number, address: number};\n\n constructor(start: number, end: number, address: number) {\n super(MemoryRequestEvent.eventName);\n this.data = {start, end, address};\n }\n}\n\nexport class AddressChangedEvent extends Event {\n static readonly eventName = 'addresschanged';\n data: number;\n\n constructor(address: number) {\n super(AddressChangedEvent.eventName);\n this.data = address;\n }\n}\n\nexport class SettingsChangedEvent extends Event {\n static readonly eventName = 'settingschanged';\n data: Settings;\n\n constructor(settings: Settings) {\n super(SettingsChangedEvent.eventName);\n this.data = settings;\n }\n}\n\nclass AddressHistoryEntry implements Common.SimpleHistoryManager.HistoryEntry {\n #address = 0;\n #callback;\n\n constructor(address: number, callback: (x: number) => void) {\n if (address < 0) {\n throw new Error('Address should be a greater or equal to zero');\n }\n this.#address = address;\n this.#callback = callback;\n }\n\n valid(): boolean {\n return true;\n }\n\n reveal(): void {\n this.#callback(this.#address);\n }\n}\n\nexport class LinearMemoryInspector extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-inspector`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n readonly #history = new Common.SimpleHistoryManager.SimpleHistoryManager(10);\n\n #memory = new Uint8Array();\n #memoryOffset = 0;\n #outerMemoryLength = 0;\n\n #address = -1;\n #highlightInfo?: HighlightInfo;\n\n #currentNavigatorMode = Mode.Submitted;\n #currentNavigatorAddressLine = `${this.#address}`;\n\n #numBytesPerPage = 4;\n\n #valueTypeModes = getDefaultValueTypeMapping();\n #valueTypes = new Set(this.#valueTypeModes.keys());\n #endianness = Endianness.Little;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [linearMemoryInspectorStyles];\n }\n\n set data(data: LinearMemoryInspectorData) {\n if (data.address < data.memoryOffset || data.address > data.memoryOffset + data.memory.length || data.address < 0) {\n throw new Error('Address is out of bounds.');\n }\n\n if (data.memoryOffset < 0) {\n throw new Error('Memory offset has to be greater or equal to zero.');\n }\n\n if (data.highlightInfo) {\n if (data.highlightInfo.size < 0) {\n throw new Error('Object size has to be greater than or equal to zero');\n }\n if (data.highlightInfo.startAddress < 0 || data.highlightInfo.startAddress >= data.outerMemoryLength) {\n throw new Error('Object start address is out of bounds.');\n }\n }\n\n this.#memory = data.memory;\n this.#memoryOffset = data.memoryOffset;\n this.#outerMemoryLength = data.outerMemoryLength;\n this.#valueTypeModes = data.valueTypeModes || this.#valueTypeModes;\n this.#valueTypes = data.valueTypes || this.#valueTypes;\n this.#endianness = data.endianness || this.#endianness;\n this.#highlightInfo = data.highlightInfo;\n this.#setAddress(data.address);\n this.#render();\n }\n\n #render(): void {\n const {start, end} = this.#getPageRangeForAddress(this.#address, this.#numBytesPerPage);\n\n const navigatorAddressToShow = this.#currentNavigatorMode === Mode.Submitted ? formatAddress(this.#address) :\n this.#currentNavigatorAddressLine;\n const navigatorAddressIsValid = this.#isValidAddress(navigatorAddressToShow);\n\n const invalidAddressMsg = i18nString(\n UIStrings.addressHasToBeANumberBetweenSAnd,\n {PH1: formatAddress(0), PH2: formatAddress(this.#outerMemoryLength)});\n\n const errorMsg = navigatorAddressIsValid ? undefined : invalidAddressMsg;\n\n const canGoBackInHistory = this.#history.canRollback();\n const canGoForwardInHistory = this.#history.canRollover();\n\n const highlightedMemoryAreas = this.#highlightInfo ? [this.#highlightInfo] : [];\n const focusedMemoryHighlight = this.#getSmallestEnclosingMemoryHighlight(highlightedMemoryAreas, this.#address);\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n render(html`\n
\n <${LinearMemoryNavigator.litTagName}\n .data=${{address: navigatorAddressToShow, valid: navigatorAddressIsValid, mode: this.#currentNavigatorMode, error: errorMsg, canGoBackInHistory, canGoForwardInHistory} as LinearMemoryNavigatorData}\n @refreshrequested=${this.#onRefreshRequest}\n @addressinputchanged=${this.#onAddressChange}\n @pagenavigation=${this.#navigatePage}\n @historynavigation=${this.#navigateHistory}>\n <${LinearMemoryHighlightChipList.litTagName}\n .data=${{highlightInfos: highlightedMemoryAreas, focusedMemoryHighlight: focusedMemoryHighlight } as LinearMemoryHighlightChipListData}\n @jumptohighlightedmemory=${this.#onJumpToAddress}>\n \n <${LinearMemoryViewer.litTagName}\n .data=${{\n memory: this.#memory.slice(start - this.#memoryOffset,\n end - this.#memoryOffset),\n address: this.#address, memoryOffset: start,\n focus: this.#currentNavigatorMode === Mode.Submitted,\n highlightInfo: this.#highlightInfo,\n focusedMemoryHighlight: focusedMemoryHighlight } as LinearMemoryViewerData}\n @byteselected=${this.#onByteSelected}\n @resize=${this.#resize}>\n \n
\n
\n <${LinearMemoryValueInterpreter.litTagName}\n .data=${{\n value: this.#memory.slice(this.#address - this.#memoryOffset, this.#address + VALUE_INTEPRETER_MAX_NUM_BYTES).buffer,\n valueTypes: this.#valueTypes,\n valueTypeModes: this.#valueTypeModes,\n endianness: this.#endianness,\n memoryLength: this.#outerMemoryLength } as LinearMemoryValueInterpreterData}\n @valuetypetoggled=${this.#onValueTypeToggled}\n @valuetypemodechanged=${this.#onValueTypeModeChanged}\n @endiannesschanged=${this.#onEndiannessChanged}\n @jumptopointeraddress=${this.#onJumpToAddress}\n >\n \n
\n `, this.#shadow, {\n host: this,\n });\n // clang-format on\n }\n\n #onJumpToAddress(e: JumpToPointerAddressEvent|JumpToHighlightedMemoryEvent): void {\n // Stop event from bubbling up, since no element further up needs the event.\n e.stopPropagation();\n this.#currentNavigatorMode = Mode.Submitted;\n const addressInRange = Math.max(0, Math.min(e.data, this.#outerMemoryLength - 1));\n this.#jumpToAddress(addressInRange);\n }\n\n #onRefreshRequest(): void {\n const {start, end} = this.#getPageRangeForAddress(this.#address, this.#numBytesPerPage);\n this.dispatchEvent(new MemoryRequestEvent(start, end, this.#address));\n }\n\n #onByteSelected(e: ByteSelectedEvent): void {\n this.#currentNavigatorMode = Mode.Submitted;\n const addressInRange = Math.max(0, Math.min(e.data, this.#outerMemoryLength - 1));\n this.#jumpToAddress(addressInRange);\n }\n\n #createSettings(): Settings {\n return {valueTypes: this.#valueTypes, modes: this.#valueTypeModes, endianness: this.#endianness};\n }\n\n #onEndiannessChanged(e: EndiannessChangedEvent): void {\n this.#endianness = e.data;\n this.dispatchEvent(new SettingsChangedEvent(this.#createSettings()));\n this.#render();\n }\n\n #isValidAddress(address: string): boolean {\n const newAddress = parseAddress(address);\n return newAddress !== undefined && newAddress >= 0 && newAddress < this.#outerMemoryLength;\n }\n\n #onAddressChange(e: AddressInputChangedEvent): void {\n const {address, mode} = e.data;\n const isValid = this.#isValidAddress(address);\n const newAddress = parseAddress(address);\n this.#currentNavigatorAddressLine = address;\n\n if (newAddress !== undefined && isValid) {\n this.#currentNavigatorMode = mode;\n this.#jumpToAddress(newAddress);\n return;\n }\n\n if (mode === Mode.Submitted && !isValid) {\n this.#currentNavigatorMode = Mode.InvalidSubmit;\n } else {\n this.#currentNavigatorMode = Mode.Edit;\n }\n\n this.#render();\n }\n\n #onValueTypeToggled(e: ValueTypeToggledEvent): void {\n const {type, checked} = e.data;\n if (checked) {\n this.#valueTypes.add(type);\n } else {\n this.#valueTypes.delete(type);\n }\n this.dispatchEvent(new SettingsChangedEvent(this.#createSettings()));\n this.#render();\n }\n\n #onValueTypeModeChanged(e: ValueTypeModeChangedEvent): void {\n e.stopImmediatePropagation();\n const {type, mode} = e.data;\n this.#valueTypeModes.set(type, mode);\n this.dispatchEvent(new SettingsChangedEvent(this.#createSettings()));\n this.#render();\n }\n\n #navigateHistory(e: HistoryNavigationEvent): boolean {\n return e.data === Navigation.Forward ? this.#history.rollover() : this.#history.rollback();\n }\n\n #navigatePage(e: PageNavigationEvent): void {\n const newAddress =\n e.data === Navigation.Forward ? this.#address + this.#numBytesPerPage : this.#address - this.#numBytesPerPage;\n const addressInRange = Math.max(0, Math.min(newAddress, this.#outerMemoryLength - 1));\n this.#jumpToAddress(addressInRange);\n }\n\n #jumpToAddress(address: number): void {\n if (address < 0 || address >= this.#outerMemoryLength) {\n console.warn(`Specified address is out of bounds: ${address}`);\n return;\n }\n this.#setAddress(address);\n this.#update();\n }\n\n #getPageRangeForAddress(address: number, numBytesPerPage: number): {start: number, end: number} {\n const pageNumber = Math.floor(address / numBytesPerPage);\n const pageStartAddress = pageNumber * numBytesPerPage;\n const pageEndAddress = Math.min(pageStartAddress + numBytesPerPage, this.#outerMemoryLength);\n return {start: pageStartAddress, end: pageEndAddress};\n }\n\n #resize(event: ResizeEvent): void {\n this.#numBytesPerPage = event.data;\n this.#update();\n }\n\n #update(): void {\n const {start, end} = this.#getPageRangeForAddress(this.#address, this.#numBytesPerPage);\n if (start < this.#memoryOffset || end > this.#memoryOffset + this.#memory.length) {\n this.dispatchEvent(new MemoryRequestEvent(start, end, this.#address));\n } else {\n this.#render();\n }\n }\n\n #setAddress(address: number): void {\n // If we are already showing the address that is requested, no need to act upon it.\n if (this.#address === address) {\n return;\n }\n const historyEntry = new AddressHistoryEntry(address, () => this.#jumpToAddress(address));\n this.#history.push(historyEntry);\n this.#address = address;\n this.dispatchEvent(new AddressChangedEvent(this.#address));\n }\n\n // Returns the highlightInfo with the smallest size property that encloses the provided address.\n // If there are multiple smallest enclosing highlights, we pick the one appearing the earliest in highlightedMemoryAreas.\n // If no such highlightInfo exists, it returns undefined.\n //\n // Selecting the smallest enclosing memory highlight is a heuristic that aims to pick the\n // most specific highlight given a provided address. This way, objects contained in other objects are\n // potentially still accessible.\n #getSmallestEnclosingMemoryHighlight(highlightedMemoryAreas: HighlightInfo[], address: number): HighlightInfo\n |undefined {\n let smallestEnclosingHighlight;\n for (const highlightedMemory of highlightedMemoryAreas) {\n if (highlightedMemory.startAddress <= address &&\n address < highlightedMemory.startAddress + highlightedMemory.size) {\n if (!smallestEnclosingHighlight) {\n smallestEnclosingHighlight = highlightedMemory;\n } else if (highlightedMemory.size < smallestEnclosingHighlight.size) {\n smallestEnclosingHighlight = highlightedMemory;\n }\n }\n }\n return smallestEnclosingHighlight;\n }\n}\n\nComponentHelpers.CustomElements.defineComponent('devtools-linear-memory-inspector-inspector', LinearMemoryInspector);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'devtools-linear-memory-inspector-inspector': LinearMemoryInspector;\n }\n\n interface HTMLElementEventMap {\n 'memoryrequest': MemoryRequestEvent;\n 'addresschanged': AddressChangedEvent;\n 'settingschanged': SettingsChangedEvent;\n 'deletememoryhighlight': DeleteMemoryHighlightEvent;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/linear_memory_inspector/components/LinearMemoryNavigator.js b/public/panels/linear_memory_inspector/components/LinearMemoryNavigator.js index 7a7f4b9a1..5141b88bb 100644 --- a/public/panels/linear_memory_inspector/components/LinearMemoryNavigator.js +++ b/public/panels/linear_memory_inspector/components/LinearMemoryNavigator.js @@ -9,7 +9,7 @@ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js'; import linearMemoryNavigatorStyles from './linearMemoryNavigator.css.js'; const UIStrings = { /** - *@description Tooltip text that appears when hovering over a valid memory address (e.g. 0x0) in the address line in the Linear Memory Inspector. + *@description Tooltip text that appears when hovering over a valid memory address (e.g. 0x0) in the address line in the Linear memory inspector. */ enterAddress: 'Enter address', /** diff --git a/public/panels/linear_memory_inspector/components/LinearMemoryNavigator.js.map b/public/panels/linear_memory_inspector/components/LinearMemoryNavigator.js.map index f896414ee..fcfee67e8 100644 --- a/public/panels/linear_memory_inspector/components/LinearMemoryNavigator.js.map +++ b/public/panels/linear_memory_inspector/components/LinearMemoryNavigator.js.map @@ -1 +1 @@ -{"version":3,"file":"LinearMemoryNavigator.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,8CAA8C,CAAC;AAE9E,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AAEzE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,YAAY,EAAE,eAAe;IAC7B;;OAEG;IACH,sBAAsB,EAAE,4BAA4B;IACpD;;OAEG;IACH,yBAAyB,EAAE,+BAA+B;IAC1D;;OAEG;IACH,YAAY,EAAE,eAAe;IAC7B;;OAEG;IACH,QAAQ,EAAE,WAAW;IACrB;;OAEG;IACH,OAAO,EAAE,SAAS;CACnB,CAAC;AACF,MAAM,IAAI,GACN,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,oEAAoE,EAAE,SAAS,CAAC,CAAC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B,CAAC;IACf,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,4CAA4C,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport linearMemoryNavigatorStyles from './linearMemoryNavigator.css.js';\n\nconst UIStrings = {\n /**\n *@description Tooltip text that appears when hovering over a valid memory address (e.g. 0x0) in the address line in the Linear Memory Inspector.\n */\n enterAddress: 'Enter address',\n /**\n *@description Tooltip text that appears when hovering over the button to go back in history in the Linear Memory Navigator\n */\n goBackInAddressHistory: 'Go back in address history',\n /**\n *@description Tooltip text that appears when hovering over the button to go forward in history in the Linear Memory Navigator\n */\n goForwardInAddressHistory: 'Go forward in address history',\n /**\n *@description Tooltip text that appears when hovering over the page back icon in the Linear Memory Navigator\n */\n previousPage: 'Previous page',\n /**\n *@description Tooltip text that appears when hovering over the next page icon in the Linear Memory Navigator\n */\n nextPage: 'Next page',\n /**\n *@description Text to refresh the page\n */\n refresh: 'Refresh',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/components/LinearMemoryNavigator.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst {render, html} = LitHtml;\n\nexport const enum Navigation {\n Backward = 'Backward',\n Forward = 'Forward',\n}\n\nexport class AddressInputChangedEvent extends Event {\n static readonly eventName = 'addressinputchanged';\n data: {address: string, mode: Mode};\n\n constructor(address: string, mode: Mode) {\n super(AddressInputChangedEvent.eventName);\n this.data = {address, mode};\n }\n}\n\nexport class PageNavigationEvent extends Event {\n static readonly eventName = 'pagenavigation';\n data: Navigation;\n\n constructor(navigation: Navigation) {\n super(PageNavigationEvent.eventName, {});\n this.data = navigation;\n }\n}\n\nexport class HistoryNavigationEvent extends Event {\n static readonly eventName = 'historynavigation';\n data: Navigation;\n\n constructor(navigation: Navigation) {\n super(HistoryNavigationEvent.eventName, {});\n this.data = navigation;\n }\n}\n\nexport class RefreshRequestedEvent extends Event {\n static readonly eventName = 'refreshrequested';\n constructor() {\n super(RefreshRequestedEvent.eventName, {});\n }\n}\n\nexport interface LinearMemoryNavigatorData {\n address: string;\n mode: Mode;\n canGoBackInHistory: boolean;\n canGoForwardInHistory: boolean;\n valid: boolean;\n error: string|undefined;\n}\n\nexport const enum Mode {\n Edit = 'Edit',\n Submitted = 'Submitted',\n InvalidSubmit = 'InvalidSubmit',\n}\n\nexport class LinearMemoryNavigator extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-navigator`;\n\n readonly #shadow = this.attachShadow({mode: 'open'});\n #address = '0';\n #error: string|undefined = undefined;\n #valid = true;\n #canGoBackInHistory = false;\n #canGoForwardInHistory = false;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [linearMemoryNavigatorStyles];\n }\n\n set data(data: LinearMemoryNavigatorData) {\n this.#address = data.address;\n this.#error = data.error;\n this.#valid = data.valid;\n this.#canGoBackInHistory = data.canGoBackInHistory;\n this.#canGoForwardInHistory = data.canGoForwardInHistory;\n this.#render();\n\n const addressInput = this.#shadow.querySelector('.address-input');\n if (addressInput) {\n if (data.mode === Mode.Submitted) {\n addressInput.blur();\n } else if (data.mode === Mode.InvalidSubmit) {\n addressInput.select();\n }\n }\n }\n\n #render(): void {\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n const result = html`\n
\n
\n ${this.#createButton({icon: 'undo', title: i18nString(UIStrings.goBackInAddressHistory),\n event: new HistoryNavigationEvent(Navigation.Backward), enabled: this.#canGoBackInHistory,\n jslogContext:'linear-memory-inspector.history-back'})}\n ${this.#createButton({icon: 'redo', title: i18nString(UIStrings.goForwardInAddressHistory),\n event: new HistoryNavigationEvent(Navigation.Forward), enabled: this.#canGoForwardInHistory,\n jslogContext:'linear-memory-inspector.history-forward'})}\n
\n
\n ${this.#createButton({icon: 'chevron-left', title: i18nString(UIStrings.previousPage),\n event: new PageNavigationEvent(Navigation.Backward), enabled: true,\n jslogContext:'linear-memory-inspector.previous-page'})}\n ${this.#createAddressInput()}\n ${this.#createButton({icon: 'chevron-right', title: i18nString(UIStrings.nextPage),\n event: new PageNavigationEvent(Navigation.Forward), enabled: true,\n jslogContext:'linear-memory-inspector.next-page'})}\n
\n ${this.#createButton({icon: 'refresh', title: i18nString(UIStrings.refresh),\n event: new RefreshRequestedEvent(), enabled: true,\n jslogContext:'linear-memory-inspector.refresh'})}\n
\n `;\n render(result, this.#shadow, {host: this});\n // clang-format on\n }\n\n #createAddressInput(): LitHtml.TemplateResult {\n const classMap = {\n 'address-input': true,\n invalid: !this.#valid,\n };\n return html`\n `;\n }\n\n #onAddressChange(mode: Mode, event: Event): void {\n const addressInput = event.target as HTMLInputElement;\n this.dispatchEvent(new AddressInputChangedEvent(addressInput.value, mode));\n }\n\n #createButton(data: {icon: string, title: string, event: Event, enabled: boolean, jslogContext: string}):\n LitHtml.TemplateResult {\n return html`\n `;\n }\n}\n\nComponentHelpers.CustomElements.defineComponent('devtools-linear-memory-inspector-navigator', LinearMemoryNavigator);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-linear-memory-inspector-navigator': LinearMemoryNavigator;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"LinearMemoryNavigator.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,gBA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IAAI,CAAA;mDACoC,CAAC,IAAI,CAAC,OAAO;gBAChD,aAAa,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;sBAClF,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,IAAI,CAAC,KAAK;iBACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;WAC/C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,UAClC,EAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EACrD;YACxB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU;gBAC3B,CAAC;IACf,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,4CAA4C,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport linearMemoryNavigatorStyles from './linearMemoryNavigator.css.js';\n\nconst UIStrings = {\n /**\n *@description Tooltip text that appears when hovering over a valid memory address (e.g. 0x0) in the address line in the Linear memory inspector.\n */\n enterAddress: 'Enter address',\n /**\n *@description Tooltip text that appears when hovering over the button to go back in history in the Linear Memory Navigator\n */\n goBackInAddressHistory: 'Go back in address history',\n /**\n *@description Tooltip text that appears when hovering over the button to go forward in history in the Linear Memory Navigator\n */\n goForwardInAddressHistory: 'Go forward in address history',\n /**\n *@description Tooltip text that appears when hovering over the page back icon in the Linear Memory Navigator\n */\n previousPage: 'Previous page',\n /**\n *@description Tooltip text that appears when hovering over the next page icon in the Linear Memory Navigator\n */\n nextPage: 'Next page',\n /**\n *@description Text to refresh the page\n */\n refresh: 'Refresh',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/components/LinearMemoryNavigator.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst {render, html} = LitHtml;\n\nexport const enum Navigation {\n Backward = 'Backward',\n Forward = 'Forward',\n}\n\nexport class AddressInputChangedEvent extends Event {\n static readonly eventName = 'addressinputchanged';\n data: {address: string, mode: Mode};\n\n constructor(address: string, mode: Mode) {\n super(AddressInputChangedEvent.eventName);\n this.data = {address, mode};\n }\n}\n\nexport class PageNavigationEvent extends Event {\n static readonly eventName = 'pagenavigation';\n data: Navigation;\n\n constructor(navigation: Navigation) {\n super(PageNavigationEvent.eventName, {});\n this.data = navigation;\n }\n}\n\nexport class HistoryNavigationEvent extends Event {\n static readonly eventName = 'historynavigation';\n data: Navigation;\n\n constructor(navigation: Navigation) {\n super(HistoryNavigationEvent.eventName, {});\n this.data = navigation;\n }\n}\n\nexport class RefreshRequestedEvent extends Event {\n static readonly eventName = 'refreshrequested';\n constructor() {\n super(RefreshRequestedEvent.eventName, {});\n }\n}\n\nexport interface LinearMemoryNavigatorData {\n address: string;\n mode: Mode;\n canGoBackInHistory: boolean;\n canGoForwardInHistory: boolean;\n valid: boolean;\n error: string|undefined;\n}\n\nexport const enum Mode {\n Edit = 'Edit',\n Submitted = 'Submitted',\n InvalidSubmit = 'InvalidSubmit',\n}\n\nexport class LinearMemoryNavigator extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-navigator`;\n\n readonly #shadow = this.attachShadow({mode: 'open'});\n #address = '0';\n #error: string|undefined = undefined;\n #valid = true;\n #canGoBackInHistory = false;\n #canGoForwardInHistory = false;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [linearMemoryNavigatorStyles];\n }\n\n set data(data: LinearMemoryNavigatorData) {\n this.#address = data.address;\n this.#error = data.error;\n this.#valid = data.valid;\n this.#canGoBackInHistory = data.canGoBackInHistory;\n this.#canGoForwardInHistory = data.canGoForwardInHistory;\n this.#render();\n\n const addressInput = this.#shadow.querySelector('.address-input');\n if (addressInput) {\n if (data.mode === Mode.Submitted) {\n addressInput.blur();\n } else if (data.mode === Mode.InvalidSubmit) {\n addressInput.select();\n }\n }\n }\n\n #render(): void {\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n const result = html`\n
\n
\n ${this.#createButton({icon: 'undo', title: i18nString(UIStrings.goBackInAddressHistory),\n event: new HistoryNavigationEvent(Navigation.Backward), enabled: this.#canGoBackInHistory,\n jslogContext:'linear-memory-inspector.history-back'})}\n ${this.#createButton({icon: 'redo', title: i18nString(UIStrings.goForwardInAddressHistory),\n event: new HistoryNavigationEvent(Navigation.Forward), enabled: this.#canGoForwardInHistory,\n jslogContext:'linear-memory-inspector.history-forward'})}\n
\n
\n ${this.#createButton({icon: 'chevron-left', title: i18nString(UIStrings.previousPage),\n event: new PageNavigationEvent(Navigation.Backward), enabled: true,\n jslogContext:'linear-memory-inspector.previous-page'})}\n ${this.#createAddressInput()}\n ${this.#createButton({icon: 'chevron-right', title: i18nString(UIStrings.nextPage),\n event: new PageNavigationEvent(Navigation.Forward), enabled: true,\n jslogContext:'linear-memory-inspector.next-page'})}\n
\n ${this.#createButton({icon: 'refresh', title: i18nString(UIStrings.refresh),\n event: new RefreshRequestedEvent(), enabled: true,\n jslogContext:'linear-memory-inspector.refresh'})}\n
\n `;\n render(result, this.#shadow, {host: this});\n // clang-format on\n }\n\n #createAddressInput(): LitHtml.TemplateResult {\n const classMap = {\n 'address-input': true,\n invalid: !this.#valid,\n };\n return html`\n `;\n }\n\n #onAddressChange(mode: Mode, event: Event): void {\n const addressInput = event.target as HTMLInputElement;\n this.dispatchEvent(new AddressInputChangedEvent(addressInput.value, mode));\n }\n\n #createButton(data: {icon: string, title: string, event: Event, enabled: boolean, jslogContext: string}):\n LitHtml.TemplateResult {\n return html`\n `;\n }\n}\n\nComponentHelpers.CustomElements.defineComponent('devtools-linear-memory-inspector-navigator', LinearMemoryNavigator);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-linear-memory-inspector-navigator': LinearMemoryNavigator;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.js b/public/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.js index 8ca178918..7eb536631 100644 --- a/public/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.js +++ b/public/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.js @@ -11,12 +11,12 @@ import { ValueInterpreterDisplay } from './ValueInterpreterDisplay.js'; import { ValueInterpreterSettings, } from './ValueInterpreterSettings.js'; const UIStrings = { /** - *@description Tooltip text that appears when hovering over the gear button to open and close settings in the Linear Memory Inspector. These settings + *@description Tooltip text that appears when hovering over the gear button to open and close settings in the Linear memory inspector. These settings * allow the user to change the value type to view, such as 32-bit Integer, or 32-bit Float. */ toggleValueTypeSettings: 'Toggle value type settings', /** - *@description Tooltip text that appears when hovering over the 'Little Endian' or 'Big Endian' setting in the Linear Memory Inspector. + *@description Tooltip text that appears when hovering over the 'Little Endian' or 'Big Endian' setting in the Linear memory inspector. */ changeEndianness: 'Change `Endianness`', }; diff --git a/public/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.js.map b/public/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.js.map index c5e515fd6..a2d146c4f 100644 --- a/public/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.js.map +++ b/public/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.js.map @@ -1 +1 @@ -{"version":3,"file":"LinearMemoryValueInterpreter.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,8CAA8C,CAAC;AAE9E,OAAO,kCAAkC,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAwB,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAE5F,OAAO,EAEL,wBAAwB,GAEzB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,uBAAuB,EAAE,4BAA4B;IACrD;;OAEG;IACH,gBAAgB,EAAE,qBAAqB;CACxC,CAAC;AACF,MAAM,IAAI,GACN,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,2EAA2E,EAAE,SAAS,CAAC,CAAC;AACxH,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;AAE/B,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,MAAM,CAAU,SAAS,GAAG,mBAAmB,CAAC;IAChD,IAAI,CAAa;IAEjB,YAAY,UAAsB;QAChC,KAAK,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;;AAGH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,MAAM,CAAU,SAAS,GAAG,kBAAkB,CAAC;IAC/C,IAAI,CAAsC;IAE1C,Y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AED,wBAAwB;QACtB,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChE,qDAAqD;QACrD,mBAAmB;QACnB,OAAO,IAAI,CAAA;kDACmC,UAAU,CAAC,SAAS,CAAC,gBAAgB,CAAC;;gBAExE,aAAa,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC;;yCAEhE,mBAAmB;UAClD,4EAAmC,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;YACnD,OAAO,IAAI,CAAA,iBAAiB,UAAU,cAAc,IAAI,CAAC,WAAW,KAAK,UAAU,IAC/E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC;QACtD,CAAC,CAAC;;;KAGL,CAAC;QACF,kBAAkB;IACpB,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;QACzC,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,aAAa,CAAC,CAAkB;QAC9B,IAAI,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7E,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAC3C,8CAA8C,EAAE,4BAA4B,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport linearMemoryValueInterpreterStyles from './linearMemoryValueInterpreter.css.js';\nimport {type ValueDisplayData, ValueInterpreterDisplay} from './ValueInterpreterDisplay.js';\nimport {Endianness, type ValueType, type ValueTypeMode} from './ValueInterpreterDisplayUtils.js';\nimport {\n type TypeToggleEvent,\n ValueInterpreterSettings,\n type ValueInterpreterSettingsData,\n} from './ValueInterpreterSettings.js';\n\nconst UIStrings = {\n /**\n *@description Tooltip text that appears when hovering over the gear button to open and close settings in the Linear Memory Inspector. These settings\n * allow the user to change the value type to view, such as 32-bit Integer, or 32-bit Float.\n */\n toggleValueTypeSettings: 'Toggle value type settings',\n /**\n *@description Tooltip text that appears when hovering over the 'Little Endian' or 'Big Endian' setting in the Linear Memory Inspector.\n */\n changeEndianness: 'Change `Endianness`',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst {render, html} = LitHtml;\n\nexport class EndiannessChangedEvent extends Event {\n static readonly eventName = 'endiannesschanged';\n data: Endianness;\n\n constructor(endianness: Endianness) {\n super(EndiannessChangedEvent.eventName);\n this.data = endianness;\n }\n}\n\nexport class ValueTypeToggledEvent extends Event {\n static readonly eventName = 'valuetypetoggled';\n data: {type: ValueType, checked: boolean};\n\n constructor(type: ValueType, checked: boolean) {\n super(ValueTypeToggledEvent.eventName);\n this.data = {type, checked};\n }\n}\n\nexport interface LinearMemoryValueInterpreterData {\n value: ArrayBuffer;\n valueTypes: Set;\n endianness: Endianness;\n valueTypeModes?: Map;\n memoryLength: number;\n}\n\nexport class LinearMemoryValueInterpreter extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-interpreter`;\n\n readonly #shadow = this.attachShadow({mode: 'open'});\n #endianness = Endianness.Little;\n #buffer = new ArrayBuffer(0);\n #valueTypes: Set = new Set();\n #valueTypeModeConfig: Map = new Map();\n #memoryLength = 0;\n #showSettings = false;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [linearMemoryValueInterpreterStyles];\n }\n\n set data(data: LinearMemoryValueInterpreterData) {\n this.#endianness = data.endianness;\n this.#buffer = data.value;\n this.#valueTypes = data.valueTypes;\n this.#valueTypeModeConfig = data.valueTypeModes || new Map();\n this.#memoryLength = data.memoryLength;\n this.#render();\n }\n\n #render(): void {\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n render(html`\n
\n
\n ${this.#renderEndiannessSetting()}\n \n
\n \n
\n ${this.#showSettings ?\n html`\n <${ValueInterpreterSettings.litTagName}\n .data=${{ valueTypes: this.#valueTypes } as ValueInterpreterSettingsData}\n @typetoggle=${this.#onTypeToggle}>\n ` :\n html`\n <${ValueInterpreterDisplay.litTagName}\n .data=${{\n buffer: this.#buffer,\n valueTypes: this.#valueTypes,\n endianness: this.#endianness,\n valueTypeModes: this.#valueTypeModeConfig,\n memoryLength: this.#memoryLength,\n } as ValueDisplayData}>\n `}\n
\n
\n `,\n this.#shadow, { host: this },\n );\n // clang-format on\n }\n\n #onEndiannessChange(event: Event): void {\n event.preventDefault();\n const select = event.target as HTMLInputElement;\n const endianness = select.value as Endianness;\n this.dispatchEvent(new EndiannessChangedEvent(endianness));\n }\n\n #renderEndiannessSetting(): LitHtml.TemplateResult {\n const onEnumSettingChange = this.#onEndiannessChange.bind(this);\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n \n `;\n // clang-format on\n }\n\n #onSettingsToggle(): void {\n this.#showSettings = !this.#showSettings;\n this.#render();\n }\n\n #onTypeToggle(e: TypeToggleEvent): void {\n this.dispatchEvent(new ValueTypeToggledEvent(e.data.type, e.data.checked));\n }\n}\n\nComponentHelpers.CustomElements.defineComponent(\n 'devtools-linear-memory-inspector-interpreter', LinearMemoryValueInterpreter);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-linear-memory-inspector-interpreter': LinearMemoryValueInterpreter;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"LinearMemoryValueInterpreter.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,8CAA8C,CAAC;AAE9E,OAAO,kCAAkC,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAwB,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAE5F,OAAO,EAEL,wBAAwB,GAEzB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,uBAAuB,EAAE,4BAA4B;IACrD;;OAEG;IACH,gBAAgB,EAAE,qBAAqB;CACxC,CAAC;AACF,MAAM,IAAI,GACN,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,2EAA2E,EAAE,SAAS,CAAC,CAAC;AACxH,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;AAE/B,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,MAAM,CAAU,SAAS,GAAG,mBAAmB,CAAC;IAChD,IAAI,CAAa;IAEjB,YAAY,UAAsB;QAChC,KAAK,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;;AAGH,MAAM,OAAO,qBAAsB,SAAQ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IAAI,CAAC,aAAa,CAAC,IAAI,sBAAsB,CAAC,UAAU,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,wBAAwB;QACtB,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChE,qDAAqD;QACrD,mBAAmB;QACnB,OAAO,IAAI,CAAA;kDACmC,UAAU,CAAC,SAAS,CAAC,gBAAgB,CAAC;;gBAExE,aAAa,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC;;yCAEhE,mBAAmB;UAClD,4EAAmC,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;YACnD,OAAO,IAAI,CAAA,iBAAiB,UAAU,cAAc,IAAI,CAAC,WAAW,KAAK,UAAU,IAC/E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC;QACtD,CAAC,CAAC;;;KAGL,CAAC;QACF,kBAAkB;IACpB,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;QACzC,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,aAAa,CAAC,CAAkB;QAC9B,IAAI,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7E,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAC3C,8CAA8C,EAAE,4BAA4B,CAAC,CAAC","sourcesContent":["// Copyright (c) 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport linearMemoryValueInterpreterStyles from './linearMemoryValueInterpreter.css.js';\nimport {type ValueDisplayData, ValueInterpreterDisplay} from './ValueInterpreterDisplay.js';\nimport {Endianness, type ValueType, type ValueTypeMode} from './ValueInterpreterDisplayUtils.js';\nimport {\n type TypeToggleEvent,\n ValueInterpreterSettings,\n type ValueInterpreterSettingsData,\n} from './ValueInterpreterSettings.js';\n\nconst UIStrings = {\n /**\n *@description Tooltip text that appears when hovering over the gear button to open and close settings in the Linear memory inspector. These settings\n * allow the user to change the value type to view, such as 32-bit Integer, or 32-bit Float.\n */\n toggleValueTypeSettings: 'Toggle value type settings',\n /**\n *@description Tooltip text that appears when hovering over the 'Little Endian' or 'Big Endian' setting in the Linear memory inspector.\n */\n changeEndianness: 'Change `Endianness`',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst {render, html} = LitHtml;\n\nexport class EndiannessChangedEvent extends Event {\n static readonly eventName = 'endiannesschanged';\n data: Endianness;\n\n constructor(endianness: Endianness) {\n super(EndiannessChangedEvent.eventName);\n this.data = endianness;\n }\n}\n\nexport class ValueTypeToggledEvent extends Event {\n static readonly eventName = 'valuetypetoggled';\n data: {type: ValueType, checked: boolean};\n\n constructor(type: ValueType, checked: boolean) {\n super(ValueTypeToggledEvent.eventName);\n this.data = {type, checked};\n }\n}\n\nexport interface LinearMemoryValueInterpreterData {\n value: ArrayBuffer;\n valueTypes: Set;\n endianness: Endianness;\n valueTypeModes?: Map;\n memoryLength: number;\n}\n\nexport class LinearMemoryValueInterpreter extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-linear-memory-inspector-interpreter`;\n\n readonly #shadow = this.attachShadow({mode: 'open'});\n #endianness = Endianness.Little;\n #buffer = new ArrayBuffer(0);\n #valueTypes: Set = new Set();\n #valueTypeModeConfig: Map = new Map();\n #memoryLength = 0;\n #showSettings = false;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [linearMemoryValueInterpreterStyles];\n }\n\n set data(data: LinearMemoryValueInterpreterData) {\n this.#endianness = data.endianness;\n this.#buffer = data.value;\n this.#valueTypes = data.valueTypes;\n this.#valueTypeModeConfig = data.valueTypeModes || new Map();\n this.#memoryLength = data.memoryLength;\n this.#render();\n }\n\n #render(): void {\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n render(html`\n
\n
\n ${this.#renderEndiannessSetting()}\n \n
\n \n
\n ${this.#showSettings ?\n html`\n <${ValueInterpreterSettings.litTagName}\n .data=${{ valueTypes: this.#valueTypes } as ValueInterpreterSettingsData}\n @typetoggle=${this.#onTypeToggle}>\n ` :\n html`\n <${ValueInterpreterDisplay.litTagName}\n .data=${{\n buffer: this.#buffer,\n valueTypes: this.#valueTypes,\n endianness: this.#endianness,\n valueTypeModes: this.#valueTypeModeConfig,\n memoryLength: this.#memoryLength,\n } as ValueDisplayData}>\n `}\n
\n
\n `,\n this.#shadow, { host: this },\n );\n // clang-format on\n }\n\n #onEndiannessChange(event: Event): void {\n event.preventDefault();\n const select = event.target as HTMLInputElement;\n const endianness = select.value as Endianness;\n this.dispatchEvent(new EndiannessChangedEvent(endianness));\n }\n\n #renderEndiannessSetting(): LitHtml.TemplateResult {\n const onEnumSettingChange = this.#onEndiannessChange.bind(this);\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n \n `;\n // clang-format on\n }\n\n #onSettingsToggle(): void {\n this.#showSettings = !this.#showSettings;\n this.#render();\n }\n\n #onTypeToggle(e: TypeToggleEvent): void {\n this.dispatchEvent(new ValueTypeToggledEvent(e.data.type, e.data.checked));\n }\n}\n\nComponentHelpers.CustomElements.defineComponent(\n 'devtools-linear-memory-inspector-interpreter', LinearMemoryValueInterpreter);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-linear-memory-inspector-interpreter': LinearMemoryValueInterpreter;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/linear_memory_inspector/linear_memory_inspector-meta.js b/public/panels/linear_memory_inspector/linear_memory_inspector-meta.js index 0deae6d98..58d74ed34 100644 --- a/public/panels/linear_memory_inspector/linear_memory_inspector-meta.js +++ b/public/panels/linear_memory_inspector/linear_memory_inspector-meta.js @@ -8,13 +8,13 @@ import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; const UIStrings = { /** - *@description Title of the Linear Memory Inspector tool + *@description Title of the Linear Memory inspector tool */ - memoryInspector: 'Memory Inspector', + memoryInspector: 'Memory inspector', /** - *@description Command for showing the 'Memory Inspector' tool + *@description Command for showing the 'Memory inspector' tool */ - showMemoryInspector: 'Show Memory Inspector', + showMemoryInspector: 'Show Memory inspector', }; const str_ = i18n.i18n.registerUIStrings('panels/linear_memory_inspector/linear_memory_inspector-meta.ts', UIStrings); const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_); diff --git a/public/panels/linear_memory_inspector/linear_memory_inspector-meta.js.map b/public/panels/linear_memory_inspector/linear_memory_inspector-meta.js.map index 960a5ab6d..6143de00e 100644 --- a/public/panels/linear_memory_inspector/linear_memory_inspector-meta.js.map +++ b/public/panels/linear_memory_inspector/linear_memory_inspector-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"linear_memory_inspector-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7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AAC;IACD,UAAU,EAAE,SAAS;IACrB,YAAY;QACV,OAAO;YACL,QAAQ,CAAC,uBAAuB,CAAC,yBAAyB;SAC3D,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC/B,YAAY;QACV,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IACD,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,sBAAsB;IACvE,KAAK,CAAC,YAAY;QAChB,MAAM,qBAAqB,GAAG,MAAM,+BAA+B,EAAE,CAAC;QACtE,OAAO,qBAAqB,CAAC,+BAA+B,CAAC,+BAA+B,CAAC,QAAQ,EAAE,CAAC;IAC1G,CAAC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as LinearMemoryInspector from './linear_memory_inspector.js';\n\nconst UIStrings = {\n /**\n *@description Title of the Linear Memory Inspector tool\n */\n memoryInspector: 'Memory Inspector',\n /**\n *@description Command for showing the 'Memory Inspector' tool\n */\n showMemoryInspector: 'Show Memory Inspector',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/linear_memory_inspector-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedLinearMemoryInspectorModule: (typeof LinearMemoryInspector|undefined);\n\nasync function loadLinearMemoryInspectorModule(): Promise {\n if (!loadedLinearMemoryInspectorModule) {\n loadedLinearMemoryInspectorModule = await import('./linear_memory_inspector.js');\n }\n return loadedLinearMemoryInspectorModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'linear-memory-inspector',\n title: i18nLazyString(UIStrings.memoryInspector),\n commandPrompt: i18nLazyString(UIStrings.showMemoryInspector),\n order: 100,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const LinearMemoryInspector = await loadLinearMemoryInspectorModule();\n return LinearMemoryInspector.LinearMemoryInspectorPane.LinearMemoryInspectorPane.instance();\n },\n});\n\nUI.ContextMenu.registerProvider({\n async loadProvider() {\n const LinearMemoryInspector = await loadLinearMemoryInspectorModule();\n return LinearMemoryInspector.LinearMemoryInspectorController.LinearMemoryInspectorController.instance();\n },\n experiment: undefined,\n contextTypes() {\n return [\n ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement,\n ];\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [SDK.RemoteObject.LinearMemoryInspectable];\n },\n destination: Common.Revealer.RevealerDestination.MEMORY_INSPECTOR_PANEL,\n async loadRevealer() {\n const LinearMemoryInspector = await loadLinearMemoryInspectorModule();\n return LinearMemoryInspector.LinearMemoryInspectorController.LinearMemoryInspectorController.instance();\n },\n});\n"]} \ No newline at end of file +{"version":3,"file":"linear_memory_inspector-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,eAAe,EAAE,kBAAkB;IACnC;;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CAAC,gBAAgB,CAAC;IAC/B,YAAY;QACV,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IACD,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,sBAAsB;IACvE,KAAK,CAAC,YAAY;QAChB,MAAM,qBAAqB,GAAG,MAAM,+BAA+B,EAAE,CAAC;QACtE,OAAO,qBAAqB,CAAC,+BAA+B,CAAC,+BAA+B,CAAC,QAAQ,EAAE,CAAC;IAC1G,CAAC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as LinearMemoryInspector from './linear_memory_inspector.js';\n\nconst UIStrings = {\n /**\n *@description Title of the Linear Memory inspector tool\n */\n memoryInspector: 'Memory inspector',\n /**\n *@description Command for showing the 'Memory inspector' tool\n */\n showMemoryInspector: 'Show Memory inspector',\n};\nconst str_ =\n i18n.i18n.registerUIStrings('panels/linear_memory_inspector/linear_memory_inspector-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedLinearMemoryInspectorModule: (typeof LinearMemoryInspector|undefined);\n\nasync function loadLinearMemoryInspectorModule(): Promise {\n if (!loadedLinearMemoryInspectorModule) {\n loadedLinearMemoryInspectorModule = await import('./linear_memory_inspector.js');\n }\n return loadedLinearMemoryInspectorModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'linear-memory-inspector',\n title: i18nLazyString(UIStrings.memoryInspector),\n commandPrompt: i18nLazyString(UIStrings.showMemoryInspector),\n order: 100,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const LinearMemoryInspector = await loadLinearMemoryInspectorModule();\n return LinearMemoryInspector.LinearMemoryInspectorPane.LinearMemoryInspectorPane.instance();\n },\n});\n\nUI.ContextMenu.registerProvider({\n async loadProvider() {\n const LinearMemoryInspector = await loadLinearMemoryInspectorModule();\n return LinearMemoryInspector.LinearMemoryInspectorController.LinearMemoryInspectorController.instance();\n },\n experiment: undefined,\n contextTypes() {\n return [\n ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement,\n ];\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [SDK.RemoteObject.LinearMemoryInspectable];\n },\n destination: Common.Revealer.RevealerDestination.MEMORY_INSPECTOR_PANEL,\n async loadRevealer() {\n const LinearMemoryInspector = await loadLinearMemoryInspectorModule();\n return LinearMemoryInspector.LinearMemoryInspectorController.LinearMemoryInspectorController.instance();\n },\n});\n"]} \ No newline at end of file diff --git a/public/panels/media/MainView.d.ts b/public/panels/media/MainView.d.ts index 6cc929d12..eeed2d0f3 100644 --- a/public/panels/media/MainView.d.ts +++ b/public/panels/media/MainView.d.ts @@ -35,11 +35,7 @@ export declare class MainView extends UI.Panel.PanelWithSidebar implements SDK.T private deletedPlayers; private readonly downloadStore; private readonly sidebar; - constructor(downloadStore: PlayerDataDownloadManager); - static instance(opts?: { - forceNew: boolean; - downloadStore?: PlayerDataDownloadManager; - }): MainView; + constructor(downloadStore?: PlayerDataDownloadManager); renderMainPanel(playerID: string): void; wasShown(): void; willHide(): void; diff --git a/public/panels/media/MainView.js b/public/panels/media/MainView.js index ba1d3f063..e9cec129b 100644 --- a/public/panels/media/MainView.js +++ b/public/panels/media/MainView.js @@ -80,13 +80,12 @@ export class PlayerDataDownloadManager { this.playerDataCollection.delete(playerID); } } -let mainViewInstance; export class MainView extends UI.Panel.PanelWithSidebar { detailPanels; deletedPlayers; downloadStore; sidebar; - constructor(downloadStore) { + constructor(downloadStore = new PlayerDataDownloadManager()) { super('Media'); this.detailPanels = new Map(); this.deletedPlayers = new Set(); @@ -95,12 +94,6 @@ export class MainView extends UI.Panel.PanelWithSidebar { this.sidebar.show(this.panelSidebarElement()); SDK.TargetManager.TargetManager.instance().observeModels(MediaModel, this, { scoped: true }); } - static instance(opts) { - if (!mainViewInstance || opts?.forceNew) { - mainViewInstance = new MainView(opts?.downloadStore || new PlayerDataDownloadManager()); - } - return mainViewInstance; - } renderMainPanel(playerID) { if (!this.detailPanels.has(playerID)) { return; diff --git a/public/panels/media/MainView.js.map b/public/panels/media/MainView.js.map index b33174a5e..b132ebd6c 100644 --- a/public/panels/media/MainView.js.map +++ b/public/panels/media/MainView.js.map @@ -1 +1 @@ -{"version":3,"file":"MainView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/media/MainView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGhD,OAAO,EAAC,UAAU,EAA2B,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAgBnD,MAAM,oBAAoB;IACP,UAAU,CAAsB;IAChC,QAAQ,CAAiC;IACzC,MAAM,CAAgB;IACtB,MAAM,CAA+B;IAEtD;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAED,UAAU,CAAC,QAAuC;QAChD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC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G,CAAC,CAAC;QAC3C,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;QACzB,MAAM,CAAC,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;QACrC,MAAM,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright 2019 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport type * as Protocol from '../../generated/protocol.js';\n\nimport {MediaModel, Events, type PlayerEvent} from './MediaModel.js';\nimport {PlayerDetailView} from './PlayerDetailView.js';\nimport {PlayerListView} from './PlayerListView.js';\n\nexport interface TriggerHandler {\n onProperty(property: Protocol.Media.PlayerProperty): void;\n onError(error: Protocol.Media.PlayerError): void;\n onMessage(message: Protocol.Media.PlayerMessage): void;\n onEvent(event: PlayerEvent): void;\n}\n\nexport interface TriggerDispatcher {\n onProperty(playerID: string, property: Protocol.Media.PlayerProperty): void;\n onError(playerID: string, error: Protocol.Media.PlayerError): void;\n onMessage(playerID: string, message: Protocol.Media.PlayerMessage): void;\n onEvent(playerID: string, event: PlayerEvent): void;\n}\n\nclass PlayerDataCollection implements TriggerHandler {\n private readonly properties: Map;\n private readonly messages: Protocol.Media.PlayerMessage[];\n private readonly events: PlayerEvent[];\n private readonly errors: Protocol.Media.PlayerError[];\n\n constructor() {\n this.properties = new Map();\n this.messages = [];\n this.events = [];\n this.errors = [];\n }\n\n onProperty(property: Protocol.Media.PlayerProperty): void {\n this.properties.set(property.name, property.value);\n }\n\n onError(error: Protocol.Media.PlayerError): void {\n this.errors.push(error);\n }\n\n onMessage(message: Protocol.Media.PlayerMessage): void {\n this.messages.push(message);\n }\n\n onEvent(event: PlayerEvent): void {\n this.events.push(event);\n }\n\n export(): {\n properties: Map,\n messages: Protocol.Media.PlayerMessage[],\n events: PlayerEvent[],\n errors: Protocol.Media.PlayerError[],\n } {\n return {'properties': this.properties, 'messages': this.messages, 'events': this.events, 'errors': this.errors};\n }\n}\n\nexport class PlayerDataDownloadManager implements TriggerDispatcher {\n private readonly playerDataCollection: Map;\n constructor() {\n this.playerDataCollection = new Map();\n }\n\n addPlayer(playerID: string): void {\n this.playerDataCollection.set(playerID, new PlayerDataCollection());\n }\n\n onProperty(playerID: string, property: Protocol.Media.PlayerProperty): void {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n return;\n }\n\n playerProperty.onProperty(property);\n }\n\n onError(playerID: string, error: Protocol.Media.PlayerError): void {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n return;\n }\n\n playerProperty.onError(error);\n }\n\n onMessage(playerID: string, message: Protocol.Media.PlayerMessage): void {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n return;\n }\n\n playerProperty.onMessage(message);\n }\n\n onEvent(playerID: string, event: PlayerEvent): void {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n return;\n }\n\n playerProperty.onEvent(event);\n }\n\n exportPlayerData(playerID: string): {\n properties: Map,\n messages: Protocol.Media.PlayerMessage[],\n events: PlayerEvent[],\n errors: Protocol.Media.PlayerError[],\n } {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n throw new Error('Unable to find player');\n }\n\n return playerProperty.export();\n }\n\n deletePlayer(playerID: string): void {\n this.playerDataCollection.delete(playerID);\n }\n}\n\nlet mainViewInstance: MainView;\nexport class MainView extends UI.Panel.PanelWithSidebar implements SDK.TargetManager.SDKModelObserver {\n private detailPanels: Map;\n private deletedPlayers: Set;\n private readonly downloadStore: PlayerDataDownloadManager;\n private readonly sidebar: PlayerListView;\n\n constructor(downloadStore: PlayerDataDownloadManager) {\n super('Media');\n this.detailPanels = new Map();\n\n this.deletedPlayers = new Set();\n\n this.downloadStore = downloadStore;\n\n this.sidebar = new PlayerListView(this);\n this.sidebar.show(this.panelSidebarElement());\n\n SDK.TargetManager.TargetManager.instance().observeModels(MediaModel, this, {scoped: true});\n }\n\n static instance(opts?: {forceNew: boolean, downloadStore?: PlayerDataDownloadManager}): MainView {\n if (!mainViewInstance || opts?.forceNew) {\n mainViewInstance = new MainView(opts?.downloadStore || new PlayerDataDownloadManager());\n }\n\n return mainViewInstance;\n }\n\n renderMainPanel(playerID: string): void {\n if (!this.detailPanels.has(playerID)) {\n return;\n }\n const mainWidget = this.splitWidget().mainWidget();\n if (mainWidget) {\n mainWidget.detachChildWidgets();\n }\n this.detailPanels.get(playerID)?.show(this.mainElement());\n }\n\n override wasShown(): void {\n super.wasShown();\n for (const model of SDK.TargetManager.TargetManager.instance().models(MediaModel, {scoped: true})) {\n this.addEventListeners(model);\n }\n }\n\n override willHide(): void {\n for (const model of SDK.TargetManager.TargetManager.instance().models(MediaModel, {scoped: true})) {\n this.removeEventListeners(model);\n }\n }\n\n modelAdded(model: MediaModel): void {\n if (this.isShowing()) {\n this.addEventListeners(model);\n }\n }\n\n modelRemoved(model: MediaModel): void {\n this.removeEventListeners(model);\n }\n\n private addEventListeners(mediaModel: MediaModel): void {\n mediaModel.ensureEnabled();\n mediaModel.addEventListener(Events.PlayerPropertiesChanged, this.propertiesChanged, this);\n mediaModel.addEventListener(Events.PlayerEventsAdded, this.eventsAdded, this);\n mediaModel.addEventListener(Events.PlayerMessagesLogged, this.messagesLogged, this);\n mediaModel.addEventListener(Events.PlayerErrorsRaised, this.errorsRaised, this);\n mediaModel.addEventListener(Events.PlayersCreated, this.playersCreated, this);\n }\n\n private removeEventListeners(mediaModel: MediaModel): void {\n mediaModel.removeEventListener(Events.PlayerPropertiesChanged, this.propertiesChanged, this);\n mediaModel.removeEventListener(Events.PlayerEventsAdded, this.eventsAdded, this);\n mediaModel.removeEventListener(Events.PlayerMessagesLogged, this.messagesLogged, this);\n mediaModel.removeEventListener(Events.PlayerErrorsRaised, this.errorsRaised, this);\n mediaModel.removeEventListener(Events.PlayersCreated, this.playersCreated, this);\n }\n\n private onPlayerCreated(playerID: string): void {\n this.sidebar.addMediaElementItem(playerID);\n this.detailPanels.set(playerID, new PlayerDetailView());\n this.downloadStore.addPlayer(playerID);\n }\n\n private propertiesChanged(event: Common.EventTarget.EventTargetEvent):\n void {\n for (const property of event.data.properties) {\n this.onProperty(event.data.playerId, property);\n }\n }\n\n private eventsAdded(event: Common.EventTarget.EventTargetEvent): void {\n for (const ev of event.data.events) {\n // TODO(crbug.com/1228674): The conversion from Protocol.Media.PlayerEvent to PlayerEvent happens implicitly\n // by augmenting the protocol type with some additional property in various places. This needs to be cleaned up\n // in a conversion function that takes the protocol type and produces the PlayerEvent type.\n this.onEvent(event.data.playerId, ev as PlayerEvent);\n }\n }\n\n private messagesLogged(event: Common.EventTarget.EventTargetEvent): void {\n for (const message of event.data.messages) {\n this.onMessage(event.data.playerId, message);\n }\n }\n\n private errorsRaised(event: Common.EventTarget.EventTargetEvent): void {\n for (const error of event.data.errors) {\n this.onError(event.data.playerId, error);\n }\n }\n\n private shouldPropagate(playerID: string): boolean {\n return !this.deletedPlayers.has(playerID) && this.detailPanels.has(playerID);\n }\n\n onProperty(playerID: string, property: Protocol.Media.PlayerProperty): void {\n if (!this.shouldPropagate(playerID)) {\n return;\n }\n this.sidebar.onProperty(playerID, property);\n this.downloadStore.onProperty(playerID, property);\n this.detailPanels.get(playerID)?.onProperty(property);\n }\n\n onError(playerID: string, error: Protocol.Media.PlayerError): void {\n if (!this.shouldPropagate(playerID)) {\n return;\n }\n this.sidebar.onError(playerID, error);\n this.downloadStore.onError(playerID, error);\n this.detailPanels.get(playerID)?.onError(error);\n }\n\n onMessage(playerID: string, message: Protocol.Media.PlayerMessage): void {\n if (!this.shouldPropagate(playerID)) {\n return;\n }\n this.sidebar.onMessage(playerID, message);\n this.downloadStore.onMessage(playerID, message);\n this.detailPanels.get(playerID)?.onMessage(message);\n }\n\n onEvent(playerID: string, event: PlayerEvent): void {\n if (!this.shouldPropagate(playerID)) {\n return;\n }\n this.sidebar.onEvent(playerID, event);\n this.downloadStore.onEvent(playerID, event);\n this.detailPanels.get(playerID)?.onEvent(event);\n }\n\n private playersCreated(event: Common.EventTarget.EventTargetEvent): void {\n for (const playerID of event.data) {\n this.onPlayerCreated(playerID);\n }\n }\n\n markPlayerForDeletion(playerID: string): void {\n // TODO(tmathmeyer): send this to chromium to save the storage space there too.\n this.deletedPlayers.add(playerID);\n this.detailPanels.delete(playerID);\n this.sidebar.deletePlayer(playerID);\n this.downloadStore.deletePlayer(playerID);\n }\n\n markOtherPlayersForDeletion(playerID: string): void {\n for (const keyID of this.detailPanels.keys()) {\n if (keyID !== playerID) {\n this.markPlayerForDeletion(keyID);\n }\n }\n }\n\n exportPlayerData(playerID: string): void {\n const dump = this.downloadStore.exportPlayerData(playerID);\n const uriContent = 'data:application/octet-stream,' + encodeURIComponent(JSON.stringify(dump, null, 2));\n const anchor = document.createElement('a');\n anchor.href = uriContent;\n anchor.download = playerID + '.json';\n anchor.click();\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"MainView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/media/MainView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGhD,OAAO,EAAC,UAAU,EAA2B,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAgBnD,MAAM,oBAAoB;IACP,UAAU,CAAsB;IAChC,QAAQ,CAAiC;IACzC,MAAM,CAAgB;IACtB,MAAM,CAA+B;IAEtD;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,MAAM,G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M,CAAC,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;QACrC,MAAM,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright 2019 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport type * as Protocol from '../../generated/protocol.js';\n\nimport {MediaModel, Events, type PlayerEvent} from './MediaModel.js';\nimport {PlayerDetailView} from './PlayerDetailView.js';\nimport {PlayerListView} from './PlayerListView.js';\n\nexport interface TriggerHandler {\n onProperty(property: Protocol.Media.PlayerProperty): void;\n onError(error: Protocol.Media.PlayerError): void;\n onMessage(message: Protocol.Media.PlayerMessage): void;\n onEvent(event: PlayerEvent): void;\n}\n\nexport interface TriggerDispatcher {\n onProperty(playerID: string, property: Protocol.Media.PlayerProperty): void;\n onError(playerID: string, error: Protocol.Media.PlayerError): void;\n onMessage(playerID: string, message: Protocol.Media.PlayerMessage): void;\n onEvent(playerID: string, event: PlayerEvent): void;\n}\n\nclass PlayerDataCollection implements TriggerHandler {\n private readonly properties: Map;\n private readonly messages: Protocol.Media.PlayerMessage[];\n private readonly events: PlayerEvent[];\n private readonly errors: Protocol.Media.PlayerError[];\n\n constructor() {\n this.properties = new Map();\n this.messages = [];\n this.events = [];\n this.errors = [];\n }\n\n onProperty(property: Protocol.Media.PlayerProperty): void {\n this.properties.set(property.name, property.value);\n }\n\n onError(error: Protocol.Media.PlayerError): void {\n this.errors.push(error);\n }\n\n onMessage(message: Protocol.Media.PlayerMessage): void {\n this.messages.push(message);\n }\n\n onEvent(event: PlayerEvent): void {\n this.events.push(event);\n }\n\n export(): {\n properties: Map,\n messages: Protocol.Media.PlayerMessage[],\n events: PlayerEvent[],\n errors: Protocol.Media.PlayerError[],\n } {\n return {'properties': this.properties, 'messages': this.messages, 'events': this.events, 'errors': this.errors};\n }\n}\n\nexport class PlayerDataDownloadManager implements TriggerDispatcher {\n private readonly playerDataCollection: Map;\n constructor() {\n this.playerDataCollection = new Map();\n }\n\n addPlayer(playerID: string): void {\n this.playerDataCollection.set(playerID, new PlayerDataCollection());\n }\n\n onProperty(playerID: string, property: Protocol.Media.PlayerProperty): void {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n return;\n }\n\n playerProperty.onProperty(property);\n }\n\n onError(playerID: string, error: Protocol.Media.PlayerError): void {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n return;\n }\n\n playerProperty.onError(error);\n }\n\n onMessage(playerID: string, message: Protocol.Media.PlayerMessage): void {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n return;\n }\n\n playerProperty.onMessage(message);\n }\n\n onEvent(playerID: string, event: PlayerEvent): void {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n return;\n }\n\n playerProperty.onEvent(event);\n }\n\n exportPlayerData(playerID: string): {\n properties: Map,\n messages: Protocol.Media.PlayerMessage[],\n events: PlayerEvent[],\n errors: Protocol.Media.PlayerError[],\n } {\n const playerProperty = this.playerDataCollection.get(playerID);\n if (!playerProperty) {\n throw new Error('Unable to find player');\n }\n\n return playerProperty.export();\n }\n\n deletePlayer(playerID: string): void {\n this.playerDataCollection.delete(playerID);\n }\n}\n\nexport class MainView extends UI.Panel.PanelWithSidebar implements SDK.TargetManager.SDKModelObserver {\n private detailPanels: Map;\n private deletedPlayers: Set;\n private readonly downloadStore: PlayerDataDownloadManager;\n private readonly sidebar: PlayerListView;\n\n constructor(downloadStore: PlayerDataDownloadManager = new PlayerDataDownloadManager()) {\n super('Media');\n this.detailPanels = new Map();\n\n this.deletedPlayers = new Set();\n\n this.downloadStore = downloadStore;\n\n this.sidebar = new PlayerListView(this);\n this.sidebar.show(this.panelSidebarElement());\n\n SDK.TargetManager.TargetManager.instance().observeModels(MediaModel, this, {scoped: true});\n }\n\n renderMainPanel(playerID: string): void {\n if (!this.detailPanels.has(playerID)) {\n return;\n }\n const mainWidget = this.splitWidget().mainWidget();\n if (mainWidget) {\n mainWidget.detachChildWidgets();\n }\n this.detailPanels.get(playerID)?.show(this.mainElement());\n }\n\n override wasShown(): void {\n super.wasShown();\n for (const model of SDK.TargetManager.TargetManager.instance().models(MediaModel, {scoped: true})) {\n this.addEventListeners(model);\n }\n }\n\n override willHide(): void {\n for (const model of SDK.TargetManager.TargetManager.instance().models(MediaModel, {scoped: true})) {\n this.removeEventListeners(model);\n }\n }\n\n modelAdded(model: MediaModel): void {\n if (this.isShowing()) {\n this.addEventListeners(model);\n }\n }\n\n modelRemoved(model: MediaModel): void {\n this.removeEventListeners(model);\n }\n\n private addEventListeners(mediaModel: MediaModel): void {\n mediaModel.ensureEnabled();\n mediaModel.addEventListener(Events.PlayerPropertiesChanged, this.propertiesChanged, this);\n mediaModel.addEventListener(Events.PlayerEventsAdded, this.eventsAdded, this);\n mediaModel.addEventListener(Events.PlayerMessagesLogged, this.messagesLogged, this);\n mediaModel.addEventListener(Events.PlayerErrorsRaised, this.errorsRaised, this);\n mediaModel.addEventListener(Events.PlayersCreated, this.playersCreated, this);\n }\n\n private removeEventListeners(mediaModel: MediaModel): void {\n mediaModel.removeEventListener(Events.PlayerPropertiesChanged, this.propertiesChanged, this);\n mediaModel.removeEventListener(Events.PlayerEventsAdded, this.eventsAdded, this);\n mediaModel.removeEventListener(Events.PlayerMessagesLogged, this.messagesLogged, this);\n mediaModel.removeEventListener(Events.PlayerErrorsRaised, this.errorsRaised, this);\n mediaModel.removeEventListener(Events.PlayersCreated, this.playersCreated, this);\n }\n\n private onPlayerCreated(playerID: string): void {\n this.sidebar.addMediaElementItem(playerID);\n this.detailPanels.set(playerID, new PlayerDetailView());\n this.downloadStore.addPlayer(playerID);\n }\n\n private propertiesChanged(event: Common.EventTarget.EventTargetEvent):\n void {\n for (const property of event.data.properties) {\n this.onProperty(event.data.playerId, property);\n }\n }\n\n private eventsAdded(event: Common.EventTarget.EventTargetEvent): void {\n for (const ev of event.data.events) {\n // TODO(crbug.com/1228674): The conversion from Protocol.Media.PlayerEvent to PlayerEvent happens implicitly\n // by augmenting the protocol type with some additional property in various places. This needs to be cleaned up\n // in a conversion function that takes the protocol type and produces the PlayerEvent type.\n this.onEvent(event.data.playerId, ev as PlayerEvent);\n }\n }\n\n private messagesLogged(event: Common.EventTarget.EventTargetEvent): void {\n for (const message of event.data.messages) {\n this.onMessage(event.data.playerId, message);\n }\n }\n\n private errorsRaised(event: Common.EventTarget.EventTargetEvent): void {\n for (const error of event.data.errors) {\n this.onError(event.data.playerId, error);\n }\n }\n\n private shouldPropagate(playerID: string): boolean {\n return !this.deletedPlayers.has(playerID) && this.detailPanels.has(playerID);\n }\n\n onProperty(playerID: string, property: Protocol.Media.PlayerProperty): void {\n if (!this.shouldPropagate(playerID)) {\n return;\n }\n this.sidebar.onProperty(playerID, property);\n this.downloadStore.onProperty(playerID, property);\n this.detailPanels.get(playerID)?.onProperty(property);\n }\n\n onError(playerID: string, error: Protocol.Media.PlayerError): void {\n if (!this.shouldPropagate(playerID)) {\n return;\n }\n this.sidebar.onError(playerID, error);\n this.downloadStore.onError(playerID, error);\n this.detailPanels.get(playerID)?.onError(error);\n }\n\n onMessage(playerID: string, message: Protocol.Media.PlayerMessage): void {\n if (!this.shouldPropagate(playerID)) {\n return;\n }\n this.sidebar.onMessage(playerID, message);\n this.downloadStore.onMessage(playerID, message);\n this.detailPanels.get(playerID)?.onMessage(message);\n }\n\n onEvent(playerID: string, event: PlayerEvent): void {\n if (!this.shouldPropagate(playerID)) {\n return;\n }\n this.sidebar.onEvent(playerID, event);\n this.downloadStore.onEvent(playerID, event);\n this.detailPanels.get(playerID)?.onEvent(event);\n }\n\n private playersCreated(event: Common.EventTarget.EventTargetEvent): void {\n for (const playerID of event.data) {\n this.onPlayerCreated(playerID);\n }\n }\n\n markPlayerForDeletion(playerID: string): void {\n // TODO(tmathmeyer): send this to chromium to save the storage space there too.\n this.deletedPlayers.add(playerID);\n this.detailPanels.delete(playerID);\n this.sidebar.deletePlayer(playerID);\n this.downloadStore.deletePlayer(playerID);\n }\n\n markOtherPlayersForDeletion(playerID: string): void {\n for (const keyID of this.detailPanels.keys()) {\n if (keyID !== playerID) {\n this.markPlayerForDeletion(keyID);\n }\n }\n }\n\n exportPlayerData(playerID: string): void {\n const dump = this.downloadStore.exportPlayerData(playerID);\n const uriContent = 'data:application/octet-stream,' + encodeURIComponent(JSON.stringify(dump, null, 2));\n const anchor = document.createElement('a');\n anchor.href = uriContent;\n anchor.download = playerID + '.json';\n anchor.click();\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/media/PlayerMessagesView.js b/public/panels/media/PlayerMessagesView.js index e0f3311f8..1fe6894f9 100644 --- a/public/panels/media/PlayerMessagesView.js +++ b/public/panels/media/PlayerMessagesView.js @@ -220,12 +220,11 @@ export class PlayerMessagesView extends UI.Widget.VBox { createDropdown() { const items = new UI.ListModel.ListModel(); this.messageLevelSelector = new MessageLevelSelector(items, this); - const dropDown = new UI.SoftDropDown.SoftDropDown(items, this.messageLevelSelector); + const dropDown = new UI.SoftDropDown.SoftDropDown(items, this.messageLevelSelector, 'log-level'); dropDown.setRowHeight(18); this.messageLevelSelector.populate(); this.messageLevelSelector.setDefault(dropDown); const dropDownItem = new UI.Toolbar.ToolbarItem(dropDown.element); - dropDownItem.element.setAttribute('jslog', `${VisualLogging.dropDown().track({ click: true }).context('log-level')}`); dropDownItem.element.classList.add('toolbar-has-dropdown'); dropDownItem.setEnabled(true); dropDownItem.setTitle(this.messageLevelSelector.defaultTitle()); diff --git a/public/panels/media/PlayerMessagesView.js.map b/public/panels/media/PlayerMessagesView.js.map index 48f2b806c..0c3e777b0 100644 --- a/public/panels/media/PlayerMessagesView.js.map +++ b/public/panels/media/PlayerMessagesView.js.map @@ -1 +1 @@ -{"version":3,"file":"PlayerMessagesView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/media/PlayerMessagesView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source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport playerMessagesViewStyles from './playerMessagesView.css.js';\n\nconst UIStrings = {\n /**\n *@description A context menu item in the Console View of the Console panel\n */\n default: 'Default',\n /**\n *@description Text in Network Throttling Selector of the Network panel\n */\n custom: 'Custom',\n /**\n *@description Text for everything\n */\n all: 'All',\n /**\n *@description Text for errors\n */\n error: 'Error',\n /**\n *@description Text to indicate an item is a warning\n */\n warning: 'Warning',\n /**\n *@description Sdk console message message level info of level Labels in Console View of the Console panel\n */\n info: 'Info',\n /**\n *@description Debug log level\n */\n debug: 'Debug',\n /**\n *@description Label for selecting between the set of log levels to show.\n */\n logLevel: 'Log level:',\n /**\n *@description Default text for user-text-entry for searching log messages.\n */\n filterLogMessages: 'Filter log messages',\n /**\n *@description The label for the group name that this error belongs to.\n */\n errorGroupLabel: 'Error Group:',\n /**\n *@description The label for the numeric code associated with this error.\n */\n errorCodeLabel: 'Error Code:',\n /**\n *@description The label for extra data associated with an error.\n */\n errorDataLabel: 'Data:',\n /**\n *@description The label for the stacktrace associated with the error.\n */\n errorStackLabel: 'Stacktrace:',\n /**\n *@description The label for a root cause error associated with this error.\n */\n errorCauseLabel: 'Caused by:',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/media/PlayerMessagesView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst enum MessageLevelBitfield {\n Error = 0b0001,\n Warning = 0b0010,\n Info = 0b0100,\n Debug = 0b1000,\n\n Default = 0b0111, // Error, Warning, Info\n All = 0b1111, // Error, Warning, Info, Debug\n Custom = 0,\n}\n\ninterface SelectableLevel {\n title: string;\n value: MessageLevelBitfield;\n stringValue: string;\n selectable?: boolean;\n overwrite?: boolean;\n}\n\nclass MessageLevelSelector implements UI.SoftDropDown.Delegate {\n private readonly items: UI.ListModel.ListModel;\n private readonly view: PlayerMessagesView;\n private readonly itemMap: Map;\n private hiddenLevels: string[];\n private bitFieldValue: MessageLevelBitfield;\n private readonly savedBitFieldValue: MessageLevelBitfield;\n private readonly defaultTitleInternal: Common.UIString.LocalizedString;\n private readonly customTitle: Common.UIString.LocalizedString;\n private readonly allTitle: Common.UIString.LocalizedString;\n elementsForItems: WeakMap;\n\n constructor(items: UI.ListModel.ListModel, view: PlayerMessagesView) {\n this.items = items;\n this.view = view;\n this.itemMap = new Map();\n\n this.hiddenLevels = [];\n\n this.bitFieldValue = MessageLevelBitfield.Default;\n this.savedBitFieldValue = MessageLevelBitfield.Default;\n\n this.defaultTitleInternal = i18nString(UIStrings.default);\n this.customTitle = i18nString(UIStrings.custom);\n this.allTitle = i18nString(UIStrings.all);\n\n this.elementsForItems = new WeakMap();\n }\n\n defaultTitle(): Common.UIString.LocalizedString {\n return this.defaultTitleInternal;\n }\n\n setDefault(dropdown: UI.SoftDropDown.SoftDropDown): void {\n dropdown.selectItem(this.items.at(0));\n }\n\n populate(): void {\n this.items.insert(this.items.length, {\n title: this.defaultTitleInternal,\n overwrite: true,\n stringValue: '',\n value: MessageLevelBitfield.Default,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: this.allTitle,\n overwrite: true,\n stringValue: '',\n value: MessageLevelBitfield.All,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: i18nString(UIStrings.error),\n overwrite: false,\n stringValue: 'error',\n value: MessageLevelBitfield.Error,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: i18nString(UIStrings.warning),\n overwrite: false,\n stringValue: 'warning',\n value: MessageLevelBitfield.Warning,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: i18nString(UIStrings.info),\n overwrite: false,\n stringValue: 'info',\n value: MessageLevelBitfield.Info,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: i18nString(UIStrings.debug),\n overwrite: false,\n stringValue: 'debug',\n value: MessageLevelBitfield.Debug,\n selectable: undefined,\n });\n }\n\n private updateCheckMarks(): void {\n this.hiddenLevels = [];\n for (const [key, item] of this.itemMap) {\n if (!item.overwrite) {\n const elementForItem = this.elementsForItems.get(item as SelectableLevel);\n if (elementForItem && elementForItem.firstChild) {\n elementForItem.firstChild.remove();\n }\n if (elementForItem && key & this.bitFieldValue) {\n UI.UIUtils.createTextChild(elementForItem.createChild('div'), '✓');\n } else {\n this.hiddenLevels.push(item.stringValue);\n }\n }\n }\n }\n\n titleFor(item: SelectableLevel): string {\n // This would make a lot more sense to have in |itemSelected|, but this\n // method gets called first.\n if (item.overwrite) {\n this.bitFieldValue = item.value;\n } else {\n this.bitFieldValue ^= item.value;\n }\n\n if (this.bitFieldValue === MessageLevelBitfield.Default) {\n return this.defaultTitleInternal;\n }\n\n if (this.bitFieldValue === MessageLevelBitfield.All) {\n return this.allTitle;\n }\n\n const potentialMatch = this.itemMap.get(this.bitFieldValue);\n if (potentialMatch) {\n return potentialMatch.title;\n }\n\n return this.customTitle;\n }\n\n createElementForItem(item: SelectableLevel): Element {\n const element = document.createElement('div');\n const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(\n element, {cssFile: [playerMessagesViewStyles], delegatesFocus: undefined});\n const container = shadowRoot.createChild('div', 'media-messages-level-dropdown-element');\n const checkBox = container.createChild('div', 'media-messages-level-dropdown-checkbox') as HTMLElement;\n const text = container.createChild('span', 'media-messages-level-dropdown-text');\n UI.UIUtils.createTextChild(text, item.title);\n this.elementsForItems.set(item, checkBox);\n this.itemMap.set(item.value, item);\n this.updateCheckMarks();\n this.view.regenerateMessageDisplayCss(this.hiddenLevels);\n return element;\n }\n\n isItemSelectable(_item: SelectableLevel): boolean {\n return true;\n }\n\n itemSelected(_item: SelectableLevel|null): void {\n this.updateCheckMarks();\n this.view.regenerateMessageDisplayCss(this.hiddenLevels);\n }\n\n highlightedItemChanged(\n _from: SelectableLevel|null, _to: SelectableLevel|null, _fromElement: Element|null,\n _toElement: Element|null): void {\n }\n}\n\nexport class PlayerMessagesView extends UI.Widget.VBox {\n private readonly headerPanel: HTMLElement;\n private readonly bodyPanel: HTMLElement;\n private messageLevelSelector?: MessageLevelSelector;\n\n constructor() {\n super();\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('messages')}`);\n\n this.headerPanel = this.contentElement.createChild('div', 'media-messages-header');\n this.bodyPanel = this.contentElement.createChild('div', 'media-messages-body');\n\n this.buildToolbar();\n }\n\n private buildToolbar(): void {\n const toolbar = new UI.Toolbar.Toolbar('media-messages-toolbar', this.headerPanel);\n toolbar.appendText(i18nString(UIStrings.logLevel));\n toolbar.appendToolbarItem(this.createDropdown());\n toolbar.appendSeparator();\n toolbar.appendToolbarItem(this.createFilterInput());\n }\n\n private createDropdown(): UI.Toolbar.ToolbarItem {\n const items = new UI.ListModel.ListModel();\n this.messageLevelSelector = new MessageLevelSelector(items, this);\n const dropDown = new UI.SoftDropDown.SoftDropDown(items, this.messageLevelSelector);\n dropDown.setRowHeight(18);\n\n this.messageLevelSelector.populate();\n this.messageLevelSelector.setDefault(dropDown);\n\n const dropDownItem = new UI.Toolbar.ToolbarItem(dropDown.element);\n dropDownItem.element.setAttribute('jslog', `${VisualLogging.dropDown().track({click: true}).context('log-level')}`);\n dropDownItem.element.classList.add('toolbar-has-dropdown');\n dropDownItem.setEnabled(true);\n dropDownItem.setTitle(this.messageLevelSelector.defaultTitle());\n UI.ARIAUtils.setLabel(\n dropDownItem.element, `${i18nString(UIStrings.logLevel)} ${this.messageLevelSelector.defaultTitle()}`);\n return dropDownItem;\n }\n\n private createFilterInput(): UI.Toolbar.ToolbarInput {\n const filterInput = new UI.Toolbar.ToolbarInput(i18nString(UIStrings.filterLogMessages));\n filterInput.addEventListener(UI.Toolbar.ToolbarInput.Event.TextChanged, (data: {data: string}) => {\n this.filterByString(data as {\n data: string,\n });\n }, this);\n return filterInput;\n }\n\n regenerateMessageDisplayCss(hiddenLevels: string[]): void {\n const messages = this.bodyPanel.getElementsByClassName('media-messages-message-container');\n for (const message of messages) {\n if (this.matchesHiddenLevels(message, hiddenLevels)) {\n message.classList.add('media-messages-message-unselected');\n } else {\n message.classList.remove('media-messages-message-unselected');\n }\n }\n }\n\n private matchesHiddenLevels(element: Element, hiddenLevels: string[]): boolean {\n for (const level of hiddenLevels) {\n if (element.classList.contains('media-message-' + level)) {\n return true;\n }\n }\n return false;\n }\n\n private filterByString(userStringData: {data: string}): void {\n const userString = userStringData.data;\n const messages = this.bodyPanel.getElementsByClassName('media-messages-message-container');\n\n for (const message of messages) {\n if (userString === '') {\n message.classList.remove('media-messages-message-filtered');\n } else if (message.textContent && message.textContent.includes(userString)) {\n message.classList.remove('media-messages-message-filtered');\n } else {\n message.classList.add('media-messages-message-filtered');\n }\n }\n }\n\n addMessage(message: Protocol.Media.PlayerMessage): void {\n const container =\n this.bodyPanel.createChild('div', 'media-messages-message-container media-message-' + message.level);\n UI.UIUtils.createTextChild(container, message.message);\n }\n\n private errorToDiv(error: Protocol.Media.PlayerError): Element {\n const entry = UI.Fragment.Fragment.build`\n
\n
\n \n ${error.errorType}\n
\n
\n \n ${error.code}\n
\n
\n
\n
\n
\n
\n
\n `;\n\n entry.$('status-error-group').textContent = i18nString(UIStrings.errorGroupLabel);\n entry.$('status-error-code').textContent = i18nString(UIStrings.errorCodeLabel);\n\n if (Object.keys(error.data).length !== 0) {\n const label = entry.$('status-error-data').createChild('span', 'status-error-field-label');\n UI.UIUtils.createTextChild(label, i18nString(UIStrings.errorDataLabel));\n const dataContent = entry.$('status-error-data').createChild('div');\n for (const [key, value] of Object.entries(error.data)) {\n const datumContent = dataContent.createChild('div');\n UI.UIUtils.createTextChild(datumContent, `${key}: ${value}`);\n }\n }\n\n if (error.stack.length !== 0) {\n const label = entry.$('status-error-stack').createChild('span', 'status-error-field-label');\n UI.UIUtils.createTextChild(label, i18nString(UIStrings.errorStackLabel));\n const stackContent = entry.$('status-error-stack').createChild('div');\n for (const stackEntry of error.stack) {\n const frameBox = stackContent.createChild('div');\n UI.UIUtils.createTextChild(frameBox, `${stackEntry.file}:${stackEntry.line}`);\n }\n }\n\n if (error.cause.length !== 0) {\n const label = entry.$('status-error-cause').createChild('span', 'status-error-field-label');\n UI.UIUtils.createTextChild(label, i18nString(UIStrings.errorCauseLabel));\n entry.$('status-error-cause').appendChild(this.errorToDiv(error.cause[0]));\n }\n\n return entry.element();\n }\n\n addError(error: Protocol.Media.PlayerError): void {\n const container = this.bodyPanel.createChild('div', 'media-messages-message-container media-message-error');\n container.appendChild(this.errorToDiv(error));\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([playerMessagesViewStyles]);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"PlayerMessagesView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/media/PlayerMessagesView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,GAAG,EAAE,KAAK;IACV;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,QAAQ,EAAE,YAAY;IACtB;;OAEG;IACH,iBAAiB,EAAE,qBAAqB;IACxC;;OAEG;IACH,eAAe,EAAE,cAAc;IAC/B;;OAEG;IACH,cAAc,EAAE,aAAa;IAC7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AQ,CAAC,KAAiC;QACxC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,sDAAsD,CAAC,CAAC;QAC5G,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport playerMessagesViewStyles from './playerMessagesView.css.js';\n\nconst UIStrings = {\n /**\n *@description A context menu item in the Console View of the Console panel\n */\n default: 'Default',\n /**\n *@description Text in Network Throttling Selector of the Network panel\n */\n custom: 'Custom',\n /**\n *@description Text for everything\n */\n all: 'All',\n /**\n *@description Text for errors\n */\n error: 'Error',\n /**\n *@description Text to indicate an item is a warning\n */\n warning: 'Warning',\n /**\n *@description Sdk console message message level info of level Labels in Console View of the Console panel\n */\n info: 'Info',\n /**\n *@description Debug log level\n */\n debug: 'Debug',\n /**\n *@description Label for selecting between the set of log levels to show.\n */\n logLevel: 'Log level:',\n /**\n *@description Default text for user-text-entry for searching log messages.\n */\n filterLogMessages: 'Filter log messages',\n /**\n *@description The label for the group name that this error belongs to.\n */\n errorGroupLabel: 'Error Group:',\n /**\n *@description The label for the numeric code associated with this error.\n */\n errorCodeLabel: 'Error Code:',\n /**\n *@description The label for extra data associated with an error.\n */\n errorDataLabel: 'Data:',\n /**\n *@description The label for the stacktrace associated with the error.\n */\n errorStackLabel: 'Stacktrace:',\n /**\n *@description The label for a root cause error associated with this error.\n */\n errorCauseLabel: 'Caused by:',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/media/PlayerMessagesView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst enum MessageLevelBitfield {\n Error = 0b0001,\n Warning = 0b0010,\n Info = 0b0100,\n Debug = 0b1000,\n\n Default = 0b0111, // Error, Warning, Info\n All = 0b1111, // Error, Warning, Info, Debug\n Custom = 0,\n}\n\ninterface SelectableLevel {\n title: string;\n value: MessageLevelBitfield;\n stringValue: string;\n selectable?: boolean;\n overwrite?: boolean;\n}\n\nclass MessageLevelSelector implements UI.SoftDropDown.Delegate {\n private readonly items: UI.ListModel.ListModel;\n private readonly view: PlayerMessagesView;\n private readonly itemMap: Map;\n private hiddenLevels: string[];\n private bitFieldValue: MessageLevelBitfield;\n private readonly savedBitFieldValue: MessageLevelBitfield;\n private readonly defaultTitleInternal: Common.UIString.LocalizedString;\n private readonly customTitle: Common.UIString.LocalizedString;\n private readonly allTitle: Common.UIString.LocalizedString;\n elementsForItems: WeakMap;\n\n constructor(items: UI.ListModel.ListModel, view: PlayerMessagesView) {\n this.items = items;\n this.view = view;\n this.itemMap = new Map();\n\n this.hiddenLevels = [];\n\n this.bitFieldValue = MessageLevelBitfield.Default;\n this.savedBitFieldValue = MessageLevelBitfield.Default;\n\n this.defaultTitleInternal = i18nString(UIStrings.default);\n this.customTitle = i18nString(UIStrings.custom);\n this.allTitle = i18nString(UIStrings.all);\n\n this.elementsForItems = new WeakMap();\n }\n\n defaultTitle(): Common.UIString.LocalizedString {\n return this.defaultTitleInternal;\n }\n\n setDefault(dropdown: UI.SoftDropDown.SoftDropDown): void {\n dropdown.selectItem(this.items.at(0));\n }\n\n populate(): void {\n this.items.insert(this.items.length, {\n title: this.defaultTitleInternal,\n overwrite: true,\n stringValue: '',\n value: MessageLevelBitfield.Default,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: this.allTitle,\n overwrite: true,\n stringValue: '',\n value: MessageLevelBitfield.All,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: i18nString(UIStrings.error),\n overwrite: false,\n stringValue: 'error',\n value: MessageLevelBitfield.Error,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: i18nString(UIStrings.warning),\n overwrite: false,\n stringValue: 'warning',\n value: MessageLevelBitfield.Warning,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: i18nString(UIStrings.info),\n overwrite: false,\n stringValue: 'info',\n value: MessageLevelBitfield.Info,\n selectable: undefined,\n });\n\n this.items.insert(this.items.length, {\n title: i18nString(UIStrings.debug),\n overwrite: false,\n stringValue: 'debug',\n value: MessageLevelBitfield.Debug,\n selectable: undefined,\n });\n }\n\n private updateCheckMarks(): void {\n this.hiddenLevels = [];\n for (const [key, item] of this.itemMap) {\n if (!item.overwrite) {\n const elementForItem = this.elementsForItems.get(item as SelectableLevel);\n if (elementForItem && elementForItem.firstChild) {\n elementForItem.firstChild.remove();\n }\n if (elementForItem && key & this.bitFieldValue) {\n UI.UIUtils.createTextChild(elementForItem.createChild('div'), '✓');\n } else {\n this.hiddenLevels.push(item.stringValue);\n }\n }\n }\n }\n\n titleFor(item: SelectableLevel): string {\n // This would make a lot more sense to have in |itemSelected|, but this\n // method gets called first.\n if (item.overwrite) {\n this.bitFieldValue = item.value;\n } else {\n this.bitFieldValue ^= item.value;\n }\n\n if (this.bitFieldValue === MessageLevelBitfield.Default) {\n return this.defaultTitleInternal;\n }\n\n if (this.bitFieldValue === MessageLevelBitfield.All) {\n return this.allTitle;\n }\n\n const potentialMatch = this.itemMap.get(this.bitFieldValue);\n if (potentialMatch) {\n return potentialMatch.title;\n }\n\n return this.customTitle;\n }\n\n createElementForItem(item: SelectableLevel): Element {\n const element = document.createElement('div');\n const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(\n element, {cssFile: [playerMessagesViewStyles], delegatesFocus: undefined});\n const container = shadowRoot.createChild('div', 'media-messages-level-dropdown-element');\n const checkBox = container.createChild('div', 'media-messages-level-dropdown-checkbox') as HTMLElement;\n const text = container.createChild('span', 'media-messages-level-dropdown-text');\n UI.UIUtils.createTextChild(text, item.title);\n this.elementsForItems.set(item, checkBox);\n this.itemMap.set(item.value, item);\n this.updateCheckMarks();\n this.view.regenerateMessageDisplayCss(this.hiddenLevels);\n return element;\n }\n\n isItemSelectable(_item: SelectableLevel): boolean {\n return true;\n }\n\n itemSelected(_item: SelectableLevel|null): void {\n this.updateCheckMarks();\n this.view.regenerateMessageDisplayCss(this.hiddenLevels);\n }\n\n highlightedItemChanged(\n _from: SelectableLevel|null, _to: SelectableLevel|null, _fromElement: Element|null,\n _toElement: Element|null): void {\n }\n}\n\nexport class PlayerMessagesView extends UI.Widget.VBox {\n private readonly headerPanel: HTMLElement;\n private readonly bodyPanel: HTMLElement;\n private messageLevelSelector?: MessageLevelSelector;\n\n constructor() {\n super();\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('messages')}`);\n\n this.headerPanel = this.contentElement.createChild('div', 'media-messages-header');\n this.bodyPanel = this.contentElement.createChild('div', 'media-messages-body');\n\n this.buildToolbar();\n }\n\n private buildToolbar(): void {\n const toolbar = new UI.Toolbar.Toolbar('media-messages-toolbar', this.headerPanel);\n toolbar.appendText(i18nString(UIStrings.logLevel));\n toolbar.appendToolbarItem(this.createDropdown());\n toolbar.appendSeparator();\n toolbar.appendToolbarItem(this.createFilterInput());\n }\n\n private createDropdown(): UI.Toolbar.ToolbarItem {\n const items = new UI.ListModel.ListModel();\n this.messageLevelSelector = new MessageLevelSelector(items, this);\n const dropDown = new UI.SoftDropDown.SoftDropDown(items, this.messageLevelSelector, 'log-level');\n dropDown.setRowHeight(18);\n\n this.messageLevelSelector.populate();\n this.messageLevelSelector.setDefault(dropDown);\n\n const dropDownItem = new UI.Toolbar.ToolbarItem(dropDown.element);\n dropDownItem.element.classList.add('toolbar-has-dropdown');\n dropDownItem.setEnabled(true);\n dropDownItem.setTitle(this.messageLevelSelector.defaultTitle());\n UI.ARIAUtils.setLabel(\n dropDownItem.element, `${i18nString(UIStrings.logLevel)} ${this.messageLevelSelector.defaultTitle()}`);\n return dropDownItem;\n }\n\n private createFilterInput(): UI.Toolbar.ToolbarInput {\n const filterInput = new UI.Toolbar.ToolbarInput(i18nString(UIStrings.filterLogMessages));\n filterInput.addEventListener(UI.Toolbar.ToolbarInput.Event.TextChanged, (data: {data: string}) => {\n this.filterByString(data as {\n data: string,\n });\n }, this);\n return filterInput;\n }\n\n regenerateMessageDisplayCss(hiddenLevels: string[]): void {\n const messages = this.bodyPanel.getElementsByClassName('media-messages-message-container');\n for (const message of messages) {\n if (this.matchesHiddenLevels(message, hiddenLevels)) {\n message.classList.add('media-messages-message-unselected');\n } else {\n message.classList.remove('media-messages-message-unselected');\n }\n }\n }\n\n private matchesHiddenLevels(element: Element, hiddenLevels: string[]): boolean {\n for (const level of hiddenLevels) {\n if (element.classList.contains('media-message-' + level)) {\n return true;\n }\n }\n return false;\n }\n\n private filterByString(userStringData: {data: string}): void {\n const userString = userStringData.data;\n const messages = this.bodyPanel.getElementsByClassName('media-messages-message-container');\n\n for (const message of messages) {\n if (userString === '') {\n message.classList.remove('media-messages-message-filtered');\n } else if (message.textContent && message.textContent.includes(userString)) {\n message.classList.remove('media-messages-message-filtered');\n } else {\n message.classList.add('media-messages-message-filtered');\n }\n }\n }\n\n addMessage(message: Protocol.Media.PlayerMessage): void {\n const container =\n this.bodyPanel.createChild('div', 'media-messages-message-container media-message-' + message.level);\n UI.UIUtils.createTextChild(container, message.message);\n }\n\n private errorToDiv(error: Protocol.Media.PlayerError): Element {\n const entry = UI.Fragment.Fragment.build`\n
\n
\n \n ${error.errorType}\n
\n
\n \n ${error.code}\n
\n
\n
\n
\n
\n
\n
\n `;\n\n entry.$('status-error-group').textContent = i18nString(UIStrings.errorGroupLabel);\n entry.$('status-error-code').textContent = i18nString(UIStrings.errorCodeLabel);\n\n if (Object.keys(error.data).length !== 0) {\n const label = entry.$('status-error-data').createChild('span', 'status-error-field-label');\n UI.UIUtils.createTextChild(label, i18nString(UIStrings.errorDataLabel));\n const dataContent = entry.$('status-error-data').createChild('div');\n for (const [key, value] of Object.entries(error.data)) {\n const datumContent = dataContent.createChild('div');\n UI.UIUtils.createTextChild(datumContent, `${key}: ${value}`);\n }\n }\n\n if (error.stack.length !== 0) {\n const label = entry.$('status-error-stack').createChild('span', 'status-error-field-label');\n UI.UIUtils.createTextChild(label, i18nString(UIStrings.errorStackLabel));\n const stackContent = entry.$('status-error-stack').createChild('div');\n for (const stackEntry of error.stack) {\n const frameBox = stackContent.createChild('div');\n UI.UIUtils.createTextChild(frameBox, `${stackEntry.file}:${stackEntry.line}`);\n }\n }\n\n if (error.cause.length !== 0) {\n const label = entry.$('status-error-cause').createChild('span', 'status-error-field-label');\n UI.UIUtils.createTextChild(label, i18nString(UIStrings.errorCauseLabel));\n entry.$('status-error-cause').appendChild(this.errorToDiv(error.cause[0]));\n }\n\n return entry.element();\n }\n\n addError(error: Protocol.Media.PlayerError): void {\n const container = this.bodyPanel.createChild('div', 'media-messages-message-container media-message-error');\n container.appendChild(this.errorToDiv(error));\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([playerMessagesViewStyles]);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/media/media-meta.js b/public/panels/media/media-meta.js index 51867b3d5..7bbd3878c 100644 --- a/public/panels/media/media-meta.js +++ b/public/panels/media/media-meta.js @@ -35,7 +35,7 @@ UI.ViewManager.registerViewExtension({ order: 100, async loadView() { const Media = await loadMediaModule(); - return Media.MainView.MainView.instance(); + return new Media.MainView.MainView(); }, tags: [ i18nLazyString(UIStrings.media), diff --git a/public/panels/media/media-meta.js.map b/public/panels/media/media-meta.js.map index 47986e2a5..22fdf295d 100644 --- a/public/panels/media/media-meta.js.map +++ b/public/panels/media/media-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"media-meta.js","sourceRoot":"","sources":["../../../../../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// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Media from './media.js';\n\nconst UIStrings = {\n /**\n *@description Text that appears on a button for the media resource type filter.\n */\n media: 'Media',\n /**\n *@description The type of media. Lower case.\n */\n video: 'video',\n /**\n *@description Command for showing the media tool.\n */\n showMedia: 'Show Media',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/media/media-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedMediaModule: (typeof Media|undefined);\n\nasync function loadMediaModule(): Promise {\n if (!loadedMediaModule) {\n loadedMediaModule = await import('./media.js');\n }\n return loadedMediaModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.PANEL,\n id: 'medias',\n title: i18nLazyString(UIStrings.media),\n commandPrompt: i18nLazyString(UIStrings.showMedia),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 100,\n async loadView() {\n const Media = await loadMediaModule();\n return Media.MainView.MainView.instance();\n },\n tags: [\n i18nLazyString(UIStrings.media),\n i18nLazyString(UIStrings.video),\n ],\n});\n"]} \ No newline at end of file +{"version":3,"file":"media-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/media/media-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,SAAS,EAAE,YAAY;CACxB,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,4BAA4B,EAAE,SAAS,CAAC,CAAC;AAClF,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,iBAA2C,CAAC;AAEhD,KAAK,UAAU,eAAe;IAC5B,IAAI,CAAC,iBAAiB,EAAE;QACtB,iBAAiB,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;KAChD;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,uDAAyC;IACjD,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC;IACtC,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,SAAS,CAAC;IAClD,WAAW,4DAA0C;IACrD,KAAK,EAAE,GAAG;IACV,KAAK,CAAC,QAAQ;QACZ,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAC;QACtC,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;IACvC,CAAC;IACD,IAAI,EAAE;QACJ,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC;QAC/B,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC;KAChC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Media from './media.js';\n\nconst UIStrings = {\n /**\n *@description Text that appears on a button for the media resource type filter.\n */\n media: 'Media',\n /**\n *@description The type of media. Lower case.\n */\n video: 'video',\n /**\n *@description Command for showing the media tool.\n */\n showMedia: 'Show Media',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/media/media-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedMediaModule: (typeof Media|undefined);\n\nasync function loadMediaModule(): Promise {\n if (!loadedMediaModule) {\n loadedMediaModule = await import('./media.js');\n }\n return loadedMediaModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.PANEL,\n id: 'medias',\n title: i18nLazyString(UIStrings.media),\n commandPrompt: i18nLazyString(UIStrings.showMedia),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 100,\n async loadView() {\n const Media = await loadMediaModule();\n return new Media.MainView.MainView();\n },\n tags: [\n i18nLazyString(UIStrings.media),\n i18nLazyString(UIStrings.video),\n ],\n});\n"]} \ No newline at end of file diff --git a/public/panels/mobile_throttling/ThrottlingSettingsTab.d.ts b/public/panels/mobile_throttling/ThrottlingSettingsTab.d.ts index ee77f6227..9d0010078 100644 --- a/public/panels/mobile_throttling/ThrottlingSettingsTab.d.ts +++ b/public/panels/mobile_throttling/ThrottlingSettingsTab.d.ts @@ -5,9 +5,6 @@ export declare class ThrottlingSettingsTab extends UI.Widget.VBox implements UI. private readonly customSetting; private editor?; constructor(); - static instance(opts?: { - forceNew: null; - }): ThrottlingSettingsTab; wasShown(): void; private conditionsUpdated; private addButtonClicked; diff --git a/public/panels/mobile_throttling/ThrottlingSettingsTab.js b/public/panels/mobile_throttling/ThrottlingSettingsTab.js index afd78fc39..304b76d40 100644 --- a/public/panels/mobile_throttling/ThrottlingSettingsTab.js +++ b/public/panels/mobile_throttling/ThrottlingSettingsTab.js @@ -75,14 +75,13 @@ const UIStrings = { }; const str_ = i18n.i18n.registerUIStrings('panels/mobile_throttling/ThrottlingSettingsTab.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -let throttlingSettingsTabInstance; export class ThrottlingSettingsTab extends UI.Widget.VBox { list; customSetting; editor; constructor() { super(true); - this.element.setAttribute('jslog', `${VisualLogging.section().context('throttling-conditions')}`); + this.element.setAttribute('jslog', `${VisualLogging.pane().context('throttling-conditions')}`); const header = this.contentElement.createChild('div', 'header'); header.textContent = i18nString(UIStrings.networkThrottlingProfiles); UI.ARIAUtils.markAsHeading(header, 1); @@ -96,13 +95,6 @@ export class ThrottlingSettingsTab extends UI.Widget.VBox { this.customSetting.addChangeListener(this.conditionsUpdated, this); this.setDefaultFocusedElement(addButton); } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!throttlingSettingsTabInstance || forceNew) { - throttlingSettingsTabInstance = new ThrottlingSettingsTab(); - } - return throttlingSettingsTabInstance; - } wasShown() { super.wasShown(); this.list.registerCSSFiles([throttlingSettingsTabStyles]); diff --git a/public/panels/mobile_throttling/ThrottlingSettingsTab.js.map b/public/panels/mobile_throttling/ThrottlingSettingsTab.js.map index 6a779ad00..06f588bd0 100644 --- a/public/panels/mobile_throttling/ThrottlingSettingsTab.js.map +++ b/public/panels/mobile_throttling/ThrottlingSettingsTab.js.map @@ -1 +1 @@ -{"version":3,"file":"ThrottlingSettingsTab.js","sourceRoot":"","sources":["../../../../../../front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AAEzE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,yBAAyB,EAAE,6BAA6B;IACxD;;OAEG;IACH,gBAAgB,EAAE,uBAAuB;IACzC;;;OAGG;IACH,GAAG,EAAE,YAAY;IACjB;;OAEG;IACH,WAAW,EAAE,cAAc;IAC3B;;;OAGG;IACH,QAAQ,EAAE,UAAU;IACpB;;;OAGG;IACH,MAAM,EAAE,QAAQ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AG,UAAU,CAAC,SAAS,CAAC,gCAAgC,EAAE,EAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAC,CAAC,CAAC;gBAChH,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,CAAC;aAC9B;YACD,OAAO,EAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAC,CAAC;QAC1C,CAAC;IACH,CAAC;CACF;AAED,SAAS,cAAc,CAAC,UAAkB;IACxC,IAAI,UAAU,GAAG,CAAC,EAAE;QAClB,OAAO,EAAE,CAAC;KACX;IACD,MAAM,gBAAgB,GAAG,UAAU,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IACjD,IAAI,gBAAgB,GAAG,IAAI,EAAE;QAC3B,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAC,CAAC,CAAC;KAC/D;IACD,IAAI,gBAAgB,GAAG,IAAI,GAAG,EAAE,EAAE;QAChC,MAAM,eAAe,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC7D,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,eAAe,EAAC,CAAC,CAAC;KAC9D;IACD,sFAAsF;IACtF,mEAAmE;IACnE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as SDK from '../../core/sdk/sdk.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport throttlingSettingsTabStyles from './throttlingSettingsTab.css.js';\n\nconst UIStrings = {\n /**\n *@description Text in Throttling Settings Tab of the Network panel\n */\n networkThrottlingProfiles: 'Network Throttling Profiles',\n /**\n *@description Text of add conditions button in Throttling Settings Tab of the Network panel\n */\n addCustomProfile: 'Add custom profile...',\n /**\n *@description A value in milliseconds\n *@example {3} PH1\n */\n dms: '{PH1} `ms`',\n /**\n *@description Text in Throttling Settings Tab of the Network panel\n */\n profileName: 'Profile Name',\n /**\n * @description Label for a textbox that sets the download speed in the Throttling Settings Tab.\n * Noun, short for 'download speed'.\n */\n download: 'Download',\n /**\n * @description Label for a textbox that sets the upload speed in the Throttling Settings Tab.\n * Noun, short for 'upload speed'.\n */\n upload: 'Upload',\n /**\n * @description Label for a textbox that sets the latency in the Throttling Settings Tab.\n */\n latency: 'Latency',\n /**\n *@description Text in Throttling Settings Tab of the Network panel\n */\n optional: 'optional',\n /**\n *@description Error message for Profile Name input in Throtting pane of the Settings\n *@example {49} PH1\n */\n profileNameCharactersLengthMust: 'Profile Name characters length must be between 1 to {PH1} inclusive',\n /**\n *@description Error message for Download and Upload inputs in Throttling pane of the Settings\n *@example {Download} PH1\n *@example {0} PH2\n *@example {10000000} PH3\n */\n sMustBeANumberBetweenSkbsToSkbs: '{PH1} must be a number between {PH2} `kbit/s` to {PH3} `kbit/s` inclusive',\n /**\n *@description Error message for Latency input in Throttling pane of the Settings\n *@example {0} PH1\n *@example {1000000} PH2\n */\n latencyMustBeAnIntegerBetweenSms: 'Latency must be an integer between {PH1} `ms` to {PH2} `ms` inclusive',\n /**\n * @description Text in Throttling Settings Tab of the Network panel, indicating the download or\n * upload speed that will be applied in kilobits per second.\n * @example {25} PH1\n */\n dskbits: '{PH1} `kbit/s`',\n /**\n * @description Text in Throttling Settings Tab of the Network panel, indicating the download or\n * upload speed that will be applied in megabits per second.\n * @example {25.4} PH1\n */\n fsmbits: '{PH1} `Mbit/s`',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/mobile_throttling/ThrottlingSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet throttlingSettingsTabInstance: ThrottlingSettingsTab;\n\nexport class ThrottlingSettingsTab extends UI.Widget.VBox implements\n UI.ListWidget.Delegate {\n private readonly list: UI.ListWidget.ListWidget;\n private readonly customSetting: Common.Settings.Setting;\n private editor?: UI.ListWidget.Editor;\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.section().context('throttling-conditions')}`);\n\n const header = this.contentElement.createChild('div', 'header');\n header.textContent = i18nString(UIStrings.networkThrottlingProfiles);\n UI.ARIAUtils.markAsHeading(header, 1);\n\n const addButton = UI.UIUtils.createTextButton(\n i18nString(UIStrings.addCustomProfile), this.addButtonClicked.bind(this), 'add-conditions-button');\n addButton.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context('add-conditions')}`);\n this.contentElement.appendChild(addButton);\n\n this.list = new UI.ListWidget.ListWidget(this);\n this.list.element.classList.add('conditions-list');\n\n this.list.show(this.contentElement);\n\n this.customSetting = Common.Settings.Settings.instance().moduleSetting('customNetworkConditions');\n this.customSetting.addChangeListener(this.conditionsUpdated, this);\n\n this.setDefaultFocusedElement(addButton);\n }\n\n static instance(opts = {forceNew: null}): ThrottlingSettingsTab {\n const {forceNew} = opts;\n if (!throttlingSettingsTabInstance || forceNew) {\n throttlingSettingsTabInstance = new ThrottlingSettingsTab();\n }\n\n return throttlingSettingsTabInstance;\n }\n\n override wasShown(): void {\n super.wasShown();\n this.list.registerCSSFiles([throttlingSettingsTabStyles]);\n this.registerCSSFiles([throttlingSettingsTabStyles]);\n this.conditionsUpdated();\n }\n\n private conditionsUpdated(): void {\n this.list.clear();\n\n const conditions = this.customSetting.get();\n for (let i = 0; i < conditions.length; ++i) {\n this.list.appendItem(conditions[i], true);\n }\n\n this.list.appendSeparator();\n }\n\n private addButtonClicked(): void {\n this.list.addNewItem(this.customSetting.get().length, {title: () => '', download: -1, upload: -1, latency: 0});\n }\n\n renderItem(conditions: SDK.NetworkManager.Conditions, _editable: boolean): Element {\n const element = document.createElement('div');\n element.classList.add('conditions-list-item');\n const title = element.createChild('div', 'conditions-list-text conditions-list-title');\n const titleText = title.createChild('div', 'conditions-list-title-text');\n const castedTitle = this.retrieveOptionsTitle(conditions);\n titleText.textContent = castedTitle;\n UI.Tooltip.Tooltip.install(titleText, castedTitle);\n element.createChild('div', 'conditions-list-separator');\n element.createChild('div', 'conditions-list-text').textContent = throughputText(conditions.download);\n element.createChild('div', 'conditions-list-separator');\n element.createChild('div', 'conditions-list-text').textContent = throughputText(conditions.upload);\n element.createChild('div', 'conditions-list-separator');\n element.createChild('div', 'conditions-list-text').textContent =\n i18nString(UIStrings.dms, {PH1: conditions.latency});\n return element;\n }\n\n removeItemRequested(_item: SDK.NetworkManager.Conditions, index: number): void {\n const list = this.customSetting.get();\n list.splice(index, 1);\n this.customSetting.set(list);\n }\n\n retrieveOptionsTitle(conditions: SDK.NetworkManager.Conditions): string {\n // The title is usually an i18nLazyString except for custom values that are stored in the local storage in the form of a string.\n const castedTitle = typeof conditions.title === 'function' ? conditions.title() : conditions.title;\n return castedTitle;\n }\n\n commitEdit(\n conditions: SDK.NetworkManager.Conditions, editor: UI.ListWidget.Editor,\n isNew: boolean): void {\n conditions.title = editor.control('title').value.trim();\n const download = editor.control('download').value.trim();\n conditions.download = download ? parseInt(download, 10) * (1000 / 8) : -1;\n const upload = editor.control('upload').value.trim();\n conditions.upload = upload ? parseInt(upload, 10) * (1000 / 8) : -1;\n const latency = editor.control('latency').value.trim();\n conditions.latency = latency ? parseInt(latency, 10) : 0;\n\n const list = this.customSetting.get();\n if (isNew) {\n list.push(conditions);\n }\n\n this.customSetting.set(list);\n }\n\n beginEdit(conditions: SDK.NetworkManager.Conditions): UI.ListWidget.Editor {\n const editor = this.createEditor();\n editor.control('title').value = this.retrieveOptionsTitle(conditions);\n editor.control('download').value = conditions.download <= 0 ? '' : String(conditions.download / (1000 / 8));\n editor.control('upload').value = conditions.upload <= 0 ? '' : String(conditions.upload / (1000 / 8));\n editor.control('latency').value = conditions.latency ? String(conditions.latency) : '';\n return editor;\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n this.editor = editor;\n const content = editor.contentElement();\n\n const titles = content.createChild('div', 'conditions-edit-row');\n const nameLabel = titles.createChild('div', 'conditions-list-text conditions-list-title');\n const nameStr = i18nString(UIStrings.profileName);\n const nameLabelText = nameLabel.createChild('div', 'conditions-list-title-text');\n nameLabelText.textContent = nameStr;\n titles.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n const downloadLabel = titles.createChild('div', 'conditions-list-text');\n const downloadStr = i18nString(UIStrings.download);\n const downloadLabelText = downloadLabel.createChild('div', 'conditions-list-title-text');\n downloadLabelText.textContent = downloadStr;\n titles.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n const uploadLabel = titles.createChild('div', 'conditions-list-text');\n const uploadLabelText = uploadLabel.createChild('div', 'conditions-list-title-text');\n const uploadStr = i18nString(UIStrings.upload);\n uploadLabelText.textContent = uploadStr;\n titles.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n const latencyLabel = titles.createChild('div', 'conditions-list-text');\n const latencyStr = i18nString(UIStrings.latency);\n const latencyLabelText = latencyLabel.createChild('div', 'conditions-list-title-text');\n latencyLabelText.textContent = latencyStr;\n\n const fields = content.createChild('div', 'conditions-edit-row');\n const nameInput = editor.createInput('title', 'text', '', titleValidator);\n UI.ARIAUtils.setLabel(nameInput, nameStr);\n fields.createChild('div', 'conditions-list-text conditions-list-title').appendChild(nameInput);\n fields.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n\n let cell = fields.createChild('div', 'conditions-list-text');\n const downloadInput = editor.createInput('download', 'text', i18n.i18n.lockedString('kbit/s'), throughputValidator);\n cell.appendChild(downloadInput);\n UI.ARIAUtils.setLabel(downloadInput, downloadStr);\n const downloadOptional = cell.createChild('div', 'conditions-edit-optional');\n const optionalStr = i18nString(UIStrings.optional);\n downloadOptional.textContent = optionalStr;\n UI.ARIAUtils.setDescription(downloadInput, optionalStr);\n fields.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n\n cell = fields.createChild('div', 'conditions-list-text');\n const uploadInput = editor.createInput('upload', 'text', i18n.i18n.lockedString('kbit/s'), throughputValidator);\n UI.ARIAUtils.setLabel(uploadInput, uploadStr);\n cell.appendChild(uploadInput);\n const uploadOptional = cell.createChild('div', 'conditions-edit-optional');\n uploadOptional.textContent = optionalStr;\n UI.ARIAUtils.setDescription(uploadInput, optionalStr);\n fields.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n\n cell = fields.createChild('div', 'conditions-list-text');\n const latencyInput = editor.createInput('latency', 'text', i18n.i18n.lockedString('ms'), latencyValidator);\n UI.ARIAUtils.setLabel(latencyInput, latencyStr);\n cell.appendChild(latencyInput);\n const latencyOptional = cell.createChild('div', 'conditions-edit-optional');\n latencyOptional.textContent = optionalStr;\n UI.ARIAUtils.setDescription(latencyInput, optionalStr);\n\n return editor;\n\n function titleValidator(_item: SDK.NetworkManager.Conditions, _index: number, input: UI.ListWidget.EditorControl):\n UI.ListWidget.ValidatorResult {\n const maxLength = 49;\n const value = input.value.trim();\n const valid = value.length > 0 && value.length <= maxLength;\n if (!valid) {\n const errorMessage = i18nString(UIStrings.profileNameCharactersLengthMust, {PH1: maxLength});\n return {valid, errorMessage};\n }\n return {valid, errorMessage: undefined};\n }\n\n function throughputValidator(\n _item: SDK.NetworkManager.Conditions, _index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const minThroughput = 0;\n const maxThroughput = 10000000;\n const value = input.value.trim();\n const parsedValue = Number(value);\n const throughput = input.getAttribute('aria-label');\n const valid = !Number.isNaN(parsedValue) && parsedValue >= minThroughput && parsedValue <= maxThroughput;\n if (!valid) {\n const errorMessage = i18nString(\n UIStrings.sMustBeANumberBetweenSkbsToSkbs,\n {PH1: String(throughput), PH2: minThroughput, PH3: maxThroughput});\n return {valid, errorMessage};\n }\n return {valid, errorMessage: undefined};\n }\n\n function latencyValidator(_item: SDK.NetworkManager.Conditions, _index: number, input: UI.ListWidget.EditorControl):\n UI.ListWidget.ValidatorResult {\n const minLatency = 0;\n const maxLatency = 1000000;\n const value = input.value.trim();\n const parsedValue = Number(value);\n const valid = Number.isInteger(parsedValue) && parsedValue >= minLatency && parsedValue <= maxLatency;\n if (!valid) {\n const errorMessage = i18nString(UIStrings.latencyMustBeAnIntegerBetweenSms, {PH1: minLatency, PH2: maxLatency});\n return {valid, errorMessage};\n }\n return {valid, errorMessage: undefined};\n }\n }\n}\n\nfunction throughputText(throughput: number): string {\n if (throughput < 0) {\n return '';\n }\n const throughputInKbps = throughput / (1000 / 8);\n if (throughputInKbps < 1000) {\n return i18nString(UIStrings.dskbits, {PH1: throughputInKbps});\n }\n if (throughputInKbps < 1000 * 10) {\n const formattedResult = (throughputInKbps / 1000).toFixed(1);\n return i18nString(UIStrings.fsmbits, {PH1: formattedResult});\n }\n // TODO(petermarshall): Figure out if there is a difference we need to tell i18n about\n // for these two versions: one with decimal places and one without.\n return i18nString(UIStrings.fsmbits, {PH1: (throughputInKbps / 1000) | 0});\n}\n"]} \ No newline at end of file +{"version":3,"file":"ThrottlingSettingsTab.js","sourceRoot":"","sources":["../../../../../../front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AAEzE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,yBAAyB,EAAE,6BAA6B;IACxD;;OAEG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BAChH,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,CAAC;aAC9B;YACD,OAAO,EAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAC,CAAC;QAC1C,CAAC;IACH,CAAC;CACF;AAED,SAAS,cAAc,CAAC,UAAkB;IACxC,IAAI,UAAU,GAAG,CAAC,EAAE;QAClB,OAAO,EAAE,CAAC;KACX;IACD,MAAM,gBAAgB,GAAG,UAAU,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IACjD,IAAI,gBAAgB,GAAG,IAAI,EAAE;QAC3B,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAC,CAAC,CAAC;KAC/D;IACD,IAAI,gBAAgB,GAAG,IAAI,GAAG,EAAE,EAAE;QAChC,MAAM,eAAe,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC7D,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,eAAe,EAAC,CAAC,CAAC;KAC9D;IACD,sFAAsF;IACtF,mEAAmE;IACnE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAC,GAAG,EAAE,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as SDK from '../../core/sdk/sdk.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport throttlingSettingsTabStyles from './throttlingSettingsTab.css.js';\n\nconst UIStrings = {\n /**\n *@description Text in Throttling Settings Tab of the Network panel\n */\n networkThrottlingProfiles: 'Network Throttling Profiles',\n /**\n *@description Text of add conditions button in Throttling Settings Tab of the Network panel\n */\n addCustomProfile: 'Add custom profile...',\n /**\n *@description A value in milliseconds\n *@example {3} PH1\n */\n dms: '{PH1} `ms`',\n /**\n *@description Text in Throttling Settings Tab of the Network panel\n */\n profileName: 'Profile Name',\n /**\n * @description Label for a textbox that sets the download speed in the Throttling Settings Tab.\n * Noun, short for 'download speed'.\n */\n download: 'Download',\n /**\n * @description Label for a textbox that sets the upload speed in the Throttling Settings Tab.\n * Noun, short for 'upload speed'.\n */\n upload: 'Upload',\n /**\n * @description Label for a textbox that sets the latency in the Throttling Settings Tab.\n */\n latency: 'Latency',\n /**\n *@description Text in Throttling Settings Tab of the Network panel\n */\n optional: 'optional',\n /**\n *@description Error message for Profile Name input in Throtting pane of the Settings\n *@example {49} PH1\n */\n profileNameCharactersLengthMust: 'Profile Name characters length must be between 1 to {PH1} inclusive',\n /**\n *@description Error message for Download and Upload inputs in Throttling pane of the Settings\n *@example {Download} PH1\n *@example {0} PH2\n *@example {10000000} PH3\n */\n sMustBeANumberBetweenSkbsToSkbs: '{PH1} must be a number between {PH2} `kbit/s` to {PH3} `kbit/s` inclusive',\n /**\n *@description Error message for Latency input in Throttling pane of the Settings\n *@example {0} PH1\n *@example {1000000} PH2\n */\n latencyMustBeAnIntegerBetweenSms: 'Latency must be an integer between {PH1} `ms` to {PH2} `ms` inclusive',\n /**\n * @description Text in Throttling Settings Tab of the Network panel, indicating the download or\n * upload speed that will be applied in kilobits per second.\n * @example {25} PH1\n */\n dskbits: '{PH1} `kbit/s`',\n /**\n * @description Text in Throttling Settings Tab of the Network panel, indicating the download or\n * upload speed that will be applied in megabits per second.\n * @example {25.4} PH1\n */\n fsmbits: '{PH1} `Mbit/s`',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/mobile_throttling/ThrottlingSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class ThrottlingSettingsTab extends UI.Widget.VBox implements\n UI.ListWidget.Delegate {\n private readonly list: UI.ListWidget.ListWidget;\n private readonly customSetting: Common.Settings.Setting;\n private editor?: UI.ListWidget.Editor;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('throttling-conditions')}`);\n\n const header = this.contentElement.createChild('div', 'header');\n header.textContent = i18nString(UIStrings.networkThrottlingProfiles);\n UI.ARIAUtils.markAsHeading(header, 1);\n\n const addButton = UI.UIUtils.createTextButton(\n i18nString(UIStrings.addCustomProfile), this.addButtonClicked.bind(this), 'add-conditions-button');\n addButton.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context('add-conditions')}`);\n this.contentElement.appendChild(addButton);\n\n this.list = new UI.ListWidget.ListWidget(this);\n this.list.element.classList.add('conditions-list');\n\n this.list.show(this.contentElement);\n\n this.customSetting = Common.Settings.Settings.instance().moduleSetting('customNetworkConditions');\n this.customSetting.addChangeListener(this.conditionsUpdated, this);\n\n this.setDefaultFocusedElement(addButton);\n }\n\n override wasShown(): void {\n super.wasShown();\n this.list.registerCSSFiles([throttlingSettingsTabStyles]);\n this.registerCSSFiles([throttlingSettingsTabStyles]);\n this.conditionsUpdated();\n }\n\n private conditionsUpdated(): void {\n this.list.clear();\n\n const conditions = this.customSetting.get();\n for (let i = 0; i < conditions.length; ++i) {\n this.list.appendItem(conditions[i], true);\n }\n\n this.list.appendSeparator();\n }\n\n private addButtonClicked(): void {\n this.list.addNewItem(this.customSetting.get().length, {title: () => '', download: -1, upload: -1, latency: 0});\n }\n\n renderItem(conditions: SDK.NetworkManager.Conditions, _editable: boolean): Element {\n const element = document.createElement('div');\n element.classList.add('conditions-list-item');\n const title = element.createChild('div', 'conditions-list-text conditions-list-title');\n const titleText = title.createChild('div', 'conditions-list-title-text');\n const castedTitle = this.retrieveOptionsTitle(conditions);\n titleText.textContent = castedTitle;\n UI.Tooltip.Tooltip.install(titleText, castedTitle);\n element.createChild('div', 'conditions-list-separator');\n element.createChild('div', 'conditions-list-text').textContent = throughputText(conditions.download);\n element.createChild('div', 'conditions-list-separator');\n element.createChild('div', 'conditions-list-text').textContent = throughputText(conditions.upload);\n element.createChild('div', 'conditions-list-separator');\n element.createChild('div', 'conditions-list-text').textContent =\n i18nString(UIStrings.dms, {PH1: conditions.latency});\n return element;\n }\n\n removeItemRequested(_item: SDK.NetworkManager.Conditions, index: number): void {\n const list = this.customSetting.get();\n list.splice(index, 1);\n this.customSetting.set(list);\n }\n\n retrieveOptionsTitle(conditions: SDK.NetworkManager.Conditions): string {\n // The title is usually an i18nLazyString except for custom values that are stored in the local storage in the form of a string.\n const castedTitle = typeof conditions.title === 'function' ? conditions.title() : conditions.title;\n return castedTitle;\n }\n\n commitEdit(\n conditions: SDK.NetworkManager.Conditions, editor: UI.ListWidget.Editor,\n isNew: boolean): void {\n conditions.title = editor.control('title').value.trim();\n const download = editor.control('download').value.trim();\n conditions.download = download ? parseInt(download, 10) * (1000 / 8) : -1;\n const upload = editor.control('upload').value.trim();\n conditions.upload = upload ? parseInt(upload, 10) * (1000 / 8) : -1;\n const latency = editor.control('latency').value.trim();\n conditions.latency = latency ? parseInt(latency, 10) : 0;\n\n const list = this.customSetting.get();\n if (isNew) {\n list.push(conditions);\n }\n\n this.customSetting.set(list);\n }\n\n beginEdit(conditions: SDK.NetworkManager.Conditions): UI.ListWidget.Editor {\n const editor = this.createEditor();\n editor.control('title').value = this.retrieveOptionsTitle(conditions);\n editor.control('download').value = conditions.download <= 0 ? '' : String(conditions.download / (1000 / 8));\n editor.control('upload').value = conditions.upload <= 0 ? '' : String(conditions.upload / (1000 / 8));\n editor.control('latency').value = conditions.latency ? String(conditions.latency) : '';\n return editor;\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n this.editor = editor;\n const content = editor.contentElement();\n\n const titles = content.createChild('div', 'conditions-edit-row');\n const nameLabel = titles.createChild('div', 'conditions-list-text conditions-list-title');\n const nameStr = i18nString(UIStrings.profileName);\n const nameLabelText = nameLabel.createChild('div', 'conditions-list-title-text');\n nameLabelText.textContent = nameStr;\n titles.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n const downloadLabel = titles.createChild('div', 'conditions-list-text');\n const downloadStr = i18nString(UIStrings.download);\n const downloadLabelText = downloadLabel.createChild('div', 'conditions-list-title-text');\n downloadLabelText.textContent = downloadStr;\n titles.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n const uploadLabel = titles.createChild('div', 'conditions-list-text');\n const uploadLabelText = uploadLabel.createChild('div', 'conditions-list-title-text');\n const uploadStr = i18nString(UIStrings.upload);\n uploadLabelText.textContent = uploadStr;\n titles.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n const latencyLabel = titles.createChild('div', 'conditions-list-text');\n const latencyStr = i18nString(UIStrings.latency);\n const latencyLabelText = latencyLabel.createChild('div', 'conditions-list-title-text');\n latencyLabelText.textContent = latencyStr;\n\n const fields = content.createChild('div', 'conditions-edit-row');\n const nameInput = editor.createInput('title', 'text', '', titleValidator);\n UI.ARIAUtils.setLabel(nameInput, nameStr);\n fields.createChild('div', 'conditions-list-text conditions-list-title').appendChild(nameInput);\n fields.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n\n let cell = fields.createChild('div', 'conditions-list-text');\n const downloadInput = editor.createInput('download', 'text', i18n.i18n.lockedString('kbit/s'), throughputValidator);\n cell.appendChild(downloadInput);\n UI.ARIAUtils.setLabel(downloadInput, downloadStr);\n const downloadOptional = cell.createChild('div', 'conditions-edit-optional');\n const optionalStr = i18nString(UIStrings.optional);\n downloadOptional.textContent = optionalStr;\n UI.ARIAUtils.setDescription(downloadInput, optionalStr);\n fields.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n\n cell = fields.createChild('div', 'conditions-list-text');\n const uploadInput = editor.createInput('upload', 'text', i18n.i18n.lockedString('kbit/s'), throughputValidator);\n UI.ARIAUtils.setLabel(uploadInput, uploadStr);\n cell.appendChild(uploadInput);\n const uploadOptional = cell.createChild('div', 'conditions-edit-optional');\n uploadOptional.textContent = optionalStr;\n UI.ARIAUtils.setDescription(uploadInput, optionalStr);\n fields.createChild('div', 'conditions-list-separator conditions-list-separator-invisible');\n\n cell = fields.createChild('div', 'conditions-list-text');\n const latencyInput = editor.createInput('latency', 'text', i18n.i18n.lockedString('ms'), latencyValidator);\n UI.ARIAUtils.setLabel(latencyInput, latencyStr);\n cell.appendChild(latencyInput);\n const latencyOptional = cell.createChild('div', 'conditions-edit-optional');\n latencyOptional.textContent = optionalStr;\n UI.ARIAUtils.setDescription(latencyInput, optionalStr);\n\n return editor;\n\n function titleValidator(_item: SDK.NetworkManager.Conditions, _index: number, input: UI.ListWidget.EditorControl):\n UI.ListWidget.ValidatorResult {\n const maxLength = 49;\n const value = input.value.trim();\n const valid = value.length > 0 && value.length <= maxLength;\n if (!valid) {\n const errorMessage = i18nString(UIStrings.profileNameCharactersLengthMust, {PH1: maxLength});\n return {valid, errorMessage};\n }\n return {valid, errorMessage: undefined};\n }\n\n function throughputValidator(\n _item: SDK.NetworkManager.Conditions, _index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const minThroughput = 0;\n const maxThroughput = 10000000;\n const value = input.value.trim();\n const parsedValue = Number(value);\n const throughput = input.getAttribute('aria-label');\n const valid = !Number.isNaN(parsedValue) && parsedValue >= minThroughput && parsedValue <= maxThroughput;\n if (!valid) {\n const errorMessage = i18nString(\n UIStrings.sMustBeANumberBetweenSkbsToSkbs,\n {PH1: String(throughput), PH2: minThroughput, PH3: maxThroughput});\n return {valid, errorMessage};\n }\n return {valid, errorMessage: undefined};\n }\n\n function latencyValidator(_item: SDK.NetworkManager.Conditions, _index: number, input: UI.ListWidget.EditorControl):\n UI.ListWidget.ValidatorResult {\n const minLatency = 0;\n const maxLatency = 1000000;\n const value = input.value.trim();\n const parsedValue = Number(value);\n const valid = Number.isInteger(parsedValue) && parsedValue >= minLatency && parsedValue <= maxLatency;\n if (!valid) {\n const errorMessage = i18nString(UIStrings.latencyMustBeAnIntegerBetweenSms, {PH1: minLatency, PH2: maxLatency});\n return {valid, errorMessage};\n }\n return {valid, errorMessage: undefined};\n }\n }\n}\n\nfunction throughputText(throughput: number): string {\n if (throughput < 0) {\n return '';\n }\n const throughputInKbps = throughput / (1000 / 8);\n if (throughputInKbps < 1000) {\n return i18nString(UIStrings.dskbits, {PH1: throughputInKbps});\n }\n if (throughputInKbps < 1000 * 10) {\n const formattedResult = (throughputInKbps / 1000).toFixed(1);\n return i18nString(UIStrings.fsmbits, {PH1: formattedResult});\n }\n // TODO(petermarshall): Figure out if there is a difference we need to tell i18n about\n // for these two versions: one with decimal places and one without.\n return i18nString(UIStrings.fsmbits, {PH1: (throughputInKbps / 1000) | 0});\n}\n"]} \ No newline at end of file diff --git a/public/panels/mobile_throttling/mobile_throttling-meta.js b/public/panels/mobile_throttling/mobile_throttling-meta.js index 9b82c4e31..28c056d9b 100644 --- a/public/panels/mobile_throttling/mobile_throttling-meta.js +++ b/public/panels/mobile_throttling/mobile_throttling-meta.js @@ -57,7 +57,7 @@ UI.ViewManager.registerViewExtension({ order: 35, async loadView() { const MobileThrottling = await loadMobileThrottlingModule(); - return MobileThrottling.ThrottlingSettingsTab.ThrottlingSettingsTab.instance(); + return new MobileThrottling.ThrottlingSettingsTab.ThrottlingSettingsTab(); }, settings: [ 'customNetworkConditions', diff --git a/public/panels/mobile_throttling/mobile_throttling-meta.js.map b/public/panels/mobile_throttling/mobile_throttling-meta.js.map index 3ac485ed7..8662dd501 100644 --- a/public/panels/mobile_throttling/mobile_throttling-meta.js.map +++ b/public/panels/mobile_throttling/mobile_throttling-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"mobile_throttling-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/mobile_throttling/mobile_throttling-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,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G,MAAM,0BAA0B,EAAE,CAAC;QAC5D,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;IACjE,CAAC;IACD,IAAI,EAAE;QACJ,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC;QAChC,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;KACxC;CACF,CAAC,CAAC;AAEH,EAAE,CAAC,kBAAkB,CAAC,uBAAuB,CAAC;IAC5C,QAAQ,EAAE,mCAAmC;IAC7C,QAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,OAAO;IACtD,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC;IACzC,KAAK,CAAC,kBAAkB;QACtB,MAAM,gBAAgB,GAAG,MAAM,0BAA0B,EAAE,CAAC;QAC5D,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;IACjE,CAAC;IACD,IAAI,EAAE;QACJ,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC;QAChC,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;KACxC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,MAAM;IACtD,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK;IAC9C,YAAY,EAAE,EAAE;CACjB,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as MobileThrottling from './mobile_throttling.js';\n\nconst UIStrings = {\n /**\n *@description Text for throttling the network\n */\n throttling: 'Throttling',\n /**\n *@description Command for showing the Mobile Throttling tool.\n */\n showThrottling: 'Show Throttling',\n /**\n *@description Title of an action in the network conditions tool to network offline\n */\n goOffline: 'Go offline',\n /**\n *@description A tag of Mobile related settings that can be searched in the command menu\n */\n device: 'device',\n /**\n *@description A tag of Network related actions that can be searched in the command menu\n */\n throttlingTag: 'throttling',\n /**\n * @description Title of an action in the network conditions tool to simulate an environment with a\n * slow 3G connection, i.e. for a low end mobile device.\n */\n enableSlowGThrottling: 'Enable slow `3G` throttling',\n /**\n * @description Title of an action in the network conditions tool to simulate an environment with a\n * medium-speed 3G connection, i.e. for a mid-tier mobile device.\n */\n enableFastGThrottling: 'Enable fast `3G` throttling',\n /**\n *@description Title of an action in the network conditions tool to network online\n */\n goOnline: 'Go online',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/mobile_throttling/mobile_throttling-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedMobileThrottlingModule: (typeof MobileThrottling|undefined);\n\nasync function loadMobileThrottlingModule(): Promise {\n if (!loadedMobileThrottlingModule) {\n loadedMobileThrottlingModule = await import('./mobile_throttling.js');\n }\n return loadedMobileThrottlingModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'throttling-conditions',\n title: i18nLazyString(UIStrings.throttling),\n commandPrompt: i18nLazyString(UIStrings.showThrottling),\n order: 35,\n async loadView() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return MobileThrottling.ThrottlingSettingsTab.ThrottlingSettingsTab.instance();\n },\n settings: [\n 'customNetworkConditions',\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network-conditions.network-offline',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.goOffline),\n async loadActionDelegate() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingManager.ActionDelegate();\n },\n tags: [\n i18nLazyString(UIStrings.device),\n i18nLazyString(UIStrings.throttlingTag),\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network-conditions.network-low-end-mobile',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.enableSlowGThrottling),\n async loadActionDelegate() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingManager.ActionDelegate();\n },\n tags: [\n i18nLazyString(UIStrings.device),\n i18nLazyString(UIStrings.throttlingTag),\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network-conditions.network-mid-tier-mobile',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.enableFastGThrottling),\n async loadActionDelegate() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingManager.ActionDelegate();\n },\n tags: [\n i18nLazyString(UIStrings.device),\n i18nLazyString(UIStrings.throttlingTag),\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network-conditions.network-online',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.goOnline),\n async loadActionDelegate() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingManager.ActionDelegate();\n },\n tags: [\n i18nLazyString(UIStrings.device),\n i18nLazyString(UIStrings.throttlingTag),\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n storageType: Common.Settings.SettingStorageType.Synced,\n settingName: 'customNetworkConditions',\n settingType: Common.Settings.SettingType.ARRAY,\n defaultValue: [],\n});\n"]} \ No newline at end of file +{"version":3,"file":"mobile_throttling-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/mobile_throttling/mobile_throttling-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAA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B,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;IACjE,CAAC;IACD,IAAI,EAAE;QACJ,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC;QAChC,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;KACxC;CACF,CAAC,CAAC;AAEH,EAAE,CAAC,kBAAkB,CAAC,uBAAuB,CAAC;IAC5C,QAAQ,EAAE,mCAAmC;IAC7C,QAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,OAAO;IACtD,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC;IACzC,KAAK,CAAC,kBAAkB;QACtB,MAAM,gBAAgB,GAAG,MAAM,0BAA0B,EAAE,CAAC;QAC5D,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;IACjE,CAAC;IACD,IAAI,EAAE;QACJ,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC;QAChC,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;KACxC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,MAAM;IACtD,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK;IAC9C,YAAY,EAAE,EAAE;CACjB,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as MobileThrottling from './mobile_throttling.js';\n\nconst UIStrings = {\n /**\n *@description Text for throttling the network\n */\n throttling: 'Throttling',\n /**\n *@description Command for showing the Mobile Throttling tool.\n */\n showThrottling: 'Show Throttling',\n /**\n *@description Title of an action in the network conditions tool to network offline\n */\n goOffline: 'Go offline',\n /**\n *@description A tag of Mobile related settings that can be searched in the command menu\n */\n device: 'device',\n /**\n *@description A tag of Network related actions that can be searched in the command menu\n */\n throttlingTag: 'throttling',\n /**\n * @description Title of an action in the network conditions tool to simulate an environment with a\n * slow 3G connection, i.e. for a low end mobile device.\n */\n enableSlowGThrottling: 'Enable slow `3G` throttling',\n /**\n * @description Title of an action in the network conditions tool to simulate an environment with a\n * medium-speed 3G connection, i.e. for a mid-tier mobile device.\n */\n enableFastGThrottling: 'Enable fast `3G` throttling',\n /**\n *@description Title of an action in the network conditions tool to network online\n */\n goOnline: 'Go online',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/mobile_throttling/mobile_throttling-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedMobileThrottlingModule: (typeof MobileThrottling|undefined);\n\nasync function loadMobileThrottlingModule(): Promise {\n if (!loadedMobileThrottlingModule) {\n loadedMobileThrottlingModule = await import('./mobile_throttling.js');\n }\n return loadedMobileThrottlingModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'throttling-conditions',\n title: i18nLazyString(UIStrings.throttling),\n commandPrompt: i18nLazyString(UIStrings.showThrottling),\n order: 35,\n async loadView() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingSettingsTab.ThrottlingSettingsTab();\n },\n settings: [\n 'customNetworkConditions',\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network-conditions.network-offline',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.goOffline),\n async loadActionDelegate() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingManager.ActionDelegate();\n },\n tags: [\n i18nLazyString(UIStrings.device),\n i18nLazyString(UIStrings.throttlingTag),\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network-conditions.network-low-end-mobile',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.enableSlowGThrottling),\n async loadActionDelegate() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingManager.ActionDelegate();\n },\n tags: [\n i18nLazyString(UIStrings.device),\n i18nLazyString(UIStrings.throttlingTag),\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network-conditions.network-mid-tier-mobile',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.enableFastGThrottling),\n async loadActionDelegate() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingManager.ActionDelegate();\n },\n tags: [\n i18nLazyString(UIStrings.device),\n i18nLazyString(UIStrings.throttlingTag),\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network-conditions.network-online',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.goOnline),\n async loadActionDelegate() {\n const MobileThrottling = await loadMobileThrottlingModule();\n return new MobileThrottling.ThrottlingManager.ActionDelegate();\n },\n tags: [\n i18nLazyString(UIStrings.device),\n i18nLazyString(UIStrings.throttlingTag),\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n storageType: Common.Settings.SettingStorageType.Synced,\n settingName: 'customNetworkConditions',\n settingType: Common.Settings.SettingType.ARRAY,\n defaultValue: [],\n});\n"]} \ No newline at end of file diff --git a/public/panels/network/BlockedURLsPane.d.ts b/public/panels/network/BlockedURLsPane.d.ts index 2977ebdd9..8be08d0bc 100644 --- a/public/panels/network/BlockedURLsPane.d.ts +++ b/public/panels/network/BlockedURLsPane.d.ts @@ -1,7 +1,5 @@ -import * as Common from '../../core/common/common.js'; import * as SDK from '../../core/sdk/sdk.js'; import * as UI from '../../ui/legacy/legacy.js'; -export declare let blockedURLsPaneInstance: BlockedURLsPane | null; export declare class BlockedURLsPane extends UI.Widget.VBox implements UI.ListWidget.Delegate { private manager; private readonly toolbar; @@ -9,14 +7,8 @@ export declare class BlockedURLsPane extends UI.Widget.VBox implements UI.ListWi private readonly list; private editor; private blockedCountForUrl; - private readonly updateThrottler; - constructor(updateThrottler: Common.Throttler.Throttler); - static instance(opts?: { - forceNew: boolean; - updateThrottler: Common.Throttler.Throttler; - }): BlockedURLsPane; + constructor(); private createEmptyPlaceholder; - static reset(): void; addPattern(): void; removeAllPatterns(): void; renderItem(pattern: SDK.NetworkManager.BlockedPattern, editable: boolean): Element; @@ -26,10 +18,10 @@ export declare class BlockedURLsPane extends UI.Widget.VBox implements UI.ListWi beginEdit(pattern: SDK.NetworkManager.BlockedPattern): UI.ListWidget.Editor; commitEdit(item: SDK.NetworkManager.BlockedPattern, editor: UI.ListWidget.Editor, isNew: boolean): void; private createEditor; - private update; + update(): void; private blockedRequestsCount; private matches; - reset(): void; + private onNetworkLogReset; private onRequestFinished; wasShown(): void; willHide(): void; diff --git a/public/panels/network/BlockedURLsPane.js b/public/panels/network/BlockedURLsPane.js index 2b3e76081..d8836d353 100644 --- a/public/panels/network/BlockedURLsPane.js +++ b/public/panels/network/BlockedURLsPane.js @@ -1,10 +1,10 @@ // Copyright (c) 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import * as Common from '../../core/common/common.js'; import * as i18n from '../../core/i18n/i18n.js'; import * as Platform from '../../core/platform/platform.js'; import * as SDK from '../../core/sdk/sdk.js'; +import * as Logs from '../../models/logs/logs.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as VisualLogging from '../../ui/visual_logging/visual_logging.js'; import blockedURLsPaneStyles from './blockedURLsPane.css.js'; @@ -50,7 +50,6 @@ const UIStrings = { }; const str_ = i18n.i18n.registerUIStrings('panels/network/BlockedURLsPane.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -export let blockedURLsPaneInstance = null; export class BlockedURLsPane extends UI.Widget.VBox { manager; toolbar; @@ -58,14 +57,11 @@ export class BlockedURLsPane extends UI.Widget.VBox { list; editor; blockedCountForUrl; - updateThrottler; - constructor(updateThrottler) { + constructor() { super(true); this.element.setAttribute('jslog', `${VisualLogging.panel().context('network.blocked-urls')}`); this.manager = SDK.NetworkManager.MultitargetNetworkManager.instance(); - this.manager.addEventListener(SDK.NetworkManager.MultitargetNetworkManager.Events.BlockedPatternsChanged, () => { - void this.update(); - }, this); + this.manager.addEventListener(SDK.NetworkManager.MultitargetNetworkManager.Events.BlockedPatternsChanged, this.update, this); this.toolbar = new UI.Toolbar.Toolbar('', this.contentElement); this.enabledCheckbox = new UI.Toolbar.ToolbarCheckbox(i18nString(UIStrings.enableNetworkRequestBlocking), undefined, this.toggleEnabled.bind(this), 'network.enable-request-blocking'); this.toolbar.appendToolbarItem(this.enabledCheckbox); @@ -79,14 +75,8 @@ export class BlockedURLsPane extends UI.Widget.VBox { this.editor = null; this.blockedCountForUrl = new Map(); SDK.TargetManager.TargetManager.instance().addModelListener(SDK.NetworkManager.NetworkManager, SDK.NetworkManager.Events.RequestFinished, this.onRequestFinished, this, { scoped: true }); - this.updateThrottler = updateThrottler; - void this.update(); - } - static instance(opts) { - if (!blockedURLsPaneInstance || opts?.forceNew) { - blockedURLsPaneInstance = new BlockedURLsPane(opts?.updateThrottler || new Common.Throttler.Throttler(200)); - } - return blockedURLsPaneInstance; + this.update(); + Logs.NetworkLog.NetworkLog.instance().addEventListener(Logs.NetworkLog.Events.Reset, this.onNetworkLogReset, this); } createEmptyPlaceholder() { const element = this.contentElement.createChild('div', 'no-blocked-urls'); @@ -96,11 +86,6 @@ export class BlockedURLsPane extends UI.Widget.VBox { element.appendChild(i18n.i18n.getFormatLocalizedString(str_, UIStrings.networkRequestsAreNotBlockedS, { PH1: addButton })); return element; } - static reset() { - if (blockedURLsPaneInstance) { - blockedURLsPaneInstance.reset(); - } - } addPattern() { this.manager.setBlockingEnabled(true); this.list.addNewItem(0, { url: Platform.DevToolsPath.EmptyUrlString, enabled: true }); @@ -133,7 +118,7 @@ export class BlockedURLsPane extends UI.Widget.VBox { } toggleEnabled() { this.manager.setBlockingEnabled(!this.manager.blockingEnabled()); - void this.update(); + this.update(); } removeItemRequested(pattern, index) { const patterns = this.manager.blockedPatterns(); @@ -191,7 +176,6 @@ export class BlockedURLsPane extends UI.Widget.VBox { for (const pattern of this.manager.blockedPatterns()) { this.list.appendItem(pattern, enabled); } - return Promise.resolve(); } blockedRequestsCount(url) { if (!url) { @@ -221,16 +205,16 @@ export class BlockedURLsPane extends UI.Widget.VBox { } return true; } - reset() { + onNetworkLogReset(_event) { this.blockedCountForUrl.clear(); - void this.updateThrottler.schedule(this.update.bind(this)); + this.update(); } onRequestFinished(event) { const request = event.data; if (request.wasBlocked()) { const count = this.blockedCountForUrl.get(request.url()) || 0; this.blockedCountForUrl.set(request.url(), count + 1); - void this.updateThrottler.schedule(this.update.bind(this)); + this.update(); } } wasShown() { diff --git a/public/panels/network/BlockedURLsPane.js.map b/public/panels/network/BlockedURLsPane.js.map index 0051bfe48..50d28f154 100644 --- a/public/panels/network/BlockedURLsPane.js.map +++ b/public/panels/network/BlockedURLsPane.js.map @@ -1 +1 @@ -{"version":3,"file":"BlockedURLsPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/BlockedURLsPane.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,4BAA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AAO,cAAc;IACzB,YAAY,CAAC,OAA2B,EAAE,QAAgB;QACxD,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QACxD,IAAI,eAAe,KAAK,IAAI,EAAE;YAC5B,OAAO,KAAK,CAAC;SACd;QACD,QAAQ,QAAQ,EAAE;YAChB,KAAK,8CAA8C,CAAC,CAAC;gBACnD,eAAe,CAAC,UAAU,EAAE,CAAC;gBAC7B,OAAO,IAAI,CAAC;aACb;YAED,KAAK,sDAAsD,CAAC,CAAC;gBAC3D,eAAe,CAAC,iBAAiB,EAAE,CAAC;gBACpC,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright (c) 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport blockedURLsPaneStyles from './blockedURLsPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Text to enable blocking of network requests\n */\n enableNetworkRequestBlocking: 'Enable network request blocking',\n /**\n *@description Tooltip text that appears when hovering over the plus button in the Blocked URLs Pane of the Network panel\n */\n addPattern: 'Add pattern',\n /**\n *@description Accessible label for the button to add request blocking patterns in the network request blocking tool\n */\n addNetworkRequestBlockingPattern: 'Add network request blocking pattern',\n /**\n *@description Button to add a pattern to block netwrok requests in the Network request blocking tool\n *@example {Add pattern} PH1\n */\n networkRequestsAreNotBlockedS: 'Network requests are not blocked. {PH1}',\n /**\n *@description Text in Blocked URLs Pane of the Network panel\n *@example {4} PH1\n */\n dBlocked: '{PH1} blocked',\n /**\n *@description Text in Blocked URLs Pane of the Network panel\n */\n textPatternToBlockMatching: 'Text pattern to block matching requests; use * for wildcard',\n /**\n *@description Error text for empty list widget input in Request Blocking tool\n */\n patternInputCannotBeEmpty: 'Pattern input cannot be empty.',\n /**\n *@description Error text for duplicate list widget input in Request Blocking tool\n */\n patternAlreadyExists: 'Pattern already exists.',\n /**\n *@description Message to be announced for a when list item is removed from list widget\n */\n itemDeleted: 'Item successfully deleted',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/BlockedURLsPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport let blockedURLsPaneInstance: BlockedURLsPane|null = null;\n\nexport class BlockedURLsPane extends UI.Widget.VBox implements\n UI.ListWidget.Delegate {\n private manager: SDK.NetworkManager.MultitargetNetworkManager;\n private readonly toolbar: UI.Toolbar.Toolbar;\n private readonly enabledCheckbox: UI.Toolbar.ToolbarCheckbox;\n private readonly list: UI.ListWidget.ListWidget;\n private editor: UI.ListWidget.Editor|null;\n private blockedCountForUrl: Map;\n private readonly updateThrottler: Common.Throttler.Throttler;\n\n constructor(updateThrottler: Common.Throttler.Throttler) {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('network.blocked-urls')}`);\n\n this.manager = SDK.NetworkManager.MultitargetNetworkManager.instance();\n this.manager.addEventListener(SDK.NetworkManager.MultitargetNetworkManager.Events.BlockedPatternsChanged, () => {\n void this.update();\n }, this);\n\n this.toolbar = new UI.Toolbar.Toolbar('', this.contentElement);\n this.enabledCheckbox = new UI.Toolbar.ToolbarCheckbox(\n i18nString(UIStrings.enableNetworkRequestBlocking), undefined, this.toggleEnabled.bind(this),\n 'network.enable-request-blocking');\n this.toolbar.appendToolbarItem(this.enabledCheckbox);\n this.toolbar.appendSeparator();\n this.toolbar.appendToolbarItem(\n UI.Toolbar.Toolbar.createActionButtonForId('network.add-network-request-blocking-pattern'));\n this.toolbar.appendToolbarItem(\n UI.Toolbar.Toolbar.createActionButtonForId('network.remove-all-network-request-blocking-patterns'));\n\n this.list = new UI.ListWidget.ListWidget(this);\n this.list.element.classList.add('blocked-urls');\n\n this.list.setEmptyPlaceholder(this.createEmptyPlaceholder());\n this.list.show(this.contentElement);\n\n this.editor = null;\n\n this.blockedCountForUrl = new Map();\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.NetworkManager.NetworkManager, SDK.NetworkManager.Events.RequestFinished, this.onRequestFinished, this,\n {scoped: true});\n\n this.updateThrottler = updateThrottler;\n\n void this.update();\n }\n\n static instance(opts?: {\n forceNew: boolean,\n updateThrottler: Common.Throttler.Throttler,\n }): BlockedURLsPane {\n if (!blockedURLsPaneInstance || opts?.forceNew) {\n blockedURLsPaneInstance = new BlockedURLsPane(opts?.updateThrottler || new Common.Throttler.Throttler(200));\n }\n return blockedURLsPaneInstance;\n }\n\n private createEmptyPlaceholder(): Element {\n const element = this.contentElement.createChild('div', 'no-blocked-urls');\n const addButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.addPattern), this.addPattern.bind(this), 'add-button', true);\n addButton.setAttribute(\n 'jslog',\n `${VisualLogging.action().track({click: true}).context('network.add-network-request-blocking-pattern')}`);\n UI.ARIAUtils.setLabel(addButton, i18nString(UIStrings.addNetworkRequestBlockingPattern));\n element.appendChild(\n i18n.i18n.getFormatLocalizedString(str_, UIStrings.networkRequestsAreNotBlockedS, {PH1: addButton}));\n return element;\n }\n\n static reset(): void {\n if (blockedURLsPaneInstance) {\n blockedURLsPaneInstance.reset();\n }\n }\n\n addPattern(): void {\n this.manager.setBlockingEnabled(true);\n this.list.addNewItem(0, {url: Platform.DevToolsPath.EmptyUrlString, enabled: true});\n }\n\n removeAllPatterns(): void {\n this.manager.setBlockedPatterns([]);\n }\n\n renderItem(pattern: SDK.NetworkManager.BlockedPattern, editable: boolean): Element {\n const count = this.blockedRequestsCount(pattern.url);\n const element = document.createElement('div');\n element.classList.add('blocked-url');\n const checkbox = (element.createChild('input', 'blocked-url-checkbox') as HTMLInputElement);\n checkbox.type = 'checkbox';\n checkbox.checked = pattern.enabled;\n checkbox.disabled = !editable;\n checkbox.setAttribute('jslog', `${VisualLogging.toggle().track({change: true})}`);\n element.createChild('div', 'blocked-url-label').textContent = pattern.url;\n element.createChild('div', 'blocked-url-count').textContent = i18nString(UIStrings.dBlocked, {PH1: count});\n if (editable) {\n element.addEventListener('click', event => this.togglePattern(pattern, event));\n checkbox.addEventListener('click', event => this.togglePattern(pattern, event));\n }\n return element;\n }\n\n private togglePattern(pattern: SDK.NetworkManager.BlockedPattern, event: Event): void {\n event.consume(true);\n const patterns = this.manager.blockedPatterns();\n patterns.splice(patterns.indexOf(pattern), 1, {enabled: !pattern.enabled, url: pattern.url});\n this.manager.setBlockedPatterns(patterns);\n }\n\n private toggleEnabled(): void {\n this.manager.setBlockingEnabled(!this.manager.blockingEnabled());\n void this.update();\n }\n\n removeItemRequested(pattern: SDK.NetworkManager.BlockedPattern, index: number): void {\n const patterns = this.manager.blockedPatterns();\n patterns.splice(index, 1);\n this.manager.setBlockedPatterns(patterns);\n UI.ARIAUtils.alert(UIStrings.itemDeleted);\n }\n\n beginEdit(pattern: SDK.NetworkManager.BlockedPattern): UI.ListWidget.Editor {\n this.editor = this.createEditor();\n this.editor.control('url').value = pattern.url;\n return this.editor;\n }\n\n commitEdit(\n item: SDK.NetworkManager.BlockedPattern, editor: UI.ListWidget.Editor,\n isNew: boolean): void {\n const url = editor.control('url').value as Platform.DevToolsPath.UrlString;\n const patterns = this.manager.blockedPatterns();\n if (isNew) {\n patterns.push({enabled: true, url: url});\n } else {\n patterns.splice(patterns.indexOf(item), 1, {enabled: true, url: url});\n }\n\n this.manager.setBlockedPatterns(patterns);\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n const content = editor.contentElement();\n const titles = content.createChild('div', 'blocked-url-edit-row');\n titles.createChild('div').textContent = i18nString(UIStrings.textPatternToBlockMatching);\n const fields = content.createChild('div', 'blocked-url-edit-row');\n const validator = (_item: SDK.NetworkManager.BlockedPattern, _index: number, input: UI.ListWidget.EditorControl): {\n valid: boolean,\n errorMessage: Common.UIString.LocalizedString|undefined,\n } => {\n let valid = true;\n let errorMessage;\n if (!input.value) {\n errorMessage = i18nString(UIStrings.patternInputCannotBeEmpty);\n valid = false;\n } else if (this.manager.blockedPatterns().find(pattern => pattern.url === input.value)) {\n errorMessage = i18nString(UIStrings.patternAlreadyExists);\n valid = false;\n }\n return {valid, errorMessage};\n };\n const urlInput = editor.createInput('url', 'text', '', validator);\n fields.createChild('div', 'blocked-url-edit-value').appendChild(urlInput);\n return editor;\n }\n\n private update(): Promise {\n const enabled = this.manager.blockingEnabled();\n this.list.element.classList.toggle('blocking-disabled', !enabled && Boolean(this.manager.blockedPatterns().length));\n\n this.enabledCheckbox.setChecked(enabled);\n this.list.clear();\n for (const pattern of this.manager.blockedPatterns()) {\n this.list.appendItem(pattern, enabled);\n }\n return Promise.resolve();\n }\n\n private blockedRequestsCount(url: string): number {\n if (!url) {\n return 0;\n }\n\n let result = 0;\n for (const blockedUrl of this.blockedCountForUrl.keys()) {\n if (this.matches(url, blockedUrl)) {\n result += (this.blockedCountForUrl.get(blockedUrl) as number);\n }\n }\n return result;\n }\n\n private matches(pattern: string, url: string): boolean {\n let pos = 0;\n const parts = pattern.split('*');\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n if (!part.length) {\n continue;\n }\n pos = url.indexOf(part, pos);\n if (pos === -1) {\n return false;\n }\n pos += part.length;\n }\n return true;\n }\n\n reset(): void {\n this.blockedCountForUrl.clear();\n void this.updateThrottler.schedule(this.update.bind(this));\n }\n\n private onRequestFinished(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n if (request.wasBlocked()) {\n const count = this.blockedCountForUrl.get(request.url()) || 0;\n this.blockedCountForUrl.set(request.url(), count + 1);\n void this.updateThrottler.schedule(this.update.bind(this));\n }\n }\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(BlockedURLsPane, this);\n super.wasShown();\n this.list.registerCSSFiles([blockedURLsPaneStyles]);\n this.registerCSSFiles([blockedURLsPaneStyles]);\n }\n\n override willHide(): void {\n super.willHide();\n UI.Context.Context.instance().setFlavor(BlockedURLsPane, null);\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const blockedURLsPane = context.flavor(BlockedURLsPane);\n if (blockedURLsPane === null) {\n return false;\n }\n switch (actionId) {\n case 'network.add-network-request-blocking-pattern': {\n blockedURLsPane.addPattern();\n return true;\n }\n\n case 'network.remove-all-network-request-blocking-patterns': {\n blockedURLsPane.removeAllPatterns();\n return true;\n }\n }\n return false;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"BlockedURLsPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/BlockedURLsPane.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAE7D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,4BAA4B,EAAE,iCAAiC;IAC/D;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,gCAAgC,EAAE,sCAAsC;IACxE;;;OAGG;IACH,6BAA6B,EAAE,yCAAyC;IACxE;;;OAGG;IACH,QAAQ,EAAE,eAAe;IACzB;;OAEG;IACH,0BAA0B,EAAE,6DAA6D;IACzF;;OAEG;IACH,yBAAyB,EAAE,gCAAgC;IAC3D;;OAEG;IACH,oBAAoB,EAAE,yBA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AAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC;QACpD,IAAI,CAAC,gBAAgB,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACjD,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;CACF;AAED,MAAM,OAAO,cAAc;IACzB,YAAY,CAAC,OAA2B,EAAE,QAAgB;QACxD,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QACxD,IAAI,eAAe,KAAK,IAAI,EAAE;YAC5B,OAAO,KAAK,CAAC;SACd;QACD,QAAQ,QAAQ,EAAE;YAChB,KAAK,8CAA8C,CAAC,CAAC;gBACnD,eAAe,CAAC,UAAU,EAAE,CAAC;gBAC7B,OAAO,IAAI,CAAC;aACb;YAED,KAAK,sDAAsD,CAAC,CAAC;gBAC3D,eAAe,CAAC,iBAAiB,EAAE,CAAC;gBACpC,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright (c) 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Logs from '../../models/logs/logs.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport blockedURLsPaneStyles from './blockedURLsPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Text to enable blocking of network requests\n */\n enableNetworkRequestBlocking: 'Enable network request blocking',\n /**\n *@description Tooltip text that appears when hovering over the plus button in the Blocked URLs Pane of the Network panel\n */\n addPattern: 'Add pattern',\n /**\n *@description Accessible label for the button to add request blocking patterns in the network request blocking tool\n */\n addNetworkRequestBlockingPattern: 'Add network request blocking pattern',\n /**\n *@description Button to add a pattern to block netwrok requests in the Network request blocking tool\n *@example {Add pattern} PH1\n */\n networkRequestsAreNotBlockedS: 'Network requests are not blocked. {PH1}',\n /**\n *@description Text in Blocked URLs Pane of the Network panel\n *@example {4} PH1\n */\n dBlocked: '{PH1} blocked',\n /**\n *@description Text in Blocked URLs Pane of the Network panel\n */\n textPatternToBlockMatching: 'Text pattern to block matching requests; use * for wildcard',\n /**\n *@description Error text for empty list widget input in Request Blocking tool\n */\n patternInputCannotBeEmpty: 'Pattern input cannot be empty.',\n /**\n *@description Error text for duplicate list widget input in Request Blocking tool\n */\n patternAlreadyExists: 'Pattern already exists.',\n /**\n *@description Message to be announced for a when list item is removed from list widget\n */\n itemDeleted: 'Item successfully deleted',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/BlockedURLsPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class BlockedURLsPane extends UI.Widget.VBox implements\n UI.ListWidget.Delegate {\n private manager: SDK.NetworkManager.MultitargetNetworkManager;\n private readonly toolbar: UI.Toolbar.Toolbar;\n private readonly enabledCheckbox: UI.Toolbar.ToolbarCheckbox;\n private readonly list: UI.ListWidget.ListWidget;\n private editor: UI.ListWidget.Editor|null;\n private blockedCountForUrl: Map;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('network.blocked-urls')}`);\n\n this.manager = SDK.NetworkManager.MultitargetNetworkManager.instance();\n this.manager.addEventListener(\n SDK.NetworkManager.MultitargetNetworkManager.Events.BlockedPatternsChanged, this.update, this);\n\n this.toolbar = new UI.Toolbar.Toolbar('', this.contentElement);\n this.enabledCheckbox = new UI.Toolbar.ToolbarCheckbox(\n i18nString(UIStrings.enableNetworkRequestBlocking), undefined, this.toggleEnabled.bind(this),\n 'network.enable-request-blocking');\n this.toolbar.appendToolbarItem(this.enabledCheckbox);\n this.toolbar.appendSeparator();\n this.toolbar.appendToolbarItem(\n UI.Toolbar.Toolbar.createActionButtonForId('network.add-network-request-blocking-pattern'));\n this.toolbar.appendToolbarItem(\n UI.Toolbar.Toolbar.createActionButtonForId('network.remove-all-network-request-blocking-patterns'));\n\n this.list = new UI.ListWidget.ListWidget(this);\n this.list.element.classList.add('blocked-urls');\n\n this.list.setEmptyPlaceholder(this.createEmptyPlaceholder());\n this.list.show(this.contentElement);\n\n this.editor = null;\n\n this.blockedCountForUrl = new Map();\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.NetworkManager.NetworkManager, SDK.NetworkManager.Events.RequestFinished, this.onRequestFinished, this,\n {scoped: true});\n\n this.update();\n Logs.NetworkLog.NetworkLog.instance().addEventListener(Logs.NetworkLog.Events.Reset, this.onNetworkLogReset, this);\n }\n\n private createEmptyPlaceholder(): Element {\n const element = this.contentElement.createChild('div', 'no-blocked-urls');\n const addButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.addPattern), this.addPattern.bind(this), 'add-button', true);\n addButton.setAttribute(\n 'jslog',\n `${VisualLogging.action().track({click: true}).context('network.add-network-request-blocking-pattern')}`);\n UI.ARIAUtils.setLabel(addButton, i18nString(UIStrings.addNetworkRequestBlockingPattern));\n element.appendChild(\n i18n.i18n.getFormatLocalizedString(str_, UIStrings.networkRequestsAreNotBlockedS, {PH1: addButton}));\n return element;\n }\n\n addPattern(): void {\n this.manager.setBlockingEnabled(true);\n this.list.addNewItem(0, {url: Platform.DevToolsPath.EmptyUrlString, enabled: true});\n }\n\n removeAllPatterns(): void {\n this.manager.setBlockedPatterns([]);\n }\n\n renderItem(pattern: SDK.NetworkManager.BlockedPattern, editable: boolean): Element {\n const count = this.blockedRequestsCount(pattern.url);\n const element = document.createElement('div');\n element.classList.add('blocked-url');\n const checkbox = (element.createChild('input', 'blocked-url-checkbox') as HTMLInputElement);\n checkbox.type = 'checkbox';\n checkbox.checked = pattern.enabled;\n checkbox.disabled = !editable;\n checkbox.setAttribute('jslog', `${VisualLogging.toggle().track({change: true})}`);\n element.createChild('div', 'blocked-url-label').textContent = pattern.url;\n element.createChild('div', 'blocked-url-count').textContent = i18nString(UIStrings.dBlocked, {PH1: count});\n if (editable) {\n element.addEventListener('click', event => this.togglePattern(pattern, event));\n checkbox.addEventListener('click', event => this.togglePattern(pattern, event));\n }\n return element;\n }\n\n private togglePattern(pattern: SDK.NetworkManager.BlockedPattern, event: Event): void {\n event.consume(true);\n const patterns = this.manager.blockedPatterns();\n patterns.splice(patterns.indexOf(pattern), 1, {enabled: !pattern.enabled, url: pattern.url});\n this.manager.setBlockedPatterns(patterns);\n }\n\n private toggleEnabled(): void {\n this.manager.setBlockingEnabled(!this.manager.blockingEnabled());\n this.update();\n }\n\n removeItemRequested(pattern: SDK.NetworkManager.BlockedPattern, index: number): void {\n const patterns = this.manager.blockedPatterns();\n patterns.splice(index, 1);\n this.manager.setBlockedPatterns(patterns);\n UI.ARIAUtils.alert(UIStrings.itemDeleted);\n }\n\n beginEdit(pattern: SDK.NetworkManager.BlockedPattern): UI.ListWidget.Editor {\n this.editor = this.createEditor();\n this.editor.control('url').value = pattern.url;\n return this.editor;\n }\n\n commitEdit(\n item: SDK.NetworkManager.BlockedPattern, editor: UI.ListWidget.Editor,\n isNew: boolean): void {\n const url = editor.control('url').value as Platform.DevToolsPath.UrlString;\n const patterns = this.manager.blockedPatterns();\n if (isNew) {\n patterns.push({enabled: true, url: url});\n } else {\n patterns.splice(patterns.indexOf(item), 1, {enabled: true, url: url});\n }\n\n this.manager.setBlockedPatterns(patterns);\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n const content = editor.contentElement();\n const titles = content.createChild('div', 'blocked-url-edit-row');\n titles.createChild('div').textContent = i18nString(UIStrings.textPatternToBlockMatching);\n const fields = content.createChild('div', 'blocked-url-edit-row');\n const validator = (_item: SDK.NetworkManager.BlockedPattern, _index: number, input: UI.ListWidget.EditorControl): {\n valid: boolean,\n errorMessage: Common.UIString.LocalizedString|undefined,\n } => {\n let valid = true;\n let errorMessage;\n if (!input.value) {\n errorMessage = i18nString(UIStrings.patternInputCannotBeEmpty);\n valid = false;\n } else if (this.manager.blockedPatterns().find(pattern => pattern.url === input.value)) {\n errorMessage = i18nString(UIStrings.patternAlreadyExists);\n valid = false;\n }\n return {valid, errorMessage};\n };\n const urlInput = editor.createInput('url', 'text', '', validator);\n fields.createChild('div', 'blocked-url-edit-value').appendChild(urlInput);\n return editor;\n }\n\n update(): void {\n const enabled = this.manager.blockingEnabled();\n this.list.element.classList.toggle('blocking-disabled', !enabled && Boolean(this.manager.blockedPatterns().length));\n\n this.enabledCheckbox.setChecked(enabled);\n this.list.clear();\n for (const pattern of this.manager.blockedPatterns()) {\n this.list.appendItem(pattern, enabled);\n }\n }\n\n private blockedRequestsCount(url: string): number {\n if (!url) {\n return 0;\n }\n\n let result = 0;\n for (const blockedUrl of this.blockedCountForUrl.keys()) {\n if (this.matches(url, blockedUrl)) {\n result += (this.blockedCountForUrl.get(blockedUrl) as number);\n }\n }\n return result;\n }\n\n private matches(pattern: string, url: string): boolean {\n let pos = 0;\n const parts = pattern.split('*');\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n if (!part.length) {\n continue;\n }\n pos = url.indexOf(part, pos);\n if (pos === -1) {\n return false;\n }\n pos += part.length;\n }\n return true;\n }\n\n private onNetworkLogReset(_event: Common.EventTarget.EventTargetEvent): void {\n this.blockedCountForUrl.clear();\n this.update();\n }\n\n private onRequestFinished(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n if (request.wasBlocked()) {\n const count = this.blockedCountForUrl.get(request.url()) || 0;\n this.blockedCountForUrl.set(request.url(), count + 1);\n this.update();\n }\n }\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(BlockedURLsPane, this);\n super.wasShown();\n this.list.registerCSSFiles([blockedURLsPaneStyles]);\n this.registerCSSFiles([blockedURLsPaneStyles]);\n }\n\n override willHide(): void {\n super.willHide();\n UI.Context.Context.instance().setFlavor(BlockedURLsPane, null);\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const blockedURLsPane = context.flavor(BlockedURLsPane);\n if (blockedURLsPane === null) {\n return false;\n }\n switch (actionId) {\n case 'network.add-network-request-blocking-pattern': {\n blockedURLsPane.addPattern();\n return true;\n }\n\n case 'network.remove-all-network-request-blocking-patterns': {\n blockedURLsPane.removeAllPatterns();\n return true;\n }\n }\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/network/NetworkItemView.js b/public/panels/network/NetworkItemView.js index c97f192cc..3bf0b2cd6 100644 --- a/public/panels/network/NetworkItemView.js +++ b/public/panels/network/NetworkItemView.js @@ -161,7 +161,7 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane { const frameView = new ResourceWebSocketFrameView(request); this.appendTab(NetworkForward.UIRequestLocation.UIRequestTabs.WsFrames, i18nString(UIStrings.messages), frameView, i18nString(UIStrings.websocketMessages)); } - else if (request.mimeType === SDK.NetworkRequest.MIME_TYPE.EVENTSTREAM) { + else if (request.mimeType === "text/event-stream" /* SDK.NetworkRequest.MimeType.EVENTSTREAM */) { this.appendTab(NetworkForward.UIRequestLocation.UIRequestTabs.EventSource, i18nString(UIStrings.eventstream), new EventSourceMessagesView(request)); } else { diff --git a/public/panels/network/NetworkItemView.js.map b/public/panels/network/NetworkItemView.js.map index 72df832ee..9254049ba 100644 --- a/public/panels/network/NetworkItemView.js.map +++ b/public/panels/network/NetworkItemView.js.map @@ -1 +1 @@ -{"version":3,"file":"NetworkItemView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/NetworkItemView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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YAC3C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;gBACrB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;oBAC1B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;iBAC3B;YACH,CAAC,EAAE,CAAC,CAAC,CAAC;SACP;IACH,CAAC;IAEO,WAAW,CAAC,KAAmE;QACrF,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE;YAC7B,OAAO;SACR;QACD,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAuD,CAAC,CAAC;IACtG,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,QAAgD;QACvE,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,iBAAiB,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChF,MAAM,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC;IAED,YAAY,CAAC,OAAyD,EAAE,MAAwB;QAC9F,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,iBAAiB,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;QACxF,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAED,uBAAuB;QACrB,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2010 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as NetworkForward from '../../panels/network/forward/forward.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';\nimport type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport * as NetworkComponents from './components/components.js';\nimport {EventSourceMessagesView} from './EventSourceMessagesView.js';\nimport {type NetworkTimeCalculator} from './NetworkTimeCalculator.js';\nimport {RequestCookiesView} from './RequestCookiesView.js';\nimport {RequestInitiatorView} from './RequestInitiatorView.js';\nimport {RequestPayloadView} from './RequestPayloadView.js';\nimport {RequestPreviewView} from './RequestPreviewView.js';\nimport {RequestResponseView} from './RequestResponseView.js';\nimport {RequestTimingView} from './RequestTimingView.js';\nimport {ResourceWebSocketFrameView} from './ResourceWebSocketFrameView.js';\n\nconst UIStrings = {\n /**\n *@description Text for network request headers\n */\n headers: 'Headers',\n /**\n *@description Text in Network Item View of the Network panel\n */\n payload: 'Payload',\n /**\n *@description Text in Network Item View of the Network panel\n */\n messages: 'Messages',\n /**\n *@description Text in Network Item View of the Network panel\n */\n websocketMessages: 'WebSocket messages',\n /**\n *@description Text in Network Item View of the Network panel\n */\n eventstream: 'EventStream',\n /**\n *@description Text for previewing items\n */\n preview: 'Preview',\n /**\n *@description Text in Network Item View of the Network panel\n */\n responsePreview: 'Response preview',\n /**\n *@description Icon title in Network Item View of the Network panel\n */\n signedexchangeError: 'SignedExchange error',\n /**\n *@description Title of a tab in the Network panel. A Network response refers to the act of acknowledging a\n network request. Should not be confused with answer.\n */\n response: 'Response',\n /**\n *@description Text in Network Item View of the Network panel\n */\n rawResponseData: 'Raw response data',\n /**\n *@description Text for the initiator of something\n */\n initiator: 'Initiator',\n /**\n * @description Tooltip for initiator view in Network panel. An initiator is a piece of code/entity\n * in the code that initiated/started the network request, i.e. caused the network request. The 'call\n * stack' is the location in the code where the initiation happened.\n */\n requestInitiatorCallStack: 'Request initiator call stack',\n /**\n *@description Title of a tab in Network Item View of the Network panel.\n *The tab displays the duration breakdown of a network request.\n */\n timing: 'Timing',\n /**\n *@description Text in Network Item View of the Network panel\n */\n requestAndResponseTimeline: 'Request and response timeline',\n /**\n *@description Label of a tab in the network panel. Previously known as 'Trust Tokens'.\n */\n trustTokens: 'Private state tokens',\n /**\n *@description Title of the Private State Token tab in the Network panel. Previously known as 'Trust Token tab'.\n */\n trustTokenOperationDetails: 'Private State Token operation details',\n /**\n *@description Text for web cookies\n */\n cookies: 'Cookies',\n /**\n *@description Text in Network Item View of the Network panel\n */\n requestAndResponseCookies: 'Request and response cookies',\n /**\n *@description Tooltip text explaining that DevTools has overridden the response's headers\n */\n containsOverriddenHeaders: 'This response contains headers which are overridden by DevTools',\n /**\n *@description Tooltip text explaining that DevTools has overridden the response\n */\n responseIsOverridden: 'This response is overridden by DevTools',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/NetworkItemView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class NetworkItemView extends UI.TabbedPane.TabbedPane {\n private requestInternal: SDK.NetworkRequest.NetworkRequest;\n private readonly resourceViewTabSetting: Common.Settings.Setting;\n private readonly headersViewComponent: NetworkComponents.RequestHeadersView.RequestHeadersView;\n private payloadView: RequestPayloadView|null;\n private readonly responseView: RequestResponseView|undefined;\n private cookiesView: RequestCookiesView|null;\n private initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs;\n\n constructor(\n request: SDK.NetworkRequest.NetworkRequest, calculator: NetworkTimeCalculator,\n initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs) {\n super();\n this.requestInternal = request;\n this.element.classList.add('network-item-view');\n\n const headersTab = NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent;\n this.resourceViewTabSetting = Common.Settings.Settings.instance().createSetting(\n 'resourceViewTab', NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent);\n\n this.headersViewComponent = new NetworkComponents.RequestHeadersView.RequestHeadersView(request);\n this.appendTab(\n headersTab, i18nString(UIStrings.headers),\n LegacyWrapper.LegacyWrapper.legacyWrapper(UI.Widget.VBox, this.headersViewComponent),\n i18nString(UIStrings.headers));\n\n if (this.requestInternal.hasOverriddenHeaders()) {\n const icon = new IconButton.Icon.Icon();\n icon.data =\n {iconName: 'small-status-dot', color: 'var(--sys-color-purple-bright)', width: '16px', height: '16px'};\n icon.title = i18nString(UIStrings.containsOverriddenHeaders);\n this.setTabIcon(NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent, icon);\n }\n\n this.payloadView = null;\n void this.maybeAppendPayloadPanel();\n\n this.addEventListener(UI.TabbedPane.Events.TabSelected, this.tabSelected, this);\n\n if (request.resourceType() === Common.ResourceType.resourceTypes.WebSocket) {\n const frameView = new ResourceWebSocketFrameView(request);\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.WsFrames, i18nString(UIStrings.messages), frameView,\n i18nString(UIStrings.websocketMessages));\n } else if (request.mimeType === SDK.NetworkRequest.MIME_TYPE.EVENTSTREAM) {\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.EventSource, i18nString(UIStrings.eventstream),\n new EventSourceMessagesView(request));\n } else {\n this.responseView = new RequestResponseView(request);\n const previewView = new RequestPreviewView(request);\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Preview, i18nString(UIStrings.preview), previewView,\n i18nString(UIStrings.responsePreview));\n const signedExchangeInfo = request.signedExchangeInfo();\n if (signedExchangeInfo && signedExchangeInfo.errors && signedExchangeInfo.errors.length) {\n const icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'cross-circle-filled', color: 'var(--icon-error)', width: '14px', height: '14px'};\n UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.signedexchangeError));\n this.setTabIcon(NetworkForward.UIRequestLocation.UIRequestTabs.Preview, icon);\n }\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Response, i18nString(UIStrings.response), this.responseView,\n i18nString(UIStrings.rawResponseData));\n\n if (this.requestInternal.hasOverriddenContent) {\n const icon = new IconButton.Icon.Icon();\n icon.title = i18nString(UIStrings.responseIsOverridden);\n icon.data =\n {iconName: 'small-status-dot', color: 'var(--sys-color-purple-bright)', width: '16px', height: '16px'};\n this.setTabIcon(NetworkForward.UIRequestLocation.UIRequestTabs.Response, icon);\n }\n }\n\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Initiator, i18nString(UIStrings.initiator),\n new RequestInitiatorView(request), i18nString(UIStrings.requestInitiatorCallStack));\n\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Timing, i18nString(UIStrings.timing),\n new RequestTimingView(request, calculator), i18nString(UIStrings.requestAndResponseTimeline));\n\n if (request.trustTokenParams()) {\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.TrustTokens, i18nString(UIStrings.trustTokens),\n LegacyWrapper.LegacyWrapper.legacyWrapper(\n UI.Widget.VBox, new NetworkComponents.RequestTrustTokensView.RequestTrustTokensView(request)),\n i18nString(UIStrings.trustTokenOperationDetails));\n }\n\n this.cookiesView = null;\n\n this.initialTab = initialTab || this.resourceViewTabSetting.get();\n // Selecting tabs should not be handled by the super class.\n this.setAutoSelectFirstItemOnShow(false);\n }\n\n override wasShown(): void {\n super.wasShown();\n this.requestInternal.addEventListener(\n SDK.NetworkRequest.Events.RequestHeadersChanged, this.requestHeadersChanged, this);\n this.requestInternal.addEventListener(\n SDK.NetworkRequest.Events.ResponseHeadersChanged, this.maybeAppendCookiesPanel, this);\n this.requestInternal.addEventListener(\n SDK.NetworkRequest.Events.TrustTokenResultAdded, this.maybeShowErrorIconInTrustTokenTabHeader, this);\n this.maybeAppendCookiesPanel();\n this.maybeShowErrorIconInTrustTokenTabHeader();\n\n // Only select the initial tab the first time the view is shown after construction.\n // When the view is re-shown (without re-constructing) users or revealers might have changed\n // the selected tab in the mean time. Show the previously selected tab in that\n // case instead, by simply doing nohting.\n if (this.initialTab) {\n this.selectTabInternal(this.initialTab);\n this.initialTab = undefined;\n }\n }\n\n override willHide(): void {\n this.requestInternal.removeEventListener(\n SDK.NetworkRequest.Events.RequestHeadersChanged, this.requestHeadersChanged, this);\n this.requestInternal.removeEventListener(\n SDK.NetworkRequest.Events.ResponseHeadersChanged, this.maybeAppendCookiesPanel, this);\n this.requestInternal.removeEventListener(\n SDK.NetworkRequest.Events.TrustTokenResultAdded, this.maybeShowErrorIconInTrustTokenTabHeader, this);\n }\n\n private async requestHeadersChanged(): Promise {\n this.maybeAppendCookiesPanel();\n void this.maybeAppendPayloadPanel();\n }\n\n private maybeAppendCookiesPanel(): void {\n const cookiesPresent = this.requestInternal.hasRequestCookies() || this.requestInternal.responseCookies.length > 0;\n console.assert(cookiesPresent || !this.cookiesView, 'Cookies were introduced in headers and then removed!');\n if (cookiesPresent && !this.cookiesView) {\n this.cookiesView = new RequestCookiesView(this.requestInternal);\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Cookies, i18nString(UIStrings.cookies), this.cookiesView,\n i18nString(UIStrings.requestAndResponseCookies));\n }\n }\n\n private async maybeAppendPayloadPanel(): Promise {\n if (this.hasTab('payload')) {\n return;\n }\n if (this.requestInternal.queryParameters || await this.requestInternal.requestFormData()) {\n this.payloadView = new RequestPayloadView(this.requestInternal);\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Payload, i18nString(UIStrings.payload), this.payloadView,\n i18nString(UIStrings.payload), /* userGesture=*/ void 0,\n /* isCloseable=*/ void 0, /* isPreviewFeature=*/ void 0, /* index=*/ 1);\n }\n }\n\n private maybeShowErrorIconInTrustTokenTabHeader(): void {\n const trustTokenResult = this.requestInternal.trustTokenOperationDoneEvent();\n if (trustTokenResult &&\n !NetworkComponents.RequestTrustTokensView.statusConsideredSuccess(trustTokenResult.status)) {\n const icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'cross-circle-filled', color: 'var(--icon-error)', width: '14px', height: '14px'};\n this.setTabIcon(NetworkForward.UIRequestLocation.UIRequestTabs.TrustTokens, icon);\n }\n }\n\n private selectTabInternal(tabId: string): void {\n if (!this.selectTab(tabId)) {\n // maybeAppendPayloadPanel might cause payload tab to appear asynchronously, so\n // it makes sense to retry on the next tick\n window.setTimeout(() => {\n if (!this.selectTab(tabId)) {\n this.selectTab('headers');\n }\n }, 0);\n }\n }\n\n private tabSelected(event: Common.EventTarget.EventTargetEvent): void {\n if (!event.data.isUserGesture) {\n return;\n }\n this.resourceViewTabSetting.set(event.data.tabId as NetworkForward.UIRequestLocation.UIRequestTabs);\n }\n\n request(): SDK.NetworkRequest.NetworkRequest {\n return this.requestInternal;\n }\n\n async revealResponseBody(position: SourceFrame.SourceFrame.RevealPosition): Promise {\n this.selectTabInternal(NetworkForward.UIRequestLocation.UIRequestTabs.Response);\n await this.responseView?.revealPosition(position);\n }\n\n revealHeader(section: NetworkForward.UIRequestLocation.UIHeaderSection, header: string|undefined): void {\n this.selectTabInternal(NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent);\n this.headersViewComponent.revealHeader(section, header);\n }\n\n getHeadersViewComponent(): NetworkComponents.RequestHeadersView.RequestHeadersView {\n return this.headersViewComponent;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"NetworkItemView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/NetworkItemView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,cAAc,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,aAAa,MAAM,sDAAsD,CAAC;AAEtF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,0BAA0B,EA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,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;IAED,uBAAuB;QACrB,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2010 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as NetworkForward from '../../panels/network/forward/forward.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';\nimport type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport * as NetworkComponents from './components/components.js';\nimport {EventSourceMessagesView} from './EventSourceMessagesView.js';\nimport {type NetworkTimeCalculator} from './NetworkTimeCalculator.js';\nimport {RequestCookiesView} from './RequestCookiesView.js';\nimport {RequestInitiatorView} from './RequestInitiatorView.js';\nimport {RequestPayloadView} from './RequestPayloadView.js';\nimport {RequestPreviewView} from './RequestPreviewView.js';\nimport {RequestResponseView} from './RequestResponseView.js';\nimport {RequestTimingView} from './RequestTimingView.js';\nimport {ResourceWebSocketFrameView} from './ResourceWebSocketFrameView.js';\n\nconst UIStrings = {\n /**\n *@description Text for network request headers\n */\n headers: 'Headers',\n /**\n *@description Text in Network Item View of the Network panel\n */\n payload: 'Payload',\n /**\n *@description Text in Network Item View of the Network panel\n */\n messages: 'Messages',\n /**\n *@description Text in Network Item View of the Network panel\n */\n websocketMessages: 'WebSocket messages',\n /**\n *@description Text in Network Item View of the Network panel\n */\n eventstream: 'EventStream',\n /**\n *@description Text for previewing items\n */\n preview: 'Preview',\n /**\n *@description Text in Network Item View of the Network panel\n */\n responsePreview: 'Response preview',\n /**\n *@description Icon title in Network Item View of the Network panel\n */\n signedexchangeError: 'SignedExchange error',\n /**\n *@description Title of a tab in the Network panel. A Network response refers to the act of acknowledging a\n network request. Should not be confused with answer.\n */\n response: 'Response',\n /**\n *@description Text in Network Item View of the Network panel\n */\n rawResponseData: 'Raw response data',\n /**\n *@description Text for the initiator of something\n */\n initiator: 'Initiator',\n /**\n * @description Tooltip for initiator view in Network panel. An initiator is a piece of code/entity\n * in the code that initiated/started the network request, i.e. caused the network request. The 'call\n * stack' is the location in the code where the initiation happened.\n */\n requestInitiatorCallStack: 'Request initiator call stack',\n /**\n *@description Title of a tab in Network Item View of the Network panel.\n *The tab displays the duration breakdown of a network request.\n */\n timing: 'Timing',\n /**\n *@description Text in Network Item View of the Network panel\n */\n requestAndResponseTimeline: 'Request and response timeline',\n /**\n *@description Label of a tab in the network panel. Previously known as 'Trust Tokens'.\n */\n trustTokens: 'Private state tokens',\n /**\n *@description Title of the Private State Token tab in the Network panel. Previously known as 'Trust Token tab'.\n */\n trustTokenOperationDetails: 'Private State Token operation details',\n /**\n *@description Text for web cookies\n */\n cookies: 'Cookies',\n /**\n *@description Text in Network Item View of the Network panel\n */\n requestAndResponseCookies: 'Request and response cookies',\n /**\n *@description Tooltip text explaining that DevTools has overridden the response's headers\n */\n containsOverriddenHeaders: 'This response contains headers which are overridden by DevTools',\n /**\n *@description Tooltip text explaining that DevTools has overridden the response\n */\n responseIsOverridden: 'This response is overridden by DevTools',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/NetworkItemView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class NetworkItemView extends UI.TabbedPane.TabbedPane {\n private requestInternal: SDK.NetworkRequest.NetworkRequest;\n private readonly resourceViewTabSetting: Common.Settings.Setting;\n private readonly headersViewComponent: NetworkComponents.RequestHeadersView.RequestHeadersView;\n private payloadView: RequestPayloadView|null;\n private readonly responseView: RequestResponseView|undefined;\n private cookiesView: RequestCookiesView|null;\n private initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs;\n\n constructor(\n request: SDK.NetworkRequest.NetworkRequest, calculator: NetworkTimeCalculator,\n initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs) {\n super();\n this.requestInternal = request;\n this.element.classList.add('network-item-view');\n\n const headersTab = NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent;\n this.resourceViewTabSetting = Common.Settings.Settings.instance().createSetting(\n 'resourceViewTab', NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent);\n\n this.headersViewComponent = new NetworkComponents.RequestHeadersView.RequestHeadersView(request);\n this.appendTab(\n headersTab, i18nString(UIStrings.headers),\n LegacyWrapper.LegacyWrapper.legacyWrapper(UI.Widget.VBox, this.headersViewComponent),\n i18nString(UIStrings.headers));\n\n if (this.requestInternal.hasOverriddenHeaders()) {\n const icon = new IconButton.Icon.Icon();\n icon.data =\n {iconName: 'small-status-dot', color: 'var(--sys-color-purple-bright)', width: '16px', height: '16px'};\n icon.title = i18nString(UIStrings.containsOverriddenHeaders);\n this.setTabIcon(NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent, icon);\n }\n\n this.payloadView = null;\n void this.maybeAppendPayloadPanel();\n\n this.addEventListener(UI.TabbedPane.Events.TabSelected, this.tabSelected, this);\n\n if (request.resourceType() === Common.ResourceType.resourceTypes.WebSocket) {\n const frameView = new ResourceWebSocketFrameView(request);\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.WsFrames, i18nString(UIStrings.messages), frameView,\n i18nString(UIStrings.websocketMessages));\n } else if (request.mimeType === SDK.NetworkRequest.MimeType.EVENTSTREAM) {\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.EventSource, i18nString(UIStrings.eventstream),\n new EventSourceMessagesView(request));\n } else {\n this.responseView = new RequestResponseView(request);\n const previewView = new RequestPreviewView(request);\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Preview, i18nString(UIStrings.preview), previewView,\n i18nString(UIStrings.responsePreview));\n const signedExchangeInfo = request.signedExchangeInfo();\n if (signedExchangeInfo && signedExchangeInfo.errors && signedExchangeInfo.errors.length) {\n const icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'cross-circle-filled', color: 'var(--icon-error)', width: '14px', height: '14px'};\n UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.signedexchangeError));\n this.setTabIcon(NetworkForward.UIRequestLocation.UIRequestTabs.Preview, icon);\n }\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Response, i18nString(UIStrings.response), this.responseView,\n i18nString(UIStrings.rawResponseData));\n\n if (this.requestInternal.hasOverriddenContent) {\n const icon = new IconButton.Icon.Icon();\n icon.title = i18nString(UIStrings.responseIsOverridden);\n icon.data =\n {iconName: 'small-status-dot', color: 'var(--sys-color-purple-bright)', width: '16px', height: '16px'};\n this.setTabIcon(NetworkForward.UIRequestLocation.UIRequestTabs.Response, icon);\n }\n }\n\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Initiator, i18nString(UIStrings.initiator),\n new RequestInitiatorView(request), i18nString(UIStrings.requestInitiatorCallStack));\n\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Timing, i18nString(UIStrings.timing),\n new RequestTimingView(request, calculator), i18nString(UIStrings.requestAndResponseTimeline));\n\n if (request.trustTokenParams()) {\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.TrustTokens, i18nString(UIStrings.trustTokens),\n LegacyWrapper.LegacyWrapper.legacyWrapper(\n UI.Widget.VBox, new NetworkComponents.RequestTrustTokensView.RequestTrustTokensView(request)),\n i18nString(UIStrings.trustTokenOperationDetails));\n }\n\n this.cookiesView = null;\n\n this.initialTab = initialTab || this.resourceViewTabSetting.get();\n // Selecting tabs should not be handled by the super class.\n this.setAutoSelectFirstItemOnShow(false);\n }\n\n override wasShown(): void {\n super.wasShown();\n this.requestInternal.addEventListener(\n SDK.NetworkRequest.Events.RequestHeadersChanged, this.requestHeadersChanged, this);\n this.requestInternal.addEventListener(\n SDK.NetworkRequest.Events.ResponseHeadersChanged, this.maybeAppendCookiesPanel, this);\n this.requestInternal.addEventListener(\n SDK.NetworkRequest.Events.TrustTokenResultAdded, this.maybeShowErrorIconInTrustTokenTabHeader, this);\n this.maybeAppendCookiesPanel();\n this.maybeShowErrorIconInTrustTokenTabHeader();\n\n // Only select the initial tab the first time the view is shown after construction.\n // When the view is re-shown (without re-constructing) users or revealers might have changed\n // the selected tab in the mean time. Show the previously selected tab in that\n // case instead, by simply doing nohting.\n if (this.initialTab) {\n this.selectTabInternal(this.initialTab);\n this.initialTab = undefined;\n }\n }\n\n override willHide(): void {\n this.requestInternal.removeEventListener(\n SDK.NetworkRequest.Events.RequestHeadersChanged, this.requestHeadersChanged, this);\n this.requestInternal.removeEventListener(\n SDK.NetworkRequest.Events.ResponseHeadersChanged, this.maybeAppendCookiesPanel, this);\n this.requestInternal.removeEventListener(\n SDK.NetworkRequest.Events.TrustTokenResultAdded, this.maybeShowErrorIconInTrustTokenTabHeader, this);\n }\n\n private async requestHeadersChanged(): Promise {\n this.maybeAppendCookiesPanel();\n void this.maybeAppendPayloadPanel();\n }\n\n private maybeAppendCookiesPanel(): void {\n const cookiesPresent = this.requestInternal.hasRequestCookies() || this.requestInternal.responseCookies.length > 0;\n console.assert(cookiesPresent || !this.cookiesView, 'Cookies were introduced in headers and then removed!');\n if (cookiesPresent && !this.cookiesView) {\n this.cookiesView = new RequestCookiesView(this.requestInternal);\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Cookies, i18nString(UIStrings.cookies), this.cookiesView,\n i18nString(UIStrings.requestAndResponseCookies));\n }\n }\n\n private async maybeAppendPayloadPanel(): Promise {\n if (this.hasTab('payload')) {\n return;\n }\n if (this.requestInternal.queryParameters || await this.requestInternal.requestFormData()) {\n this.payloadView = new RequestPayloadView(this.requestInternal);\n this.appendTab(\n NetworkForward.UIRequestLocation.UIRequestTabs.Payload, i18nString(UIStrings.payload), this.payloadView,\n i18nString(UIStrings.payload), /* userGesture=*/ void 0,\n /* isCloseable=*/ void 0, /* isPreviewFeature=*/ void 0, /* index=*/ 1);\n }\n }\n\n private maybeShowErrorIconInTrustTokenTabHeader(): void {\n const trustTokenResult = this.requestInternal.trustTokenOperationDoneEvent();\n if (trustTokenResult &&\n !NetworkComponents.RequestTrustTokensView.statusConsideredSuccess(trustTokenResult.status)) {\n const icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'cross-circle-filled', color: 'var(--icon-error)', width: '14px', height: '14px'};\n this.setTabIcon(NetworkForward.UIRequestLocation.UIRequestTabs.TrustTokens, icon);\n }\n }\n\n private selectTabInternal(tabId: string): void {\n if (!this.selectTab(tabId)) {\n // maybeAppendPayloadPanel might cause payload tab to appear asynchronously, so\n // it makes sense to retry on the next tick\n window.setTimeout(() => {\n if (!this.selectTab(tabId)) {\n this.selectTab('headers');\n }\n }, 0);\n }\n }\n\n private tabSelected(event: Common.EventTarget.EventTargetEvent): void {\n if (!event.data.isUserGesture) {\n return;\n }\n this.resourceViewTabSetting.set(event.data.tabId as NetworkForward.UIRequestLocation.UIRequestTabs);\n }\n\n request(): SDK.NetworkRequest.NetworkRequest {\n return this.requestInternal;\n }\n\n async revealResponseBody(position: SourceFrame.SourceFrame.RevealPosition): Promise {\n this.selectTabInternal(NetworkForward.UIRequestLocation.UIRequestTabs.Response);\n await this.responseView?.revealPosition(position);\n }\n\n revealHeader(section: NetworkForward.UIRequestLocation.UIHeaderSection, header: string|undefined): void {\n this.selectTabInternal(NetworkForward.UIRequestLocation.UIRequestTabs.HeadersComponent);\n this.headersViewComponent.revealHeader(section, header);\n }\n\n getHeadersViewComponent(): NetworkComponents.RequestHeadersView.RequestHeadersView {\n return this.headersViewComponent;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/network/NetworkLogView.d.ts b/public/panels/network/NetworkLogView.d.ts index 8a4b64982..e9cf9c26d 100644 --- a/public/panels/network/NetworkLogView.d.ts +++ b/public/panels/network/NetworkLogView.d.ts @@ -189,7 +189,7 @@ export declare class NetworkLogView extends NetworkLogView_base implements SDK.T private filterOutBlobRequests; private generateFetchCall; private generateAllFetchCall; - static generateCurlCommand(request: SDK.NetworkRequest.NetworkRequest, platform: string): Promise; + static generateCurlCommand(request: SDK.NetworkRequest.NetworkRequest, platform: 'unix' | 'win'): Promise; private generateAllCurlCommand; private generatePowerShellCommand; private generateAllPowerShellCommand; diff --git a/public/panels/network/NetworkLogView.js b/public/panels/network/NetworkLogView.js index c90fd09f6..49f3b61f6 100644 --- a/public/panels/network/NetworkLogView.js +++ b/public/panels/network/NetworkLogView.js @@ -1897,8 +1897,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin(UI.Widget.VB // The |Accept-Encoding| header is ignored to prevent decompression errors. crbug.com/1015321 const ignoredHeaders = new Set(['accept-encoding', 'host', 'method', 'path', 'scheme', 'version']); function escapeStringWin(str) { - /* If there are no new line characters do not escape the " characters - since it only uglifies the command. + /* Only escape the " characters when necessary. Because cmd.exe parser and MS Crt arguments parsers use some of the same escape characters, they can interact with each other in @@ -1924,7 +1923,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin(UI.Widget.VB new line is there to enact the escape command the second is the character to escape (in this case new line). */ - const encapsChars = /[\r\n]/.test(str) ? '^"' : '"'; + const encapsChars = /[\r\n]|[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`&]/.test(str) ? '^"' : '"'; return encapsChars + str.replace(/\\/g, '\\\\') .replace(/"/g, '\\"') @@ -1992,7 +1991,6 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin(UI.Widget.VB } } command = command.concat(data); - command.push('--compressed'); if (request.securityState() === "insecure" /* Protocol.Security.SecurityState.Insecure */) { command.push('--insecure'); } diff --git a/public/panels/network/NetworkLogView.js.map b/public/panels/network/NetworkLogView.js.map index cf7e2dae2..68b1241b5 100644 --- a/public/panels/network/NetworkLogView.js.map +++ b/public/panels/network/NetworkLogView.js.map @@ -1 +1 @@ -{"version":3,"file":"NetworkLogView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/NetworkLogView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MA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,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,wBAAwB;QACtB,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC;QAC5C,IAAI,CAAC,kBAAkB,CAAC,WAAW,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QACvD,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC3D,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE;YACjC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACjE;aAAM;YACL,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;SAC9D;IACH,CAAC;IAED,OAAO;QACL,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;SAC5B;IACH,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2008, 2009 Anthony Ricaud \n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as HAR from '../../models/har/har.js';\nimport * as Logs from '../../models/logs/logs.js';\nimport * as Persistence from '../../models/persistence/persistence.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as NetworkForward from '../../panels/network/forward/forward.js';\nimport * as Sources from '../../panels/sources/sources.js';\nimport * as Adorners from '../../ui/components/adorners/adorners.js';\nimport * as Coordinator from '../../ui/components/render_coordinator/render_coordinator.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {\n Events,\n type EventTypes,\n NetworkGroupNode,\n type NetworkLogViewInterface,\n type NetworkNode,\n NetworkRequestNode,\n} from './NetworkDataGridNode.js';\nimport {NetworkFrameGrouper} from './NetworkFrameGrouper.js';\nimport networkLogViewStyles from './networkLogView.css.js';\nimport {NetworkLogViewColumns} from './NetworkLogViewColumns.js';\nimport {\n NetworkTimeBoundary,\n type NetworkTimeCalculator,\n NetworkTransferDurationCalculator,\n NetworkTransferTimeCalculator,\n} from './NetworkTimeCalculator.js';\n\nconst UIStrings = {\n /**\n *@description Text in Network Log View of the Network panel\n */\n invertFilter: 'Invert',\n /**\n *@description Tooltip for the 'invert' checkbox in the Network panel.\n */\n invertsFilter: 'Inverts the search filter',\n /**\n *@description Text for everything\n */\n allStrings: 'All',\n /**\n *@description Text in Network Log View of the Network panel\n */\n hideDataUrls: 'Hide data URLs',\n /**\n *@description Data urlfilter ui element title in Network Log View of the Network panel\n */\n hidesDataAndBlobUrls: 'Hide \\'data:\\' and \\'blob:\\' URLs',\n /**\n * @description Label for a filter in the Network panel\n */\n chromeExtensions: 'Hide extension URLs',\n /**\n * @description Tooltip for a filter in the Network panel\n */\n hideChromeExtension: 'Hide \\'chrome-extension://\\' URLs',\n /**\n *@description Aria accessible name in Network Log View of the Network panel\n */\n requestTypesToInclude: 'Request types to include',\n /**\n * @description Tooltip for the `Request types` dropdown in the Network Panel\n */\n requestTypesTooltip: 'Filter requests by type',\n /**\n * @description Label for the dropdown in the Network Panel\n */\n requestTypes: 'Request types',\n /**\n * @description Dynamic label for the `Request types` dropdown in the Network panel\n * @example {Doc} PH1\n * @example {CSS} PH2\n */\n twoTypesSelected: '{PH1}, {PH2}',\n /**\n * @description: Dynamic label for the `Request types` dropdown in the Network panel\n * @example {Doc} PH1\n * @example {CSS} PH2\n */\n overTwoTypesSelected: '{PH1}, {PH2}...',\n /**\n *@description Label for a checkbox in the Network panel. When checked, only requests with\n * blocked response cookies are shown.\n */\n hasBlockedCookies: 'Blocked response cookies',\n /**\n *@description Tooltip for a checkbox in the Network panel. The response to a network request may include a\n * cookie (https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies). Such response cookies can\n * be malformed or otherwise invalid and the browser may choose to ignore or not accept invalid cookies.\n */\n onlyShowRequestsWithBlockedCookies: 'Show only requests with blocked response cookies',\n /**\n *@description Label for a filter in the Network panel\n */\n blockedRequests: 'Blocked requests',\n /**\n *@description Tooltip for a filter in the Network panel\n */\n onlyShowBlockedRequests: 'Show only blocked requests',\n /**\n *@description Label for a filter in the Network panel\n */\n thirdParty: '3rd-party requests',\n /**\n *@description Tooltip for a filter in the Network panel\n */\n onlyShowThirdPartyRequests: 'Show only requests with origin different from page origin',\n /**\n *@description Text that appears when user drag and drop something (for example, a file) in Network Log View of the Network panel\n */\n dropHarFilesHere: 'Drop HAR files here',\n /**\n *@description Recording text text content in Network Log View of the Network panel\n */\n recordingNetworkActivity: 'Recording network activity…',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {Ctrl + R} PH1\n */\n performARequestOrHitSToRecordThe: 'Perform a request or hit {PH1} to record the reload.',\n /**\n *@description Shown in the Network Log View of the Network panel when the user has not yet\n * recorded any network activity. This is an instruction to the user to start recording in order to\n * show network activity in the current UI.\n *@example {Ctrl + E} PH1\n */\n recordToDisplayNetworkActivity: 'Record network log ({PH1}) to display network activity.',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Text to announce to screen readers that network data is available.\n */\n networkDataAvailable: 'Network Data Available',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {3} PH1\n *@example {5} PH2\n */\n sSRequests: '{PH1} / {PH2} requests',\n /**\n *@description Message in the summary toolbar at the bottom of the Network log that shows the compressed size of the\n * resources transferred during a selected time frame over the compressed size of all resources transferred during\n * the whole network log.\n *@example {5 B} PH1\n *@example {10 B} PH2\n */\n sSTransferred: '{PH1} / {PH2} transferred',\n /**\n *@description Message in a tooltip that shows the compressed size of the resources transferred during a selected\n * time frame over the compressed size of all resources transferred during the whole network log.\n *@example {10} PH1\n *@example {15} PH2\n */\n sBSBTransferredOverNetwork: '{PH1} B / {PH2} B transferred over network',\n /**\n * @description Text in Network Log View of the Network panel. Appears when a particular network\n * resource is selected by the user. Shows how large the selected resource was (PH1) out of the\n * total size (PH2).\n * @example {40MB} PH1\n * @example {50MB} PH2\n */\n sSResources: '{PH1} / {PH2} resources',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {40} PH1\n *@example {50} PH2\n */\n sBSBResourcesLoadedByThePage: '{PH1} B / {PH2} B resources loaded by the page',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {6} PH1\n */\n sRequests: '{PH1} requests',\n /**\n *@description Message in the summary toolbar at the bottom of the Network log that shows the compressed size of\n * all resources transferred over network during a network activity log.\n *@example {4 B} PH1\n */\n sTransferred: '{PH1} transferred',\n /**\n *@description Message in a tooltip that shows the compressed size of all resources transferred over network during\n * a network activity log.\n *@example {4} PH1\n */\n sBTransferredOverNetwork: '{PH1} B transferred over network',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {4} PH1\n */\n sResources: '{PH1} resources',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {10} PH1\n */\n sBResourcesLoadedByThePage: '{PH1} B resources loaded by the page',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {120ms} PH1\n */\n finishS: 'Finish: {PH1}',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {3000ms} PH1\n */\n domcontentloadedS: 'DOMContentLoaded: {PH1}',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {40ms} PH1\n */\n loadS: 'Load: {PH1}',\n /**\n *@description Text for copying\n */\n copy: 'Copy',\n /**\n *@description Text in Network Log View of the Network panel\n */\n copyRequestHeaders: 'Copy request headers',\n /**\n *@description Text in Network Log View of the Network panel\n */\n copyResponseHeaders: 'Copy response headers',\n /**\n *@description Text in Network Log View of the Network panel\n */\n copyResponse: 'Copy response',\n /**\n *@description Text in Network Log View of the Network panel\n */\n copyStacktrace: 'Copy stack trace',\n /**\n * @description A context menu command in the Network panel, for copying to the clipboard.\n * PowerShell refers to the format the data will be copied as.\n */\n copyAsPowershell: 'Copy as `PowerShell`',\n /**\n *@description A context menu command in the Network panel, for copying to the clipboard. 'fetch'\n * refers to the format the data will be copied as, which is compatible with the fetch web API.\n */\n copyAsFetch: 'Copy as `fetch`',\n /**\n * @description Text in Network Log View of the Network panel. An action that copies a command to\n * the developer's clipboard. The command allows the developer to replay this specific network\n * request in Node.js, a desktop application/framework. 'Node.js fetch' is a noun phrase for the\n * type of request that will be copied.\n */\n copyAsNodejsFetch: 'Copy as `Node.js` `fetch`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with cURL (a program, not\n *translatable).\n */\n copyAsCurlCmd: 'Copy as `cURL` (`cmd`)',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a Bash script.\n */\n copyAsCurlBash: 'Copy as `cURL` (`bash`)',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a PowerShell script.\n */\n copyAllAsPowershell: 'Copy all as `PowerShell`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a 'fetch' command (fetch\n *should not be translated).\n */\n copyAllAsFetch: 'Copy all as `fetch`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a Node.js 'fetch' command\n *(fetch and Node.js should not be translated).\n */\n copyAllAsNodejsFetch: 'Copy all as `Node.js` `fetch`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with cURL (a program, not\n *translatable).\n */\n copyAllAsCurlCmd: 'Copy all as `cURL` (`cmd`)',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a Bash script.\n */\n copyAllAsCurlBash: 'Copy all as `cURL` (`bash`)',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with cURL (a program, not\n *translatable).\n */\n copyAsCurl: 'Copy as `cURL`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with cURL (a program, not\n *translatable).\n */\n copyAllAsCurl: 'Copy all as `cURL`',\n /**\n * @description Text in Network Log View of the Network panel. An action that copies data to the\n * clipboard. It will copy the data in the HAR (not translatable) format. 'all' refers to every\n * network request that is currently shown.\n */\n copyAllAsHar: 'Copy all as `HAR`',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n saveAllAsHarWithContent: 'Save all as `HAR` with content',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n clearBrowserCache: 'Clear browser cache',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n clearBrowserCookies: 'Clear browser cookies',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n blockRequestUrl: 'Block request URL',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n *@example {example.com} PH1\n */\n unblockS: 'Unblock {PH1}',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n blockRequestDomain: 'Block request domain',\n /**\n *@description Text to replay an XHR request\n */\n replayXhr: 'Replay XHR',\n /**\n *@description Text in Network Log View of the Network panel\n */\n areYouSureYouWantToClearBrowser: 'Are you sure you want to clear browser cache?',\n /**\n *@description Text in Network Log View of the Network panel\n */\n areYouSureYouWantToClearBrowserCookies: 'Are you sure you want to clear browser cookies?',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n * for creating a header override\n */\n overrideHeaders: 'Override headers',\n /**\n * @description Tooltip for the Show only/Hide requests dropdown of the filterbar\n */\n showOnlyHideRequests: 'Show only/hide requests',\n /**\n * @description Text for the Show only/Hide requests dropdown button of the filterbar\n */\n moreFilters: 'More filters',\n /**\n * @description Text for the Request types dropdown button tooltip\n * @example {Media, Images} PH1\n */\n showOnly: 'Show only {PH1}',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/NetworkLogView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst enum FetchStyle {\n Browser = 0,\n NodeJs = 1,\n}\n\nconst coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();\n\nexport class NetworkLogView extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox)\n implements SDK.TargetManager.SDKModelObserver, NetworkLogViewInterface {\n private readonly networkInvertFilterSetting: Common.Settings.Setting;\n private readonly networkHideDataURLSetting: Common.Settings.Setting;\n private readonly networkHideChromeExtensions: Common.Settings.Setting;\n private readonly networkShowBlockedCookiesOnlySetting: Common.Settings.Setting;\n private readonly networkOnlyBlockedRequestsSetting: Common.Settings.Setting;\n private readonly networkOnlyThirdPartySetting: Common.Settings.Setting;\n private readonly networkResourceTypeFiltersSetting: Common.Settings.Setting<{[key: string]: boolean}>;\n private rawRowHeight: number;\n private readonly progressBarContainer: Element;\n private readonly networkLogLargeRowsSetting: Common.Settings.Setting;\n private rowHeightInternal: number;\n private readonly timeCalculatorInternal: NetworkTransferTimeCalculator;\n private readonly durationCalculator: NetworkTransferDurationCalculator;\n private calculatorInternal: NetworkTransferTimeCalculator;\n private readonly columnsInternal: NetworkLogViewColumns;\n private staleRequests: Set;\n private mainRequestLoadTime: number;\n private mainRequestDOMContentLoadedTime: number;\n private filters: Filter[];\n private timeFilter: Filter|null;\n private hoveredNodeInternal: NetworkNode|null;\n private recordingHint: Element|null;\n private highlightedNode: NetworkRequestNode|null;\n private readonly linkifierInternal: Components.Linkifier.Linkifier;\n private recording: boolean;\n private needsRefresh: boolean;\n private readonly headerHeightInternal: number;\n private readonly groupLookups: Map;\n private activeGroupLookup: GroupLookupInterface|null;\n private readonly textFilterUI: UI.FilterBar.TextFilterUI;\n private readonly invertFilterUI: UI.FilterBar.CheckboxFilterUI;\n private readonly dataURLFilterUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly moreFiltersDropDownUI: MoreFiltersDropDownUI|undefined;\n private readonly onlyBlockedResponseCookiesFilterUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly onlyBlockedRequestsUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly onlyThirdPartyFilterUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly hideChromeExtensionsUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly resourceCategoryFilterUI: DropDownTypesUI|UI.FilterBar.NamedBitSetFilterUI;\n private readonly filterParser: TextUtils.TextUtils.FilterParser;\n private readonly suggestionBuilder: UI.FilterSuggestionBuilder.FilterSuggestionBuilder;\n private dataGrid: DataGrid.SortableDataGrid.SortableDataGrid;\n private readonly summaryToolbarInternal: UI.Toolbar.Toolbar;\n private readonly filterBar: UI.FilterBar.FilterBar;\n private readonly textFilterSetting: Common.Settings.Setting;\n\n constructor(\n filterBar: UI.FilterBar.FilterBar, progressBarContainer: Element,\n networkLogLargeRowsSetting: Common.Settings.Setting) {\n super();\n this.setMinimumSize(50, 64);\n\n this.element.id = 'network-container';\n this.element.classList.add('no-node-selected');\n\n this.networkInvertFilterSetting = Common.Settings.Settings.instance().createSetting('networkInvertFilter', false);\n this.networkHideDataURLSetting = Common.Settings.Settings.instance().createSetting('networkHideDataURL', false);\n this.networkHideChromeExtensions =\n Common.Settings.Settings.instance().createSetting('networkHideChromeExtensions', false);\n this.networkShowBlockedCookiesOnlySetting =\n Common.Settings.Settings.instance().createSetting('networkShowBlockedCookiesOnlySetting', false);\n this.networkOnlyBlockedRequestsSetting =\n Common.Settings.Settings.instance().createSetting('networkOnlyBlockedRequests', false);\n this.networkOnlyThirdPartySetting =\n Common.Settings.Settings.instance().createSetting('networkOnlyThirdPartySetting', false);\n this.networkResourceTypeFiltersSetting =\n Common.Settings.Settings.instance().createSetting('networkResourceTypeFilters', {});\n\n this.rawRowHeight = 0;\n this.progressBarContainer = progressBarContainer;\n this.networkLogLargeRowsSetting = networkLogLargeRowsSetting;\n this.networkLogLargeRowsSetting.addChangeListener(updateRowHeight.bind(this), this);\n\n function updateRowHeight(this: NetworkLogView): void {\n this.rawRowHeight = Boolean(this.networkLogLargeRowsSetting.get()) ? 41 : 21;\n this.rowHeightInternal = this.computeRowHeight();\n }\n this.rawRowHeight = 0;\n this.rowHeightInternal = 0;\n updateRowHeight.call(this);\n\n this.timeCalculatorInternal = new NetworkTransferTimeCalculator();\n this.durationCalculator = new NetworkTransferDurationCalculator();\n this.calculatorInternal = this.timeCalculatorInternal;\n\n this.columnsInternal = new NetworkLogViewColumns(\n this, this.timeCalculatorInternal, this.durationCalculator, networkLogLargeRowsSetting);\n this.columnsInternal.show(this.element);\n\n this.staleRequests = new Set();\n this.mainRequestLoadTime = -1;\n this.mainRequestDOMContentLoadedTime = -1;\n\n this.filters = [];\n this.timeFilter = null;\n this.hoveredNodeInternal = null;\n this.recordingHint = null;\n this.highlightedNode = null;\n\n this.linkifierInternal = new Components.Linkifier.Linkifier();\n\n this.recording = false;\n this.needsRefresh = false;\n\n this.headerHeightInternal = 0;\n\n this.groupLookups = new Map();\n this.groupLookups.set('Frame', new NetworkFrameGrouper(this));\n\n this.activeGroupLookup = null;\n\n this.textFilterUI = new UI.FilterBar.TextFilterUI();\n this.textFilterUI.addEventListener(UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged, this);\n filterBar.addFilter(this.textFilterUI);\n\n this.invertFilterUI = new UI.FilterBar.CheckboxFilterUI(\n 'invert-filter', i18nString(UIStrings.invertFilter), true, this.networkInvertFilterSetting);\n this.invertFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(this.invertFilterUI.element(), i18nString(UIStrings.invertsFilter));\n filterBar.addFilter(this.invertFilterUI);\n filterBar.addDivider();\n\n const filterItems =\n Object.values(Common.ResourceType.resourceCategories)\n .map(\n category =>\n ({name: category.title(), label: (): string => category.shortTitle(), title: category.title()}));\n\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN)) {\n this.resourceCategoryFilterUI =\n new DropDownTypesUI(filterItems, this.filterChanged.bind(this), this.networkResourceTypeFiltersSetting);\n UI.ARIAUtils.setLabel(this.resourceCategoryFilterUI.element(), i18nString(UIStrings.requestTypesToInclude));\n this.resourceCategoryFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n filterBar.addFilter(this.resourceCategoryFilterUI);\n filterBar.addDivider();\n\n this.moreFiltersDropDownUI = new MoreFiltersDropDownUI(this.filterChanged.bind(this));\n filterBar.addFilter(this.moreFiltersDropDownUI);\n } else {\n this.dataURLFilterUI = new UI.FilterBar.CheckboxFilterUI(\n 'hide-data-url', i18nString(UIStrings.hideDataUrls), true, this.networkHideDataURLSetting);\n this.dataURLFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(this.dataURLFilterUI.element(), i18nString(UIStrings.hidesDataAndBlobUrls));\n filterBar.addFilter(this.dataURLFilterUI);\n\n this.hideChromeExtensionsUI = new UI.FilterBar.CheckboxFilterUI(\n 'chrome-extension', i18nString(UIStrings.chromeExtensions), true, this.networkHideChromeExtensions);\n this.hideChromeExtensionsUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(this.hideChromeExtensionsUI.element(), i18nString(UIStrings.hideChromeExtension));\n filterBar.addFilter(this.hideChromeExtensionsUI);\n\n this.resourceCategoryFilterUI =\n new UI.FilterBar.NamedBitSetFilterUI(filterItems, this.networkResourceTypeFiltersSetting);\n UI.ARIAUtils.setLabel(this.resourceCategoryFilterUI.element(), i18nString(UIStrings.requestTypesToInclude));\n this.resourceCategoryFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n filterBar.addFilter(this.resourceCategoryFilterUI);\n\n this.onlyBlockedResponseCookiesFilterUI = new UI.FilterBar.CheckboxFilterUI(\n 'only-show-blocked-cookies', i18nString(UIStrings.hasBlockedCookies), true,\n this.networkShowBlockedCookiesOnlySetting);\n this.onlyBlockedResponseCookiesFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(\n this.onlyBlockedResponseCookiesFilterUI.element(), i18nString(UIStrings.onlyShowRequestsWithBlockedCookies));\n filterBar.addFilter(this.onlyBlockedResponseCookiesFilterUI);\n\n this.onlyBlockedRequestsUI = new UI.FilterBar.CheckboxFilterUI(\n 'only-show-blocked-requests', i18nString(UIStrings.blockedRequests), true,\n this.networkOnlyBlockedRequestsSetting);\n this.onlyBlockedRequestsUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(this.onlyBlockedRequestsUI.element(), i18nString(UIStrings.onlyShowBlockedRequests));\n filterBar.addFilter(this.onlyBlockedRequestsUI);\n\n this.onlyThirdPartyFilterUI = new UI.FilterBar.CheckboxFilterUI(\n 'only-show-third-party', i18nString(UIStrings.thirdParty), true, this.networkOnlyThirdPartySetting);\n this.onlyThirdPartyFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(\n this.onlyThirdPartyFilterUI.element(), i18nString(UIStrings.onlyShowThirdPartyRequests));\n filterBar.addFilter(this.onlyThirdPartyFilterUI);\n }\n\n this.filterParser = new TextUtils.TextUtils.FilterParser(searchKeys);\n this.suggestionBuilder =\n new UI.FilterSuggestionBuilder.FilterSuggestionBuilder(searchKeys, NetworkLogView.sortSearchValues);\n this.resetSuggestionBuilder();\n\n this.dataGrid = this.columnsInternal.dataGrid();\n this.setupDataGrid();\n this.columnsInternal.sortByCurrentColumn();\n filterBar.filterButton().addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click, this.dataGrid.scheduleUpdate.bind(this.dataGrid, true /* isFromUser */));\n\n this.summaryToolbarInternal = new UI.Toolbar.Toolbar('network-summary-bar', this.element);\n this.summaryToolbarInternal.element.setAttribute('role', 'status');\n\n new UI.DropTarget.DropTarget(\n this.element, [UI.DropTarget.Type.File], i18nString(UIStrings.dropHarFilesHere), this.handleDrop.bind(this));\n\n Common.Settings.Settings.instance()\n .moduleSetting('networkColorCodeResourceTypes')\n .addChangeListener(this.invalidateAllItems.bind(this, false), this);\n\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.NetworkManager.NetworkManager, this, {scoped: true});\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestAdded, this.onRequestUpdated, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestUpdated, this.onRequestUpdated, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestRemoved, this.onRequestRemoved, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(Logs.NetworkLog.Events.Reset, this.reset, this);\n\n this.updateGroupByFrame();\n Common.Settings.Settings.instance()\n .moduleSetting('network.group-by-frame')\n .addChangeListener(() => this.updateGroupByFrame());\n\n this.filterBar = filterBar;\n\n this.textFilterSetting = Common.Settings.Settings.instance().createSetting('networkTextFilter', '');\n if (this.textFilterSetting.get()) {\n this.textFilterUI.setValue(this.textFilterSetting.get());\n }\n }\n\n getMoreFiltersDropdown(): MoreFiltersDropDownUI|undefined {\n return this.moreFiltersDropDownUI;\n }\n\n private updateGroupByFrame(): void {\n const value = Common.Settings.Settings.instance().moduleSetting('network.group-by-frame').get();\n this.setGrouping(value ? 'Frame' : null);\n }\n\n private static sortSearchValues(key: string, values: string[]): void {\n if (key === NetworkForward.UIFilter.FilterType.Priority) {\n values.sort((a, b) => {\n const aPriority = (PerfUI.NetworkPriorities.uiLabelToNetworkPriority(a) as Protocol.Network.ResourcePriority);\n const bPriority = (PerfUI.NetworkPriorities.uiLabelToNetworkPriority(b) as Protocol.Network.ResourcePriority);\n return PerfUI.NetworkPriorities.networkPriorityWeight(aPriority) -\n PerfUI.NetworkPriorities.networkPriorityWeight(bPriority);\n });\n } else {\n values.sort();\n }\n }\n\n private static negativeFilter(filter: Filter, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return !filter(request);\n }\n\n private static requestPathFilter(regex: RegExp|null, request: SDK.NetworkRequest.NetworkRequest): boolean {\n if (!regex) {\n return false;\n }\n\n return regex.test(request.path() + '/' + request.name());\n }\n\n private static subdomains(domain: string): string[] {\n const result = [domain];\n let indexOfPeriod = domain.indexOf('.');\n while (indexOfPeriod !== -1) {\n result.push('*' + domain.substring(indexOfPeriod));\n indexOfPeriod = domain.indexOf('.', indexOfPeriod + 1);\n }\n return result;\n }\n\n private static createRequestDomainFilter(value: string): Filter {\n const escapedPattern = value.split('*').map(Platform.StringUtilities.escapeForRegExp).join('.*');\n return NetworkLogView.requestDomainFilter.bind(null, new RegExp('^' + escapedPattern + '$', 'i'));\n }\n\n private static requestDomainFilter(regex: RegExp, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return regex.test(request.domain);\n }\n\n private static runningRequestFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return !request.finished;\n }\n\n private static fromCacheRequestFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.cached();\n }\n\n private static interceptedByServiceWorkerFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.fetchedViaServiceWorker;\n }\n\n private static initiatedByServiceWorkerFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.initiatedByServiceWorker();\n }\n\n private static requestResponseHeaderFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.responseHeaderValue(value) !== undefined;\n }\n\n private static requestResponseHeaderSetCookieFilter(value: string, request: SDK.NetworkRequest.NetworkRequest):\n boolean {\n // Multiple Set-Cookie headers in the request are concatenated via space. Only\n // filter via `includes` instead of strict equality.\n return Boolean(request.responseHeaderValue('Set-Cookie')?.includes(value));\n }\n\n private static requestMethodFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.requestMethod === value;\n }\n\n private static requestPriorityFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.priority() === value;\n }\n\n private static requestMimeTypeFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.mimeType === value;\n }\n\n private static requestMixedContentFilter(\n value: NetworkForward.UIFilter.MixedContentFilterValues, request: SDK.NetworkRequest.NetworkRequest): boolean {\n if (value === NetworkForward.UIFilter.MixedContentFilterValues.Displayed) {\n return request.mixedContentType === Protocol.Security.MixedContentType.OptionallyBlockable;\n }\n if (value === NetworkForward.UIFilter.MixedContentFilterValues.Blocked) {\n return request.mixedContentType === Protocol.Security.MixedContentType.Blockable && request.wasBlocked();\n }\n if (value === NetworkForward.UIFilter.MixedContentFilterValues.BlockOverridden) {\n return request.mixedContentType === Protocol.Security.MixedContentType.Blockable && !request.wasBlocked();\n }\n if (value === NetworkForward.UIFilter.MixedContentFilterValues.All) {\n return request.mixedContentType !== Protocol.Security.MixedContentType.None;\n }\n\n return false;\n }\n\n private static requestSchemeFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.scheme === value;\n }\n\n private static requestCookieDomainFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.allCookiesIncludingBlockedOnes().some(cookie => cookie.domain() === value);\n }\n\n private static requestCookieNameFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.allCookiesIncludingBlockedOnes().some(cookie => cookie.name() === value);\n }\n\n private static requestCookiePathFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.allCookiesIncludingBlockedOnes().some(cookie => cookie.path() === value);\n }\n\n private static requestCookieValueFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.allCookiesIncludingBlockedOnes().some(cookie => cookie.value() === value);\n }\n\n private static requestSetCookieDomainFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.responseCookies.some(cookie => cookie.domain() === value);\n }\n\n private static requestSetCookieNameFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.responseCookies.some(cookie => cookie.name() === value);\n }\n\n private static requestSetCookieValueFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.responseCookies.some(cookie => cookie.value() === value);\n }\n\n private static requestSizeLargerThanFilter(value: number, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.transferSize >= value;\n }\n\n private static statusCodeFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return (String(request.statusCode)) === value;\n }\n\n private static hasOverridesFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n if (!value) {\n return false;\n }\n\n if (value === overrideFilter.no) {\n return request.overrideTypes.length === 0;\n }\n\n if (value === overrideFilter.yes) {\n return request.overrideTypes.length > 0;\n }\n\n if (value === overrideFilter.content) {\n return request.overrideTypes.includes('content');\n }\n\n if (value === overrideFilter.headers) {\n return request.overrideTypes.includes('headers');\n }\n\n return request.overrideTypes.join(',').includes(value);\n }\n\n static getHTTPRequestsFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.parsedURL.isValid && (request.scheme in HTTPSchemas);\n }\n\n private static resourceTypeFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.resourceType().name() === value;\n }\n\n private static requestUrlFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n const regex = new RegExp(Platform.StringUtilities.escapeForRegExp(value), 'i');\n return regex.test(request.url());\n }\n\n private static requestTimeFilter(windowStart: number, windowEnd: number, request: SDK.NetworkRequest.NetworkRequest):\n boolean {\n if (request.issueTime() > windowEnd) {\n return false;\n }\n if (request.endTime !== -1 && request.endTime < windowStart) {\n return false;\n }\n return true;\n }\n\n private static copyRequestHeaders(request: SDK.NetworkRequest.NetworkRequest): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(request.requestHeadersText());\n }\n\n private static copyResponseHeaders(request: SDK.NetworkRequest.NetworkRequest): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(request.responseHeadersText);\n }\n\n private static async copyResponse(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const contentData = await request.contentData();\n let content: (string|null)|string = contentData.content || '';\n if (!request.contentType().isTextType()) {\n content = TextUtils.ContentProvider.contentAsDataURL(content, request.mimeType, contentData.encoded);\n } else if (contentData.encoded && content) {\n content = window.atob(content);\n }\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(content);\n }\n\n private handleDrop(dataTransfer: DataTransfer): void {\n const items = dataTransfer.items;\n if (!items.length) {\n return;\n }\n const file = items[0].getAsFile();\n if (file) {\n void this.onLoadFromFile(file);\n }\n }\n\n async onLoadFromFile(file: File): Promise {\n const outputStream = new Common.StringOutputStream.StringOutputStream();\n const reader = new Bindings.FileUtils.ChunkedFileReader(file, /* chunkSize */ 10000000);\n const success = await reader.read(outputStream);\n if (!success) {\n const error = reader.error();\n if (error) {\n this.harLoadFailed(error.message);\n }\n return;\n }\n let harRoot;\n try {\n // HARRoot and JSON.parse might throw.\n harRoot = new HAR.HARFormat.HARRoot(JSON.parse(outputStream.data()));\n } catch (e) {\n this.harLoadFailed(e);\n return;\n }\n Logs.NetworkLog.NetworkLog.instance().importRequests(HAR.Importer.Importer.requestsFromHARLog(harRoot.log));\n }\n\n private harLoadFailed(message: string): void {\n Common.Console.Console.instance().error('Failed to load HAR file with following error: ' + message);\n }\n\n private setGrouping(groupKey: string|null): void {\n if (this.activeGroupLookup) {\n this.activeGroupLookup.reset();\n }\n const groupLookup = groupKey ? this.groupLookups.get(groupKey) || null : null;\n this.activeGroupLookup = groupLookup;\n this.invalidateAllItems();\n }\n\n private computeRowHeight(): number {\n return Math.round(this.rawRowHeight * window.devicePixelRatio) / window.devicePixelRatio;\n }\n\n nodeForRequest(request: SDK.NetworkRequest.NetworkRequest): NetworkRequestNode|null {\n return networkRequestToNode.get(request) || null;\n }\n\n headerHeight(): number {\n return this.headerHeightInternal;\n }\n\n setRecording(recording: boolean): void {\n this.recording = recording;\n this.updateSummaryBar();\n }\n\n columns(): NetworkLogViewColumns {\n return this.columnsInternal;\n }\n\n summaryToolbar(): UI.Toolbar.Toolbar {\n return this.summaryToolbarInternal;\n }\n\n modelAdded(networkManager: SDK.NetworkManager.NetworkManager): void {\n // TODO(allada) Remove dependency on networkManager and instead use NetworkLog and PageLoad for needed data.\n const target = networkManager.target();\n if (target.outermostTarget() !== target) {\n return;\n }\n const resourceTreeModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);\n if (resourceTreeModel) {\n resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this);\n resourceTreeModel.addEventListener(\n SDK.ResourceTreeModel.Events.DOMContentLoaded, this.domContentLoadedEventFired, this);\n }\n for (const request of Logs.NetworkLog.NetworkLog.instance().requests()) {\n if (this.isInScope(request)) {\n this.refreshRequest(request);\n }\n }\n }\n\n modelRemoved(networkManager: SDK.NetworkManager.NetworkManager): void {\n const target = networkManager.target();\n if (target.outermostTarget() !== target) {\n return;\n }\n const resourceTreeModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);\n if (resourceTreeModel) {\n resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this);\n resourceTreeModel.removeEventListener(\n SDK.ResourceTreeModel.Events.DOMContentLoaded, this.domContentLoadedEventFired, this);\n }\n const preserveLog = Common.Settings.Settings.instance().moduleSetting('network_log.preserve-log').get();\n if (!preserveLog) {\n this.reset();\n }\n }\n\n linkifier(): Components.Linkifier.Linkifier {\n return this.linkifierInternal;\n }\n\n setWindow(start: number, end: number): void {\n if (!start && !end) {\n this.timeFilter = null;\n this.timeCalculatorInternal.setWindow(null);\n } else {\n this.timeFilter = NetworkLogView.requestTimeFilter.bind(null, start, end);\n this.timeCalculatorInternal.setWindow(new NetworkTimeBoundary(start, end));\n }\n this.filterRequests();\n }\n\n resetFocus(): void {\n this.dataGrid.element.focus();\n }\n\n private resetSuggestionBuilder(): void {\n this.suggestionBuilder.clear();\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.Running);\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.FromCache);\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.ServiceWorkerIntercepted);\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.ServiceWorkerInitiated);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '100');\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '10k');\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '1M');\n this.textFilterUI.setSuggestionProvider(this.suggestionBuilder.completions.bind(this.suggestionBuilder));\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasOverrides, overrideFilter.yes);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasOverrides, overrideFilter.no);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasOverrides, overrideFilter.content);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasOverrides, overrideFilter.headers);\n }\n\n private filterChanged(): void {\n this.removeAllNodeHighlights();\n this.parseFilterQuery(this.textFilterUI.value(), this.invertFilterUI.checked());\n this.filterRequests();\n this.textFilterSetting.set(this.textFilterUI.value());\n this.moreFiltersDropDownUI?.updateActiveFiltersCount();\n this.moreFiltersDropDownUI?.updateTooltip();\n }\n\n async resetFilter(): Promise {\n this.textFilterUI.clear();\n }\n\n private showRecordingHint(): void {\n this.hideRecordingHint();\n this.recordingHint = this.element.createChild('div', 'network-status-pane fill');\n const hintText = this.recordingHint.createChild('div', 'recording-hint');\n\n if (this.recording) {\n let reloadShortcutNode: Element|null = null;\n const reloadShortcut =\n UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction('inspector_main.reload')[0];\n if (reloadShortcut) {\n reloadShortcutNode = this.recordingHint.createChild('b');\n reloadShortcutNode.textContent = reloadShortcut.title();\n }\n\n const recordingText = hintText.createChild('span');\n recordingText.textContent = i18nString(UIStrings.recordingNetworkActivity);\n if (reloadShortcutNode) {\n hintText.createChild('br');\n hintText.appendChild(i18n.i18n.getFormatLocalizedString(\n str_, UIStrings.performARequestOrHitSToRecordThe, {PH1: reloadShortcutNode}));\n }\n } else {\n const recordNode = hintText.createChild('b');\n recordNode.textContent =\n UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutTitleForAction('network.toggle-recording') || '';\n hintText.appendChild(\n i18n.i18n.getFormatLocalizedString(str_, UIStrings.recordToDisplayNetworkActivity, {PH1: recordNode}));\n }\n hintText.createChild('br');\n hintText.appendChild(UI.XLink.XLink.create(\n 'https://developer.chrome.com/docs/devtools/network/?utm_source=devtools&utm_campaign=2019Q1',\n i18nString(UIStrings.learnMore)));\n\n this.setHidden(true);\n }\n\n private hideRecordingHint(): void {\n this.setHidden(false);\n if (this.recordingHint) {\n this.recordingHint.remove();\n }\n UI.ARIAUtils.alert(i18nString(UIStrings.networkDataAvailable));\n this.recordingHint = null;\n }\n\n private setHidden(value: boolean): void {\n this.columnsInternal.setHidden(value);\n UI.ARIAUtils.setHidden(this.summaryToolbarInternal.element, value);\n }\n\n override elementsToRestoreScrollPositionsFor(): Element[] {\n if (!this.dataGrid) // Not initialized yet.\n {\n return [];\n }\n return [this.dataGrid.scrollContainer];\n }\n\n columnExtensionResolved(): void {\n this.invalidateAllItems(true);\n }\n\n private setupDataGrid(): DataGrid.SortableDataGrid.SortableDataGrid {\n this.dataGrid.setRowContextMenuCallback((contextMenu, node) => {\n const request = (node as NetworkNode).request();\n if (request) {\n this.handleContextMenuForRequest(contextMenu, request);\n }\n });\n this.dataGrid.setStickToBottom(true);\n this.dataGrid.setName('networkLog');\n this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.Last);\n this.dataGrid.element.classList.add('network-log-grid');\n this.dataGrid.element.addEventListener('mousedown', this.dataGridMouseDown.bind(this), true);\n this.dataGrid.element.addEventListener('mousemove', this.dataGridMouseMove.bind(this), true);\n this.dataGrid.element.addEventListener('mouseleave', () => this.setHoveredNode(null), true);\n this.dataGrid.element.addEventListener('keydown', event => {\n if (event.key === 'ArrowRight' && this.dataGrid.selectedNode) {\n const initiatorLink = this.dataGrid.selectedNode.element().querySelector('span.devtools-link');\n if (initiatorLink) {\n (initiatorLink as HTMLElement).focus();\n }\n }\n\n if (Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {\n this.dispatchEventToListeners(Events.RequestActivated, {showPanel: true, takeFocus: true});\n event.consume(true);\n }\n });\n this.dataGrid.element.addEventListener('keyup', event => {\n if ((event.key === 'r' || event.key === 'R') && this.dataGrid.selectedNode) {\n const request = (this.dataGrid.selectedNode as NetworkNode).request();\n if (!request) {\n return;\n }\n\n if (SDK.NetworkManager.NetworkManager.canReplayRequest(request)) {\n SDK.NetworkManager.NetworkManager.replayRequest(request);\n }\n }\n });\n this.dataGrid.element.addEventListener('focus', this.onDataGridFocus.bind(this), true);\n this.dataGrid.element.addEventListener('blur', this.onDataGridBlur.bind(this), true);\n return this.dataGrid;\n }\n\n private dataGridMouseMove(event: Event): void {\n const mouseEvent = (event as MouseEvent);\n const node = (this.dataGrid.dataGridNodeFromNode((mouseEvent.target as Node)));\n const highlightInitiatorChain = mouseEvent.shiftKey;\n this.setHoveredNode(node as NetworkNode, highlightInitiatorChain);\n }\n\n hoveredNode(): NetworkNode|null {\n return this.hoveredNodeInternal;\n }\n\n private setHoveredNode(node: NetworkNode|null, highlightInitiatorChain?: boolean): void {\n if (this.hoveredNodeInternal) {\n this.hoveredNodeInternal.setHovered(false, false);\n }\n this.hoveredNodeInternal = node;\n if (this.hoveredNodeInternal) {\n this.hoveredNodeInternal.setHovered(true, Boolean(highlightInitiatorChain));\n }\n }\n\n private dataGridMouseDown(event: Event): void {\n const mouseEvent = (event as MouseEvent);\n if (!this.dataGrid.selectedNode && mouseEvent.button) {\n mouseEvent.consume();\n }\n }\n\n private updateSummaryBar(): void {\n this.hideRecordingHint();\n\n let transferSize = 0;\n let resourceSize = 0;\n let selectedNodeNumber = 0;\n let selectedTransferSize = 0;\n let selectedResourceSize = 0;\n let baseTime = -1;\n let maxTime = -1;\n\n let nodeCount = 0;\n for (const request of Logs.NetworkLog.NetworkLog.instance().requests()) {\n const node = networkRequestToNode.get(request);\n if (!node) {\n continue;\n }\n nodeCount++;\n const requestTransferSize = request.transferSize;\n transferSize += requestTransferSize;\n const requestResourceSize = request.resourceSize;\n resourceSize += requestResourceSize;\n if (!filteredNetworkRequests.has(node)) {\n selectedNodeNumber++;\n selectedTransferSize += requestTransferSize;\n selectedResourceSize += requestResourceSize;\n }\n const networkManager = SDK.NetworkManager.NetworkManager.forRequest(request);\n // TODO(allada) inspectedURL should be stored in PageLoad used instead of target so HAR requests can have an\n // inspected url.\n if (networkManager && request.url() === networkManager.target().inspectedURL() &&\n request.resourceType() === Common.ResourceType.resourceTypes.Document &&\n networkManager.target().parentTarget()?.type() !== SDK.Target.Type.Frame) {\n baseTime = request.startTime;\n }\n if (request.endTime > maxTime) {\n maxTime = request.endTime;\n }\n }\n\n if (!nodeCount) {\n this.showRecordingHint();\n return;\n }\n\n this.summaryToolbarInternal.removeToolbarItems();\n const appendChunk = (chunk: string, title?: string): HTMLDivElement => {\n const toolbarText = new UI.Toolbar.ToolbarText(chunk);\n toolbarText.setTitle(title ? title : chunk);\n this.summaryToolbarInternal.appendToolbarItem(toolbarText);\n return toolbarText.element as HTMLDivElement;\n };\n\n if (selectedNodeNumber !== nodeCount) {\n appendChunk(i18nString(UIStrings.sSRequests, {PH1: selectedNodeNumber, PH2: nodeCount}));\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(\n i18nString(UIStrings.sSTransferred, {\n PH1: Platform.NumberUtilities.bytesToString(selectedTransferSize),\n PH2: Platform.NumberUtilities.bytesToString(transferSize),\n }),\n i18nString(UIStrings.sBSBTransferredOverNetwork, {PH1: selectedTransferSize, PH2: transferSize}));\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(\n i18nString(UIStrings.sSResources, {\n PH1: Platform.NumberUtilities.bytesToString(selectedResourceSize),\n PH2: Platform.NumberUtilities.bytesToString(resourceSize),\n }),\n i18nString(UIStrings.sBSBResourcesLoadedByThePage, {PH1: selectedResourceSize, PH2: resourceSize}));\n } else {\n appendChunk(i18nString(UIStrings.sRequests, {PH1: nodeCount}));\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(\n i18nString(UIStrings.sTransferred, {PH1: Platform.NumberUtilities.bytesToString(transferSize)}),\n i18nString(UIStrings.sBTransferredOverNetwork, {PH1: transferSize}));\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(\n i18nString(UIStrings.sResources, {PH1: Platform.NumberUtilities.bytesToString(resourceSize)}),\n i18nString(UIStrings.sBResourcesLoadedByThePage, {PH1: resourceSize}));\n }\n\n if (baseTime !== -1 && maxTime !== -1) {\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(i18nString(UIStrings.finishS, {PH1: i18n.TimeUtilities.secondsToString(maxTime - baseTime)}));\n if (this.mainRequestDOMContentLoadedTime !== -1 && this.mainRequestDOMContentLoadedTime > baseTime) {\n this.summaryToolbarInternal.appendSeparator();\n const domContentLoadedText = i18nString(\n UIStrings.domcontentloadedS,\n {PH1: i18n.TimeUtilities.secondsToString(this.mainRequestDOMContentLoadedTime - baseTime)});\n appendChunk(domContentLoadedText).style.color = `var(${NetworkLogView.getDCLEventColor()})`;\n }\n if (this.mainRequestLoadTime !== -1) {\n this.summaryToolbarInternal.appendSeparator();\n const loadText =\n i18nString(UIStrings.loadS, {PH1: i18n.TimeUtilities.secondsToString(this.mainRequestLoadTime - baseTime)});\n appendChunk(loadText).style.color = `var(${NetworkLogView.getLoadEventColor()})`;\n }\n }\n }\n\n scheduleRefresh(): void {\n if (this.needsRefresh) {\n return;\n }\n\n this.needsRefresh = true;\n\n if (this.isShowing()) {\n void coordinator.write('NetworkLogView.render', this.refresh.bind(this));\n }\n }\n\n addFilmStripFrames(times: number[]): void {\n this.columnsInternal.addEventDividers(times, 'network-frame-divider');\n }\n\n selectFilmStripFrame(time: number): void {\n this.columnsInternal.selectFilmStripFrame(time);\n }\n\n clearFilmStripFrame(): void {\n this.columnsInternal.clearFilmStripFrame();\n }\n\n private refreshIfNeeded(): void {\n if (this.needsRefresh) {\n this.refresh();\n }\n }\n\n private invalidateAllItems(deferUpdate?: boolean): void {\n this.staleRequests = new Set(Logs.NetworkLog.NetworkLog.instance().requests().filter(this.isInScope));\n if (deferUpdate) {\n this.scheduleRefresh();\n } else {\n this.refresh();\n }\n }\n\n timeCalculator(): NetworkTimeCalculator {\n return this.timeCalculatorInternal;\n }\n\n calculator(): NetworkTimeCalculator {\n return this.calculatorInternal;\n }\n\n setCalculator(x: NetworkTimeCalculator): void {\n if (!x || this.calculatorInternal === x) {\n return;\n }\n\n if (this.calculatorInternal !== x) {\n this.calculatorInternal = x;\n this.columnsInternal.setCalculator(this.calculatorInternal);\n }\n this.calculatorInternal.reset();\n\n if (this.calculatorInternal.startAtZero) {\n this.columnsInternal.hideEventDividers();\n } else {\n this.columnsInternal.showEventDividers();\n }\n\n this.invalidateAllItems();\n }\n\n private loadEventFired(\n event: Common.EventTarget\n .EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>): void {\n if (!this.recording) {\n return;\n }\n\n const time = event.data.loadTime;\n if (time) {\n this.mainRequestLoadTime = time;\n this.columnsInternal.addEventDividers([time], 'network-load-divider');\n }\n }\n\n private domContentLoadedEventFired(event: Common.EventTarget.EventTargetEvent): void {\n if (!this.recording) {\n return;\n }\n const {data} = event;\n if (data) {\n this.mainRequestDOMContentLoadedTime = data;\n this.columnsInternal.addEventDividers([data], 'network-dcl-divider');\n }\n }\n\n override wasShown(): void {\n this.refreshIfNeeded();\n this.registerCSSFiles([networkLogViewStyles]);\n this.columnsInternal.wasShown();\n }\n\n override willHide(): void {\n this.columnsInternal.willHide();\n }\n\n override onResize(): void {\n this.rowHeightInternal = this.computeRowHeight();\n }\n\n flatNodesList(): NetworkNode[] {\n const rootNode =\n (this.dataGrid.rootNode() as\n DataGrid.ViewportDataGrid.ViewportDataGridNode>);\n return rootNode.flatChildren() as NetworkNode[];\n }\n\n private onDataGridFocus(): void {\n if (this.dataGrid.element.matches(':focus-visible')) {\n this.element.classList.add('grid-focused');\n }\n this.updateNodeBackground();\n }\n\n private onDataGridBlur(): void {\n this.element.classList.remove('grid-focused');\n this.updateNodeBackground();\n }\n\n updateNodeBackground(): void {\n if (this.dataGrid.selectedNode) {\n (this.dataGrid.selectedNode as NetworkNode).updateBackgroundColor();\n }\n }\n\n updateNodeSelectedClass(isSelected: boolean): void {\n if (isSelected) {\n this.element.classList.remove('no-node-selected');\n } else {\n this.element.classList.add('no-node-selected');\n }\n }\n\n stylesChanged(): void {\n this.columnsInternal.scheduleRefresh();\n }\n\n private removeNodeAndMaybeAncestors(node: NetworkRequestNode): void {\n let parent: NetworkNode|\n (DataGrid.DataGrid.DataGridNode>>|\n null) = node.parent;\n if (!parent) {\n return;\n }\n parent.removeChild(node);\n while (parent && !parent.hasChildren() && parent.dataGrid && parent.dataGrid.rootNode() !== parent) {\n const grandparent = (parent.parent as NetworkNode);\n grandparent.removeChild(parent);\n parent = grandparent;\n }\n }\n\n private refresh(): void {\n this.needsRefresh = false;\n\n this.removeAllNodeHighlights();\n\n this.timeCalculatorInternal.updateBoundariesForEventTime(this.mainRequestLoadTime);\n this.durationCalculator.updateBoundariesForEventTime(this.mainRequestLoadTime);\n this.timeCalculatorInternal.updateBoundariesForEventTime(this.mainRequestDOMContentLoadedTime);\n this.durationCalculator.updateBoundariesForEventTime(this.mainRequestDOMContentLoadedTime);\n\n const nodesToInsert = new Map();\n const nodesToRefresh: NetworkNode[] = [];\n\n const staleNodes = new Set();\n\n // While creating nodes it may add more entries into staleRequests because redirect request nodes update the parent\n // node so we loop until we have no more stale requests.\n while (this.staleRequests.size) {\n const request = this.staleRequests.values().next().value;\n this.staleRequests.delete(request);\n let node = networkRequestToNode.get(request);\n if (!node) {\n node = this.createNodeForRequest(request);\n }\n staleNodes.add(node);\n }\n\n for (const node of staleNodes) {\n const isFilteredOut = !this.applyFilter(node);\n if (isFilteredOut && node === this.hoveredNodeInternal) {\n this.setHoveredNode(null);\n }\n\n if (!isFilteredOut) {\n nodesToRefresh.push(node);\n }\n const request = node.request();\n this.timeCalculatorInternal.updateBoundaries(request);\n this.durationCalculator.updateBoundaries(request);\n const newParent = this.parentNodeForInsert(node);\n const wasAlreadyFiltered = filteredNetworkRequests.has(node);\n if (wasAlreadyFiltered === isFilteredOut && node.parent === newParent) {\n continue;\n }\n if (isFilteredOut) {\n filteredNetworkRequests.add(node);\n } else {\n filteredNetworkRequests.delete(node);\n }\n const removeFromParent = node.parent && (isFilteredOut || node.parent !== newParent);\n if (removeFromParent) {\n this.removeNodeAndMaybeAncestors(node);\n }\n\n if (!newParent || isFilteredOut) {\n continue;\n }\n\n if (!newParent.dataGrid && !nodesToInsert.has(newParent)) {\n nodesToInsert.set(newParent, (this.dataGrid.rootNode() as NetworkNode));\n nodesToRefresh.push(newParent);\n }\n nodesToInsert.set(node, newParent);\n }\n\n for (const node of nodesToInsert.keys()) {\n (nodesToInsert.get(node) as NetworkNode).appendChild(node);\n }\n\n for (const node of nodesToRefresh) {\n node.refresh();\n }\n\n this.updateSummaryBar();\n\n if (nodesToInsert.size) {\n this.columnsInternal.sortByCurrentColumn();\n }\n\n this.dataGrid.updateInstantly();\n this.didRefreshForTest();\n }\n\n private didRefreshForTest(): void {\n }\n\n private parentNodeForInsert(node: NetworkRequestNode): NetworkNode|null {\n if (!this.activeGroupLookup) {\n return this.dataGrid.rootNode() as NetworkNode;\n }\n\n const groupNode = this.activeGroupLookup.groupNodeForRequest(node.request());\n if (!groupNode) {\n return this.dataGrid.rootNode() as NetworkNode;\n }\n return groupNode;\n }\n\n private reset(): void {\n this.dispatchEventToListeners(Events.RequestActivated, {showPanel: false});\n\n this.setHoveredNode(null);\n this.columnsInternal.reset();\n\n this.timeFilter = null;\n this.calculatorInternal.reset();\n\n this.timeCalculatorInternal.setWindow(null);\n this.linkifierInternal.reset();\n\n if (this.activeGroupLookup) {\n this.activeGroupLookup.reset();\n }\n this.staleRequests.clear();\n this.resetSuggestionBuilder();\n\n this.mainRequestLoadTime = -1;\n this.mainRequestDOMContentLoadedTime = -1;\n\n this.dataGrid.rootNode().removeChildren();\n this.updateSummaryBar();\n this.dataGrid.setStickToBottom(true);\n this.scheduleRefresh();\n }\n\n // TODO(crbug.com/1477668)\n setTextFilterValue(filterString: string): void {\n this.textFilterUI.setValue(filterString);\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN)) {\n this.networkHideDataURLSetting.set(false);\n this.networkShowBlockedCookiesOnlySetting.set(false);\n this.networkOnlyBlockedRequestsSetting.set(false);\n this.networkOnlyThirdPartySetting.set(false);\n this.networkHideChromeExtensions.set(false);\n } else {\n this.dataURLFilterUI?.setChecked(false);\n this.onlyBlockedResponseCookiesFilterUI?.setChecked(false);\n this.onlyBlockedRequestsUI?.setChecked(false);\n this.onlyThirdPartyFilterUI?.setChecked(false);\n this.hideChromeExtensionsUI?.setChecked(false);\n }\n this.resourceCategoryFilterUI.reset();\n }\n\n private createNodeForRequest(request: SDK.NetworkRequest.NetworkRequest): NetworkRequestNode {\n const node = new NetworkRequestNode(this, request);\n networkRequestToNode.set(request, node);\n filteredNetworkRequests.add(node);\n\n for (let redirect = request.redirectSource(); redirect; redirect = redirect.redirectSource()) {\n this.refreshRequest(redirect);\n }\n return node;\n }\n\n private isInScope(request: SDK.NetworkRequest.NetworkRequest): boolean {\n const networkManager = SDK.NetworkManager.NetworkManager.forRequest(request);\n return !networkManager || SDK.TargetManager.TargetManager.instance().isInScope(networkManager);\n }\n\n private onRequestUpdated(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n if (this.isInScope(request)) {\n this.refreshRequest(request);\n }\n }\n\n private onRequestRemoved(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n this.staleRequests.delete(request);\n const node = networkRequestToNode.get(request);\n if (node) {\n this.removeNodeAndMaybeAncestors(node);\n }\n }\n\n private refreshRequest(request: SDK.NetworkRequest.NetworkRequest): void {\n NetworkLogView.subdomains(request.domain)\n .forEach(\n this.suggestionBuilder.addItem.bind(this.suggestionBuilder, NetworkForward.UIFilter.FilterType.Domain));\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Method, request.requestMethod);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.MimeType, request.mimeType);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Scheme, String(request.scheme));\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.StatusCode, String(request.statusCode));\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.ResourceType, request.resourceType().name());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Url, request.securityOrigin());\n\n const priority = request.priority();\n if (priority) {\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.Priority, PerfUI.NetworkPriorities.uiLabelForNetworkPriority(priority));\n }\n\n if (request.mixedContentType !== Protocol.Security.MixedContentType.None) {\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.MixedContent, NetworkForward.UIFilter.MixedContentFilterValues.All);\n }\n\n if (request.mixedContentType === Protocol.Security.MixedContentType.OptionallyBlockable) {\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.MixedContent, NetworkForward.UIFilter.MixedContentFilterValues.Displayed);\n }\n\n if (request.mixedContentType === Protocol.Security.MixedContentType.Blockable) {\n const suggestion = request.wasBlocked() ? NetworkForward.UIFilter.MixedContentFilterValues.Blocked :\n NetworkForward.UIFilter.MixedContentFilterValues.BlockOverridden;\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.MixedContent, suggestion);\n }\n\n const responseHeaders = request.responseHeaders;\n for (const responseHeader of responseHeaders) {\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasResponseHeader, responseHeader.name);\n if (responseHeader.name === 'Set-Cookie') {\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.ResponseHeaderValueSetCookie);\n }\n }\n\n for (const cookie of request.responseCookies) {\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.SetCookieDomain, cookie.domain());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.SetCookieName, cookie.name());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.SetCookieValue, cookie.value());\n }\n\n for (const cookie of request.allCookiesIncludingBlockedOnes()) {\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.CookieDomain, cookie.domain());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.CookieName, cookie.name());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.CookiePath, cookie.path());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.CookieValue, cookie.value());\n }\n\n this.staleRequests.add(request);\n this.scheduleRefresh();\n }\n\n rowHeight(): number {\n return this.rowHeightInternal;\n }\n\n switchViewMode(gridMode: boolean): void {\n this.columnsInternal.switchViewMode(gridMode);\n }\n\n handleContextMenuForRequest(contextMenu: UI.ContextMenu.ContextMenu, request: SDK.NetworkRequest.NetworkRequest):\n void {\n contextMenu.appendApplicableItems(request);\n let copyMenu = contextMenu.clipboardSection().appendSubMenuItem(i18nString(UIStrings.copy));\n const footerSection = copyMenu.footerSection();\n if (request) {\n copyMenu.defaultSection().appendItem(\n UI.UIUtils.copyLinkAddressLabel(),\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText.bind(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance, request.contentURL()));\n if (request.requestHeadersText()) {\n copyMenu.defaultSection().appendItem(\n i18nString(UIStrings.copyRequestHeaders), NetworkLogView.copyRequestHeaders.bind(null, request));\n }\n\n if (request.responseHeadersText) {\n copyMenu.defaultSection().appendItem(\n i18nString(UIStrings.copyResponseHeaders), NetworkLogView.copyResponseHeaders.bind(null, request));\n }\n\n if (request.finished) {\n copyMenu.defaultSection().appendItem(\n i18nString(UIStrings.copyResponse), NetworkLogView.copyResponse.bind(null, request));\n }\n\n const initiator = request.initiator();\n\n if (initiator) {\n const stack = initiator.stack;\n if (stack) {\n // We proactively compute the stacktrace text, as we can't determine whether the stacktrace\n // has any context solely based on the top frame. Sometimes, the top frame does not have\n // any callFrames, but its parent frames do.\n const stackTraceText = computeStackTraceText(stack);\n if (stackTraceText !== '') {\n copyMenu.defaultSection().appendItem(i18nString(UIStrings.copyStacktrace), () => {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(stackTraceText);\n });\n }\n }\n }\n\n const disableIfBlob = request.isBlobRequest();\n if (Host.Platform.isWin()) {\n footerSection.appendItem(\n i18nString(UIStrings.copyAsPowershell), this.copyPowerShellCommand.bind(this, request),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsFetch), this.copyFetchCall.bind(this, request, FetchStyle.Browser),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsNodejsFetch), this.copyFetchCall.bind(this, request, FetchStyle.NodeJs),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsCurlCmd), this.copyCurlCommand.bind(this, request, 'win'),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsCurlBash), this.copyCurlCommand.bind(this, request, 'unix'),\n {disabled: disableIfBlob});\n footerSection.appendItem(i18nString(UIStrings.copyAllAsPowershell), this.copyAllPowerShellCommand.bind(this));\n footerSection.appendItem(\n i18nString(UIStrings.copyAllAsFetch), this.copyAllFetchCall.bind(this, FetchStyle.Browser));\n footerSection.appendItem(\n i18nString(UIStrings.copyAllAsNodejsFetch), this.copyAllFetchCall.bind(this, FetchStyle.NodeJs));\n footerSection.appendItem(i18nString(UIStrings.copyAllAsCurlCmd), this.copyAllCurlCommand.bind(this, 'win'));\n footerSection.appendItem(i18nString(UIStrings.copyAllAsCurlBash), this.copyAllCurlCommand.bind(this, 'unix'));\n } else {\n footerSection.appendItem(\n i18nString(UIStrings.copyAsPowershell), this.copyPowerShellCommand.bind(this, request),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsFetch), this.copyFetchCall.bind(this, request, FetchStyle.Browser),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsNodejsFetch), this.copyFetchCall.bind(this, request, FetchStyle.NodeJs),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsCurl), this.copyCurlCommand.bind(this, request, 'unix'),\n {disabled: disableIfBlob});\n footerSection.appendItem(i18nString(UIStrings.copyAllAsPowershell), this.copyAllPowerShellCommand.bind(this));\n footerSection.appendItem(\n i18nString(UIStrings.copyAllAsFetch), this.copyAllFetchCall.bind(this, FetchStyle.Browser));\n footerSection.appendItem(\n i18nString(UIStrings.copyAllAsNodejsFetch), this.copyAllFetchCall.bind(this, FetchStyle.NodeJs));\n footerSection.appendItem(i18nString(UIStrings.copyAllAsCurl), this.copyAllCurlCommand.bind(this, 'unix'));\n }\n } else {\n copyMenu = contextMenu.clipboardSection().appendSubMenuItem(i18nString(UIStrings.copy));\n }\n footerSection.appendItem(i18nString(UIStrings.copyAllAsHar), this.copyAll.bind(this));\n\n contextMenu.saveSection().appendItem(i18nString(UIStrings.saveAllAsHarWithContent), this.exportAll.bind(this));\n contextMenu.overrideSection().appendItem(\n i18nString(UIStrings.overrideHeaders), this.#handleCreateResponseHeaderOverrideClick.bind(this, request));\n\n contextMenu.editSection().appendItem(i18nString(UIStrings.clearBrowserCache), this.clearBrowserCache.bind(this));\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.clearBrowserCookies), this.clearBrowserCookies.bind(this));\n\n if (request) {\n const maxBlockedURLLength = 20;\n const manager = SDK.NetworkManager.MultitargetNetworkManager.instance();\n let patterns = manager.blockedPatterns();\n\n function addBlockedURL(url: string): void {\n patterns.push({enabled: true, url: url as Platform.DevToolsPath.UrlString});\n manager.setBlockedPatterns(patterns);\n manager.setBlockingEnabled(true);\n void UI.ViewManager.ViewManager.instance().showView('network.blocked-urls');\n }\n\n function removeBlockedURL(url: string): void {\n patterns = patterns.filter(pattern => pattern.url !== url);\n manager.setBlockedPatterns(patterns);\n void UI.ViewManager.ViewManager.instance().showView('network.blocked-urls');\n }\n\n const urlWithoutScheme = request.parsedURL.urlWithoutScheme();\n if (urlWithoutScheme && !patterns.find(pattern => pattern.url === urlWithoutScheme)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.blockRequestUrl), addBlockedURL.bind(null, urlWithoutScheme));\n } else if (urlWithoutScheme) {\n const croppedURL = Platform.StringUtilities.trimMiddle(urlWithoutScheme, maxBlockedURLLength);\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.unblockS, {PH1: croppedURL}), removeBlockedURL.bind(null, urlWithoutScheme));\n }\n\n const domain = request.parsedURL.domain();\n if (domain && !patterns.find(pattern => pattern.url === domain)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.blockRequestDomain), addBlockedURL.bind(null, domain));\n } else if (domain) {\n const croppedDomain = Platform.StringUtilities.trimMiddle(domain, maxBlockedURLLength);\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.unblockS, {PH1: croppedDomain}), removeBlockedURL.bind(null, domain));\n }\n\n if (SDK.NetworkManager.NetworkManager.canReplayRequest(request)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.replayXhr), SDK.NetworkManager.NetworkManager.replayRequest.bind(null, request));\n }\n }\n }\n\n private harRequests(): SDK.NetworkRequest.NetworkRequest[] {\n return Logs.NetworkLog.NetworkLog.instance()\n .requests()\n .filter(NetworkLogView.getHTTPRequestsFilter)\n .filter(request => {\n return request.finished ||\n (request.resourceType() === Common.ResourceType.resourceTypes.WebSocket && request.responseReceivedTime);\n });\n }\n\n private async copyAll(): Promise {\n const harArchive = {log: await HAR.Log.Log.build(this.harRequests())};\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(JSON.stringify(harArchive, null, 2));\n }\n\n private async copyCurlCommand(request: SDK.NetworkRequest.NetworkRequest, platform: string): Promise {\n const command = await NetworkLogView.generateCurlCommand(request, platform);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(command);\n }\n\n private async copyAllCurlCommand(platform: string): Promise {\n const commands = await this.generateAllCurlCommand(Logs.NetworkLog.NetworkLog.instance().requests(), platform);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(commands);\n }\n\n private async copyFetchCall(request: SDK.NetworkRequest.NetworkRequest, style: FetchStyle): Promise {\n const command = await this.generateFetchCall(request, style);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(command);\n }\n\n private async copyAllFetchCall(style: FetchStyle): Promise {\n const commands = await this.generateAllFetchCall(Logs.NetworkLog.NetworkLog.instance().requests(), style);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(commands);\n }\n\n private async copyPowerShellCommand(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const command = await this.generatePowerShellCommand(request);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(command);\n }\n\n private async copyAllPowerShellCommand(): Promise {\n const commands = await this.generateAllPowerShellCommand(Logs.NetworkLog.NetworkLog.instance().requests());\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(commands);\n }\n\n async exportAll(): Promise {\n const mainTarget = SDK.TargetManager.TargetManager.instance().scopeTarget();\n if (!mainTarget) {\n return;\n }\n const url = mainTarget.inspectedURL();\n const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);\n const filename = (parsedURL ? parsedURL.host : 'network-log') as Platform.DevToolsPath.RawPathString;\n const stream = new Bindings.FileUtils.FileOutputStream();\n\n if (!await stream.open(Common.ParsedURL.ParsedURL.concatenate(filename, '.har'))) {\n return;\n }\n\n const progressIndicator = new UI.ProgressIndicator.ProgressIndicator();\n this.progressBarContainer.appendChild(progressIndicator.element);\n await HAR.Writer.Writer.write(stream, this.harRequests(), progressIndicator);\n progressIndicator.done();\n void stream.close();\n }\n\n async #handleCreateResponseHeaderOverrideClick(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const requestLocation =\n NetworkForward.UIRequestLocation.UIRequestLocation.responseHeaderMatch(request, {name: '', value: ''});\n const networkPersistanceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();\n if (networkPersistanceManager.project()) {\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled').set(true);\n await networkPersistanceManager.getOrCreateHeadersUISourceCodeFromUrl(request.url());\n await Common.Revealer.reveal(requestLocation);\n } else { // If folder for local overrides has not been provided yet\n UI.InspectorView.InspectorView.instance().displaySelectOverrideFolderInfobar(async(): Promise => {\n await Sources.SourcesNavigator.OverridesNavigatorView.instance().setupNewWorkspace();\n await networkPersistanceManager.getOrCreateHeadersUISourceCodeFromUrl(request.url());\n await Common.Revealer.reveal(requestLocation);\n });\n }\n }\n\n private clearBrowserCache(): void {\n if (confirm(i18nString(UIStrings.areYouSureYouWantToClearBrowser))) {\n SDK.NetworkManager.MultitargetNetworkManager.instance().clearBrowserCache();\n }\n }\n\n private clearBrowserCookies(): void {\n if (confirm(i18nString(UIStrings.areYouSureYouWantToClearBrowserCookies))) {\n SDK.NetworkManager.MultitargetNetworkManager.instance().clearBrowserCookies();\n }\n }\n\n private removeAllHighlights(): void {\n this.removeAllNodeHighlights();\n }\n\n private applyFilter(node: NetworkRequestNode): boolean {\n const request = node.request();\n if (this.timeFilter && !this.timeFilter(request)) {\n return false;\n }\n const categoryName = request.resourceType().category().title();\n if (!this.resourceCategoryFilterUI.accept(categoryName)) {\n return false;\n }\n const [hideDataURL, blockedCookies, blockedRequests, thirdParty, hideExtensionURL] =\n Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN) ?\n [\n this.networkHideDataURLSetting.get(),\n this.networkShowBlockedCookiesOnlySetting.get(),\n this.networkOnlyBlockedRequestsSetting.get(),\n this.networkOnlyThirdPartySetting.get(),\n this.networkHideChromeExtensions.get(),\n ] :\n [\n this.dataURLFilterUI?.checked(),\n this.onlyBlockedResponseCookiesFilterUI?.checked(),\n this.onlyBlockedRequestsUI?.checked(),\n this.onlyThirdPartyFilterUI?.checked(),\n this.hideChromeExtensionsUI?.checked(),\n ];\n\n if (hideDataURL && (request.parsedURL.isDataURL() || request.parsedURL.isBlobURL())) {\n return false;\n }\n if (blockedCookies && !request.blockedResponseCookies().length) {\n return false;\n }\n if (blockedRequests && !request.wasBlocked() && !request.corsErrorStatus()) {\n return false;\n }\n if (thirdParty && request.isSameSite()) {\n return false;\n }\n if (hideExtensionURL && request.scheme === 'chrome-extension') {\n return false;\n }\n for (let i = 0; i < this.filters.length; ++i) {\n if (!this.filters[i](request)) {\n return false;\n }\n }\n return true;\n }\n\n private isValidUrl(url: string): boolean {\n try {\n new URL(url);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n private parseFilterQuery(query: string, invert: boolean): void {\n // A query string can have multiple filters, some of them regular\n // expressions, some not. Each one of those filters can be negated with a\n // \"-\" prefix, including the regular expressions. The top-level `invert`\n // checkbox therefore inverts each one of those individual filters.\n const descriptors = this.filterParser.parse(query);\n this.filters = descriptors.map(descriptor => {\n const key = descriptor.key;\n const text = descriptor.text || '';\n const regex = descriptor.regex;\n let filter;\n if (key) {\n const defaultText = Platform.StringUtilities.escapeForRegExp(key + ':' + text);\n filter = this.createSpecialFilter((key as NetworkForward.UIFilter.FilterType), text) ||\n NetworkLogView.requestPathFilter.bind(null, new RegExp(defaultText, 'i'));\n } else if (descriptor.regex) {\n filter = NetworkLogView.requestPathFilter.bind(null, (regex as RegExp));\n } else if (this.isValidUrl(text)) {\n filter = NetworkLogView.requestUrlFilter.bind(null, text);\n } else {\n filter = NetworkLogView.requestPathFilter.bind(\n null, new RegExp(Platform.StringUtilities.escapeForRegExp(text), 'i'));\n }\n if ((descriptor.negative && !invert) || (!descriptor.negative && invert)) {\n return NetworkLogView.negativeFilter.bind(null, filter);\n }\n return filter;\n });\n }\n\n private createSpecialFilter(type: NetworkForward.UIFilter.FilterType, value: string): Filter|null {\n switch (type) {\n case NetworkForward.UIFilter.FilterType.Domain:\n return NetworkLogView.createRequestDomainFilter(value);\n\n case NetworkForward.UIFilter.FilterType.HasResponseHeader:\n return NetworkLogView.requestResponseHeaderFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.ResponseHeaderValueSetCookie:\n return NetworkLogView.requestResponseHeaderSetCookieFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.Is:\n if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.Running) {\n return NetworkLogView.runningRequestFilter;\n }\n if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.FromCache) {\n return NetworkLogView.fromCacheRequestFilter;\n }\n if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.ServiceWorkerIntercepted) {\n return NetworkLogView.interceptedByServiceWorkerFilter;\n }\n if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.ServiceWorkerInitiated) {\n return NetworkLogView.initiatedByServiceWorkerFilter;\n }\n break;\n\n case NetworkForward.UIFilter.FilterType.LargerThan:\n return this.createSizeFilter(value.toLowerCase());\n\n case NetworkForward.UIFilter.FilterType.Method:\n return NetworkLogView.requestMethodFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.MimeType:\n return NetworkLogView.requestMimeTypeFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.MixedContent:\n return NetworkLogView.requestMixedContentFilter.bind(\n null, (value as NetworkForward.UIFilter.MixedContentFilterValues));\n\n case NetworkForward.UIFilter.FilterType.Scheme:\n return NetworkLogView.requestSchemeFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.SetCookieDomain:\n return NetworkLogView.requestSetCookieDomainFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.SetCookieName:\n return NetworkLogView.requestSetCookieNameFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.SetCookieValue:\n return NetworkLogView.requestSetCookieValueFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.CookieDomain:\n return NetworkLogView.requestCookieDomainFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.CookieName:\n return NetworkLogView.requestCookieNameFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.CookiePath:\n return NetworkLogView.requestCookiePathFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.CookieValue:\n return NetworkLogView.requestCookieValueFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.Priority:\n return NetworkLogView.requestPriorityFilter.bind(\n null, PerfUI.NetworkPriorities.uiLabelToNetworkPriority(value));\n\n case NetworkForward.UIFilter.FilterType.StatusCode:\n return NetworkLogView.statusCodeFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.HasOverrides:\n return NetworkLogView.hasOverridesFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.ResourceType:\n return NetworkLogView.resourceTypeFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.Url:\n return NetworkLogView.requestUrlFilter.bind(null, value);\n }\n return null;\n }\n\n private createSizeFilter(value: string): Filter|null {\n let multiplier = 1;\n if (value.endsWith('k')) {\n multiplier = 1000;\n value = value.substring(0, value.length - 1);\n } else if (value.endsWith('m')) {\n multiplier = 1000 * 1000;\n value = value.substring(0, value.length - 1);\n }\n const quantity = Number(value);\n if (isNaN(quantity)) {\n return null;\n }\n return NetworkLogView.requestSizeLargerThanFilter.bind(null, quantity * multiplier);\n }\n\n private filterRequests(): void {\n this.removeAllHighlights();\n this.invalidateAllItems();\n }\n\n private reveal(request: SDK.NetworkRequest.NetworkRequest): NetworkRequestNode|null {\n this.removeAllNodeHighlights();\n const node = networkRequestToNode.get(request);\n if (!node || !node.dataGrid) {\n return null;\n }\n // Viewport datagrid nodes do not reveal if not in the root node\n // list of flatChildren. For children of grouped frame nodes:\n // reveal and expand parent to ensure child is revealable.\n if (node.parent && node.parent instanceof NetworkGroupNode) {\n node.parent.reveal();\n node.parent.expand();\n }\n node.reveal();\n return node;\n }\n\n revealAndHighlightRequest(request: SDK.NetworkRequest.NetworkRequest): void {\n const node = this.reveal(request);\n if (node) {\n this.highlightNode(node);\n }\n }\n\n revealAndHighlightRequestWithId(requestId: NetworkForward.NetworkRequestId.NetworkRequestId): void {\n const request = Logs.NetworkLog.NetworkLog.instance().requestByManagerAndId(requestId.manager, requestId.requestId);\n if (request) {\n this.revealAndHighlightRequest(request);\n }\n }\n\n selectRequest(request: SDK.NetworkRequest.NetworkRequest, options?: NetworkForward.UIRequestLocation.FilterOptions):\n void {\n const defaultOptions = {clearFilter: true};\n const {clearFilter} = options || defaultOptions;\n if (clearFilter) {\n this.setTextFilterValue('');\n }\n const node = this.reveal(request);\n if (node) {\n node.select();\n }\n }\n\n removeAllNodeHighlights(): void {\n if (this.highlightedNode) {\n this.highlightedNode.element().classList.remove('highlighted-row');\n this.highlightedNode = null;\n }\n }\n\n private highlightNode(node: NetworkRequestNode): void {\n UI.UIUtils.runCSSAnimationOnce(node.element(), 'highlighted-row');\n this.highlightedNode = node;\n }\n\n private filterOutBlobRequests(requests: SDK.NetworkRequest.NetworkRequest[]): SDK.NetworkRequest.NetworkRequest[] {\n return requests.filter(request => !request.isBlobRequest());\n }\n\n private async generateFetchCall(request: SDK.NetworkRequest.NetworkRequest, style: FetchStyle): Promise {\n const ignoredHeaders = new Set([\n // Internal headers\n 'method',\n 'path',\n 'scheme',\n 'version',\n\n // Unsafe headers\n // Keep this list synchronized with src/net/http/http_util.cc\n 'accept-charset',\n 'accept-encoding',\n 'access-control-request-headers',\n 'access-control-request-method',\n 'connection',\n 'content-length',\n 'cookie',\n 'cookie2',\n 'date',\n 'dnt',\n 'expect',\n 'host',\n 'keep-alive',\n 'origin',\n 'referer',\n 'te',\n 'trailer',\n 'transfer-encoding',\n 'upgrade',\n 'via',\n // TODO(phistuck) - remove this once crbug.com/571722 is fixed.\n 'user-agent',\n ]);\n\n const credentialHeaders = new Set(['cookie', 'authorization']);\n\n const url = JSON.stringify(request.url());\n\n const requestHeaders = request.requestHeaders();\n const headerData: Headers = requestHeaders.reduce((result, header) => {\n const name = header.name;\n\n if (!ignoredHeaders.has(name.toLowerCase()) && !name.includes(':')) {\n result.append(name, header.value);\n }\n\n return result;\n }, new Headers());\n\n const headers: HeadersInit = {};\n for (const headerArray of headerData) {\n headers[headerArray[0]] = headerArray[1];\n }\n\n const credentials = request.includedRequestCookies().length ||\n requestHeaders.some(({name}) => credentialHeaders.has(name.toLowerCase())) ?\n 'include' :\n 'omit';\n\n const referrerHeader = requestHeaders.find(({name}) => name.toLowerCase() === 'referer');\n\n const referrer = referrerHeader ? referrerHeader.value : void 0;\n\n const referrerPolicy = request.referrerPolicy() || void 0;\n\n const requestBody = await request.requestFormData();\n\n const fetchOptions: RequestInit = {\n headers: Object.keys(headers).length ? headers : void 0,\n referrer,\n referrerPolicy,\n body: requestBody,\n method: request.requestMethod,\n mode: 'cors',\n };\n\n if (style === FetchStyle.NodeJs) {\n const cookieHeader = requestHeaders.find(header => header.name.toLowerCase() === 'cookie');\n const extraHeaders: HeadersInit = {};\n // According to https://www.npmjs.com/package/node-fetch#class-request the\n // following properties are not implemented in Node.js.\n delete fetchOptions.mode;\n if (cookieHeader) {\n extraHeaders['cookie'] = cookieHeader.value;\n }\n if (referrer) {\n delete fetchOptions.referrer;\n extraHeaders['Referer'] = referrer;\n }\n if (referrer) {\n delete fetchOptions.referrerPolicy;\n extraHeaders['Referrer-Policy'] = referrerPolicy as string;\n }\n if (Object.keys(extraHeaders).length) {\n fetchOptions.headers = {\n ...headers,\n ...extraHeaders,\n };\n }\n } else {\n fetchOptions.credentials = credentials;\n }\n\n const options = JSON.stringify(fetchOptions, null, 2);\n return `fetch(${url}, ${options});`;\n }\n\n private async generateAllFetchCall(requests: SDK.NetworkRequest.NetworkRequest[], style: FetchStyle):\n Promise {\n const nonBlobRequests = this.filterOutBlobRequests(requests);\n const commands = await Promise.all(nonBlobRequests.map(request => this.generateFetchCall(request, style)));\n return commands.join(' ;\\n');\n }\n\n static async generateCurlCommand(request: SDK.NetworkRequest.NetworkRequest, platform: string): Promise {\n let command: string[] = [];\n // Most of these headers are derived from the URL and are automatically added by cURL.\n // The |Accept-Encoding| header is ignored to prevent decompression errors. crbug.com/1015321\n const ignoredHeaders = new Set(['accept-encoding', 'host', 'method', 'path', 'scheme', 'version']);\n\n function escapeStringWin(str: string): string {\n /* If there are no new line characters do not escape the \" characters\n since it only uglifies the command.\n\n Because cmd.exe parser and MS Crt arguments parsers use some of the\n same escape characters, they can interact with each other in\n horrible ways, the order of operations is critical.\n\n Replace \\ with \\\\ first because it is an escape character for certain\n conditions in both parsers.\n\n Replace all \" with \\\" to ensure the first parser does not remove it.\n\n Then escape all characters we are not sure about with ^ to ensure it\n gets to MS Crt parser safely.\n\n The % character is special because MS Crt parser will try and look for\n ENV variables and fill them in its place. We cannot escape them with %\n and cannot escape them with ^ (because it's cmd.exe's escape not MS Crt\n parser); So we can get cmd.exe parser to escape the character after it,\n if it is followed by a valid beginning character of an ENV variable.\n This ensures we do not try and double escape another ^ if it was placed\n by the previous replace.\n\n Lastly we replace new lines with ^ and TWO new lines because the first\n new line is there to enact the escape command the second is the character\n to escape (in this case new line).\n */\n const encapsChars = /[\\r\\n]/.test(str) ? '^\"' : '\"';\n return encapsChars +\n str.replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/[^a-zA-Z0-9\\s_\\-:=+~'\\/.',?;()*`&]/g, '^$&')\n .replace(/%(?=[a-zA-Z0-9_])/g, '%^')\n .replace(/\\r?\\n/g, '^\\n\\n') +\n encapsChars;\n }\n\n function escapeStringPosix(str: string): string {\n function escapeCharacter(x: string): string {\n const code = x.charCodeAt(0);\n let hexString = code.toString(16);\n // Zero pad to four digits to comply with ANSI-C Quoting:\n // http://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html\n while (hexString.length < 4) {\n hexString = '0' + hexString;\n }\n\n return '\\\\u' + hexString;\n }\n\n if (/[\\0-\\x1F\\x7F-\\x9F!]|\\'/.test(str)) {\n // Use ANSI-C quoting syntax.\n return '$\\'' +\n str.replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\'/g, '\\\\\\'')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\0-\\x1F\\x7F-\\x9F!]/g, escapeCharacter) +\n '\\'';\n }\n // Use single quote syntax.\n return '\\'' + str + '\\'';\n }\n\n // cURL command expected to run on the same platform that DevTools run\n // (it may be different from the inspected page platform).\n const escapeString = platform === 'win' ? escapeStringWin : escapeStringPosix;\n\n command.push(escapeString(request.url()).replace(/[[{}\\]]/g, '\\\\$&'));\n\n let inferredMethod = 'GET';\n const data = [];\n const formData = await request.requestFormData();\n if (formData) {\n // Note that formData is not necessarily urlencoded because it might for example\n // come from a fetch request made with an explicitly unencoded body.\n data.push('--data-raw ' + escapeString(formData));\n ignoredHeaders.add('content-length');\n inferredMethod = 'POST';\n }\n\n if (request.requestMethod !== inferredMethod) {\n command.push('-X ' + escapeString(request.requestMethod));\n }\n\n const requestHeaders = request.requestHeaders();\n for (let i = 0; i < requestHeaders.length; i++) {\n const header = requestHeaders[i];\n const name = header.name.replace(/^:/, ''); // Translate SPDY v3 headers to HTTP headers.\n if (ignoredHeaders.has(name.toLowerCase())) {\n continue;\n }\n if (header.value.trim()) {\n command.push('-H ' + escapeString(name + ': ' + header.value));\n } else {\n // A header passed with -H with no value or only whitespace as its\n // value tells curl to not set the header at all. To post an empty\n // header, you have to terminate it with a semicolon.\n command.push('-H ' + escapeString(name + ';'));\n }\n }\n command = command.concat(data);\n command.push('--compressed');\n\n if (request.securityState() === Protocol.Security.SecurityState.Insecure) {\n command.push('--insecure');\n }\n return 'curl ' + command.join(command.length >= 3 ? (platform === 'win' ? ' ^\\n ' : ' \\\\\\n ') : ' ');\n }\n\n private async generateAllCurlCommand(requests: SDK.NetworkRequest.NetworkRequest[], platform: string):\n Promise {\n const nonBlobRequests = this.filterOutBlobRequests(requests);\n const commands =\n await Promise.all(nonBlobRequests.map(request => NetworkLogView.generateCurlCommand(request, platform)));\n if (platform === 'win') {\n return commands.join(' &\\r\\n');\n }\n return commands.join(' ;\\n');\n }\n\n private async generatePowerShellCommand(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const command = [];\n const ignoredHeaders = new Set([\n 'host',\n 'connection',\n 'proxy-connection',\n 'content-length',\n 'expect',\n 'range',\n 'content-type',\n 'user-agent',\n 'cookie',\n ]);\n\n function escapeString(str: string): string {\n return '\"' +\n str.replace(/[`\\$\"]/g, '`$&').replace(/[^\\x20-\\x7E]/g, char => '$([char]' + char.charCodeAt(0) + ')') + '\"';\n }\n\n // Generate a WebRequestSession object with the UserAgent and Cookie header values.\n // This is used to pass the user-agent and cookie headers to Invoke-WebRequest because the Invoke-WebRequest\n // command does not allow setting these headers through the -Headers parameter. See docs at:\n // https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.1#parameters\n function generatePowerShellSession(request: SDK.NetworkRequest.NetworkRequest): string|null {\n const requestHeaders = request.requestHeaders();\n const props = [];\n\n const userAgentHeader = requestHeaders.find(({name}) => name.toLowerCase() === 'user-agent');\n if (userAgentHeader) {\n props.push(`$session.UserAgent = ${escapeString(userAgentHeader.value)}`);\n }\n\n for (const cookie of request.includedRequestCookies()) {\n const name = escapeString(cookie.name());\n const value = escapeString(cookie.value());\n const domain = escapeString(cookie.domain());\n props.push(`$session.Cookies.Add((New-Object System.Net.Cookie(${name}, ${value}, \"/\", ${domain})))`);\n }\n\n if (props.length) {\n return '$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession\\n' + props.join('\\n') + '\\n';\n }\n\n return null;\n }\n\n command.push('-Uri ' + escapeString(request.url()));\n\n if (request.requestMethod !== 'GET') {\n command.push('-Method ' + escapeString(request.requestMethod));\n }\n\n const session = generatePowerShellSession(request);\n if (session) {\n command.push('-WebSession $session');\n }\n\n const requestHeaders = request.requestHeaders();\n const headerNameValuePairs = [];\n for (const header of requestHeaders) {\n const name = header.name.replace(/^:/, ''); // Translate h2 headers to HTTP headers.\n if (ignoredHeaders.has(name.toLowerCase())) {\n continue;\n }\n headerNameValuePairs.push(escapeString(name) + '=' + escapeString(header.value));\n }\n if (headerNameValuePairs.length) {\n command.push('-Headers @{\\n' + headerNameValuePairs.join('\\n ') + '\\n}');\n }\n\n const contentTypeHeader = requestHeaders.find(({name}) => name.toLowerCase() === 'content-type');\n if (contentTypeHeader) {\n command.push('-ContentType ' + escapeString(contentTypeHeader.value));\n }\n\n const formData = await request.requestFormData();\n if (formData) {\n const body = escapeString(formData);\n if (/[^\\x20-\\x7E]/.test(formData)) {\n command.push('-Body ([System.Text.Encoding]::UTF8.GetBytes(' + body + '))');\n } else {\n command.push('-Body ' + body);\n }\n }\n\n // The -UseBasicParsing parameter prevents Invoke-WebRequest from using the IE engine for parsing. Basic\n // parsing is the default behavior in PowerShell 6.0.0+ and the parameter is included here for backwards\n // compatibility only.\n const prelude = session || '';\n return prelude + 'Invoke-WebRequest -UseBasicParsing ' + command.join(command.length >= 3 ? ' `\\n' : ' ');\n }\n\n private async generateAllPowerShellCommand(requests: SDK.NetworkRequest.NetworkRequest[]): Promise {\n const nonBlobRequests = this.filterOutBlobRequests(requests);\n const commands = await Promise.all(nonBlobRequests.map(request => this.generatePowerShellCommand(request)));\n return commands.join(';\\r\\n');\n }\n\n static getDCLEventColor(): string {\n return '--sys-color-token-attribute-value';\n }\n\n static getLoadEventColor(): string {\n return '--sys-color-token-property-special';\n }\n}\n\nexport function computeStackTraceText(stackTrace: Protocol.Runtime.StackTrace): string {\n let stackTraceText = '';\n for (const frame of stackTrace.callFrames) {\n const functionName = UI.UIUtils.beautifyFunctionName(frame.functionName);\n stackTraceText += `${functionName} @ ${frame.url}:${frame.lineNumber + 1}\\n`;\n }\n if (stackTrace.parent) {\n stackTraceText += computeStackTraceText(stackTrace.parent);\n }\n return stackTraceText;\n}\n\nconst filteredNetworkRequests = new WeakSet();\nconst networkRequestToNode = new WeakMap();\n\nexport function isRequestFilteredOut(request: NetworkRequestNode): boolean {\n return filteredNetworkRequests.has(request);\n}\n\nexport const HTTPSchemas = {\n 'http': true,\n 'https': true,\n 'ws': true,\n 'wss': true,\n};\n\nconst searchKeys: string[] = Object.values(NetworkForward.UIFilter.FilterType);\n\nexport interface GroupLookupInterface {\n groupNodeForRequest(request: SDK.NetworkRequest.NetworkRequest): NetworkGroupNode|null;\n reset(): void;\n}\n\nexport const overrideFilter = {\n yes: 'yes',\n no: 'no',\n content: 'content',\n headers: 'headers',\n};\n\nexport type Filter = (request: SDK.NetworkRequest.NetworkRequest) => boolean;\n\nexport class DropDownTypesUI extends Common.ObjectWrapper.ObjectWrapper implements\n UI.FilterBar.FilterUI {\n private readonly filterElement: HTMLDivElement;\n private readonly dropDownButton: UI.Toolbar.ToolbarButton;\n private readonly filterChanged: () => void;\n private displayedTypes: Set;\n private readonly setting: Common.Settings.Setting<{[key: string]: boolean}>;\n private readonly items: UI.FilterBar.Item[];\n private contextMenu?: UI.ContextMenu.ContextMenu;\n private selectedTypesCount: HTMLElement;\n private typesCountAdorner: Adorners.Adorner.Adorner;\n private hasChanged = false;\n\n constructor(\n items: UI.FilterBar.Item[], filterChangedCallback: () => void,\n setting: Common.Settings.Setting<{[key: string]: boolean}>) {\n super();\n this.items = items;\n this.filterChanged = filterChangedCallback;\n\n this.filterElement = document.createElement('div');\n\n this.typesCountAdorner = new Adorners.Adorner.Adorner();\n this.selectedTypesCount = document.createElement('span');\n this.typesCountAdorner.data = {\n name: 'countWrapper',\n content: this.selectedTypesCount,\n };\n this.typesCountAdorner.classList.add('active-filters-count');\n\n this.dropDownButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.requestTypesTooltip), this.typesCountAdorner);\n this.dropDownButton.setText(i18nString(UIStrings.requestTypes));\n this.filterElement.appendChild(this.dropDownButton.element);\n this.dropDownButton.turnIntoSelect();\n this.dropDownButton.element.classList.add('dropdown-filterbar');\n\n this.dropDownButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.showContextMenu.bind(this));\n UI.ARIAUtils.markAsMenuButton(this.dropDownButton.element);\n\n this.displayedTypes = new Set();\n\n this.setting = setting;\n setting.addChangeListener(this.settingChanged.bind(this));\n this.setting.addChangeListener(this.filterChanged.bind(this));\n this.settingChanged();\n }\n\n discard(): void {\n this.contextMenu?.discard();\n }\n\n emitUMA(): void {\n if (this.hasChanged) {\n Host.userMetrics.resourceTypeFilterNumberOfSelectedChanged(this.displayedTypes.size);\n for (const displayedType of this.displayedTypes) {\n Host.userMetrics.resourceTypeFilterItemSelected(displayedType);\n }\n }\n }\n\n showContextMenu(event: Common.EventTarget.EventTargetEvent): void {\n const mouseEvent = event.data;\n this.hasChanged = false;\n this.contextMenu = new UI.ContextMenu.ContextMenu(mouseEvent, {\n useSoftMenu: true,\n keepOpen: true,\n x: this.dropDownButton.element.getBoundingClientRect().left,\n y: this.dropDownButton.element.getBoundingClientRect().top +\n (this.dropDownButton.element as HTMLElement).offsetHeight,\n onSoftMenuClosed: this.emitUMA.bind(this),\n });\n\n this.addRequestType(this.contextMenu, DropDownTypesUI.ALL_TYPES, i18nString(UIStrings.allStrings));\n this.contextMenu.defaultSection().appendSeparator();\n\n for (const item of this.items) {\n this.addRequestType(this.contextMenu, item.name, item.name);\n }\n\n this.update();\n void this.contextMenu.show();\n }\n\n private addRequestType(contextMenu: UI.ContextMenu.ContextMenu, name: string, label: string): void {\n contextMenu.defaultSection().appendCheckboxItem(label, () => {\n this.setting.get()[name] = !this.setting.get()[name];\n this.toggleTypeFilter(name);\n }, this.setting.get()[name]);\n }\n\n private toggleTypeFilter(typeName: string): void {\n if (typeName !== DropDownTypesUI.ALL_TYPES) {\n this.displayedTypes.delete(DropDownTypesUI.ALL_TYPES);\n } else {\n this.displayedTypes = new Set();\n }\n\n if (this.displayedTypes.has(typeName)) {\n this.displayedTypes.delete(typeName);\n } else {\n this.displayedTypes.add(typeName);\n }\n\n if (this.displayedTypes.size === 0) {\n this.displayedTypes.add(DropDownTypesUI.ALL_TYPES);\n }\n\n // Settings do not support `Sets` so convert it back to the Map-like object.\n const updatedSetting = {} as {[key: string]: boolean};\n for (const type of this.displayedTypes) {\n updatedSetting[type] = true;\n }\n\n this.setting.set(updatedSetting);\n\n // For the feature of keeping the dropdown open while choosing its options:\n // this code provides the dinamic changes of the checkboxes' state in this dropdown\n const menuItems = this.contextMenu?.getItems() || [];\n for (const i of menuItems) {\n if (i.label) {\n this.contextMenu?.setChecked(i, this.displayedTypes.has(i.label));\n }\n }\n this.contextMenu?.setChecked(menuItems[0], this.displayedTypes.has('all'));\n }\n\n private settingChanged(): void {\n this.hasChanged = true;\n this.displayedTypes = new Set();\n\n for (const s in this.setting.get()) {\n this.displayedTypes.add(s);\n }\n this.update();\n }\n\n private update(): void {\n if (this.displayedTypes.size === 0 || this.displayedTypes.has(DropDownTypesUI.ALL_TYPES)) {\n this.displayedTypes = new Set();\n this.displayedTypes.add(DropDownTypesUI.ALL_TYPES);\n }\n this.updateSelectedTypesCount();\n this.updateLabel();\n this.updateTooltip();\n }\n\n updateSelectedTypesCount(): void {\n if (!this.displayedTypes.has(DropDownTypesUI.ALL_TYPES)) {\n this.selectedTypesCount.textContent = this.displayedTypes.size.toString();\n this.typesCountAdorner.classList.remove('hidden');\n } else {\n this.typesCountAdorner.classList.add('hidden');\n }\n }\n\n updateLabel(): void {\n if (this.displayedTypes.has(DropDownTypesUI.ALL_TYPES)) {\n this.dropDownButton.setText(i18nString(UIStrings.requestTypes));\n return;\n }\n\n let newLabel;\n if (this.displayedTypes.size === 1) {\n const type = this.displayedTypes.values().next().value;\n newLabel = Common.ResourceType.ResourceCategory.categoryByTitle(type)?.shortTitle() || '';\n } else {\n // show up to two last selected types\n const twoLastSelected = [...this.displayedTypes].slice(-2).reverse();\n const shortNames =\n twoLastSelected.map(type => Common.ResourceType.ResourceCategory.categoryByTitle(type)?.shortTitle() || '');\n const valuesToDisplay = {PH1: shortNames[0], PH2: shortNames[1]};\n newLabel = this.displayedTypes.size === 2 ? i18nString(UIStrings.twoTypesSelected, valuesToDisplay) :\n i18nString(UIStrings.overTwoTypesSelected, valuesToDisplay);\n }\n this.dropDownButton.setText(newLabel);\n }\n\n updateTooltip(): void {\n let tooltipText = i18nString(UIStrings.requestTypesTooltip);\n if (!this.displayedTypes.has(DropDownTypesUI.ALL_TYPES)) {\n // reverse the order to match the button label\n const selectedTypes = [...this.displayedTypes].reverse();\n const localized =\n selectedTypes.map(type => Common.ResourceType.ResourceCategory.categoryByTitle(type)?.title() || '')\n .join(', ');\n tooltipText = i18nString(UIStrings.showOnly, {PH1: localized});\n }\n this.dropDownButton.setTitle(tooltipText);\n }\n\n isActive(): boolean {\n return !this.displayedTypes.has(DropDownTypesUI.ALL_TYPES);\n }\n\n element(): HTMLDivElement {\n return this.filterElement;\n }\n\n reset(): void {\n this.toggleTypeFilter(DropDownTypesUI.ALL_TYPES);\n }\n\n accept(typeName: string): boolean {\n return this.displayedTypes.has(DropDownTypesUI.ALL_TYPES) || this.displayedTypes.has(typeName);\n }\n\n static readonly ALL_TYPES = 'all';\n}\n\nexport class MoreFiltersDropDownUI extends\n Common.ObjectWrapper.ObjectWrapper implements UI.FilterBar.FilterUI {\n private readonly filterElement: HTMLDivElement;\n private readonly dropDownButton: UI.Toolbar.ToolbarButton;\n private readonly filterChangedCallback: () => void;\n private networkHideDataURLSetting: Common.Settings.Setting;\n private networkHideChromeExtensionsSetting: Common.Settings.Setting;\n private networkShowBlockedCookiesOnlySetting: Common.Settings.Setting;\n private networkOnlyBlockedRequestsSetting: Common.Settings.Setting;\n private networkOnlyThirdPartySetting: Common.Settings.Setting;\n private contextMenu?: UI.ContextMenu.ContextMenu;\n private activeFiltersCount: HTMLElement;\n private activeFiltersCountAdorner: Adorners.Adorner.Adorner;\n private hasChanged = false;\n\n constructor(filterChangedCallback: () => void) {\n super();\n this.filterChangedCallback = filterChangedCallback;\n\n this.networkHideDataURLSetting = Common.Settings.Settings.instance().createSetting('networkHideDataURL', false);\n this.networkHideChromeExtensionsSetting =\n Common.Settings.Settings.instance().createSetting('networkHideChromeExtensions', false);\n this.networkShowBlockedCookiesOnlySetting =\n Common.Settings.Settings.instance().createSetting('networkShowBlockedCookiesOnlySetting', false);\n this.networkOnlyBlockedRequestsSetting =\n Common.Settings.Settings.instance().createSetting('networkOnlyBlockedRequests', false);\n this.networkOnlyThirdPartySetting =\n Common.Settings.Settings.instance().createSetting('networkOnlyThirdPartySetting', false);\n\n this.filterElement = document.createElement('div');\n this.filterElement.setAttribute('aria-label', 'Show only/hide requests dropdown');\n\n this.activeFiltersCountAdorner = new Adorners.Adorner.Adorner();\n this.activeFiltersCount = document.createElement('span');\n this.activeFiltersCountAdorner.data = {\n name: 'countWrapper',\n content: this.activeFiltersCount,\n };\n this.activeFiltersCountAdorner.classList.add('active-filters-count');\n this.updateActiveFiltersCount();\n\n this.dropDownButton = new UI.Toolbar.ToolbarButton(\n i18nString(UIStrings.showOnlyHideRequests), this.activeFiltersCountAdorner, i18nString(UIStrings.moreFilters));\n this.filterElement.appendChild(this.dropDownButton.element);\n this.dropDownButton.turnIntoSelect();\n this.dropDownButton.element.classList.add('dropdown-filterbar');\n this.dropDownButton.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click, this.showMoreFiltersContextMenu.bind(this));\n UI.ARIAUtils.markAsMenuButton(this.dropDownButton.element);\n this.updateTooltip();\n }\n\n emitUMA(): void {\n if (this.hasChanged) {\n const selectedFilters = this.selectedFilters();\n Host.userMetrics.networkPanelMoreFiltersNumberOfSelectedChanged(selectedFilters.length);\n for (const selectedFilter of selectedFilters) {\n Host.userMetrics.networkPanelMoreFiltersItemSelected(selectedFilter);\n }\n }\n }\n\n #onSettingChanged(): void {\n this.hasChanged = true;\n this.filterChangedCallback();\n }\n\n showMoreFiltersContextMenu(event: Common.EventTarget.EventTargetEvent): void {\n const mouseEvent = event.data;\n this.hasChanged = false;\n\n this.networkHideDataURLSetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.networkHideChromeExtensionsSetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.networkShowBlockedCookiesOnlySetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.networkOnlyBlockedRequestsSetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.networkOnlyThirdPartySetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.contextMenu = new UI.ContextMenu.ContextMenu(mouseEvent, {\n useSoftMenu: true,\n keepOpen: true,\n x: this.dropDownButton.element.getBoundingClientRect().left,\n y: this.dropDownButton.element.getBoundingClientRect().top +\n (this.dropDownButton.element as HTMLElement).offsetHeight,\n onSoftMenuClosed: this.emitUMA.bind(this),\n });\n\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.hideDataUrls),\n () => this.networkHideDataURLSetting.set(!this.networkHideDataURLSetting.get()),\n this.networkHideDataURLSetting.get(), undefined, undefined, i18nString(UIStrings.hidesDataAndBlobUrls));\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.chromeExtensions),\n () => this.networkHideChromeExtensionsSetting.set(!this.networkHideChromeExtensionsSetting.get()),\n this.networkHideChromeExtensionsSetting.get(), undefined, undefined, i18nString(UIStrings.hideChromeExtension));\n this.contextMenu.defaultSection().appendSeparator();\n\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.hasBlockedCookies),\n () => this.networkShowBlockedCookiesOnlySetting.set(!this.networkShowBlockedCookiesOnlySetting.get()),\n this.networkShowBlockedCookiesOnlySetting.get(), undefined, undefined,\n i18nString(UIStrings.onlyShowRequestsWithBlockedCookies));\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.blockedRequests),\n () => this.networkOnlyBlockedRequestsSetting.set(!this.networkOnlyBlockedRequestsSetting.get()),\n this.networkOnlyBlockedRequestsSetting.get(), undefined, undefined,\n i18nString(UIStrings.onlyShowBlockedRequests));\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.thirdParty),\n () => this.networkOnlyThirdPartySetting.set(!this.networkOnlyThirdPartySetting.get()),\n this.networkOnlyThirdPartySetting.get(), undefined, undefined,\n i18nString(UIStrings.onlyShowThirdPartyRequests));\n\n void this.contextMenu.show();\n }\n\n selectedFilters(): string[] {\n const filters = [\n ...this.networkHideDataURLSetting.get() ? [i18nString(UIStrings.hideDataUrls)] : [],\n ...this.networkHideChromeExtensionsSetting.get() ? [i18nString(UIStrings.chromeExtensions)] : [],\n ...this.networkShowBlockedCookiesOnlySetting.get() ? [i18nString(UIStrings.hasBlockedCookies)] : [],\n ...this.networkOnlyBlockedRequestsSetting.get() ? [i18nString(UIStrings.blockedRequests)] : [],\n ...this.networkOnlyThirdPartySetting.get() ? [i18nString(UIStrings.thirdParty)] : [],\n ];\n return filters;\n }\n\n updateActiveFiltersCount(): void {\n const count = this.selectedFilters().length;\n this.activeFiltersCount.textContent = count.toString();\n count ? this.activeFiltersCountAdorner.classList.remove('hidden') :\n this.activeFiltersCountAdorner.classList.add('hidden');\n }\n\n updateTooltip(): void {\n if (this.selectedFilters().length) {\n this.dropDownButton.setTitle(this.selectedFilters().join(', '));\n } else {\n this.dropDownButton.setTitle(UIStrings.showOnlyHideRequests);\n }\n }\n\n discard(): void {\n if (this.contextMenu) {\n this.contextMenu.discard();\n }\n }\n\n isActive(): boolean {\n return true;\n }\n\n element(): HTMLDivElement {\n return this.filterElement;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"NetworkLogView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/NetworkLogView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,GAAG,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,cAAc,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,QAAQ,MAAM,0CAA0C,CAAC;AACrE,OAAO,KAAK,WAAW,MAAM,8DAA8D,CAAC;AAC5F,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE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ED,OAAO;QACL,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;SAC5B;IACH,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2008, 2009 Anthony Ricaud \n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as HAR from '../../models/har/har.js';\nimport * as Logs from '../../models/logs/logs.js';\nimport * as Persistence from '../../models/persistence/persistence.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as NetworkForward from '../../panels/network/forward/forward.js';\nimport * as Sources from '../../panels/sources/sources.js';\nimport * as Adorners from '../../ui/components/adorners/adorners.js';\nimport * as Coordinator from '../../ui/components/render_coordinator/render_coordinator.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {\n Events,\n type EventTypes,\n NetworkGroupNode,\n type NetworkLogViewInterface,\n type NetworkNode,\n NetworkRequestNode,\n} from './NetworkDataGridNode.js';\nimport {NetworkFrameGrouper} from './NetworkFrameGrouper.js';\nimport networkLogViewStyles from './networkLogView.css.js';\nimport {NetworkLogViewColumns} from './NetworkLogViewColumns.js';\nimport {\n NetworkTimeBoundary,\n type NetworkTimeCalculator,\n NetworkTransferDurationCalculator,\n NetworkTransferTimeCalculator,\n} from './NetworkTimeCalculator.js';\n\nconst UIStrings = {\n /**\n *@description Text in Network Log View of the Network panel\n */\n invertFilter: 'Invert',\n /**\n *@description Tooltip for the 'invert' checkbox in the Network panel.\n */\n invertsFilter: 'Inverts the search filter',\n /**\n *@description Text for everything\n */\n allStrings: 'All',\n /**\n *@description Text in Network Log View of the Network panel\n */\n hideDataUrls: 'Hide data URLs',\n /**\n *@description Data urlfilter ui element title in Network Log View of the Network panel\n */\n hidesDataAndBlobUrls: 'Hide \\'data:\\' and \\'blob:\\' URLs',\n /**\n * @description Label for a filter in the Network panel\n */\n chromeExtensions: 'Hide extension URLs',\n /**\n * @description Tooltip for a filter in the Network panel\n */\n hideChromeExtension: 'Hide \\'chrome-extension://\\' URLs',\n /**\n *@description Aria accessible name in Network Log View of the Network panel\n */\n requestTypesToInclude: 'Request types to include',\n /**\n * @description Tooltip for the `Request types` dropdown in the Network Panel\n */\n requestTypesTooltip: 'Filter requests by type',\n /**\n * @description Label for the dropdown in the Network Panel\n */\n requestTypes: 'Request types',\n /**\n * @description Dynamic label for the `Request types` dropdown in the Network panel\n * @example {Doc} PH1\n * @example {CSS} PH2\n */\n twoTypesSelected: '{PH1}, {PH2}',\n /**\n * @description: Dynamic label for the `Request types` dropdown in the Network panel\n * @example {Doc} PH1\n * @example {CSS} PH2\n */\n overTwoTypesSelected: '{PH1}, {PH2}...',\n /**\n *@description Label for a checkbox in the Network panel. When checked, only requests with\n * blocked response cookies are shown.\n */\n hasBlockedCookies: 'Blocked response cookies',\n /**\n *@description Tooltip for a checkbox in the Network panel. The response to a network request may include a\n * cookie (https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies). Such response cookies can\n * be malformed or otherwise invalid and the browser may choose to ignore or not accept invalid cookies.\n */\n onlyShowRequestsWithBlockedCookies: 'Show only requests with blocked response cookies',\n /**\n *@description Label for a filter in the Network panel\n */\n blockedRequests: 'Blocked requests',\n /**\n *@description Tooltip for a filter in the Network panel\n */\n onlyShowBlockedRequests: 'Show only blocked requests',\n /**\n *@description Label for a filter in the Network panel\n */\n thirdParty: '3rd-party requests',\n /**\n *@description Tooltip for a filter in the Network panel\n */\n onlyShowThirdPartyRequests: 'Show only requests with origin different from page origin',\n /**\n *@description Text that appears when user drag and drop something (for example, a file) in Network Log View of the Network panel\n */\n dropHarFilesHere: 'Drop HAR files here',\n /**\n *@description Recording text text content in Network Log View of the Network panel\n */\n recordingNetworkActivity: 'Recording network activity…',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {Ctrl + R} PH1\n */\n performARequestOrHitSToRecordThe: 'Perform a request or hit {PH1} to record the reload.',\n /**\n *@description Shown in the Network Log View of the Network panel when the user has not yet\n * recorded any network activity. This is an instruction to the user to start recording in order to\n * show network activity in the current UI.\n *@example {Ctrl + E} PH1\n */\n recordToDisplayNetworkActivity: 'Record network log ({PH1}) to display network activity.',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Text to announce to screen readers that network data is available.\n */\n networkDataAvailable: 'Network Data Available',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {3} PH1\n *@example {5} PH2\n */\n sSRequests: '{PH1} / {PH2} requests',\n /**\n *@description Message in the summary toolbar at the bottom of the Network log that shows the compressed size of the\n * resources transferred during a selected time frame over the compressed size of all resources transferred during\n * the whole network log.\n *@example {5 B} PH1\n *@example {10 B} PH2\n */\n sSTransferred: '{PH1} / {PH2} transferred',\n /**\n *@description Message in a tooltip that shows the compressed size of the resources transferred during a selected\n * time frame over the compressed size of all resources transferred during the whole network log.\n *@example {10} PH1\n *@example {15} PH2\n */\n sBSBTransferredOverNetwork: '{PH1} B / {PH2} B transferred over network',\n /**\n * @description Text in Network Log View of the Network panel. Appears when a particular network\n * resource is selected by the user. Shows how large the selected resource was (PH1) out of the\n * total size (PH2).\n * @example {40MB} PH1\n * @example {50MB} PH2\n */\n sSResources: '{PH1} / {PH2} resources',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {40} PH1\n *@example {50} PH2\n */\n sBSBResourcesLoadedByThePage: '{PH1} B / {PH2} B resources loaded by the page',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {6} PH1\n */\n sRequests: '{PH1} requests',\n /**\n *@description Message in the summary toolbar at the bottom of the Network log that shows the compressed size of\n * all resources transferred over network during a network activity log.\n *@example {4 B} PH1\n */\n sTransferred: '{PH1} transferred',\n /**\n *@description Message in a tooltip that shows the compressed size of all resources transferred over network during\n * a network activity log.\n *@example {4} PH1\n */\n sBTransferredOverNetwork: '{PH1} B transferred over network',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {4} PH1\n */\n sResources: '{PH1} resources',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {10} PH1\n */\n sBResourcesLoadedByThePage: '{PH1} B resources loaded by the page',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {120ms} PH1\n */\n finishS: 'Finish: {PH1}',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {3000ms} PH1\n */\n domcontentloadedS: 'DOMContentLoaded: {PH1}',\n /**\n *@description Text in Network Log View of the Network panel\n *@example {40ms} PH1\n */\n loadS: 'Load: {PH1}',\n /**\n *@description Text for copying\n */\n copy: 'Copy',\n /**\n *@description Text in Network Log View of the Network panel\n */\n copyRequestHeaders: 'Copy request headers',\n /**\n *@description Text in Network Log View of the Network panel\n */\n copyResponseHeaders: 'Copy response headers',\n /**\n *@description Text in Network Log View of the Network panel\n */\n copyResponse: 'Copy response',\n /**\n *@description Text in Network Log View of the Network panel\n */\n copyStacktrace: 'Copy stack trace',\n /**\n * @description A context menu command in the Network panel, for copying to the clipboard.\n * PowerShell refers to the format the data will be copied as.\n */\n copyAsPowershell: 'Copy as `PowerShell`',\n /**\n *@description A context menu command in the Network panel, for copying to the clipboard. 'fetch'\n * refers to the format the data will be copied as, which is compatible with the fetch web API.\n */\n copyAsFetch: 'Copy as `fetch`',\n /**\n * @description Text in Network Log View of the Network panel. An action that copies a command to\n * the developer's clipboard. The command allows the developer to replay this specific network\n * request in Node.js, a desktop application/framework. 'Node.js fetch' is a noun phrase for the\n * type of request that will be copied.\n */\n copyAsNodejsFetch: 'Copy as `Node.js` `fetch`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with cURL (a program, not\n *translatable).\n */\n copyAsCurlCmd: 'Copy as `cURL` (`cmd`)',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a Bash script.\n */\n copyAsCurlBash: 'Copy as `cURL` (`bash`)',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a PowerShell script.\n */\n copyAllAsPowershell: 'Copy all as `PowerShell`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a 'fetch' command (fetch\n *should not be translated).\n */\n copyAllAsFetch: 'Copy all as `fetch`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a Node.js 'fetch' command\n *(fetch and Node.js should not be translated).\n */\n copyAllAsNodejsFetch: 'Copy all as `Node.js` `fetch`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with cURL (a program, not\n *translatable).\n */\n copyAllAsCurlCmd: 'Copy all as `cURL` (`cmd`)',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with a Bash script.\n */\n copyAllAsCurlBash: 'Copy all as `cURL` (`bash`)',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with cURL (a program, not\n *translatable).\n */\n copyAsCurl: 'Copy as `cURL`',\n /**\n *@description Text in Network Log View of the Network panel. An action that copies a command to\n *the clipboard. It will copy the command in the format compatible with cURL (a program, not\n *translatable).\n */\n copyAllAsCurl: 'Copy all as `cURL`',\n /**\n * @description Text in Network Log View of the Network panel. An action that copies data to the\n * clipboard. It will copy the data in the HAR (not translatable) format. 'all' refers to every\n * network request that is currently shown.\n */\n copyAllAsHar: 'Copy all as `HAR`',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n saveAllAsHarWithContent: 'Save all as `HAR` with content',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n clearBrowserCache: 'Clear browser cache',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n clearBrowserCookies: 'Clear browser cookies',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n blockRequestUrl: 'Block request URL',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n *@example {example.com} PH1\n */\n unblockS: 'Unblock {PH1}',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n */\n blockRequestDomain: 'Block request domain',\n /**\n *@description Text to replay an XHR request\n */\n replayXhr: 'Replay XHR',\n /**\n *@description Text in Network Log View of the Network panel\n */\n areYouSureYouWantToClearBrowser: 'Are you sure you want to clear browser cache?',\n /**\n *@description Text in Network Log View of the Network panel\n */\n areYouSureYouWantToClearBrowserCookies: 'Are you sure you want to clear browser cookies?',\n /**\n *@description A context menu item in the Network Log View of the Network panel\n * for creating a header override\n */\n overrideHeaders: 'Override headers',\n /**\n * @description Tooltip for the Show only/Hide requests dropdown of the filterbar\n */\n showOnlyHideRequests: 'Show only/hide requests',\n /**\n * @description Text for the Show only/Hide requests dropdown button of the filterbar\n */\n moreFilters: 'More filters',\n /**\n * @description Text for the Request types dropdown button tooltip\n * @example {Media, Images} PH1\n */\n showOnly: 'Show only {PH1}',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/NetworkLogView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst enum FetchStyle {\n Browser = 0,\n NodeJs = 1,\n}\n\nconst coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();\n\nexport class NetworkLogView extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox)\n implements SDK.TargetManager.SDKModelObserver, NetworkLogViewInterface {\n private readonly networkInvertFilterSetting: Common.Settings.Setting;\n private readonly networkHideDataURLSetting: Common.Settings.Setting;\n private readonly networkHideChromeExtensions: Common.Settings.Setting;\n private readonly networkShowBlockedCookiesOnlySetting: Common.Settings.Setting;\n private readonly networkOnlyBlockedRequestsSetting: Common.Settings.Setting;\n private readonly networkOnlyThirdPartySetting: Common.Settings.Setting;\n private readonly networkResourceTypeFiltersSetting: Common.Settings.Setting<{[key: string]: boolean}>;\n private rawRowHeight: number;\n private readonly progressBarContainer: Element;\n private readonly networkLogLargeRowsSetting: Common.Settings.Setting;\n private rowHeightInternal: number;\n private readonly timeCalculatorInternal: NetworkTransferTimeCalculator;\n private readonly durationCalculator: NetworkTransferDurationCalculator;\n private calculatorInternal: NetworkTransferTimeCalculator;\n private readonly columnsInternal: NetworkLogViewColumns;\n private staleRequests: Set;\n private mainRequestLoadTime: number;\n private mainRequestDOMContentLoadedTime: number;\n private filters: Filter[];\n private timeFilter: Filter|null;\n private hoveredNodeInternal: NetworkNode|null;\n private recordingHint: Element|null;\n private highlightedNode: NetworkRequestNode|null;\n private readonly linkifierInternal: Components.Linkifier.Linkifier;\n private recording: boolean;\n private needsRefresh: boolean;\n private readonly headerHeightInternal: number;\n private readonly groupLookups: Map;\n private activeGroupLookup: GroupLookupInterface|null;\n private readonly textFilterUI: UI.FilterBar.TextFilterUI;\n private readonly invertFilterUI: UI.FilterBar.CheckboxFilterUI;\n private readonly dataURLFilterUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly moreFiltersDropDownUI: MoreFiltersDropDownUI|undefined;\n private readonly onlyBlockedResponseCookiesFilterUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly onlyBlockedRequestsUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly onlyThirdPartyFilterUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly hideChromeExtensionsUI: UI.FilterBar.CheckboxFilterUI|undefined;\n private readonly resourceCategoryFilterUI: DropDownTypesUI|UI.FilterBar.NamedBitSetFilterUI;\n private readonly filterParser: TextUtils.TextUtils.FilterParser;\n private readonly suggestionBuilder: UI.FilterSuggestionBuilder.FilterSuggestionBuilder;\n private dataGrid: DataGrid.SortableDataGrid.SortableDataGrid;\n private readonly summaryToolbarInternal: UI.Toolbar.Toolbar;\n private readonly filterBar: UI.FilterBar.FilterBar;\n private readonly textFilterSetting: Common.Settings.Setting;\n\n constructor(\n filterBar: UI.FilterBar.FilterBar, progressBarContainer: Element,\n networkLogLargeRowsSetting: Common.Settings.Setting) {\n super();\n this.setMinimumSize(50, 64);\n\n this.element.id = 'network-container';\n this.element.classList.add('no-node-selected');\n\n this.networkInvertFilterSetting = Common.Settings.Settings.instance().createSetting('networkInvertFilter', false);\n this.networkHideDataURLSetting = Common.Settings.Settings.instance().createSetting('networkHideDataURL', false);\n this.networkHideChromeExtensions =\n Common.Settings.Settings.instance().createSetting('networkHideChromeExtensions', false);\n this.networkShowBlockedCookiesOnlySetting =\n Common.Settings.Settings.instance().createSetting('networkShowBlockedCookiesOnlySetting', false);\n this.networkOnlyBlockedRequestsSetting =\n Common.Settings.Settings.instance().createSetting('networkOnlyBlockedRequests', false);\n this.networkOnlyThirdPartySetting =\n Common.Settings.Settings.instance().createSetting('networkOnlyThirdPartySetting', false);\n this.networkResourceTypeFiltersSetting =\n Common.Settings.Settings.instance().createSetting('networkResourceTypeFilters', {});\n\n this.rawRowHeight = 0;\n this.progressBarContainer = progressBarContainer;\n this.networkLogLargeRowsSetting = networkLogLargeRowsSetting;\n this.networkLogLargeRowsSetting.addChangeListener(updateRowHeight.bind(this), this);\n\n function updateRowHeight(this: NetworkLogView): void {\n this.rawRowHeight = Boolean(this.networkLogLargeRowsSetting.get()) ? 41 : 21;\n this.rowHeightInternal = this.computeRowHeight();\n }\n this.rawRowHeight = 0;\n this.rowHeightInternal = 0;\n updateRowHeight.call(this);\n\n this.timeCalculatorInternal = new NetworkTransferTimeCalculator();\n this.durationCalculator = new NetworkTransferDurationCalculator();\n this.calculatorInternal = this.timeCalculatorInternal;\n\n this.columnsInternal = new NetworkLogViewColumns(\n this, this.timeCalculatorInternal, this.durationCalculator, networkLogLargeRowsSetting);\n this.columnsInternal.show(this.element);\n\n this.staleRequests = new Set();\n this.mainRequestLoadTime = -1;\n this.mainRequestDOMContentLoadedTime = -1;\n\n this.filters = [];\n this.timeFilter = null;\n this.hoveredNodeInternal = null;\n this.recordingHint = null;\n this.highlightedNode = null;\n\n this.linkifierInternal = new Components.Linkifier.Linkifier();\n\n this.recording = false;\n this.needsRefresh = false;\n\n this.headerHeightInternal = 0;\n\n this.groupLookups = new Map();\n this.groupLookups.set('Frame', new NetworkFrameGrouper(this));\n\n this.activeGroupLookup = null;\n\n this.textFilterUI = new UI.FilterBar.TextFilterUI();\n this.textFilterUI.addEventListener(UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged, this);\n filterBar.addFilter(this.textFilterUI);\n\n this.invertFilterUI = new UI.FilterBar.CheckboxFilterUI(\n 'invert-filter', i18nString(UIStrings.invertFilter), true, this.networkInvertFilterSetting);\n this.invertFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(this.invertFilterUI.element(), i18nString(UIStrings.invertsFilter));\n filterBar.addFilter(this.invertFilterUI);\n filterBar.addDivider();\n\n const filterItems =\n Object.values(Common.ResourceType.resourceCategories)\n .map(\n category =>\n ({name: category.title(), label: (): string => category.shortTitle(), title: category.title()}));\n\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN)) {\n this.resourceCategoryFilterUI =\n new DropDownTypesUI(filterItems, this.filterChanged.bind(this), this.networkResourceTypeFiltersSetting);\n UI.ARIAUtils.setLabel(this.resourceCategoryFilterUI.element(), i18nString(UIStrings.requestTypesToInclude));\n this.resourceCategoryFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n filterBar.addFilter(this.resourceCategoryFilterUI);\n filterBar.addDivider();\n\n this.moreFiltersDropDownUI = new MoreFiltersDropDownUI(this.filterChanged.bind(this));\n filterBar.addFilter(this.moreFiltersDropDownUI);\n } else {\n this.dataURLFilterUI = new UI.FilterBar.CheckboxFilterUI(\n 'hide-data-url', i18nString(UIStrings.hideDataUrls), true, this.networkHideDataURLSetting);\n this.dataURLFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(this.dataURLFilterUI.element(), i18nString(UIStrings.hidesDataAndBlobUrls));\n filterBar.addFilter(this.dataURLFilterUI);\n\n this.hideChromeExtensionsUI = new UI.FilterBar.CheckboxFilterUI(\n 'chrome-extension', i18nString(UIStrings.chromeExtensions), true, this.networkHideChromeExtensions);\n this.hideChromeExtensionsUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(this.hideChromeExtensionsUI.element(), i18nString(UIStrings.hideChromeExtension));\n filterBar.addFilter(this.hideChromeExtensionsUI);\n\n this.resourceCategoryFilterUI =\n new UI.FilterBar.NamedBitSetFilterUI(filterItems, this.networkResourceTypeFiltersSetting);\n UI.ARIAUtils.setLabel(this.resourceCategoryFilterUI.element(), i18nString(UIStrings.requestTypesToInclude));\n this.resourceCategoryFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n filterBar.addFilter(this.resourceCategoryFilterUI);\n\n this.onlyBlockedResponseCookiesFilterUI = new UI.FilterBar.CheckboxFilterUI(\n 'only-show-blocked-cookies', i18nString(UIStrings.hasBlockedCookies), true,\n this.networkShowBlockedCookiesOnlySetting);\n this.onlyBlockedResponseCookiesFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(\n this.onlyBlockedResponseCookiesFilterUI.element(), i18nString(UIStrings.onlyShowRequestsWithBlockedCookies));\n filterBar.addFilter(this.onlyBlockedResponseCookiesFilterUI);\n\n this.onlyBlockedRequestsUI = new UI.FilterBar.CheckboxFilterUI(\n 'only-show-blocked-requests', i18nString(UIStrings.blockedRequests), true,\n this.networkOnlyBlockedRequestsSetting);\n this.onlyBlockedRequestsUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(this.onlyBlockedRequestsUI.element(), i18nString(UIStrings.onlyShowBlockedRequests));\n filterBar.addFilter(this.onlyBlockedRequestsUI);\n\n this.onlyThirdPartyFilterUI = new UI.FilterBar.CheckboxFilterUI(\n 'only-show-third-party', i18nString(UIStrings.thirdParty), true, this.networkOnlyThirdPartySetting);\n this.onlyThirdPartyFilterUI.addEventListener(\n UI.FilterBar.FilterUIEvents.FilterChanged, this.filterChanged.bind(this), this);\n UI.Tooltip.Tooltip.install(\n this.onlyThirdPartyFilterUI.element(), i18nString(UIStrings.onlyShowThirdPartyRequests));\n filterBar.addFilter(this.onlyThirdPartyFilterUI);\n }\n\n this.filterParser = new TextUtils.TextUtils.FilterParser(searchKeys);\n this.suggestionBuilder =\n new UI.FilterSuggestionBuilder.FilterSuggestionBuilder(searchKeys, NetworkLogView.sortSearchValues);\n this.resetSuggestionBuilder();\n\n this.dataGrid = this.columnsInternal.dataGrid();\n this.setupDataGrid();\n this.columnsInternal.sortByCurrentColumn();\n filterBar.filterButton().addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click, this.dataGrid.scheduleUpdate.bind(this.dataGrid, true /* isFromUser */));\n\n this.summaryToolbarInternal = new UI.Toolbar.Toolbar('network-summary-bar', this.element);\n this.summaryToolbarInternal.element.setAttribute('role', 'status');\n\n new UI.DropTarget.DropTarget(\n this.element, [UI.DropTarget.Type.File], i18nString(UIStrings.dropHarFilesHere), this.handleDrop.bind(this));\n\n Common.Settings.Settings.instance()\n .moduleSetting('networkColorCodeResourceTypes')\n .addChangeListener(this.invalidateAllItems.bind(this, false), this);\n\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.NetworkManager.NetworkManager, this, {scoped: true});\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestAdded, this.onRequestUpdated, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestUpdated, this.onRequestUpdated, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestRemoved, this.onRequestRemoved, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(Logs.NetworkLog.Events.Reset, this.reset, this);\n\n this.updateGroupByFrame();\n Common.Settings.Settings.instance()\n .moduleSetting('network.group-by-frame')\n .addChangeListener(() => this.updateGroupByFrame());\n\n this.filterBar = filterBar;\n\n this.textFilterSetting = Common.Settings.Settings.instance().createSetting('networkTextFilter', '');\n if (this.textFilterSetting.get()) {\n this.textFilterUI.setValue(this.textFilterSetting.get());\n }\n }\n\n getMoreFiltersDropdown(): MoreFiltersDropDownUI|undefined {\n return this.moreFiltersDropDownUI;\n }\n\n private updateGroupByFrame(): void {\n const value = Common.Settings.Settings.instance().moduleSetting('network.group-by-frame').get();\n this.setGrouping(value ? 'Frame' : null);\n }\n\n private static sortSearchValues(key: string, values: string[]): void {\n if (key === NetworkForward.UIFilter.FilterType.Priority) {\n values.sort((a, b) => {\n const aPriority = (PerfUI.NetworkPriorities.uiLabelToNetworkPriority(a) as Protocol.Network.ResourcePriority);\n const bPriority = (PerfUI.NetworkPriorities.uiLabelToNetworkPriority(b) as Protocol.Network.ResourcePriority);\n return PerfUI.NetworkPriorities.networkPriorityWeight(aPriority) -\n PerfUI.NetworkPriorities.networkPriorityWeight(bPriority);\n });\n } else {\n values.sort();\n }\n }\n\n private static negativeFilter(filter: Filter, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return !filter(request);\n }\n\n private static requestPathFilter(regex: RegExp|null, request: SDK.NetworkRequest.NetworkRequest): boolean {\n if (!regex) {\n return false;\n }\n\n return regex.test(request.path() + '/' + request.name());\n }\n\n private static subdomains(domain: string): string[] {\n const result = [domain];\n let indexOfPeriod = domain.indexOf('.');\n while (indexOfPeriod !== -1) {\n result.push('*' + domain.substring(indexOfPeriod));\n indexOfPeriod = domain.indexOf('.', indexOfPeriod + 1);\n }\n return result;\n }\n\n private static createRequestDomainFilter(value: string): Filter {\n const escapedPattern = value.split('*').map(Platform.StringUtilities.escapeForRegExp).join('.*');\n return NetworkLogView.requestDomainFilter.bind(null, new RegExp('^' + escapedPattern + '$', 'i'));\n }\n\n private static requestDomainFilter(regex: RegExp, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return regex.test(request.domain);\n }\n\n private static runningRequestFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return !request.finished;\n }\n\n private static fromCacheRequestFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.cached();\n }\n\n private static interceptedByServiceWorkerFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.fetchedViaServiceWorker;\n }\n\n private static initiatedByServiceWorkerFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.initiatedByServiceWorker();\n }\n\n private static requestResponseHeaderFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.responseHeaderValue(value) !== undefined;\n }\n\n private static requestResponseHeaderSetCookieFilter(value: string, request: SDK.NetworkRequest.NetworkRequest):\n boolean {\n // Multiple Set-Cookie headers in the request are concatenated via space. Only\n // filter via `includes` instead of strict equality.\n return Boolean(request.responseHeaderValue('Set-Cookie')?.includes(value));\n }\n\n private static requestMethodFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.requestMethod === value;\n }\n\n private static requestPriorityFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.priority() === value;\n }\n\n private static requestMimeTypeFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.mimeType === value;\n }\n\n private static requestMixedContentFilter(\n value: NetworkForward.UIFilter.MixedContentFilterValues, request: SDK.NetworkRequest.NetworkRequest): boolean {\n if (value === NetworkForward.UIFilter.MixedContentFilterValues.Displayed) {\n return request.mixedContentType === Protocol.Security.MixedContentType.OptionallyBlockable;\n }\n if (value === NetworkForward.UIFilter.MixedContentFilterValues.Blocked) {\n return request.mixedContentType === Protocol.Security.MixedContentType.Blockable && request.wasBlocked();\n }\n if (value === NetworkForward.UIFilter.MixedContentFilterValues.BlockOverridden) {\n return request.mixedContentType === Protocol.Security.MixedContentType.Blockable && !request.wasBlocked();\n }\n if (value === NetworkForward.UIFilter.MixedContentFilterValues.All) {\n return request.mixedContentType !== Protocol.Security.MixedContentType.None;\n }\n\n return false;\n }\n\n private static requestSchemeFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.scheme === value;\n }\n\n private static requestCookieDomainFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.allCookiesIncludingBlockedOnes().some(cookie => cookie.domain() === value);\n }\n\n private static requestCookieNameFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.allCookiesIncludingBlockedOnes().some(cookie => cookie.name() === value);\n }\n\n private static requestCookiePathFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.allCookiesIncludingBlockedOnes().some(cookie => cookie.path() === value);\n }\n\n private static requestCookieValueFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.allCookiesIncludingBlockedOnes().some(cookie => cookie.value() === value);\n }\n\n private static requestSetCookieDomainFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.responseCookies.some(cookie => cookie.domain() === value);\n }\n\n private static requestSetCookieNameFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.responseCookies.some(cookie => cookie.name() === value);\n }\n\n private static requestSetCookieValueFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.responseCookies.some(cookie => cookie.value() === value);\n }\n\n private static requestSizeLargerThanFilter(value: number, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.transferSize >= value;\n }\n\n private static statusCodeFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return (String(request.statusCode)) === value;\n }\n\n private static hasOverridesFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n if (!value) {\n return false;\n }\n\n if (value === overrideFilter.no) {\n return request.overrideTypes.length === 0;\n }\n\n if (value === overrideFilter.yes) {\n return request.overrideTypes.length > 0;\n }\n\n if (value === overrideFilter.content) {\n return request.overrideTypes.includes('content');\n }\n\n if (value === overrideFilter.headers) {\n return request.overrideTypes.includes('headers');\n }\n\n return request.overrideTypes.join(',').includes(value);\n }\n\n static getHTTPRequestsFilter(request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.parsedURL.isValid && (request.scheme in HTTPSchemas);\n }\n\n private static resourceTypeFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n return request.resourceType().name() === value;\n }\n\n private static requestUrlFilter(value: string, request: SDK.NetworkRequest.NetworkRequest): boolean {\n const regex = new RegExp(Platform.StringUtilities.escapeForRegExp(value), 'i');\n return regex.test(request.url());\n }\n\n private static requestTimeFilter(windowStart: number, windowEnd: number, request: SDK.NetworkRequest.NetworkRequest):\n boolean {\n if (request.issueTime() > windowEnd) {\n return false;\n }\n if (request.endTime !== -1 && request.endTime < windowStart) {\n return false;\n }\n return true;\n }\n\n private static copyRequestHeaders(request: SDK.NetworkRequest.NetworkRequest): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(request.requestHeadersText());\n }\n\n private static copyResponseHeaders(request: SDK.NetworkRequest.NetworkRequest): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(request.responseHeadersText);\n }\n\n private static async copyResponse(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const contentData = await request.contentData();\n let content: (string|null)|string = contentData.content || '';\n if (!request.contentType().isTextType()) {\n content = TextUtils.ContentProvider.contentAsDataURL(content, request.mimeType, contentData.encoded);\n } else if (contentData.encoded && content) {\n content = window.atob(content);\n }\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(content);\n }\n\n private handleDrop(dataTransfer: DataTransfer): void {\n const items = dataTransfer.items;\n if (!items.length) {\n return;\n }\n const file = items[0].getAsFile();\n if (file) {\n void this.onLoadFromFile(file);\n }\n }\n\n async onLoadFromFile(file: File): Promise {\n const outputStream = new Common.StringOutputStream.StringOutputStream();\n const reader = new Bindings.FileUtils.ChunkedFileReader(file, /* chunkSize */ 10000000);\n const success = await reader.read(outputStream);\n if (!success) {\n const error = reader.error();\n if (error) {\n this.harLoadFailed(error.message);\n }\n return;\n }\n let harRoot;\n try {\n // HARRoot and JSON.parse might throw.\n harRoot = new HAR.HARFormat.HARRoot(JSON.parse(outputStream.data()));\n } catch (e) {\n this.harLoadFailed(e);\n return;\n }\n Logs.NetworkLog.NetworkLog.instance().importRequests(HAR.Importer.Importer.requestsFromHARLog(harRoot.log));\n }\n\n private harLoadFailed(message: string): void {\n Common.Console.Console.instance().error('Failed to load HAR file with following error: ' + message);\n }\n\n private setGrouping(groupKey: string|null): void {\n if (this.activeGroupLookup) {\n this.activeGroupLookup.reset();\n }\n const groupLookup = groupKey ? this.groupLookups.get(groupKey) || null : null;\n this.activeGroupLookup = groupLookup;\n this.invalidateAllItems();\n }\n\n private computeRowHeight(): number {\n return Math.round(this.rawRowHeight * window.devicePixelRatio) / window.devicePixelRatio;\n }\n\n nodeForRequest(request: SDK.NetworkRequest.NetworkRequest): NetworkRequestNode|null {\n return networkRequestToNode.get(request) || null;\n }\n\n headerHeight(): number {\n return this.headerHeightInternal;\n }\n\n setRecording(recording: boolean): void {\n this.recording = recording;\n this.updateSummaryBar();\n }\n\n columns(): NetworkLogViewColumns {\n return this.columnsInternal;\n }\n\n summaryToolbar(): UI.Toolbar.Toolbar {\n return this.summaryToolbarInternal;\n }\n\n modelAdded(networkManager: SDK.NetworkManager.NetworkManager): void {\n // TODO(allada) Remove dependency on networkManager and instead use NetworkLog and PageLoad for needed data.\n const target = networkManager.target();\n if (target.outermostTarget() !== target) {\n return;\n }\n const resourceTreeModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);\n if (resourceTreeModel) {\n resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this);\n resourceTreeModel.addEventListener(\n SDK.ResourceTreeModel.Events.DOMContentLoaded, this.domContentLoadedEventFired, this);\n }\n for (const request of Logs.NetworkLog.NetworkLog.instance().requests()) {\n if (this.isInScope(request)) {\n this.refreshRequest(request);\n }\n }\n }\n\n modelRemoved(networkManager: SDK.NetworkManager.NetworkManager): void {\n const target = networkManager.target();\n if (target.outermostTarget() !== target) {\n return;\n }\n const resourceTreeModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);\n if (resourceTreeModel) {\n resourceTreeModel.removeEventListener(SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this);\n resourceTreeModel.removeEventListener(\n SDK.ResourceTreeModel.Events.DOMContentLoaded, this.domContentLoadedEventFired, this);\n }\n const preserveLog = Common.Settings.Settings.instance().moduleSetting('network_log.preserve-log').get();\n if (!preserveLog) {\n this.reset();\n }\n }\n\n linkifier(): Components.Linkifier.Linkifier {\n return this.linkifierInternal;\n }\n\n setWindow(start: number, end: number): void {\n if (!start && !end) {\n this.timeFilter = null;\n this.timeCalculatorInternal.setWindow(null);\n } else {\n this.timeFilter = NetworkLogView.requestTimeFilter.bind(null, start, end);\n this.timeCalculatorInternal.setWindow(new NetworkTimeBoundary(start, end));\n }\n this.filterRequests();\n }\n\n resetFocus(): void {\n this.dataGrid.element.focus();\n }\n\n private resetSuggestionBuilder(): void {\n this.suggestionBuilder.clear();\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.Running);\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.FromCache);\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.ServiceWorkerIntercepted);\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.Is, NetworkForward.UIFilter.IsFilterType.ServiceWorkerInitiated);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '100');\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '10k');\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.LargerThan, '1M');\n this.textFilterUI.setSuggestionProvider(this.suggestionBuilder.completions.bind(this.suggestionBuilder));\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasOverrides, overrideFilter.yes);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasOverrides, overrideFilter.no);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasOverrides, overrideFilter.content);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasOverrides, overrideFilter.headers);\n }\n\n private filterChanged(): void {\n this.removeAllNodeHighlights();\n this.parseFilterQuery(this.textFilterUI.value(), this.invertFilterUI.checked());\n this.filterRequests();\n this.textFilterSetting.set(this.textFilterUI.value());\n this.moreFiltersDropDownUI?.updateActiveFiltersCount();\n this.moreFiltersDropDownUI?.updateTooltip();\n }\n\n async resetFilter(): Promise {\n this.textFilterUI.clear();\n }\n\n private showRecordingHint(): void {\n this.hideRecordingHint();\n this.recordingHint = this.element.createChild('div', 'network-status-pane fill');\n const hintText = this.recordingHint.createChild('div', 'recording-hint');\n\n if (this.recording) {\n let reloadShortcutNode: Element|null = null;\n const reloadShortcut =\n UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction('inspector_main.reload')[0];\n if (reloadShortcut) {\n reloadShortcutNode = this.recordingHint.createChild('b');\n reloadShortcutNode.textContent = reloadShortcut.title();\n }\n\n const recordingText = hintText.createChild('span');\n recordingText.textContent = i18nString(UIStrings.recordingNetworkActivity);\n if (reloadShortcutNode) {\n hintText.createChild('br');\n hintText.appendChild(i18n.i18n.getFormatLocalizedString(\n str_, UIStrings.performARequestOrHitSToRecordThe, {PH1: reloadShortcutNode}));\n }\n } else {\n const recordNode = hintText.createChild('b');\n recordNode.textContent =\n UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutTitleForAction('network.toggle-recording') || '';\n hintText.appendChild(\n i18n.i18n.getFormatLocalizedString(str_, UIStrings.recordToDisplayNetworkActivity, {PH1: recordNode}));\n }\n hintText.createChild('br');\n hintText.appendChild(UI.XLink.XLink.create(\n 'https://developer.chrome.com/docs/devtools/network/?utm_source=devtools&utm_campaign=2019Q1',\n i18nString(UIStrings.learnMore)));\n\n this.setHidden(true);\n }\n\n private hideRecordingHint(): void {\n this.setHidden(false);\n if (this.recordingHint) {\n this.recordingHint.remove();\n }\n UI.ARIAUtils.alert(i18nString(UIStrings.networkDataAvailable));\n this.recordingHint = null;\n }\n\n private setHidden(value: boolean): void {\n this.columnsInternal.setHidden(value);\n UI.ARIAUtils.setHidden(this.summaryToolbarInternal.element, value);\n }\n\n override elementsToRestoreScrollPositionsFor(): Element[] {\n if (!this.dataGrid) // Not initialized yet.\n {\n return [];\n }\n return [this.dataGrid.scrollContainer];\n }\n\n columnExtensionResolved(): void {\n this.invalidateAllItems(true);\n }\n\n private setupDataGrid(): DataGrid.SortableDataGrid.SortableDataGrid {\n this.dataGrid.setRowContextMenuCallback((contextMenu, node) => {\n const request = (node as NetworkNode).request();\n if (request) {\n this.handleContextMenuForRequest(contextMenu, request);\n }\n });\n this.dataGrid.setStickToBottom(true);\n this.dataGrid.setName('networkLog');\n this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.Last);\n this.dataGrid.element.classList.add('network-log-grid');\n this.dataGrid.element.addEventListener('mousedown', this.dataGridMouseDown.bind(this), true);\n this.dataGrid.element.addEventListener('mousemove', this.dataGridMouseMove.bind(this), true);\n this.dataGrid.element.addEventListener('mouseleave', () => this.setHoveredNode(null), true);\n this.dataGrid.element.addEventListener('keydown', event => {\n if (event.key === 'ArrowRight' && this.dataGrid.selectedNode) {\n const initiatorLink = this.dataGrid.selectedNode.element().querySelector('span.devtools-link');\n if (initiatorLink) {\n (initiatorLink as HTMLElement).focus();\n }\n }\n\n if (Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {\n this.dispatchEventToListeners(Events.RequestActivated, {showPanel: true, takeFocus: true});\n event.consume(true);\n }\n });\n this.dataGrid.element.addEventListener('keyup', event => {\n if ((event.key === 'r' || event.key === 'R') && this.dataGrid.selectedNode) {\n const request = (this.dataGrid.selectedNode as NetworkNode).request();\n if (!request) {\n return;\n }\n\n if (SDK.NetworkManager.NetworkManager.canReplayRequest(request)) {\n SDK.NetworkManager.NetworkManager.replayRequest(request);\n }\n }\n });\n this.dataGrid.element.addEventListener('focus', this.onDataGridFocus.bind(this), true);\n this.dataGrid.element.addEventListener('blur', this.onDataGridBlur.bind(this), true);\n return this.dataGrid;\n }\n\n private dataGridMouseMove(event: Event): void {\n const mouseEvent = (event as MouseEvent);\n const node = (this.dataGrid.dataGridNodeFromNode((mouseEvent.target as Node)));\n const highlightInitiatorChain = mouseEvent.shiftKey;\n this.setHoveredNode(node as NetworkNode, highlightInitiatorChain);\n }\n\n hoveredNode(): NetworkNode|null {\n return this.hoveredNodeInternal;\n }\n\n private setHoveredNode(node: NetworkNode|null, highlightInitiatorChain?: boolean): void {\n if (this.hoveredNodeInternal) {\n this.hoveredNodeInternal.setHovered(false, false);\n }\n this.hoveredNodeInternal = node;\n if (this.hoveredNodeInternal) {\n this.hoveredNodeInternal.setHovered(true, Boolean(highlightInitiatorChain));\n }\n }\n\n private dataGridMouseDown(event: Event): void {\n const mouseEvent = (event as MouseEvent);\n if (!this.dataGrid.selectedNode && mouseEvent.button) {\n mouseEvent.consume();\n }\n }\n\n private updateSummaryBar(): void {\n this.hideRecordingHint();\n\n let transferSize = 0;\n let resourceSize = 0;\n let selectedNodeNumber = 0;\n let selectedTransferSize = 0;\n let selectedResourceSize = 0;\n let baseTime = -1;\n let maxTime = -1;\n\n let nodeCount = 0;\n for (const request of Logs.NetworkLog.NetworkLog.instance().requests()) {\n const node = networkRequestToNode.get(request);\n if (!node) {\n continue;\n }\n nodeCount++;\n const requestTransferSize = request.transferSize;\n transferSize += requestTransferSize;\n const requestResourceSize = request.resourceSize;\n resourceSize += requestResourceSize;\n if (!filteredNetworkRequests.has(node)) {\n selectedNodeNumber++;\n selectedTransferSize += requestTransferSize;\n selectedResourceSize += requestResourceSize;\n }\n const networkManager = SDK.NetworkManager.NetworkManager.forRequest(request);\n // TODO(allada) inspectedURL should be stored in PageLoad used instead of target so HAR requests can have an\n // inspected url.\n if (networkManager && request.url() === networkManager.target().inspectedURL() &&\n request.resourceType() === Common.ResourceType.resourceTypes.Document &&\n networkManager.target().parentTarget()?.type() !== SDK.Target.Type.Frame) {\n baseTime = request.startTime;\n }\n if (request.endTime > maxTime) {\n maxTime = request.endTime;\n }\n }\n\n if (!nodeCount) {\n this.showRecordingHint();\n return;\n }\n\n this.summaryToolbarInternal.removeToolbarItems();\n const appendChunk = (chunk: string, title?: string): HTMLDivElement => {\n const toolbarText = new UI.Toolbar.ToolbarText(chunk);\n toolbarText.setTitle(title ? title : chunk);\n this.summaryToolbarInternal.appendToolbarItem(toolbarText);\n return toolbarText.element as HTMLDivElement;\n };\n\n if (selectedNodeNumber !== nodeCount) {\n appendChunk(i18nString(UIStrings.sSRequests, {PH1: selectedNodeNumber, PH2: nodeCount}));\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(\n i18nString(UIStrings.sSTransferred, {\n PH1: Platform.NumberUtilities.bytesToString(selectedTransferSize),\n PH2: Platform.NumberUtilities.bytesToString(transferSize),\n }),\n i18nString(UIStrings.sBSBTransferredOverNetwork, {PH1: selectedTransferSize, PH2: transferSize}));\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(\n i18nString(UIStrings.sSResources, {\n PH1: Platform.NumberUtilities.bytesToString(selectedResourceSize),\n PH2: Platform.NumberUtilities.bytesToString(resourceSize),\n }),\n i18nString(UIStrings.sBSBResourcesLoadedByThePage, {PH1: selectedResourceSize, PH2: resourceSize}));\n } else {\n appendChunk(i18nString(UIStrings.sRequests, {PH1: nodeCount}));\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(\n i18nString(UIStrings.sTransferred, {PH1: Platform.NumberUtilities.bytesToString(transferSize)}),\n i18nString(UIStrings.sBTransferredOverNetwork, {PH1: transferSize}));\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(\n i18nString(UIStrings.sResources, {PH1: Platform.NumberUtilities.bytesToString(resourceSize)}),\n i18nString(UIStrings.sBResourcesLoadedByThePage, {PH1: resourceSize}));\n }\n\n if (baseTime !== -1 && maxTime !== -1) {\n this.summaryToolbarInternal.appendSeparator();\n appendChunk(i18nString(UIStrings.finishS, {PH1: i18n.TimeUtilities.secondsToString(maxTime - baseTime)}));\n if (this.mainRequestDOMContentLoadedTime !== -1 && this.mainRequestDOMContentLoadedTime > baseTime) {\n this.summaryToolbarInternal.appendSeparator();\n const domContentLoadedText = i18nString(\n UIStrings.domcontentloadedS,\n {PH1: i18n.TimeUtilities.secondsToString(this.mainRequestDOMContentLoadedTime - baseTime)});\n appendChunk(domContentLoadedText).style.color = `var(${NetworkLogView.getDCLEventColor()})`;\n }\n if (this.mainRequestLoadTime !== -1) {\n this.summaryToolbarInternal.appendSeparator();\n const loadText =\n i18nString(UIStrings.loadS, {PH1: i18n.TimeUtilities.secondsToString(this.mainRequestLoadTime - baseTime)});\n appendChunk(loadText).style.color = `var(${NetworkLogView.getLoadEventColor()})`;\n }\n }\n }\n\n scheduleRefresh(): void {\n if (this.needsRefresh) {\n return;\n }\n\n this.needsRefresh = true;\n\n if (this.isShowing()) {\n void coordinator.write('NetworkLogView.render', this.refresh.bind(this));\n }\n }\n\n addFilmStripFrames(times: number[]): void {\n this.columnsInternal.addEventDividers(times, 'network-frame-divider');\n }\n\n selectFilmStripFrame(time: number): void {\n this.columnsInternal.selectFilmStripFrame(time);\n }\n\n clearFilmStripFrame(): void {\n this.columnsInternal.clearFilmStripFrame();\n }\n\n private refreshIfNeeded(): void {\n if (this.needsRefresh) {\n this.refresh();\n }\n }\n\n private invalidateAllItems(deferUpdate?: boolean): void {\n this.staleRequests = new Set(Logs.NetworkLog.NetworkLog.instance().requests().filter(this.isInScope));\n if (deferUpdate) {\n this.scheduleRefresh();\n } else {\n this.refresh();\n }\n }\n\n timeCalculator(): NetworkTimeCalculator {\n return this.timeCalculatorInternal;\n }\n\n calculator(): NetworkTimeCalculator {\n return this.calculatorInternal;\n }\n\n setCalculator(x: NetworkTimeCalculator): void {\n if (!x || this.calculatorInternal === x) {\n return;\n }\n\n if (this.calculatorInternal !== x) {\n this.calculatorInternal = x;\n this.columnsInternal.setCalculator(this.calculatorInternal);\n }\n this.calculatorInternal.reset();\n\n if (this.calculatorInternal.startAtZero) {\n this.columnsInternal.hideEventDividers();\n } else {\n this.columnsInternal.showEventDividers();\n }\n\n this.invalidateAllItems();\n }\n\n private loadEventFired(\n event: Common.EventTarget\n .EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>): void {\n if (!this.recording) {\n return;\n }\n\n const time = event.data.loadTime;\n if (time) {\n this.mainRequestLoadTime = time;\n this.columnsInternal.addEventDividers([time], 'network-load-divider');\n }\n }\n\n private domContentLoadedEventFired(event: Common.EventTarget.EventTargetEvent): void {\n if (!this.recording) {\n return;\n }\n const {data} = event;\n if (data) {\n this.mainRequestDOMContentLoadedTime = data;\n this.columnsInternal.addEventDividers([data], 'network-dcl-divider');\n }\n }\n\n override wasShown(): void {\n this.refreshIfNeeded();\n this.registerCSSFiles([networkLogViewStyles]);\n this.columnsInternal.wasShown();\n }\n\n override willHide(): void {\n this.columnsInternal.willHide();\n }\n\n override onResize(): void {\n this.rowHeightInternal = this.computeRowHeight();\n }\n\n flatNodesList(): NetworkNode[] {\n const rootNode =\n (this.dataGrid.rootNode() as\n DataGrid.ViewportDataGrid.ViewportDataGridNode>);\n return rootNode.flatChildren() as NetworkNode[];\n }\n\n private onDataGridFocus(): void {\n if (this.dataGrid.element.matches(':focus-visible')) {\n this.element.classList.add('grid-focused');\n }\n this.updateNodeBackground();\n }\n\n private onDataGridBlur(): void {\n this.element.classList.remove('grid-focused');\n this.updateNodeBackground();\n }\n\n updateNodeBackground(): void {\n if (this.dataGrid.selectedNode) {\n (this.dataGrid.selectedNode as NetworkNode).updateBackgroundColor();\n }\n }\n\n updateNodeSelectedClass(isSelected: boolean): void {\n if (isSelected) {\n this.element.classList.remove('no-node-selected');\n } else {\n this.element.classList.add('no-node-selected');\n }\n }\n\n stylesChanged(): void {\n this.columnsInternal.scheduleRefresh();\n }\n\n private removeNodeAndMaybeAncestors(node: NetworkRequestNode): void {\n let parent: NetworkNode|\n (DataGrid.DataGrid.DataGridNode>>|\n null) = node.parent;\n if (!parent) {\n return;\n }\n parent.removeChild(node);\n while (parent && !parent.hasChildren() && parent.dataGrid && parent.dataGrid.rootNode() !== parent) {\n const grandparent = (parent.parent as NetworkNode);\n grandparent.removeChild(parent);\n parent = grandparent;\n }\n }\n\n private refresh(): void {\n this.needsRefresh = false;\n\n this.removeAllNodeHighlights();\n\n this.timeCalculatorInternal.updateBoundariesForEventTime(this.mainRequestLoadTime);\n this.durationCalculator.updateBoundariesForEventTime(this.mainRequestLoadTime);\n this.timeCalculatorInternal.updateBoundariesForEventTime(this.mainRequestDOMContentLoadedTime);\n this.durationCalculator.updateBoundariesForEventTime(this.mainRequestDOMContentLoadedTime);\n\n const nodesToInsert = new Map();\n const nodesToRefresh: NetworkNode[] = [];\n\n const staleNodes = new Set();\n\n // While creating nodes it may add more entries into staleRequests because redirect request nodes update the parent\n // node so we loop until we have no more stale requests.\n while (this.staleRequests.size) {\n const request = this.staleRequests.values().next().value;\n this.staleRequests.delete(request);\n let node = networkRequestToNode.get(request);\n if (!node) {\n node = this.createNodeForRequest(request);\n }\n staleNodes.add(node);\n }\n\n for (const node of staleNodes) {\n const isFilteredOut = !this.applyFilter(node);\n if (isFilteredOut && node === this.hoveredNodeInternal) {\n this.setHoveredNode(null);\n }\n\n if (!isFilteredOut) {\n nodesToRefresh.push(node);\n }\n const request = node.request();\n this.timeCalculatorInternal.updateBoundaries(request);\n this.durationCalculator.updateBoundaries(request);\n const newParent = this.parentNodeForInsert(node);\n const wasAlreadyFiltered = filteredNetworkRequests.has(node);\n if (wasAlreadyFiltered === isFilteredOut && node.parent === newParent) {\n continue;\n }\n if (isFilteredOut) {\n filteredNetworkRequests.add(node);\n } else {\n filteredNetworkRequests.delete(node);\n }\n const removeFromParent = node.parent && (isFilteredOut || node.parent !== newParent);\n if (removeFromParent) {\n this.removeNodeAndMaybeAncestors(node);\n }\n\n if (!newParent || isFilteredOut) {\n continue;\n }\n\n if (!newParent.dataGrid && !nodesToInsert.has(newParent)) {\n nodesToInsert.set(newParent, (this.dataGrid.rootNode() as NetworkNode));\n nodesToRefresh.push(newParent);\n }\n nodesToInsert.set(node, newParent);\n }\n\n for (const node of nodesToInsert.keys()) {\n (nodesToInsert.get(node) as NetworkNode).appendChild(node);\n }\n\n for (const node of nodesToRefresh) {\n node.refresh();\n }\n\n this.updateSummaryBar();\n\n if (nodesToInsert.size) {\n this.columnsInternal.sortByCurrentColumn();\n }\n\n this.dataGrid.updateInstantly();\n this.didRefreshForTest();\n }\n\n private didRefreshForTest(): void {\n }\n\n private parentNodeForInsert(node: NetworkRequestNode): NetworkNode|null {\n if (!this.activeGroupLookup) {\n return this.dataGrid.rootNode() as NetworkNode;\n }\n\n const groupNode = this.activeGroupLookup.groupNodeForRequest(node.request());\n if (!groupNode) {\n return this.dataGrid.rootNode() as NetworkNode;\n }\n return groupNode;\n }\n\n private reset(): void {\n this.dispatchEventToListeners(Events.RequestActivated, {showPanel: false});\n\n this.setHoveredNode(null);\n this.columnsInternal.reset();\n\n this.timeFilter = null;\n this.calculatorInternal.reset();\n\n this.timeCalculatorInternal.setWindow(null);\n this.linkifierInternal.reset();\n\n if (this.activeGroupLookup) {\n this.activeGroupLookup.reset();\n }\n this.staleRequests.clear();\n this.resetSuggestionBuilder();\n\n this.mainRequestLoadTime = -1;\n this.mainRequestDOMContentLoadedTime = -1;\n\n this.dataGrid.rootNode().removeChildren();\n this.updateSummaryBar();\n this.dataGrid.setStickToBottom(true);\n this.scheduleRefresh();\n }\n\n // TODO(crbug.com/1477668)\n setTextFilterValue(filterString: string): void {\n this.textFilterUI.setValue(filterString);\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN)) {\n this.networkHideDataURLSetting.set(false);\n this.networkShowBlockedCookiesOnlySetting.set(false);\n this.networkOnlyBlockedRequestsSetting.set(false);\n this.networkOnlyThirdPartySetting.set(false);\n this.networkHideChromeExtensions.set(false);\n } else {\n this.dataURLFilterUI?.setChecked(false);\n this.onlyBlockedResponseCookiesFilterUI?.setChecked(false);\n this.onlyBlockedRequestsUI?.setChecked(false);\n this.onlyThirdPartyFilterUI?.setChecked(false);\n this.hideChromeExtensionsUI?.setChecked(false);\n }\n this.resourceCategoryFilterUI.reset();\n }\n\n private createNodeForRequest(request: SDK.NetworkRequest.NetworkRequest): NetworkRequestNode {\n const node = new NetworkRequestNode(this, request);\n networkRequestToNode.set(request, node);\n filteredNetworkRequests.add(node);\n\n for (let redirect = request.redirectSource(); redirect; redirect = redirect.redirectSource()) {\n this.refreshRequest(redirect);\n }\n return node;\n }\n\n private isInScope(request: SDK.NetworkRequest.NetworkRequest): boolean {\n const networkManager = SDK.NetworkManager.NetworkManager.forRequest(request);\n return !networkManager || SDK.TargetManager.TargetManager.instance().isInScope(networkManager);\n }\n\n private onRequestUpdated(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n if (this.isInScope(request)) {\n this.refreshRequest(request);\n }\n }\n\n private onRequestRemoved(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n this.staleRequests.delete(request);\n const node = networkRequestToNode.get(request);\n if (node) {\n this.removeNodeAndMaybeAncestors(node);\n }\n }\n\n private refreshRequest(request: SDK.NetworkRequest.NetworkRequest): void {\n NetworkLogView.subdomains(request.domain)\n .forEach(\n this.suggestionBuilder.addItem.bind(this.suggestionBuilder, NetworkForward.UIFilter.FilterType.Domain));\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Method, request.requestMethod);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.MimeType, request.mimeType);\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Scheme, String(request.scheme));\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.StatusCode, String(request.statusCode));\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.ResourceType, request.resourceType().name());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.Url, request.securityOrigin());\n\n const priority = request.priority();\n if (priority) {\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.Priority, PerfUI.NetworkPriorities.uiLabelForNetworkPriority(priority));\n }\n\n if (request.mixedContentType !== Protocol.Security.MixedContentType.None) {\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.MixedContent, NetworkForward.UIFilter.MixedContentFilterValues.All);\n }\n\n if (request.mixedContentType === Protocol.Security.MixedContentType.OptionallyBlockable) {\n this.suggestionBuilder.addItem(\n NetworkForward.UIFilter.FilterType.MixedContent, NetworkForward.UIFilter.MixedContentFilterValues.Displayed);\n }\n\n if (request.mixedContentType === Protocol.Security.MixedContentType.Blockable) {\n const suggestion = request.wasBlocked() ? NetworkForward.UIFilter.MixedContentFilterValues.Blocked :\n NetworkForward.UIFilter.MixedContentFilterValues.BlockOverridden;\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.MixedContent, suggestion);\n }\n\n const responseHeaders = request.responseHeaders;\n for (const responseHeader of responseHeaders) {\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.HasResponseHeader, responseHeader.name);\n if (responseHeader.name === 'Set-Cookie') {\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.ResponseHeaderValueSetCookie);\n }\n }\n\n for (const cookie of request.responseCookies) {\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.SetCookieDomain, cookie.domain());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.SetCookieName, cookie.name());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.SetCookieValue, cookie.value());\n }\n\n for (const cookie of request.allCookiesIncludingBlockedOnes()) {\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.CookieDomain, cookie.domain());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.CookieName, cookie.name());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.CookiePath, cookie.path());\n this.suggestionBuilder.addItem(NetworkForward.UIFilter.FilterType.CookieValue, cookie.value());\n }\n\n this.staleRequests.add(request);\n this.scheduleRefresh();\n }\n\n rowHeight(): number {\n return this.rowHeightInternal;\n }\n\n switchViewMode(gridMode: boolean): void {\n this.columnsInternal.switchViewMode(gridMode);\n }\n\n handleContextMenuForRequest(contextMenu: UI.ContextMenu.ContextMenu, request: SDK.NetworkRequest.NetworkRequest):\n void {\n contextMenu.appendApplicableItems(request);\n let copyMenu = contextMenu.clipboardSection().appendSubMenuItem(i18nString(UIStrings.copy));\n const footerSection = copyMenu.footerSection();\n if (request) {\n copyMenu.defaultSection().appendItem(\n UI.UIUtils.copyLinkAddressLabel(),\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText.bind(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance, request.contentURL()));\n if (request.requestHeadersText()) {\n copyMenu.defaultSection().appendItem(\n i18nString(UIStrings.copyRequestHeaders), NetworkLogView.copyRequestHeaders.bind(null, request));\n }\n\n if (request.responseHeadersText) {\n copyMenu.defaultSection().appendItem(\n i18nString(UIStrings.copyResponseHeaders), NetworkLogView.copyResponseHeaders.bind(null, request));\n }\n\n if (request.finished) {\n copyMenu.defaultSection().appendItem(\n i18nString(UIStrings.copyResponse), NetworkLogView.copyResponse.bind(null, request));\n }\n\n const initiator = request.initiator();\n\n if (initiator) {\n const stack = initiator.stack;\n if (stack) {\n // We proactively compute the stacktrace text, as we can't determine whether the stacktrace\n // has any context solely based on the top frame. Sometimes, the top frame does not have\n // any callFrames, but its parent frames do.\n const stackTraceText = computeStackTraceText(stack);\n if (stackTraceText !== '') {\n copyMenu.defaultSection().appendItem(i18nString(UIStrings.copyStacktrace), () => {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(stackTraceText);\n });\n }\n }\n }\n\n const disableIfBlob = request.isBlobRequest();\n if (Host.Platform.isWin()) {\n footerSection.appendItem(\n i18nString(UIStrings.copyAsPowershell), this.copyPowerShellCommand.bind(this, request),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsFetch), this.copyFetchCall.bind(this, request, FetchStyle.Browser),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsNodejsFetch), this.copyFetchCall.bind(this, request, FetchStyle.NodeJs),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsCurlCmd), this.copyCurlCommand.bind(this, request, 'win'),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsCurlBash), this.copyCurlCommand.bind(this, request, 'unix'),\n {disabled: disableIfBlob});\n footerSection.appendItem(i18nString(UIStrings.copyAllAsPowershell), this.copyAllPowerShellCommand.bind(this));\n footerSection.appendItem(\n i18nString(UIStrings.copyAllAsFetch), this.copyAllFetchCall.bind(this, FetchStyle.Browser));\n footerSection.appendItem(\n i18nString(UIStrings.copyAllAsNodejsFetch), this.copyAllFetchCall.bind(this, FetchStyle.NodeJs));\n footerSection.appendItem(i18nString(UIStrings.copyAllAsCurlCmd), this.copyAllCurlCommand.bind(this, 'win'));\n footerSection.appendItem(i18nString(UIStrings.copyAllAsCurlBash), this.copyAllCurlCommand.bind(this, 'unix'));\n } else {\n footerSection.appendItem(\n i18nString(UIStrings.copyAsPowershell), this.copyPowerShellCommand.bind(this, request),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsFetch), this.copyFetchCall.bind(this, request, FetchStyle.Browser),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsNodejsFetch), this.copyFetchCall.bind(this, request, FetchStyle.NodeJs),\n {disabled: disableIfBlob});\n footerSection.appendItem(\n i18nString(UIStrings.copyAsCurl), this.copyCurlCommand.bind(this, request, 'unix'),\n {disabled: disableIfBlob});\n footerSection.appendItem(i18nString(UIStrings.copyAllAsPowershell), this.copyAllPowerShellCommand.bind(this));\n footerSection.appendItem(\n i18nString(UIStrings.copyAllAsFetch), this.copyAllFetchCall.bind(this, FetchStyle.Browser));\n footerSection.appendItem(\n i18nString(UIStrings.copyAllAsNodejsFetch), this.copyAllFetchCall.bind(this, FetchStyle.NodeJs));\n footerSection.appendItem(i18nString(UIStrings.copyAllAsCurl), this.copyAllCurlCommand.bind(this, 'unix'));\n }\n } else {\n copyMenu = contextMenu.clipboardSection().appendSubMenuItem(i18nString(UIStrings.copy));\n }\n footerSection.appendItem(i18nString(UIStrings.copyAllAsHar), this.copyAll.bind(this));\n\n contextMenu.saveSection().appendItem(i18nString(UIStrings.saveAllAsHarWithContent), this.exportAll.bind(this));\n contextMenu.overrideSection().appendItem(\n i18nString(UIStrings.overrideHeaders), this.#handleCreateResponseHeaderOverrideClick.bind(this, request));\n\n contextMenu.editSection().appendItem(i18nString(UIStrings.clearBrowserCache), this.clearBrowserCache.bind(this));\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.clearBrowserCookies), this.clearBrowserCookies.bind(this));\n\n if (request) {\n const maxBlockedURLLength = 20;\n const manager = SDK.NetworkManager.MultitargetNetworkManager.instance();\n let patterns = manager.blockedPatterns();\n\n function addBlockedURL(url: string): void {\n patterns.push({enabled: true, url: url as Platform.DevToolsPath.UrlString});\n manager.setBlockedPatterns(patterns);\n manager.setBlockingEnabled(true);\n void UI.ViewManager.ViewManager.instance().showView('network.blocked-urls');\n }\n\n function removeBlockedURL(url: string): void {\n patterns = patterns.filter(pattern => pattern.url !== url);\n manager.setBlockedPatterns(patterns);\n void UI.ViewManager.ViewManager.instance().showView('network.blocked-urls');\n }\n\n const urlWithoutScheme = request.parsedURL.urlWithoutScheme();\n if (urlWithoutScheme && !patterns.find(pattern => pattern.url === urlWithoutScheme)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.blockRequestUrl), addBlockedURL.bind(null, urlWithoutScheme));\n } else if (urlWithoutScheme) {\n const croppedURL = Platform.StringUtilities.trimMiddle(urlWithoutScheme, maxBlockedURLLength);\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.unblockS, {PH1: croppedURL}), removeBlockedURL.bind(null, urlWithoutScheme));\n }\n\n const domain = request.parsedURL.domain();\n if (domain && !patterns.find(pattern => pattern.url === domain)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.blockRequestDomain), addBlockedURL.bind(null, domain));\n } else if (domain) {\n const croppedDomain = Platform.StringUtilities.trimMiddle(domain, maxBlockedURLLength);\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.unblockS, {PH1: croppedDomain}), removeBlockedURL.bind(null, domain));\n }\n\n if (SDK.NetworkManager.NetworkManager.canReplayRequest(request)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.replayXhr), SDK.NetworkManager.NetworkManager.replayRequest.bind(null, request));\n }\n }\n }\n\n private harRequests(): SDK.NetworkRequest.NetworkRequest[] {\n return Logs.NetworkLog.NetworkLog.instance()\n .requests()\n .filter(NetworkLogView.getHTTPRequestsFilter)\n .filter(request => {\n return request.finished ||\n (request.resourceType() === Common.ResourceType.resourceTypes.WebSocket && request.responseReceivedTime);\n });\n }\n\n private async copyAll(): Promise {\n const harArchive = {log: await HAR.Log.Log.build(this.harRequests())};\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(JSON.stringify(harArchive, null, 2));\n }\n\n private async copyCurlCommand(request: SDK.NetworkRequest.NetworkRequest, platform: 'unix'|'win'): Promise {\n const command = await NetworkLogView.generateCurlCommand(request, platform);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(command);\n }\n\n private async copyAllCurlCommand(platform: 'unix'|'win'): Promise {\n const commands = await this.generateAllCurlCommand(Logs.NetworkLog.NetworkLog.instance().requests(), platform);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(commands);\n }\n\n private async copyFetchCall(request: SDK.NetworkRequest.NetworkRequest, style: FetchStyle): Promise {\n const command = await this.generateFetchCall(request, style);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(command);\n }\n\n private async copyAllFetchCall(style: FetchStyle): Promise {\n const commands = await this.generateAllFetchCall(Logs.NetworkLog.NetworkLog.instance().requests(), style);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(commands);\n }\n\n private async copyPowerShellCommand(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const command = await this.generatePowerShellCommand(request);\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(command);\n }\n\n private async copyAllPowerShellCommand(): Promise {\n const commands = await this.generateAllPowerShellCommand(Logs.NetworkLog.NetworkLog.instance().requests());\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(commands);\n }\n\n async exportAll(): Promise {\n const mainTarget = SDK.TargetManager.TargetManager.instance().scopeTarget();\n if (!mainTarget) {\n return;\n }\n const url = mainTarget.inspectedURL();\n const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);\n const filename = (parsedURL ? parsedURL.host : 'network-log') as Platform.DevToolsPath.RawPathString;\n const stream = new Bindings.FileUtils.FileOutputStream();\n\n if (!await stream.open(Common.ParsedURL.ParsedURL.concatenate(filename, '.har'))) {\n return;\n }\n\n const progressIndicator = new UI.ProgressIndicator.ProgressIndicator();\n this.progressBarContainer.appendChild(progressIndicator.element);\n await HAR.Writer.Writer.write(stream, this.harRequests(), progressIndicator);\n progressIndicator.done();\n void stream.close();\n }\n\n async #handleCreateResponseHeaderOverrideClick(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const requestLocation =\n NetworkForward.UIRequestLocation.UIRequestLocation.responseHeaderMatch(request, {name: '', value: ''});\n const networkPersistanceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();\n if (networkPersistanceManager.project()) {\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled').set(true);\n await networkPersistanceManager.getOrCreateHeadersUISourceCodeFromUrl(request.url());\n await Common.Revealer.reveal(requestLocation);\n } else { // If folder for local overrides has not been provided yet\n UI.InspectorView.InspectorView.instance().displaySelectOverrideFolderInfobar(async(): Promise => {\n await Sources.SourcesNavigator.OverridesNavigatorView.instance().setupNewWorkspace();\n await networkPersistanceManager.getOrCreateHeadersUISourceCodeFromUrl(request.url());\n await Common.Revealer.reveal(requestLocation);\n });\n }\n }\n\n private clearBrowserCache(): void {\n if (confirm(i18nString(UIStrings.areYouSureYouWantToClearBrowser))) {\n SDK.NetworkManager.MultitargetNetworkManager.instance().clearBrowserCache();\n }\n }\n\n private clearBrowserCookies(): void {\n if (confirm(i18nString(UIStrings.areYouSureYouWantToClearBrowserCookies))) {\n SDK.NetworkManager.MultitargetNetworkManager.instance().clearBrowserCookies();\n }\n }\n\n private removeAllHighlights(): void {\n this.removeAllNodeHighlights();\n }\n\n private applyFilter(node: NetworkRequestNode): boolean {\n const request = node.request();\n if (this.timeFilter && !this.timeFilter(request)) {\n return false;\n }\n const categoryName = request.resourceType().category().title();\n if (!this.resourceCategoryFilterUI.accept(categoryName)) {\n return false;\n }\n const [hideDataURL, blockedCookies, blockedRequests, thirdParty, hideExtensionURL] =\n Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN) ?\n [\n this.networkHideDataURLSetting.get(),\n this.networkShowBlockedCookiesOnlySetting.get(),\n this.networkOnlyBlockedRequestsSetting.get(),\n this.networkOnlyThirdPartySetting.get(),\n this.networkHideChromeExtensions.get(),\n ] :\n [\n this.dataURLFilterUI?.checked(),\n this.onlyBlockedResponseCookiesFilterUI?.checked(),\n this.onlyBlockedRequestsUI?.checked(),\n this.onlyThirdPartyFilterUI?.checked(),\n this.hideChromeExtensionsUI?.checked(),\n ];\n\n if (hideDataURL && (request.parsedURL.isDataURL() || request.parsedURL.isBlobURL())) {\n return false;\n }\n if (blockedCookies && !request.blockedResponseCookies().length) {\n return false;\n }\n if (blockedRequests && !request.wasBlocked() && !request.corsErrorStatus()) {\n return false;\n }\n if (thirdParty && request.isSameSite()) {\n return false;\n }\n if (hideExtensionURL && request.scheme === 'chrome-extension') {\n return false;\n }\n for (let i = 0; i < this.filters.length; ++i) {\n if (!this.filters[i](request)) {\n return false;\n }\n }\n return true;\n }\n\n private isValidUrl(url: string): boolean {\n try {\n new URL(url);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n private parseFilterQuery(query: string, invert: boolean): void {\n // A query string can have multiple filters, some of them regular\n // expressions, some not. Each one of those filters can be negated with a\n // \"-\" prefix, including the regular expressions. The top-level `invert`\n // checkbox therefore inverts each one of those individual filters.\n const descriptors = this.filterParser.parse(query);\n this.filters = descriptors.map(descriptor => {\n const key = descriptor.key;\n const text = descriptor.text || '';\n const regex = descriptor.regex;\n let filter;\n if (key) {\n const defaultText = Platform.StringUtilities.escapeForRegExp(key + ':' + text);\n filter = this.createSpecialFilter((key as NetworkForward.UIFilter.FilterType), text) ||\n NetworkLogView.requestPathFilter.bind(null, new RegExp(defaultText, 'i'));\n } else if (descriptor.regex) {\n filter = NetworkLogView.requestPathFilter.bind(null, (regex as RegExp));\n } else if (this.isValidUrl(text)) {\n filter = NetworkLogView.requestUrlFilter.bind(null, text);\n } else {\n filter = NetworkLogView.requestPathFilter.bind(\n null, new RegExp(Platform.StringUtilities.escapeForRegExp(text), 'i'));\n }\n if ((descriptor.negative && !invert) || (!descriptor.negative && invert)) {\n return NetworkLogView.negativeFilter.bind(null, filter);\n }\n return filter;\n });\n }\n\n private createSpecialFilter(type: NetworkForward.UIFilter.FilterType, value: string): Filter|null {\n switch (type) {\n case NetworkForward.UIFilter.FilterType.Domain:\n return NetworkLogView.createRequestDomainFilter(value);\n\n case NetworkForward.UIFilter.FilterType.HasResponseHeader:\n return NetworkLogView.requestResponseHeaderFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.ResponseHeaderValueSetCookie:\n return NetworkLogView.requestResponseHeaderSetCookieFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.Is:\n if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.Running) {\n return NetworkLogView.runningRequestFilter;\n }\n if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.FromCache) {\n return NetworkLogView.fromCacheRequestFilter;\n }\n if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.ServiceWorkerIntercepted) {\n return NetworkLogView.interceptedByServiceWorkerFilter;\n }\n if (value.toLowerCase() === NetworkForward.UIFilter.IsFilterType.ServiceWorkerInitiated) {\n return NetworkLogView.initiatedByServiceWorkerFilter;\n }\n break;\n\n case NetworkForward.UIFilter.FilterType.LargerThan:\n return this.createSizeFilter(value.toLowerCase());\n\n case NetworkForward.UIFilter.FilterType.Method:\n return NetworkLogView.requestMethodFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.MimeType:\n return NetworkLogView.requestMimeTypeFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.MixedContent:\n return NetworkLogView.requestMixedContentFilter.bind(\n null, (value as NetworkForward.UIFilter.MixedContentFilterValues));\n\n case NetworkForward.UIFilter.FilterType.Scheme:\n return NetworkLogView.requestSchemeFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.SetCookieDomain:\n return NetworkLogView.requestSetCookieDomainFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.SetCookieName:\n return NetworkLogView.requestSetCookieNameFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.SetCookieValue:\n return NetworkLogView.requestSetCookieValueFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.CookieDomain:\n return NetworkLogView.requestCookieDomainFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.CookieName:\n return NetworkLogView.requestCookieNameFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.CookiePath:\n return NetworkLogView.requestCookiePathFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.CookieValue:\n return NetworkLogView.requestCookieValueFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.Priority:\n return NetworkLogView.requestPriorityFilter.bind(\n null, PerfUI.NetworkPriorities.uiLabelToNetworkPriority(value));\n\n case NetworkForward.UIFilter.FilterType.StatusCode:\n return NetworkLogView.statusCodeFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.HasOverrides:\n return NetworkLogView.hasOverridesFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.ResourceType:\n return NetworkLogView.resourceTypeFilter.bind(null, value);\n\n case NetworkForward.UIFilter.FilterType.Url:\n return NetworkLogView.requestUrlFilter.bind(null, value);\n }\n return null;\n }\n\n private createSizeFilter(value: string): Filter|null {\n let multiplier = 1;\n if (value.endsWith('k')) {\n multiplier = 1000;\n value = value.substring(0, value.length - 1);\n } else if (value.endsWith('m')) {\n multiplier = 1000 * 1000;\n value = value.substring(0, value.length - 1);\n }\n const quantity = Number(value);\n if (isNaN(quantity)) {\n return null;\n }\n return NetworkLogView.requestSizeLargerThanFilter.bind(null, quantity * multiplier);\n }\n\n private filterRequests(): void {\n this.removeAllHighlights();\n this.invalidateAllItems();\n }\n\n private reveal(request: SDK.NetworkRequest.NetworkRequest): NetworkRequestNode|null {\n this.removeAllNodeHighlights();\n const node = networkRequestToNode.get(request);\n if (!node || !node.dataGrid) {\n return null;\n }\n // Viewport datagrid nodes do not reveal if not in the root node\n // list of flatChildren. For children of grouped frame nodes:\n // reveal and expand parent to ensure child is revealable.\n if (node.parent && node.parent instanceof NetworkGroupNode) {\n node.parent.reveal();\n node.parent.expand();\n }\n node.reveal();\n return node;\n }\n\n revealAndHighlightRequest(request: SDK.NetworkRequest.NetworkRequest): void {\n const node = this.reveal(request);\n if (node) {\n this.highlightNode(node);\n }\n }\n\n revealAndHighlightRequestWithId(requestId: NetworkForward.NetworkRequestId.NetworkRequestId): void {\n const request = Logs.NetworkLog.NetworkLog.instance().requestByManagerAndId(requestId.manager, requestId.requestId);\n if (request) {\n this.revealAndHighlightRequest(request);\n }\n }\n\n selectRequest(request: SDK.NetworkRequest.NetworkRequest, options?: NetworkForward.UIRequestLocation.FilterOptions):\n void {\n const defaultOptions = {clearFilter: true};\n const {clearFilter} = options || defaultOptions;\n if (clearFilter) {\n this.setTextFilterValue('');\n }\n const node = this.reveal(request);\n if (node) {\n node.select();\n }\n }\n\n removeAllNodeHighlights(): void {\n if (this.highlightedNode) {\n this.highlightedNode.element().classList.remove('highlighted-row');\n this.highlightedNode = null;\n }\n }\n\n private highlightNode(node: NetworkRequestNode): void {\n UI.UIUtils.runCSSAnimationOnce(node.element(), 'highlighted-row');\n this.highlightedNode = node;\n }\n\n private filterOutBlobRequests(requests: SDK.NetworkRequest.NetworkRequest[]): SDK.NetworkRequest.NetworkRequest[] {\n return requests.filter(request => !request.isBlobRequest());\n }\n\n private async generateFetchCall(request: SDK.NetworkRequest.NetworkRequest, style: FetchStyle): Promise {\n const ignoredHeaders = new Set([\n // Internal headers\n 'method',\n 'path',\n 'scheme',\n 'version',\n\n // Unsafe headers\n // Keep this list synchronized with src/net/http/http_util.cc\n 'accept-charset',\n 'accept-encoding',\n 'access-control-request-headers',\n 'access-control-request-method',\n 'connection',\n 'content-length',\n 'cookie',\n 'cookie2',\n 'date',\n 'dnt',\n 'expect',\n 'host',\n 'keep-alive',\n 'origin',\n 'referer',\n 'te',\n 'trailer',\n 'transfer-encoding',\n 'upgrade',\n 'via',\n // TODO(phistuck) - remove this once crbug.com/571722 is fixed.\n 'user-agent',\n ]);\n\n const credentialHeaders = new Set(['cookie', 'authorization']);\n\n const url = JSON.stringify(request.url());\n\n const requestHeaders = request.requestHeaders();\n const headerData: Headers = requestHeaders.reduce((result, header) => {\n const name = header.name;\n\n if (!ignoredHeaders.has(name.toLowerCase()) && !name.includes(':')) {\n result.append(name, header.value);\n }\n\n return result;\n }, new Headers());\n\n const headers: HeadersInit = {};\n for (const headerArray of headerData) {\n headers[headerArray[0]] = headerArray[1];\n }\n\n const credentials = request.includedRequestCookies().length ||\n requestHeaders.some(({name}) => credentialHeaders.has(name.toLowerCase())) ?\n 'include' :\n 'omit';\n\n const referrerHeader = requestHeaders.find(({name}) => name.toLowerCase() === 'referer');\n\n const referrer = referrerHeader ? referrerHeader.value : void 0;\n\n const referrerPolicy = request.referrerPolicy() || void 0;\n\n const requestBody = await request.requestFormData();\n\n const fetchOptions: RequestInit = {\n headers: Object.keys(headers).length ? headers : void 0,\n referrer,\n referrerPolicy,\n body: requestBody,\n method: request.requestMethod,\n mode: 'cors',\n };\n\n if (style === FetchStyle.NodeJs) {\n const cookieHeader = requestHeaders.find(header => header.name.toLowerCase() === 'cookie');\n const extraHeaders: HeadersInit = {};\n // According to https://www.npmjs.com/package/node-fetch#class-request the\n // following properties are not implemented in Node.js.\n delete fetchOptions.mode;\n if (cookieHeader) {\n extraHeaders['cookie'] = cookieHeader.value;\n }\n if (referrer) {\n delete fetchOptions.referrer;\n extraHeaders['Referer'] = referrer;\n }\n if (referrer) {\n delete fetchOptions.referrerPolicy;\n extraHeaders['Referrer-Policy'] = referrerPolicy as string;\n }\n if (Object.keys(extraHeaders).length) {\n fetchOptions.headers = {\n ...headers,\n ...extraHeaders,\n };\n }\n } else {\n fetchOptions.credentials = credentials;\n }\n\n const options = JSON.stringify(fetchOptions, null, 2);\n return `fetch(${url}, ${options});`;\n }\n\n private async generateAllFetchCall(requests: SDK.NetworkRequest.NetworkRequest[], style: FetchStyle):\n Promise {\n const nonBlobRequests = this.filterOutBlobRequests(requests);\n const commands = await Promise.all(nonBlobRequests.map(request => this.generateFetchCall(request, style)));\n return commands.join(' ;\\n');\n }\n\n static async generateCurlCommand(request: SDK.NetworkRequest.NetworkRequest, platform: 'unix'|'win'):\n Promise {\n let command: string[] = [];\n // Most of these headers are derived from the URL and are automatically added by cURL.\n // The |Accept-Encoding| header is ignored to prevent decompression errors. crbug.com/1015321\n const ignoredHeaders = new Set(['accept-encoding', 'host', 'method', 'path', 'scheme', 'version']);\n\n function escapeStringWin(str: string): string {\n /* Only escape the \" characters when necessary.\n\n Because cmd.exe parser and MS Crt arguments parsers use some of the\n same escape characters, they can interact with each other in\n horrible ways, the order of operations is critical.\n\n Replace \\ with \\\\ first because it is an escape character for certain\n conditions in both parsers.\n\n Replace all \" with \\\" to ensure the first parser does not remove it.\n\n Then escape all characters we are not sure about with ^ to ensure it\n gets to MS Crt parser safely.\n\n The % character is special because MS Crt parser will try and look for\n ENV variables and fill them in its place. We cannot escape them with %\n and cannot escape them with ^ (because it's cmd.exe's escape not MS Crt\n parser); So we can get cmd.exe parser to escape the character after it,\n if it is followed by a valid beginning character of an ENV variable.\n This ensures we do not try and double escape another ^ if it was placed\n by the previous replace.\n\n Lastly we replace new lines with ^ and TWO new lines because the first\n new line is there to enact the escape command the second is the character\n to escape (in this case new line).\n */\n const encapsChars = /[\\r\\n]|[^a-zA-Z0-9\\s_\\-:=+~'\\/.',?;()*`&]/.test(str) ? '^\"' : '\"';\n return encapsChars +\n str.replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/[^a-zA-Z0-9\\s_\\-:=+~'\\/.',?;()*`&]/g, '^$&')\n .replace(/%(?=[a-zA-Z0-9_])/g, '%^')\n .replace(/\\r?\\n/g, '^\\n\\n') +\n encapsChars;\n }\n\n function escapeStringPosix(str: string): string {\n function escapeCharacter(x: string): string {\n const code = x.charCodeAt(0);\n let hexString = code.toString(16);\n // Zero pad to four digits to comply with ANSI-C Quoting:\n // http://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html\n while (hexString.length < 4) {\n hexString = '0' + hexString;\n }\n\n return '\\\\u' + hexString;\n }\n\n if (/[\\0-\\x1F\\x7F-\\x9F!]|\\'/.test(str)) {\n // Use ANSI-C quoting syntax.\n return '$\\'' +\n str.replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\'/g, '\\\\\\'')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\0-\\x1F\\x7F-\\x9F!]/g, escapeCharacter) +\n '\\'';\n }\n // Use single quote syntax.\n return '\\'' + str + '\\'';\n }\n\n // cURL command expected to run on the same platform that DevTools run\n // (it may be different from the inspected page platform).\n const escapeString = platform === 'win' ? escapeStringWin : escapeStringPosix;\n\n command.push(escapeString(request.url()).replace(/[[{}\\]]/g, '\\\\$&'));\n\n let inferredMethod = 'GET';\n const data = [];\n const formData = await request.requestFormData();\n if (formData) {\n // Note that formData is not necessarily urlencoded because it might for example\n // come from a fetch request made with an explicitly unencoded body.\n data.push('--data-raw ' + escapeString(formData));\n ignoredHeaders.add('content-length');\n inferredMethod = 'POST';\n }\n\n if (request.requestMethod !== inferredMethod) {\n command.push('-X ' + escapeString(request.requestMethod));\n }\n\n const requestHeaders = request.requestHeaders();\n for (let i = 0; i < requestHeaders.length; i++) {\n const header = requestHeaders[i];\n const name = header.name.replace(/^:/, ''); // Translate SPDY v3 headers to HTTP headers.\n if (ignoredHeaders.has(name.toLowerCase())) {\n continue;\n }\n if (header.value.trim()) {\n command.push('-H ' + escapeString(name + ': ' + header.value));\n } else {\n // A header passed with -H with no value or only whitespace as its\n // value tells curl to not set the header at all. To post an empty\n // header, you have to terminate it with a semicolon.\n command.push('-H ' + escapeString(name + ';'));\n }\n }\n command = command.concat(data);\n\n if (request.securityState() === Protocol.Security.SecurityState.Insecure) {\n command.push('--insecure');\n }\n return 'curl ' + command.join(command.length >= 3 ? (platform === 'win' ? ' ^\\n ' : ' \\\\\\n ') : ' ');\n }\n\n private async generateAllCurlCommand(requests: SDK.NetworkRequest.NetworkRequest[], platform: 'unix'|'win'):\n Promise {\n const nonBlobRequests = this.filterOutBlobRequests(requests);\n const commands =\n await Promise.all(nonBlobRequests.map(request => NetworkLogView.generateCurlCommand(request, platform)));\n if (platform === 'win') {\n return commands.join(' &\\r\\n');\n }\n return commands.join(' ;\\n');\n }\n\n private async generatePowerShellCommand(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const command = [];\n const ignoredHeaders = new Set([\n 'host',\n 'connection',\n 'proxy-connection',\n 'content-length',\n 'expect',\n 'range',\n 'content-type',\n 'user-agent',\n 'cookie',\n ]);\n\n function escapeString(str: string): string {\n return '\"' +\n str.replace(/[`\\$\"]/g, '`$&').replace(/[^\\x20-\\x7E]/g, char => '$([char]' + char.charCodeAt(0) + ')') + '\"';\n }\n\n // Generate a WebRequestSession object with the UserAgent and Cookie header values.\n // This is used to pass the user-agent and cookie headers to Invoke-WebRequest because the Invoke-WebRequest\n // command does not allow setting these headers through the -Headers parameter. See docs at:\n // https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.1#parameters\n function generatePowerShellSession(request: SDK.NetworkRequest.NetworkRequest): string|null {\n const requestHeaders = request.requestHeaders();\n const props = [];\n\n const userAgentHeader = requestHeaders.find(({name}) => name.toLowerCase() === 'user-agent');\n if (userAgentHeader) {\n props.push(`$session.UserAgent = ${escapeString(userAgentHeader.value)}`);\n }\n\n for (const cookie of request.includedRequestCookies()) {\n const name = escapeString(cookie.name());\n const value = escapeString(cookie.value());\n const domain = escapeString(cookie.domain());\n props.push(`$session.Cookies.Add((New-Object System.Net.Cookie(${name}, ${value}, \"/\", ${domain})))`);\n }\n\n if (props.length) {\n return '$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession\\n' + props.join('\\n') + '\\n';\n }\n\n return null;\n }\n\n command.push('-Uri ' + escapeString(request.url()));\n\n if (request.requestMethod !== 'GET') {\n command.push('-Method ' + escapeString(request.requestMethod));\n }\n\n const session = generatePowerShellSession(request);\n if (session) {\n command.push('-WebSession $session');\n }\n\n const requestHeaders = request.requestHeaders();\n const headerNameValuePairs = [];\n for (const header of requestHeaders) {\n const name = header.name.replace(/^:/, ''); // Translate h2 headers to HTTP headers.\n if (ignoredHeaders.has(name.toLowerCase())) {\n continue;\n }\n headerNameValuePairs.push(escapeString(name) + '=' + escapeString(header.value));\n }\n if (headerNameValuePairs.length) {\n command.push('-Headers @{\\n' + headerNameValuePairs.join('\\n ') + '\\n}');\n }\n\n const contentTypeHeader = requestHeaders.find(({name}) => name.toLowerCase() === 'content-type');\n if (contentTypeHeader) {\n command.push('-ContentType ' + escapeString(contentTypeHeader.value));\n }\n\n const formData = await request.requestFormData();\n if (formData) {\n const body = escapeString(formData);\n if (/[^\\x20-\\x7E]/.test(formData)) {\n command.push('-Body ([System.Text.Encoding]::UTF8.GetBytes(' + body + '))');\n } else {\n command.push('-Body ' + body);\n }\n }\n\n // The -UseBasicParsing parameter prevents Invoke-WebRequest from using the IE engine for parsing. Basic\n // parsing is the default behavior in PowerShell 6.0.0+ and the parameter is included here for backwards\n // compatibility only.\n const prelude = session || '';\n return prelude + 'Invoke-WebRequest -UseBasicParsing ' + command.join(command.length >= 3 ? ' `\\n' : ' ');\n }\n\n private async generateAllPowerShellCommand(requests: SDK.NetworkRequest.NetworkRequest[]): Promise {\n const nonBlobRequests = this.filterOutBlobRequests(requests);\n const commands = await Promise.all(nonBlobRequests.map(request => this.generatePowerShellCommand(request)));\n return commands.join(';\\r\\n');\n }\n\n static getDCLEventColor(): string {\n return '--sys-color-token-attribute-value';\n }\n\n static getLoadEventColor(): string {\n return '--sys-color-token-property-special';\n }\n}\n\nexport function computeStackTraceText(stackTrace: Protocol.Runtime.StackTrace): string {\n let stackTraceText = '';\n for (const frame of stackTrace.callFrames) {\n const functionName = UI.UIUtils.beautifyFunctionName(frame.functionName);\n stackTraceText += `${functionName} @ ${frame.url}:${frame.lineNumber + 1}\\n`;\n }\n if (stackTrace.parent) {\n stackTraceText += computeStackTraceText(stackTrace.parent);\n }\n return stackTraceText;\n}\n\nconst filteredNetworkRequests = new WeakSet();\nconst networkRequestToNode = new WeakMap();\n\nexport function isRequestFilteredOut(request: NetworkRequestNode): boolean {\n return filteredNetworkRequests.has(request);\n}\n\nexport const HTTPSchemas = {\n 'http': true,\n 'https': true,\n 'ws': true,\n 'wss': true,\n};\n\nconst searchKeys: string[] = Object.values(NetworkForward.UIFilter.FilterType);\n\nexport interface GroupLookupInterface {\n groupNodeForRequest(request: SDK.NetworkRequest.NetworkRequest): NetworkGroupNode|null;\n reset(): void;\n}\n\nexport const overrideFilter = {\n yes: 'yes',\n no: 'no',\n content: 'content',\n headers: 'headers',\n};\n\nexport type Filter = (request: SDK.NetworkRequest.NetworkRequest) => boolean;\n\nexport class DropDownTypesUI extends Common.ObjectWrapper.ObjectWrapper implements\n UI.FilterBar.FilterUI {\n private readonly filterElement: HTMLDivElement;\n private readonly dropDownButton: UI.Toolbar.ToolbarButton;\n private readonly filterChanged: () => void;\n private displayedTypes: Set;\n private readonly setting: Common.Settings.Setting<{[key: string]: boolean}>;\n private readonly items: UI.FilterBar.Item[];\n private contextMenu?: UI.ContextMenu.ContextMenu;\n private selectedTypesCount: HTMLElement;\n private typesCountAdorner: Adorners.Adorner.Adorner;\n private hasChanged = false;\n\n constructor(\n items: UI.FilterBar.Item[], filterChangedCallback: () => void,\n setting: Common.Settings.Setting<{[key: string]: boolean}>) {\n super();\n this.items = items;\n this.filterChanged = filterChangedCallback;\n\n this.filterElement = document.createElement('div');\n\n this.typesCountAdorner = new Adorners.Adorner.Adorner();\n this.selectedTypesCount = document.createElement('span');\n this.typesCountAdorner.data = {\n name: 'countWrapper',\n content: this.selectedTypesCount,\n };\n this.typesCountAdorner.classList.add('active-filters-count');\n\n this.dropDownButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.requestTypesTooltip), this.typesCountAdorner);\n this.dropDownButton.setText(i18nString(UIStrings.requestTypes));\n this.filterElement.appendChild(this.dropDownButton.element);\n this.dropDownButton.turnIntoSelect();\n this.dropDownButton.element.classList.add('dropdown-filterbar');\n\n this.dropDownButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.showContextMenu.bind(this));\n UI.ARIAUtils.markAsMenuButton(this.dropDownButton.element);\n\n this.displayedTypes = new Set();\n\n this.setting = setting;\n setting.addChangeListener(this.settingChanged.bind(this));\n this.setting.addChangeListener(this.filterChanged.bind(this));\n this.settingChanged();\n }\n\n discard(): void {\n this.contextMenu?.discard();\n }\n\n emitUMA(): void {\n if (this.hasChanged) {\n Host.userMetrics.resourceTypeFilterNumberOfSelectedChanged(this.displayedTypes.size);\n for (const displayedType of this.displayedTypes) {\n Host.userMetrics.resourceTypeFilterItemSelected(displayedType);\n }\n }\n }\n\n showContextMenu(event: Common.EventTarget.EventTargetEvent): void {\n const mouseEvent = event.data;\n this.hasChanged = false;\n this.contextMenu = new UI.ContextMenu.ContextMenu(mouseEvent, {\n useSoftMenu: true,\n keepOpen: true,\n x: this.dropDownButton.element.getBoundingClientRect().left,\n y: this.dropDownButton.element.getBoundingClientRect().top +\n (this.dropDownButton.element as HTMLElement).offsetHeight,\n onSoftMenuClosed: this.emitUMA.bind(this),\n });\n\n this.addRequestType(this.contextMenu, DropDownTypesUI.ALL_TYPES, i18nString(UIStrings.allStrings));\n this.contextMenu.defaultSection().appendSeparator();\n\n for (const item of this.items) {\n this.addRequestType(this.contextMenu, item.name, item.name);\n }\n\n this.update();\n void this.contextMenu.show();\n }\n\n private addRequestType(contextMenu: UI.ContextMenu.ContextMenu, name: string, label: string): void {\n contextMenu.defaultSection().appendCheckboxItem(label, () => {\n this.setting.get()[name] = !this.setting.get()[name];\n this.toggleTypeFilter(name);\n }, this.setting.get()[name]);\n }\n\n private toggleTypeFilter(typeName: string): void {\n if (typeName !== DropDownTypesUI.ALL_TYPES) {\n this.displayedTypes.delete(DropDownTypesUI.ALL_TYPES);\n } else {\n this.displayedTypes = new Set();\n }\n\n if (this.displayedTypes.has(typeName)) {\n this.displayedTypes.delete(typeName);\n } else {\n this.displayedTypes.add(typeName);\n }\n\n if (this.displayedTypes.size === 0) {\n this.displayedTypes.add(DropDownTypesUI.ALL_TYPES);\n }\n\n // Settings do not support `Sets` so convert it back to the Map-like object.\n const updatedSetting = {} as {[key: string]: boolean};\n for (const type of this.displayedTypes) {\n updatedSetting[type] = true;\n }\n\n this.setting.set(updatedSetting);\n\n // For the feature of keeping the dropdown open while choosing its options:\n // this code provides the dinamic changes of the checkboxes' state in this dropdown\n const menuItems = this.contextMenu?.getItems() || [];\n for (const i of menuItems) {\n if (i.label) {\n this.contextMenu?.setChecked(i, this.displayedTypes.has(i.label));\n }\n }\n this.contextMenu?.setChecked(menuItems[0], this.displayedTypes.has('all'));\n }\n\n private settingChanged(): void {\n this.hasChanged = true;\n this.displayedTypes = new Set();\n\n for (const s in this.setting.get()) {\n this.displayedTypes.add(s);\n }\n this.update();\n }\n\n private update(): void {\n if (this.displayedTypes.size === 0 || this.displayedTypes.has(DropDownTypesUI.ALL_TYPES)) {\n this.displayedTypes = new Set();\n this.displayedTypes.add(DropDownTypesUI.ALL_TYPES);\n }\n this.updateSelectedTypesCount();\n this.updateLabel();\n this.updateTooltip();\n }\n\n updateSelectedTypesCount(): void {\n if (!this.displayedTypes.has(DropDownTypesUI.ALL_TYPES)) {\n this.selectedTypesCount.textContent = this.displayedTypes.size.toString();\n this.typesCountAdorner.classList.remove('hidden');\n } else {\n this.typesCountAdorner.classList.add('hidden');\n }\n }\n\n updateLabel(): void {\n if (this.displayedTypes.has(DropDownTypesUI.ALL_TYPES)) {\n this.dropDownButton.setText(i18nString(UIStrings.requestTypes));\n return;\n }\n\n let newLabel;\n if (this.displayedTypes.size === 1) {\n const type = this.displayedTypes.values().next().value;\n newLabel = Common.ResourceType.ResourceCategory.categoryByTitle(type)?.shortTitle() || '';\n } else {\n // show up to two last selected types\n const twoLastSelected = [...this.displayedTypes].slice(-2).reverse();\n const shortNames =\n twoLastSelected.map(type => Common.ResourceType.ResourceCategory.categoryByTitle(type)?.shortTitle() || '');\n const valuesToDisplay = {PH1: shortNames[0], PH2: shortNames[1]};\n newLabel = this.displayedTypes.size === 2 ? i18nString(UIStrings.twoTypesSelected, valuesToDisplay) :\n i18nString(UIStrings.overTwoTypesSelected, valuesToDisplay);\n }\n this.dropDownButton.setText(newLabel);\n }\n\n updateTooltip(): void {\n let tooltipText = i18nString(UIStrings.requestTypesTooltip);\n if (!this.displayedTypes.has(DropDownTypesUI.ALL_TYPES)) {\n // reverse the order to match the button label\n const selectedTypes = [...this.displayedTypes].reverse();\n const localized =\n selectedTypes.map(type => Common.ResourceType.ResourceCategory.categoryByTitle(type)?.title() || '')\n .join(', ');\n tooltipText = i18nString(UIStrings.showOnly, {PH1: localized});\n }\n this.dropDownButton.setTitle(tooltipText);\n }\n\n isActive(): boolean {\n return !this.displayedTypes.has(DropDownTypesUI.ALL_TYPES);\n }\n\n element(): HTMLDivElement {\n return this.filterElement;\n }\n\n reset(): void {\n this.toggleTypeFilter(DropDownTypesUI.ALL_TYPES);\n }\n\n accept(typeName: string): boolean {\n return this.displayedTypes.has(DropDownTypesUI.ALL_TYPES) || this.displayedTypes.has(typeName);\n }\n\n static readonly ALL_TYPES = 'all';\n}\n\nexport class MoreFiltersDropDownUI extends\n Common.ObjectWrapper.ObjectWrapper implements UI.FilterBar.FilterUI {\n private readonly filterElement: HTMLDivElement;\n private readonly dropDownButton: UI.Toolbar.ToolbarButton;\n private readonly filterChangedCallback: () => void;\n private networkHideDataURLSetting: Common.Settings.Setting;\n private networkHideChromeExtensionsSetting: Common.Settings.Setting;\n private networkShowBlockedCookiesOnlySetting: Common.Settings.Setting;\n private networkOnlyBlockedRequestsSetting: Common.Settings.Setting;\n private networkOnlyThirdPartySetting: Common.Settings.Setting;\n private contextMenu?: UI.ContextMenu.ContextMenu;\n private activeFiltersCount: HTMLElement;\n private activeFiltersCountAdorner: Adorners.Adorner.Adorner;\n private hasChanged = false;\n\n constructor(filterChangedCallback: () => void) {\n super();\n this.filterChangedCallback = filterChangedCallback;\n\n this.networkHideDataURLSetting = Common.Settings.Settings.instance().createSetting('networkHideDataURL', false);\n this.networkHideChromeExtensionsSetting =\n Common.Settings.Settings.instance().createSetting('networkHideChromeExtensions', false);\n this.networkShowBlockedCookiesOnlySetting =\n Common.Settings.Settings.instance().createSetting('networkShowBlockedCookiesOnlySetting', false);\n this.networkOnlyBlockedRequestsSetting =\n Common.Settings.Settings.instance().createSetting('networkOnlyBlockedRequests', false);\n this.networkOnlyThirdPartySetting =\n Common.Settings.Settings.instance().createSetting('networkOnlyThirdPartySetting', false);\n\n this.filterElement = document.createElement('div');\n this.filterElement.setAttribute('aria-label', 'Show only/hide requests dropdown');\n\n this.activeFiltersCountAdorner = new Adorners.Adorner.Adorner();\n this.activeFiltersCount = document.createElement('span');\n this.activeFiltersCountAdorner.data = {\n name: 'countWrapper',\n content: this.activeFiltersCount,\n };\n this.activeFiltersCountAdorner.classList.add('active-filters-count');\n this.updateActiveFiltersCount();\n\n this.dropDownButton = new UI.Toolbar.ToolbarButton(\n i18nString(UIStrings.showOnlyHideRequests), this.activeFiltersCountAdorner, i18nString(UIStrings.moreFilters));\n this.filterElement.appendChild(this.dropDownButton.element);\n this.dropDownButton.turnIntoSelect();\n this.dropDownButton.element.classList.add('dropdown-filterbar');\n this.dropDownButton.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click, this.showMoreFiltersContextMenu.bind(this));\n UI.ARIAUtils.markAsMenuButton(this.dropDownButton.element);\n this.updateTooltip();\n }\n\n emitUMA(): void {\n if (this.hasChanged) {\n const selectedFilters = this.selectedFilters();\n Host.userMetrics.networkPanelMoreFiltersNumberOfSelectedChanged(selectedFilters.length);\n for (const selectedFilter of selectedFilters) {\n Host.userMetrics.networkPanelMoreFiltersItemSelected(selectedFilter);\n }\n }\n }\n\n #onSettingChanged(): void {\n this.hasChanged = true;\n this.filterChangedCallback();\n }\n\n showMoreFiltersContextMenu(event: Common.EventTarget.EventTargetEvent): void {\n const mouseEvent = event.data;\n this.hasChanged = false;\n\n this.networkHideDataURLSetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.networkHideChromeExtensionsSetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.networkShowBlockedCookiesOnlySetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.networkOnlyBlockedRequestsSetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.networkOnlyThirdPartySetting.addChangeListener(this.#onSettingChanged.bind(this));\n this.contextMenu = new UI.ContextMenu.ContextMenu(mouseEvent, {\n useSoftMenu: true,\n keepOpen: true,\n x: this.dropDownButton.element.getBoundingClientRect().left,\n y: this.dropDownButton.element.getBoundingClientRect().top +\n (this.dropDownButton.element as HTMLElement).offsetHeight,\n onSoftMenuClosed: this.emitUMA.bind(this),\n });\n\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.hideDataUrls),\n () => this.networkHideDataURLSetting.set(!this.networkHideDataURLSetting.get()),\n this.networkHideDataURLSetting.get(), undefined, undefined, i18nString(UIStrings.hidesDataAndBlobUrls));\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.chromeExtensions),\n () => this.networkHideChromeExtensionsSetting.set(!this.networkHideChromeExtensionsSetting.get()),\n this.networkHideChromeExtensionsSetting.get(), undefined, undefined, i18nString(UIStrings.hideChromeExtension));\n this.contextMenu.defaultSection().appendSeparator();\n\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.hasBlockedCookies),\n () => this.networkShowBlockedCookiesOnlySetting.set(!this.networkShowBlockedCookiesOnlySetting.get()),\n this.networkShowBlockedCookiesOnlySetting.get(), undefined, undefined,\n i18nString(UIStrings.onlyShowRequestsWithBlockedCookies));\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.blockedRequests),\n () => this.networkOnlyBlockedRequestsSetting.set(!this.networkOnlyBlockedRequestsSetting.get()),\n this.networkOnlyBlockedRequestsSetting.get(), undefined, undefined,\n i18nString(UIStrings.onlyShowBlockedRequests));\n this.contextMenu.defaultSection().appendCheckboxItem(\n i18nString(UIStrings.thirdParty),\n () => this.networkOnlyThirdPartySetting.set(!this.networkOnlyThirdPartySetting.get()),\n this.networkOnlyThirdPartySetting.get(), undefined, undefined,\n i18nString(UIStrings.onlyShowThirdPartyRequests));\n\n void this.contextMenu.show();\n }\n\n selectedFilters(): string[] {\n const filters = [\n ...this.networkHideDataURLSetting.get() ? [i18nString(UIStrings.hideDataUrls)] : [],\n ...this.networkHideChromeExtensionsSetting.get() ? [i18nString(UIStrings.chromeExtensions)] : [],\n ...this.networkShowBlockedCookiesOnlySetting.get() ? [i18nString(UIStrings.hasBlockedCookies)] : [],\n ...this.networkOnlyBlockedRequestsSetting.get() ? [i18nString(UIStrings.blockedRequests)] : [],\n ...this.networkOnlyThirdPartySetting.get() ? [i18nString(UIStrings.thirdParty)] : [],\n ];\n return filters;\n }\n\n updateActiveFiltersCount(): void {\n const count = this.selectedFilters().length;\n this.activeFiltersCount.textContent = count.toString();\n count ? this.activeFiltersCountAdorner.classList.remove('hidden') :\n this.activeFiltersCountAdorner.classList.add('hidden');\n }\n\n updateTooltip(): void {\n if (this.selectedFilters().length) {\n this.dropDownButton.setTitle(this.selectedFilters().join(', '));\n } else {\n this.dropDownButton.setTitle(UIStrings.showOnlyHideRequests);\n }\n }\n\n discard(): void {\n if (this.contextMenu) {\n this.contextMenu.discard();\n }\n }\n\n isActive(): boolean {\n return true;\n }\n\n element(): HTMLDivElement {\n return this.filterElement;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/network/NetworkOverview.d.ts b/public/panels/network/NetworkOverview.d.ts index 160ef29ef..31d95eb50 100644 --- a/public/panels/network/NetworkOverview.d.ts +++ b/public/panels/network/NetworkOverview.d.ts @@ -30,5 +30,3 @@ export declare class NetworkOverview extends PerfUI.TimelineOverviewPane.Timelin export declare const RequestTimeRangeNameToColor: { [key: string]: string; }; -export declare const _bandHeight: number; -export declare const _padding: number; diff --git a/public/panels/network/NetworkOverview.js b/public/panels/network/NetworkOverview.js index 313c9d215..7a7564868 100644 --- a/public/panels/network/NetworkOverview.js +++ b/public/panels/network/NetworkOverview.js @@ -87,7 +87,7 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie const height = this.element.offsetHeight; this.calculator().setDisplayWidth(width); this.resetCanvas(); - const numBands = (((height - _padding - 1) / _bandHeight) - 1) | 0; + const numBands = (((height - PADDING - 1) / BAND_HEIGHT) - 1) | 0; this.numBands = (numBands > 0) ? numBands : 1; this.scheduleUpdate(); } @@ -122,7 +122,7 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie } const context = this.context(); const linesByType = new Map(); - const paddingTop = _padding; + const paddingTop = PADDING; function drawLines(type) { const lines = linesByType.get(type); if (!lines) { @@ -134,7 +134,7 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie context.lineWidth = BORDER_WIDTH; context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(RequestTimeRangeNameToColor[type]); for (let i = 0; i < n;) { - const y = lines[i++] * _bandHeight + paddingTop; + const y = lines[i++] * BAND_HEIGHT + paddingTop; const startTime = lines[i++]; let endTime = lines[i++]; if (endTime === Number.MAX_VALUE) { @@ -142,8 +142,8 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie } const startX = calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(startTime)); const endX = calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(endTime)) + 1; - context.fillRect(startX, y, endX - startX, _bandHeight); - context.strokeRect(startX, y, endX - startX, _bandHeight); + context.fillRect(startX, y, Math.max(endX - startX, MIN_BAND_WIDTH), BAND_HEIGHT); + context.strokeRect(startX, y, Math.max(endX - startX, MIN_BAND_WIDTH), BAND_HEIGHT); } } function addLine(type, y, start, end) { @@ -190,7 +190,7 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie const borderSize = 2; const request = this.highlightedRequest; const band = this.bandId(request.connectionId); - const y = ((band === -1) ? 0 : (band % this.numBands + 1)) * _bandHeight + paddingTop; + const y = ((band === -1) ? 0 : (band % this.numBands + 1)) * BAND_HEIGHT + paddingTop; const timeRanges = RequestTimingView.calculateRequestTimeRanges(request, this.calculator().minimumBoundary()); context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-tonal-container'); // The network overview works in seconds, but the calcululator deals in @@ -262,12 +262,10 @@ export const RequestTimeRangeNameToColor = { [RequestTimeRangeNames.Receiving]: '--network-overview-receiving', [RequestTimeRangeNames.Queueing]: '--network-overview-queueing', }; -// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration) -// eslint-disable-next-line @typescript-eslint/naming-convention -export const _bandHeight = 3; -// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration) -// eslint-disable-next-line @typescript-eslint/naming-convention -export const _padding = 5; +const BAND_HEIGHT = 3; +const PADDING = 5; +// Minimum rectangle width for very short requests. +const MIN_BAND_WIDTH = 10; // Border between bars in network overview panel for accessibility. const BORDER_WIDTH = 1; //# sourceMappingURL=NetworkOverview.js.map \ No newline at end of file diff --git a/public/panels/network/NetworkOverview.js.map b/public/panels/network/NetworkOverview.js.map index 359dabb50..74d649034 100644 --- a/public/panels/network/NetworkOverview.js.map +++ b/public/panels/network/NetworkOverview.js.map @@ -1 +1 @@ -{"version":3,"file":"NetworkOverview.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/NetworkOverview.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,8DAA8D,CAAC;AAC5F,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAE/E,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAC,qBAAqB,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ACtE,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,4BAA4B;IAC7D,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,8BAA8B;IACjE,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,6BAA6B;CACrC,CAAC;AAE7B,oEAAoE;AACpE,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAW,CAAC,CAAC;AAErC,oEAAoE;AACpE,gEAAgE;AAChE,MAAM,CAAC,MAAM,QAAQ,GAAW,CAAC,CAAC;AAElC,mEAAmE;AACnE,MAAM,YAAY,GAAG,CAAC,CAAC","sourcesContent":["// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as Coordinator from '../../ui/components/render_coordinator/render_coordinator.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {NetworkLogView} from './NetworkLogView.js';\nimport {NetworkTimeBoundary} from './NetworkTimeCalculator.js';\nimport {RequestTimeRangeNames, RequestTimingView} from './RequestTimingView.js';\n\nconst coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();\n\nexport class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOverviewBase {\n private selectedFilmStripTime: number;\n private numBands: number;\n private highlightedRequest: SDK.NetworkRequest.NetworkRequest|null;\n private loadEvents!: number[];\n private domContentLoadedEvents!: number[];\n private nextBand!: number;\n private bandMap!: Map;\n private requestsList!: SDK.NetworkRequest.NetworkRequest[];\n private requestsSet!: Set;\n private span!: number;\n private lastBoundary?: NetworkTimeBoundary|null;\n\n constructor() {\n super();\n this.selectedFilmStripTime = -1;\n this.element.classList.add('network-overview');\n\n this.numBands = 1;\n this.highlightedRequest = null;\n\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this,\n {scoped: true});\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.DOMContentLoaded,\n this.domContentLoadedEventFired, this, {scoped: true});\n\n this.reset();\n }\n\n setHighlightedRequest(request: SDK.NetworkRequest.NetworkRequest|null): void {\n this.highlightedRequest = request;\n this.scheduleUpdate();\n }\n\n selectFilmStripFrame(time: number): void {\n this.selectedFilmStripTime = time;\n this.scheduleUpdate();\n }\n\n clearFilmStripFrame(): void {\n this.selectedFilmStripTime = -1;\n this.scheduleUpdate();\n }\n\n private loadEventFired(\n event: Common.EventTarget\n .EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>): void {\n const time = event.data.loadTime;\n if (time) {\n this.loadEvents.push(time * 1000);\n }\n this.scheduleUpdate();\n }\n\n private domContentLoadedEventFired(event: Common.EventTarget.EventTargetEvent): void {\n const {data} = event;\n if (data) {\n this.domContentLoadedEvents.push(data * 1000);\n }\n this.scheduleUpdate();\n }\n\n private bandId(connectionId: string): number {\n if (!connectionId || connectionId === '0') {\n return -1;\n }\n if (this.bandMap.has(connectionId)) {\n return this.bandMap.get(connectionId) as number;\n }\n const result = this.nextBand++;\n this.bandMap.set(connectionId, result);\n return result;\n }\n\n updateRequest(request: SDK.NetworkRequest.NetworkRequest): void {\n if (!this.requestsSet.has(request)) {\n this.requestsSet.add(request);\n this.requestsList.push(request);\n }\n this.scheduleUpdate();\n }\n\n override wasShown(): void {\n this.onResize();\n }\n\n override calculator(): PerfUI.TimelineOverviewCalculator.TimelineOverviewCalculator {\n return super.calculator() as PerfUI.TimelineOverviewCalculator.TimelineOverviewCalculator;\n }\n\n override onResize(): void {\n const width = this.element.offsetWidth;\n const height = this.element.offsetHeight;\n this.calculator().setDisplayWidth(width);\n this.resetCanvas();\n const numBands = (((height - _padding - 1) / _bandHeight) - 1) | 0;\n this.numBands = (numBands > 0) ? numBands : 1;\n this.scheduleUpdate();\n }\n\n override reset(): void {\n this.span = 1;\n this.lastBoundary = null;\n this.nextBand = 0;\n this.bandMap = new Map();\n this.requestsList = [];\n this.requestsSet = new Set();\n this.loadEvents = [];\n this.domContentLoadedEvents = [];\n\n // Clear screen.\n this.resetCanvas();\n }\n\n scheduleUpdate(): void {\n if (!this.isShowing()) {\n return;\n }\n void coordinator.write('NetworkOverview.render', this.update.bind(this));\n }\n\n override update(): void {\n const calculator = this.calculator();\n\n const newBoundary = new NetworkTimeBoundary(calculator.minimumBoundary(), calculator.maximumBoundary());\n if (!this.lastBoundary || !newBoundary.equals(this.lastBoundary)) {\n const span = calculator.boundarySpan();\n while (this.span < span) {\n this.span *= 1.25;\n }\n\n calculator.setBounds(\n calculator.minimumBoundary(),\n TraceEngine.Types.Timing.MilliSeconds(calculator.minimumBoundary() + this.span));\n\n this.lastBoundary = new NetworkTimeBoundary(calculator.minimumBoundary(), calculator.maximumBoundary());\n }\n\n const context = this.context();\n const linesByType = new Map();\n const paddingTop = _padding;\n\n function drawLines(type: string): void {\n const lines = linesByType.get(type);\n if (!lines) {\n return;\n }\n const n = lines.length;\n context.beginPath();\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-opacity-80');\n context.lineWidth = BORDER_WIDTH;\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(RequestTimeRangeNameToColor[type]);\n for (let i = 0; i < n;) {\n const y = lines[i++] * _bandHeight + paddingTop;\n const startTime = lines[i++];\n let endTime: number = lines[i++];\n if (endTime === Number.MAX_VALUE) {\n endTime = calculator.maximumBoundary();\n }\n const startX = calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(startTime));\n const endX = calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(endTime)) + 1;\n context.fillRect(startX, y, endX - startX, _bandHeight);\n context.strokeRect(startX, y, endX - startX, _bandHeight);\n }\n }\n\n function addLine(type: string, y: number, start: number, end: number): void {\n let lines = linesByType.get(type);\n if (!lines) {\n lines = [];\n linesByType.set(type, lines);\n }\n lines.push(y, start, end);\n }\n\n const requests = this.requestsList;\n const n = requests.length;\n for (let i = 0; i < n; ++i) {\n const request = requests[i];\n const band = this.bandId(request.connectionId);\n const y = (band === -1) ? 0 : (band % this.numBands + 1);\n const timeRanges = RequestTimingView.calculateRequestTimeRanges(request, this.calculator().minimumBoundary());\n for (let j = 0; j < timeRanges.length; ++j) {\n const type = timeRanges[j].name;\n if (band !== -1 || type === RequestTimeRangeNames.Total) {\n addLine(type, y, timeRanges[j].start * 1000, timeRanges[j].end * 1000);\n }\n }\n }\n\n context.clearRect(0, 0, this.width(), this.height());\n context.save();\n context.scale(window.devicePixelRatio, window.devicePixelRatio);\n context.lineWidth = 2;\n drawLines(RequestTimeRangeNames.Total);\n drawLines(RequestTimeRangeNames.Blocking);\n drawLines(RequestTimeRangeNames.Connecting);\n drawLines(RequestTimeRangeNames.ServiceWorker);\n drawLines(RequestTimeRangeNames.ServiceWorkerPreparation);\n drawLines(RequestTimeRangeNames.ServiceWorkerRespondWith);\n drawLines(RequestTimeRangeNames.Push);\n drawLines(RequestTimeRangeNames.Proxy);\n drawLines(RequestTimeRangeNames.DNS);\n drawLines(RequestTimeRangeNames.SSL);\n drawLines(RequestTimeRangeNames.Sending);\n drawLines(RequestTimeRangeNames.Waiting);\n drawLines(RequestTimeRangeNames.Receiving);\n\n if (this.highlightedRequest) {\n const size = 5;\n const borderSize = 2;\n\n const request = this.highlightedRequest;\n const band = this.bandId(request.connectionId);\n const y = ((band === -1) ? 0 : (band % this.numBands + 1)) * _bandHeight + paddingTop;\n const timeRanges = RequestTimingView.calculateRequestTimeRanges(request, this.calculator().minimumBoundary());\n\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-tonal-container');\n\n // The network overview works in seconds, but the calcululator deals in\n // milliseconds, hence the multiplication by 1000.\n const start = TraceEngine.Types.Timing.MilliSeconds(timeRanges[0].start * 1000);\n const end = TraceEngine.Types.Timing.MilliSeconds(timeRanges[0].end * 1000);\n context.fillRect(\n calculator.computePosition(start) - borderSize, y - size / 2 - borderSize,\n calculator.computePosition(end) - calculator.computePosition(start) + 1 + 2 * borderSize, size * borderSize);\n\n for (let j = 0; j < timeRanges.length; ++j) {\n const type = timeRanges[j].name;\n if (band !== -1 || type === RequestTimeRangeNames.Total) {\n context.beginPath();\n context.strokeStyle =\n ThemeSupport.ThemeSupport.instance().getComputedValue(RequestTimeRangeNameToColor[type]);\n context.lineWidth = size;\n\n const start = TraceEngine.Types.Timing.MilliSeconds(timeRanges[j].start * 1000);\n const end = TraceEngine.Types.Timing.MilliSeconds(timeRanges[j].end * 1000);\n context.moveTo(calculator.computePosition(start) - 0, y);\n context.lineTo(calculator.computePosition(end) + 1, y);\n context.stroke();\n }\n }\n }\n\n const height = this.element.offsetHeight;\n context.lineWidth = 1;\n context.beginPath();\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(NetworkLogView.getDCLEventColor());\n for (let i = this.domContentLoadedEvents.length - 1; i >= 0; --i) {\n const position =\n calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(this.domContentLoadedEvents[i]));\n const x = Math.round(position) + 0.5;\n context.moveTo(x, 0);\n context.lineTo(x, height);\n }\n context.stroke();\n\n context.beginPath();\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(NetworkLogView.getLoadEventColor());\n for (let i = this.loadEvents.length - 1; i >= 0; --i) {\n const position = calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(this.loadEvents[i]));\n const x = Math.round(position) + 0.5;\n context.moveTo(x, 0);\n context.lineTo(x, height);\n }\n context.stroke();\n\n if (this.selectedFilmStripTime !== -1) {\n context.lineWidth = 2;\n context.beginPath();\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--network-frame-divider-color');\n const timeInMilliseconds = TraceEngine.Types.Timing.MilliSeconds(this.selectedFilmStripTime);\n const x = Math.round(calculator.computePosition(timeInMilliseconds));\n context.moveTo(x, 0);\n context.lineTo(x, height);\n context.stroke();\n }\n context.restore();\n }\n}\n\nexport const RequestTimeRangeNameToColor = {\n [RequestTimeRangeNames.Total]: '--network-overview-total',\n [RequestTimeRangeNames.Blocking]: '--network-overview-blocking',\n [RequestTimeRangeNames.Connecting]: '--network-overview-connecting',\n [RequestTimeRangeNames.ServiceWorker]: '--network-overview-service-worker',\n [RequestTimeRangeNames.ServiceWorkerPreparation]: '--network-overview-service-worker',\n [RequestTimeRangeNames.ServiceWorkerRespondWith]: '--network-overview-service-worker-respond-with',\n [RequestTimeRangeNames.Push]: '--network-overview-push',\n [RequestTimeRangeNames.Proxy]: '--override-network-overview-proxy',\n [RequestTimeRangeNames.DNS]: '--network-overview-dns',\n [RequestTimeRangeNames.SSL]: '--network-overview-ssl',\n [RequestTimeRangeNames.Sending]: '--override-network-overview-sending',\n [RequestTimeRangeNames.Waiting]: '--network-overview-waiting',\n [RequestTimeRangeNames.Receiving]: '--network-overview-receiving',\n [RequestTimeRangeNames.Queueing]: '--network-overview-queueing',\n} as {[key: string]: string};\n\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const _bandHeight: number = 3;\n\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const _padding: number = 5;\n\n// Border between bars in network overview panel for accessibility.\nconst BORDER_WIDTH = 1;\n"]} \ No newline at end of file +{"version":3,"file":"NetworkOverview.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/NetworkOverview.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAA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ACrF,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,EAAE,gDAAgD;IAClG,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,yBAAyB;IACvD,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,mCAAmC;IAClE,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,wBAAwB;IACrD,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,wBAAwB;IACrD,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,qCAAqC;IACtE,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,4BAA4B;IAC7D,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,8BAA8B;IACjE,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,6BAA6B;CACrC,CAAC;AAE7B,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,OAAO,GAAG,CAAC,CAAC;AAElB,mDAAmD;AACnD,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,mEAAmE;AACnE,MAAM,YAAY,GAAG,CAAC,CAAC","sourcesContent":["// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as Coordinator from '../../ui/components/render_coordinator/render_coordinator.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {NetworkLogView} from './NetworkLogView.js';\nimport {NetworkTimeBoundary} from './NetworkTimeCalculator.js';\nimport {RequestTimeRangeNames, RequestTimingView} from './RequestTimingView.js';\n\nconst coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();\n\nexport class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOverviewBase {\n private selectedFilmStripTime: number;\n private numBands: number;\n private highlightedRequest: SDK.NetworkRequest.NetworkRequest|null;\n private loadEvents!: number[];\n private domContentLoadedEvents!: number[];\n private nextBand!: number;\n private bandMap!: Map;\n private requestsList!: SDK.NetworkRequest.NetworkRequest[];\n private requestsSet!: Set;\n private span!: number;\n private lastBoundary?: NetworkTimeBoundary|null;\n\n constructor() {\n super();\n this.selectedFilmStripTime = -1;\n this.element.classList.add('network-overview');\n\n this.numBands = 1;\n this.highlightedRequest = null;\n\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this,\n {scoped: true});\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.DOMContentLoaded,\n this.domContentLoadedEventFired, this, {scoped: true});\n\n this.reset();\n }\n\n setHighlightedRequest(request: SDK.NetworkRequest.NetworkRequest|null): void {\n this.highlightedRequest = request;\n this.scheduleUpdate();\n }\n\n selectFilmStripFrame(time: number): void {\n this.selectedFilmStripTime = time;\n this.scheduleUpdate();\n }\n\n clearFilmStripFrame(): void {\n this.selectedFilmStripTime = -1;\n this.scheduleUpdate();\n }\n\n private loadEventFired(\n event: Common.EventTarget\n .EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>): void {\n const time = event.data.loadTime;\n if (time) {\n this.loadEvents.push(time * 1000);\n }\n this.scheduleUpdate();\n }\n\n private domContentLoadedEventFired(event: Common.EventTarget.EventTargetEvent): void {\n const {data} = event;\n if (data) {\n this.domContentLoadedEvents.push(data * 1000);\n }\n this.scheduleUpdate();\n }\n\n private bandId(connectionId: string): number {\n if (!connectionId || connectionId === '0') {\n return -1;\n }\n if (this.bandMap.has(connectionId)) {\n return this.bandMap.get(connectionId) as number;\n }\n const result = this.nextBand++;\n this.bandMap.set(connectionId, result);\n return result;\n }\n\n updateRequest(request: SDK.NetworkRequest.NetworkRequest): void {\n if (!this.requestsSet.has(request)) {\n this.requestsSet.add(request);\n this.requestsList.push(request);\n }\n this.scheduleUpdate();\n }\n\n override wasShown(): void {\n this.onResize();\n }\n\n override calculator(): PerfUI.TimelineOverviewCalculator.TimelineOverviewCalculator {\n return super.calculator() as PerfUI.TimelineOverviewCalculator.TimelineOverviewCalculator;\n }\n\n override onResize(): void {\n const width = this.element.offsetWidth;\n const height = this.element.offsetHeight;\n this.calculator().setDisplayWidth(width);\n this.resetCanvas();\n const numBands = (((height - PADDING - 1) / BAND_HEIGHT) - 1) | 0;\n this.numBands = (numBands > 0) ? numBands : 1;\n this.scheduleUpdate();\n }\n\n override reset(): void {\n this.span = 1;\n this.lastBoundary = null;\n this.nextBand = 0;\n this.bandMap = new Map();\n this.requestsList = [];\n this.requestsSet = new Set();\n this.loadEvents = [];\n this.domContentLoadedEvents = [];\n\n // Clear screen.\n this.resetCanvas();\n }\n\n scheduleUpdate(): void {\n if (!this.isShowing()) {\n return;\n }\n void coordinator.write('NetworkOverview.render', this.update.bind(this));\n }\n\n override update(): void {\n const calculator = this.calculator();\n\n const newBoundary = new NetworkTimeBoundary(calculator.minimumBoundary(), calculator.maximumBoundary());\n if (!this.lastBoundary || !newBoundary.equals(this.lastBoundary)) {\n const span = calculator.boundarySpan();\n while (this.span < span) {\n this.span *= 1.25;\n }\n\n calculator.setBounds(\n calculator.minimumBoundary(),\n TraceEngine.Types.Timing.MilliSeconds(calculator.minimumBoundary() + this.span));\n\n this.lastBoundary = new NetworkTimeBoundary(calculator.minimumBoundary(), calculator.maximumBoundary());\n }\n\n const context = this.context();\n const linesByType = new Map();\n const paddingTop = PADDING;\n\n function drawLines(type: string): void {\n const lines = linesByType.get(type);\n if (!lines) {\n return;\n }\n const n = lines.length;\n context.beginPath();\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-opacity-80');\n context.lineWidth = BORDER_WIDTH;\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(RequestTimeRangeNameToColor[type]);\n for (let i = 0; i < n;) {\n const y = lines[i++] * BAND_HEIGHT + paddingTop;\n const startTime = lines[i++];\n let endTime: number = lines[i++];\n if (endTime === Number.MAX_VALUE) {\n endTime = calculator.maximumBoundary();\n }\n const startX = calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(startTime));\n const endX = calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(endTime)) + 1;\n context.fillRect(startX, y, Math.max(endX - startX, MIN_BAND_WIDTH), BAND_HEIGHT);\n context.strokeRect(startX, y, Math.max(endX - startX, MIN_BAND_WIDTH), BAND_HEIGHT);\n }\n }\n\n function addLine(type: string, y: number, start: number, end: number): void {\n let lines = linesByType.get(type);\n if (!lines) {\n lines = [];\n linesByType.set(type, lines);\n }\n lines.push(y, start, end);\n }\n\n const requests = this.requestsList;\n const n = requests.length;\n for (let i = 0; i < n; ++i) {\n const request = requests[i];\n const band = this.bandId(request.connectionId);\n const y = (band === -1) ? 0 : (band % this.numBands + 1);\n const timeRanges = RequestTimingView.calculateRequestTimeRanges(request, this.calculator().minimumBoundary());\n for (let j = 0; j < timeRanges.length; ++j) {\n const type = timeRanges[j].name;\n if (band !== -1 || type === RequestTimeRangeNames.Total) {\n addLine(type, y, timeRanges[j].start * 1000, timeRanges[j].end * 1000);\n }\n }\n }\n\n context.clearRect(0, 0, this.width(), this.height());\n context.save();\n context.scale(window.devicePixelRatio, window.devicePixelRatio);\n context.lineWidth = 2;\n drawLines(RequestTimeRangeNames.Total);\n drawLines(RequestTimeRangeNames.Blocking);\n drawLines(RequestTimeRangeNames.Connecting);\n drawLines(RequestTimeRangeNames.ServiceWorker);\n drawLines(RequestTimeRangeNames.ServiceWorkerPreparation);\n drawLines(RequestTimeRangeNames.ServiceWorkerRespondWith);\n drawLines(RequestTimeRangeNames.Push);\n drawLines(RequestTimeRangeNames.Proxy);\n drawLines(RequestTimeRangeNames.DNS);\n drawLines(RequestTimeRangeNames.SSL);\n drawLines(RequestTimeRangeNames.Sending);\n drawLines(RequestTimeRangeNames.Waiting);\n drawLines(RequestTimeRangeNames.Receiving);\n\n if (this.highlightedRequest) {\n const size = 5;\n const borderSize = 2;\n\n const request = this.highlightedRequest;\n const band = this.bandId(request.connectionId);\n const y = ((band === -1) ? 0 : (band % this.numBands + 1)) * BAND_HEIGHT + paddingTop;\n const timeRanges = RequestTimingView.calculateRequestTimeRanges(request, this.calculator().minimumBoundary());\n\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-tonal-container');\n\n // The network overview works in seconds, but the calcululator deals in\n // milliseconds, hence the multiplication by 1000.\n const start = TraceEngine.Types.Timing.MilliSeconds(timeRanges[0].start * 1000);\n const end = TraceEngine.Types.Timing.MilliSeconds(timeRanges[0].end * 1000);\n context.fillRect(\n calculator.computePosition(start) - borderSize, y - size / 2 - borderSize,\n calculator.computePosition(end) - calculator.computePosition(start) + 1 + 2 * borderSize, size * borderSize);\n\n for (let j = 0; j < timeRanges.length; ++j) {\n const type = timeRanges[j].name;\n if (band !== -1 || type === RequestTimeRangeNames.Total) {\n context.beginPath();\n context.strokeStyle =\n ThemeSupport.ThemeSupport.instance().getComputedValue(RequestTimeRangeNameToColor[type]);\n context.lineWidth = size;\n\n const start = TraceEngine.Types.Timing.MilliSeconds(timeRanges[j].start * 1000);\n const end = TraceEngine.Types.Timing.MilliSeconds(timeRanges[j].end * 1000);\n context.moveTo(calculator.computePosition(start) - 0, y);\n context.lineTo(calculator.computePosition(end) + 1, y);\n context.stroke();\n }\n }\n }\n\n const height = this.element.offsetHeight;\n context.lineWidth = 1;\n context.beginPath();\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(NetworkLogView.getDCLEventColor());\n for (let i = this.domContentLoadedEvents.length - 1; i >= 0; --i) {\n const position =\n calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(this.domContentLoadedEvents[i]));\n const x = Math.round(position) + 0.5;\n context.moveTo(x, 0);\n context.lineTo(x, height);\n }\n context.stroke();\n\n context.beginPath();\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(NetworkLogView.getLoadEventColor());\n for (let i = this.loadEvents.length - 1; i >= 0; --i) {\n const position = calculator.computePosition(TraceEngine.Types.Timing.MilliSeconds(this.loadEvents[i]));\n const x = Math.round(position) + 0.5;\n context.moveTo(x, 0);\n context.lineTo(x, height);\n }\n context.stroke();\n\n if (this.selectedFilmStripTime !== -1) {\n context.lineWidth = 2;\n context.beginPath();\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--network-frame-divider-color');\n const timeInMilliseconds = TraceEngine.Types.Timing.MilliSeconds(this.selectedFilmStripTime);\n const x = Math.round(calculator.computePosition(timeInMilliseconds));\n context.moveTo(x, 0);\n context.lineTo(x, height);\n context.stroke();\n }\n context.restore();\n }\n}\n\nexport const RequestTimeRangeNameToColor = {\n [RequestTimeRangeNames.Total]: '--network-overview-total',\n [RequestTimeRangeNames.Blocking]: '--network-overview-blocking',\n [RequestTimeRangeNames.Connecting]: '--network-overview-connecting',\n [RequestTimeRangeNames.ServiceWorker]: '--network-overview-service-worker',\n [RequestTimeRangeNames.ServiceWorkerPreparation]: '--network-overview-service-worker',\n [RequestTimeRangeNames.ServiceWorkerRespondWith]: '--network-overview-service-worker-respond-with',\n [RequestTimeRangeNames.Push]: '--network-overview-push',\n [RequestTimeRangeNames.Proxy]: '--override-network-overview-proxy',\n [RequestTimeRangeNames.DNS]: '--network-overview-dns',\n [RequestTimeRangeNames.SSL]: '--network-overview-ssl',\n [RequestTimeRangeNames.Sending]: '--override-network-overview-sending',\n [RequestTimeRangeNames.Waiting]: '--network-overview-waiting',\n [RequestTimeRangeNames.Receiving]: '--network-overview-receiving',\n [RequestTimeRangeNames.Queueing]: '--network-overview-queueing',\n} as {[key: string]: string};\n\nconst BAND_HEIGHT = 3;\nconst PADDING = 5;\n\n// Minimum rectangle width for very short requests.\nconst MIN_BAND_WIDTH = 10;\n\n// Border between bars in network overview panel for accessibility.\nconst BORDER_WIDTH = 1;\n"]} \ No newline at end of file diff --git a/public/panels/network/NetworkPanel.js b/public/panels/network/NetworkPanel.js index 76b4b8d89..39b3432cf 100644 --- a/public/panels/network/NetworkPanel.js +++ b/public/panels/network/NetworkPanel.js @@ -44,7 +44,6 @@ import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as MobileThrottling from '../mobile_throttling/mobile_throttling.js'; import * as Search from '../search/search.js'; -import { BlockedURLsPane } from './BlockedURLsPane.js'; import { Events } from './NetworkDataGridNode.js'; import { NetworkItemView } from './NetworkItemView.js'; import { NetworkLogView } from './NetworkLogView.js'; @@ -215,7 +214,7 @@ export class NetworkPanel extends UI.Panel.Panel { this.filmStripPlaceholderElement = panel.contentElement.createChild('div', 'network-film-strip-placeholder'); // Create top overview component. this.overviewPane = new PerfUI.TimelineOverviewPane.TimelineOverviewPane('network'); - this.overviewPane.addEventListener(PerfUI.TimelineOverviewPane.Events.WindowChanged, this.onWindowChanged.bind(this)); + this.overviewPane.addEventListener(PerfUI.TimelineOverviewPane.Events.OverviewPaneWindowChanged, this.onWindowChanged.bind(this)); this.overviewPane.element.id = 'network-overview-panel'; this.networkOverview = new NetworkOverview(); this.overviewPane.setOverviewControls([this.networkOverview]); @@ -422,7 +421,6 @@ export class NetworkPanel extends UI.Panel.Panel { } onNetworkLogReset(event) { const { clearIfPreserved } = event.data; - BlockedURLsPane.reset(); if (!this.preserveLogSetting.get() || clearIfPreserved) { this.calculator.reset(); this.overviewPane.reset(); @@ -645,7 +643,6 @@ export class NetworkPanel extends UI.Panel.Panel { // FIXME: Unify all time units across the frontend! this.overviewPane.setBounds(TraceEngine.Types.Timing.MilliSeconds(this.calculator.minimumBoundary() * 1000), TraceEngine.Types.Timing.MilliSeconds(this.calculator.maximumBoundary() * 1000)); this.networkOverview.updateRequest(request); - this.overviewPane.scheduleUpdate(); } resolveLocation(locationName) { if (locationName === 'network-sidebar') { diff --git a/public/panels/network/NetworkPanel.js.map b/public/panels/network/NetworkPanel.js.map index 4a893eaf7..d381e184f 100644 --- a/public/panels/network/NetworkPanel.js.map +++ b/public/panels/network/NetworkPanel.js.map @@ -1 +1 @@ -{"version":3,"file":"NetworkPanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/NetworkPanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,IAAI,MAAM,2BAA2B,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AAEjE,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,MAAM,EAA6B,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,EA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OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAa,EAAE,iBAA2B;QAChE,MAAM,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAC;QACnF,MAAM,UAAU,GAAG,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAChD,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACrD,OAAO,UAAU,CAAC;IACpB,CAAC;IAEQ,WAAW;QAClB,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2008, 2009 Anthony Ricaud \n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Logs from '../../models/logs/logs.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport type * as NetworkForward from '../../panels/network/forward/forward.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';\nimport * as Search from '../search/search.js';\n\nimport {BlockedURLsPane} from './BlockedURLsPane.js';\nimport {Events, type RequestActivatedEvent} from './NetworkDataGridNode.js';\nimport {NetworkItemView} from './NetworkItemView.js';\nimport {NetworkLogView} from './NetworkLogView.js';\nimport {NetworkOverview} from './NetworkOverview.js';\nimport networkPanelStyles from './networkPanel.css.js';\nimport {NetworkSearchScope} from './NetworkSearchScope.js';\nimport {type NetworkTimeCalculator, NetworkTransferTimeCalculator} from './NetworkTimeCalculator.js';\n\nconst UIStrings = {\n /**\n *@description Text to close something\n */\n close: 'Close',\n /**\n *@description Title of a search bar or tool\n */\n search: 'Search',\n /**\n *@description Tooltip text that appears on the setting to preserve log when hovering over the item\n */\n doNotClearLogOnPageReload: 'Do not clear log on page reload / navigation',\n /**\n *@description Text to preserve the log after refreshing\n */\n preserveLog: 'Preserve log',\n /**\n *@description Text to disable cache while DevTools is open\n */\n disableCacheWhileDevtoolsIsOpen: 'Disable cache (while DevTools is open)',\n /**\n *@description Text in Network Config View of the Network panel\n */\n disableCache: 'Disable cache',\n /**\n *@description Tooltip text that appears when hovering over the largeicon settings gear in show settings pane setting in network panel of the network panel\n */\n networkSettings: 'Network settings',\n /**\n *@description Tooltip for expanding network request row setting\n */\n showMoreInformationInRequestRows: 'Show more information in request rows',\n /**\n *@description Text in Network Panel of the Network panel\n */\n useLargeRequestRows: 'Big request rows',\n /**\n *@description Tooltip text for network request overview setting\n */\n showOverviewOfNetworkRequests: 'Show overview of network requests',\n /**\n *@description Text in Network Panel of the Network panel\n */\n showOverview: 'Overview',\n /**\n *@description Tooltip for group by frame network setting\n */\n groupRequestsByTopLevelRequest: 'Group requests by top level request frame',\n /**\n *@description Text in Network Panel of the Network panel\n */\n groupByFrame: 'Group by frame',\n /**\n *@description Tooltip for capture screenshot network setting\n */\n captureScreenshotsWhenLoadingA: 'Capture screenshots when loading a page',\n /**\n *@description Text to take screenshots\n */\n captureScreenshots: 'Screenshots',\n /**\n * @description Tooltip text that appears when hovering over the largeicon load button in the\n * Network Panel. This action prompts the user to select a HAR file to upload to DevTools.\n */\n importHarFile: 'Import `HAR` file...',\n /**\n * @description Tooltip text that appears when hovering over the largeicon download button in the\n * Network Panel. HAR is a file format (HTTP Archive) and should not be translated. This action\n * triggers the download of a HAR file.\n */\n exportHar: 'Export `HAR`...',\n /**\n *@description Text for throttling the network\n */\n throttling: 'Throttling',\n /**\n *@description Text in Network Panel of the Network panel\n *@example {Ctrl + R} PH1\n */\n hitSToReloadAndCaptureFilmstrip: 'Hit {PH1} to reload and capture filmstrip.',\n /**\n *@description A context menu item in the Network Panel of the Network panel\n */\n revealInNetworkPanel: 'Reveal in Network panel',\n /**\n *@description Text in Network Panel of the Network panel\n */\n recordingFrames: 'Recording frames...',\n /**\n *@description Text in Network Panel of the Network panel\n */\n fetchingFrames: 'Fetching frames...',\n /**\n * @description Text of a button in the Network panel's toolbar that open Network Conditions panel in the drawer.\n */\n moreNetworkConditions: 'More network conditions…',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/NetworkPanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet networkPanelInstance: NetworkPanel;\n\nexport class NetworkPanel extends UI.Panel.Panel implements\n UI.ContextMenu\n .Provider,\n UI.View.ViewLocationResolver {\n private readonly networkLogShowOverviewSetting: Common.Settings.Setting;\n private readonly networkLogLargeRowsSetting: Common.Settings.Setting;\n private readonly networkRecordFilmStripSetting: Common.Settings.Setting;\n private readonly toggleRecordAction: UI.ActionRegistration.Action;\n private pendingStopTimer!: number|undefined;\n networkItemView: NetworkItemView|null;\n private filmStripView: PerfUI.FilmStripView.FilmStripView|null;\n private filmStripRecorder: FilmStripRecorder|null;\n private currentRequest: SDK.NetworkRequest.NetworkRequest|null;\n private readonly panelToolbar: UI.Toolbar.Toolbar;\n private readonly rightToolbar: UI.Toolbar.Toolbar;\n private readonly filterBar: UI.FilterBar.FilterBar;\n private readonly settingsPane: UI.Widget.HBox;\n private showSettingsPaneSetting: Common.Settings.Setting;\n private readonly filmStripPlaceholderElement: HTMLElement;\n private readonly overviewPane: PerfUI.TimelineOverviewPane.TimelineOverviewPane;\n private readonly networkOverview: NetworkOverview;\n private readonly overviewPlaceholderElement: HTMLElement;\n private readonly calculator: NetworkTransferTimeCalculator;\n private splitWidget: UI.SplitWidget.SplitWidget;\n private readonly sidebarLocation: UI.View.TabbedViewLocation;\n private readonly progressBarContainer: HTMLDivElement;\n networkLogView: NetworkLogView;\n private readonly fileSelectorElement: HTMLElement;\n private readonly detailsWidget: UI.Widget.VBox;\n private readonly closeButtonElement: HTMLDivElement;\n private preserveLogSetting: Common.Settings.Setting;\n recordLogSetting: Common.Settings.Setting;\n private readonly throttlingSelect: UI.Toolbar.ToolbarComboBox;\n private readonly displayScreenshotDelay: number;\n\n constructor(displayScreenshotDelay: number) {\n super('network');\n\n this.displayScreenshotDelay = displayScreenshotDelay;\n this.networkLogShowOverviewSetting =\n Common.Settings.Settings.instance().createSetting('networkLogShowOverview', true);\n this.networkLogLargeRowsSetting = Common.Settings.Settings.instance().createSetting('networkLogLargeRows', false);\n this.networkRecordFilmStripSetting =\n Common.Settings.Settings.instance().createSetting('networkRecordFilmStripSetting', false);\n this.toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction('network.toggle-recording');\n this.networkItemView = null;\n this.filmStripView = null;\n this.filmStripRecorder = null;\n this.currentRequest = null;\n\n const panel = new UI.Widget.VBox();\n\n const networkToolbarContainer = panel.contentElement.createChild('div', 'network-toolbar-container');\n this.panelToolbar = new UI.Toolbar.Toolbar('', networkToolbarContainer);\n this.panelToolbar.makeWrappable(true);\n this.rightToolbar = new UI.Toolbar.Toolbar('', networkToolbarContainer);\n\n this.filterBar = new UI.FilterBar.FilterBar('networkPanel', true);\n this.filterBar.show(panel.contentElement);\n this.filterBar.addEventListener(UI.FilterBar.FilterBarEvents.Changed, this.handleFilterChanged.bind(this));\n\n this.settingsPane = new UI.Widget.HBox();\n this.settingsPane.element.classList.add('network-settings-pane');\n this.settingsPane.show(panel.contentElement);\n this.showSettingsPaneSetting =\n Common.Settings.Settings.instance().createSetting('networkShowSettingsToolbar', false);\n this.showSettingsPaneSetting.addChangeListener(this.updateSettingsPaneVisibility.bind(this));\n this.updateSettingsPaneVisibility();\n\n this.filmStripPlaceholderElement = panel.contentElement.createChild('div', 'network-film-strip-placeholder');\n\n // Create top overview component.\n this.overviewPane = new PerfUI.TimelineOverviewPane.TimelineOverviewPane('network');\n this.overviewPane.addEventListener(\n PerfUI.TimelineOverviewPane.Events.WindowChanged, this.onWindowChanged.bind(this));\n this.overviewPane.element.id = 'network-overview-panel';\n this.networkOverview = new NetworkOverview();\n this.overviewPane.setOverviewControls([this.networkOverview]);\n this.overviewPlaceholderElement = panel.contentElement.createChild('div');\n\n this.calculator = new NetworkTransferTimeCalculator();\n\n this.splitWidget = new UI.SplitWidget.SplitWidget(true, false, 'networkPanelSplitViewState');\n this.splitWidget.hideMain();\n this.splitWidget.show(panel.contentElement);\n\n panel.setDefaultFocusedChild(this.filterBar);\n\n const initialSidebarWidth = 225;\n const splitWidget = new UI.SplitWidget.SplitWidget(true, false, 'networkPanelSidebarState', initialSidebarWidth);\n splitWidget.hideSidebar();\n splitWidget.enableShowModeSaving();\n splitWidget.show(this.element);\n this.sidebarLocation = UI.ViewManager.ViewManager.instance().createTabbedLocation(async () => {\n void UI.ViewManager.ViewManager.instance().showView('network');\n splitWidget.showBoth();\n }, 'network-sidebar', true);\n const tabbedPane = this.sidebarLocation.tabbedPane();\n tabbedPane.setMinimumSize(100, 25);\n tabbedPane.element.classList.add('network-tabbed-pane');\n tabbedPane.element.addEventListener('keydown', event => {\n if (event.key !== Platform.KeyboardUtilities.ESCAPE_KEY) {\n return;\n }\n splitWidget.hideSidebar();\n event.consume();\n });\n const closeSidebar = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.close), 'cross');\n closeSidebar.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => splitWidget.hideSidebar());\n tabbedPane.rightToolbar().appendToolbarItem(closeSidebar);\n splitWidget.setSidebarWidget(tabbedPane);\n splitWidget.setMainWidget(panel);\n splitWidget.setDefaultFocusedChild(panel);\n this.setDefaultFocusedChild(splitWidget);\n\n this.progressBarContainer = document.createElement('div');\n\n this.networkLogView =\n new NetworkLogView(this.filterBar, this.progressBarContainer, this.networkLogLargeRowsSetting);\n this.splitWidget.setSidebarWidget(this.networkLogView);\n this.fileSelectorElement =\n (UI.UIUtils.createFileSelectorElement(this.networkLogView.onLoadFromFile.bind(this.networkLogView)) as\n HTMLElement);\n panel.element.appendChild(this.fileSelectorElement);\n\n this.detailsWidget = new UI.Widget.VBox();\n this.detailsWidget.element.classList.add('network-details-view');\n this.splitWidget.setMainWidget(this.detailsWidget);\n\n this.closeButtonElement = document.createElement('div', {is: 'dt-close-button'});\n this.closeButtonElement.addEventListener('click', async () => {\n const action = UI.ActionRegistry.ActionRegistry.instance().getAction('network.hide-request-details');\n await action.execute();\n }, false);\n this.closeButtonElement.style.margin = '0 5px';\n\n this.networkLogShowOverviewSetting.addChangeListener(this.toggleShowOverview, this);\n this.networkLogLargeRowsSetting.addChangeListener(this.toggleLargerRequests, this);\n this.networkRecordFilmStripSetting.addChangeListener(this.toggleRecordFilmStrip, this);\n\n this.preserveLogSetting = Common.Settings.Settings.instance().moduleSetting('network_log.preserve-log');\n this.recordLogSetting = Common.Settings.Settings.instance().moduleSetting('network_log.record-log');\n this.recordLogSetting.addChangeListener(({data}) => this.toggleRecord(data));\n\n this.throttlingSelect = this.createThrottlingConditionsSelect();\n this.setupToolbarButtons(splitWidget);\n\n this.toggleRecord(this.recordLogSetting.get());\n this.toggleShowOverview();\n this.toggleLargerRequests();\n this.toggleRecordFilmStrip();\n this.updateUI();\n\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.WillReloadPage, this.willReloadPage, this,\n {scoped: true});\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load, this.load, this, {scoped: true});\n this.networkLogView.addEventListener(Events.RequestSelected, this.onRequestSelected, this);\n this.networkLogView.addEventListener(Events.RequestActivated, this.onRequestActivated, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestAdded, this.onUpdateRequest, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestUpdated, this.onUpdateRequest, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(Logs.NetworkLog.Events.Reset, this.onNetworkLogReset, this);\n }\n\n static instance(opts?: {\n forceNew: boolean,\n displayScreenshotDelay?: number,\n }): NetworkPanel {\n if (!networkPanelInstance || opts?.forceNew) {\n networkPanelInstance = new NetworkPanel(opts?.displayScreenshotDelay ?? 1000);\n }\n\n return networkPanelInstance;\n }\n\n static revealAndFilter(filters: {\n filterType: NetworkForward.UIFilter.FilterType|null,\n filterValue: string,\n }[]): Promise {\n const panel = NetworkPanel.instance();\n let filterString = '';\n for (const filter of filters) {\n if (filter.filterType) {\n filterString += `${filter.filterType}:${filter.filterValue} `;\n } else {\n filterString += `${filter.filterValue} `;\n }\n }\n panel.networkLogView.setTextFilterValue(filterString);\n return UI.ViewManager.ViewManager.instance().showView('network');\n }\n\n static async selectAndShowRequest(\n request: SDK.NetworkRequest.NetworkRequest, tab: NetworkForward.UIRequestLocation.UIRequestTabs,\n options?: NetworkForward.UIRequestLocation.FilterOptions): Promise {\n const panel = NetworkPanel.instance();\n await panel.selectAndActivateRequest(request, tab, options);\n }\n\n throttlingSelectForTest(): UI.Toolbar.ToolbarComboBox {\n return this.throttlingSelect;\n }\n\n private onWindowChanged(event: Common.EventTarget.EventTargetEvent):\n void {\n const startTime = Math.max(this.calculator.minimumBoundary(), event.data.startTime / 1000);\n const endTime = Math.min(this.calculator.maximumBoundary(), event.data.endTime / 1000);\n if (startTime === this.calculator.minimumBoundary() && endTime === this.calculator.maximumBoundary()) {\n // Reset the filters for NetworkLogView when the window is reset\n // to its boundaries. This clears the filters and allows the users\n // to see the incoming requests after they have updated the curtains\n // to be in the edges. (ex: by double clicking on the overview grid)\n this.networkLogView.setWindow(0, 0);\n } else {\n this.networkLogView.setWindow(startTime, endTime);\n }\n }\n\n private async searchToggleClick(): Promise {\n const action = UI.ActionRegistry.ActionRegistry.instance().getAction('network.search');\n await action.execute();\n }\n\n private setupToolbarButtons(splitWidget: UI.SplitWidget.SplitWidget): void {\n const searchToggle = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.search), 'search');\n function updateSidebarToggle(): void {\n const isSidebarShowing = splitWidget.showMode() !== UI.SplitWidget.ShowMode.OnlyMain;\n searchToggle.setToggled(isSidebarShowing);\n if (!isSidebarShowing) {\n (searchToggle.element as HTMLElement).focus();\n }\n }\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction));\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('network.clear'));\n this.panelToolbar.appendSeparator();\n\n this.panelToolbar.appendToolbarItem(this.filterBar.filterButton());\n updateSidebarToggle();\n splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, updateSidebarToggle);\n searchToggle.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n void this.searchToggleClick();\n });\n this.panelToolbar.appendToolbarItem(searchToggle);\n this.panelToolbar.appendSeparator();\n\n this.panelToolbar.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n this.preserveLogSetting, i18nString(UIStrings.doNotClearLogOnPageReload), i18nString(UIStrings.preserveLog)));\n\n this.panelToolbar.appendSeparator();\n const disableCacheCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n Common.Settings.Settings.instance().moduleSetting('cacheDisabled'),\n i18nString(UIStrings.disableCacheWhileDevtoolsIsOpen), i18nString(UIStrings.disableCache));\n this.panelToolbar.appendToolbarItem(disableCacheCheckbox);\n\n this.panelToolbar.appendToolbarItem(this.throttlingSelect);\n\n const networkConditionsIcon = new IconButton.Icon.Icon();\n networkConditionsIcon.data = {\n iconName: 'network-settings',\n color: 'var(--icon-default)',\n width: '20px',\n height: '20px',\n };\n const networkConditionsButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.moreNetworkConditions), networkConditionsIcon);\n networkConditionsButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n void UI.ViewManager.ViewManager.instance().showView('network.config');\n }, this);\n this.panelToolbar.appendToolbarItem(networkConditionsButton);\n\n this.rightToolbar.appendToolbarItem(new UI.Toolbar.ToolbarItem(this.progressBarContainer));\n this.rightToolbar.appendSeparator();\n this.rightToolbar.appendToolbarItem(new UI.Toolbar.ToolbarSettingToggle(\n this.showSettingsPaneSetting, 'gear', i18nString(UIStrings.networkSettings), 'gear-filled'));\n\n const settingsToolbarLeft = new UI.Toolbar.Toolbar('', this.settingsPane.element);\n settingsToolbarLeft.makeVertical();\n settingsToolbarLeft.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n this.networkLogLargeRowsSetting, i18nString(UIStrings.showMoreInformationInRequestRows),\n i18nString(UIStrings.useLargeRequestRows)));\n settingsToolbarLeft.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n this.networkLogShowOverviewSetting, i18nString(UIStrings.showOverviewOfNetworkRequests),\n i18nString(UIStrings.showOverview)));\n\n const settingsToolbarRight = new UI.Toolbar.Toolbar('', this.settingsPane.element);\n settingsToolbarRight.makeVertical();\n settingsToolbarRight.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n Common.Settings.Settings.instance().moduleSetting('network.group-by-frame'),\n i18nString(UIStrings.groupRequestsByTopLevelRequest), i18nString(UIStrings.groupByFrame)));\n settingsToolbarRight.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n this.networkRecordFilmStripSetting, i18nString(UIStrings.captureScreenshotsWhenLoadingA),\n i18nString(UIStrings.captureScreenshots)));\n\n this.panelToolbar.appendSeparator();\n const importHarButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.importHarFile), 'import');\n importHarButton.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click, () => this.fileSelectorElement.click(), this);\n this.panelToolbar.appendToolbarItem(importHarButton);\n const exportHarButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.exportHar), 'download');\n exportHarButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n void this.networkLogView.exportAll();\n }, this);\n this.panelToolbar.appendToolbarItem(exportHarButton);\n }\n\n private updateSettingsPaneVisibility(): void {\n this.settingsPane.element.classList.toggle('hidden', !this.showSettingsPaneSetting.get());\n }\n\n private createThrottlingConditionsSelect(): UI.Toolbar.ToolbarComboBox {\n const toolbarItem = new UI.Toolbar.ToolbarComboBox(null, i18nString(UIStrings.throttling));\n toolbarItem.setMaxWidth(160);\n MobileThrottling.ThrottlingManager.throttlingManager().decorateSelectWithNetworkThrottling(\n toolbarItem.selectElement());\n return toolbarItem;\n }\n\n toggleRecord(toggled: boolean): void {\n this.toggleRecordAction.setToggled(toggled);\n if (this.recordLogSetting.get() !== toggled) {\n this.recordLogSetting.set(toggled);\n }\n\n this.networkLogView.setRecording(toggled);\n if (!toggled && this.filmStripRecorder) {\n this.filmStripRecorder.stopRecording(this.filmStripAvailable.bind(this));\n }\n }\n\n private filmStripAvailable(filmStrip: TraceEngine.Extras.FilmStrip.Data): void {\n if (this.filmStripView) {\n this.filmStripView.setModel(filmStrip);\n }\n const timestamps = filmStrip.frames.map(frame => {\n // The network view works in seconds.\n return TraceEngine.Helpers.Timing.microSecondsToSeconds(frame.screenshotEvent.ts);\n });\n\n this.networkLogView.addFilmStripFrames(timestamps);\n }\n\n private onNetworkLogReset(event: Common.EventTarget.EventTargetEvent): void {\n const {clearIfPreserved} = event.data;\n BlockedURLsPane.reset();\n if (!this.preserveLogSetting.get() || clearIfPreserved) {\n this.calculator.reset();\n this.overviewPane.reset();\n }\n if (this.filmStripView) {\n this.resetFilmStripView();\n }\n }\n\n private willReloadPage(): void {\n if (this.pendingStopTimer) {\n clearTimeout(this.pendingStopTimer);\n delete this.pendingStopTimer;\n }\n if (this.isShowing() && this.filmStripRecorder) {\n this.filmStripRecorder.startRecording();\n }\n }\n\n private load(): void {\n if (this.filmStripRecorder && this.filmStripRecorder.isRecording()) {\n if (this.pendingStopTimer) {\n window.clearTimeout(this.pendingStopTimer);\n }\n this.pendingStopTimer = window.setTimeout(this.stopFilmStripRecording.bind(this), this.displayScreenshotDelay);\n }\n }\n\n private stopFilmStripRecording(): void {\n if (this.filmStripRecorder) {\n this.filmStripRecorder.stopRecording(this.filmStripAvailable.bind(this));\n }\n delete this.pendingStopTimer;\n }\n\n private toggleLargerRequests(): void {\n this.updateUI();\n }\n\n private toggleShowOverview(): void {\n const toggled = this.networkLogShowOverviewSetting.get();\n if (toggled) {\n this.overviewPane.show(this.overviewPlaceholderElement);\n } else {\n this.overviewPane.detach();\n }\n this.doResize();\n }\n\n private toggleRecordFilmStrip(): void {\n const toggled = this.networkRecordFilmStripSetting.get();\n if (toggled && !this.filmStripRecorder) {\n this.filmStripView = new PerfUI.FilmStripView.FilmStripView();\n this.filmStripView.element.classList.add('network-film-strip');\n this.filmStripRecorder = new FilmStripRecorder(this.networkLogView.timeCalculator(), this.filmStripView);\n this.filmStripView.show(this.filmStripPlaceholderElement);\n this.filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameSelected, this.onFilmFrameSelected, this);\n this.filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameEnter, this.onFilmFrameEnter, this);\n this.filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameExit, this.onFilmFrameExit, this);\n this.resetFilmStripView();\n }\n\n if (!toggled && this.filmStripRecorder) {\n if (this.filmStripView) {\n this.filmStripView.detach();\n }\n this.filmStripView = null;\n this.filmStripRecorder = null;\n }\n }\n\n private resetFilmStripView(): void {\n const reloadShortcut =\n UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction('inspector_main.reload')[0];\n\n if (this.filmStripView) {\n this.filmStripView.reset();\n if (reloadShortcut) {\n this.filmStripView.setStatusText(\n i18nString(UIStrings.hitSToReloadAndCaptureFilmstrip, {PH1: reloadShortcut.title()}));\n }\n }\n }\n\n override elementsToRestoreScrollPositionsFor(): Element[] {\n return this.networkLogView.elementsToRestoreScrollPositionsFor();\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(NetworkPanel, this);\n this.registerCSSFiles([networkPanelStyles]);\n\n // Record the network tool load time after the panel has loaded.\n Host.userMetrics.panelLoaded('network', 'DevTools.Launch.Network');\n }\n\n override willHide(): void {\n UI.Context.Context.instance().setFlavor(NetworkPanel, null);\n }\n\n revealAndHighlightRequest(request: SDK.NetworkRequest.NetworkRequest): void {\n this.hideRequestPanel();\n if (request) {\n this.networkLogView.revealAndHighlightRequest(request);\n }\n }\n\n revealAndHighlightRequestWithId(request: NetworkForward.NetworkRequestId.NetworkRequestId): void {\n this.hideRequestPanel();\n if (request) {\n this.networkLogView.revealAndHighlightRequestWithId(request);\n }\n }\n\n async selectAndActivateRequest(\n request: SDK.NetworkRequest.NetworkRequest, shownTab?: NetworkForward.UIRequestLocation.UIRequestTabs,\n options?: NetworkForward.UIRequestLocation.FilterOptions): Promise {\n await UI.ViewManager.ViewManager.instance().showView('network');\n this.networkLogView.selectRequest(request, options);\n this.showRequestPanel(shownTab);\n this.networkLogView.revealAndHighlightRequest(request);\n return this.networkItemView;\n }\n\n private handleFilterChanged(): void {\n this.hideRequestPanel();\n }\n\n private onRowSizeChanged(): void {\n this.updateUI();\n }\n\n private onRequestSelected(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n this.currentRequest = request;\n this.networkOverview.setHighlightedRequest(request);\n this.updateNetworkItemView();\n }\n\n private onRequestActivated(event: Common.EventTarget.EventTargetEvent): void {\n const {showPanel, tab, takeFocus} = event.data;\n if (showPanel) {\n this.showRequestPanel(tab, takeFocus);\n } else {\n this.hideRequestPanel();\n }\n }\n\n private showRequestPanel(shownTab?: NetworkForward.UIRequestLocation.UIRequestTabs, takeFocus?: boolean): void {\n if (this.splitWidget.showMode() === UI.SplitWidget.ShowMode.Both && !shownTab && !takeFocus) {\n // If panel is already shown, and we are not forcing a specific tab, return.\n return;\n }\n this.clearNetworkItemView();\n if (this.currentRequest) {\n const networkItemView = this.createNetworkItemView(shownTab);\n if (networkItemView && takeFocus) {\n networkItemView.focus();\n }\n }\n this.updateUI();\n }\n\n hideRequestPanel(): void {\n this.clearNetworkItemView();\n this.splitWidget.hideMain();\n this.updateUI();\n }\n\n private updateNetworkItemView(): void {\n if (this.splitWidget.showMode() === UI.SplitWidget.ShowMode.Both) {\n this.clearNetworkItemView();\n this.createNetworkItemView();\n this.updateUI();\n }\n }\n\n private clearNetworkItemView(): void {\n if (this.networkItemView) {\n this.networkItemView.detach();\n this.networkItemView = null;\n }\n }\n private createNetworkItemView(initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs): NetworkItemView\n |undefined {\n if (!this.currentRequest) {\n return;\n }\n this.networkItemView = new NetworkItemView(this.currentRequest, this.networkLogView.timeCalculator(), initialTab);\n this.networkItemView.leftToolbar().appendToolbarItem(new UI.Toolbar.ToolbarItem(this.closeButtonElement));\n this.networkItemView.show(this.detailsWidget.element);\n this.splitWidget.showBoth();\n return this.networkItemView;\n }\n\n private updateUI(): void {\n if (this.detailsWidget) {\n this.detailsWidget.element.classList.toggle(\n 'network-details-view-tall-header', this.networkLogLargeRowsSetting.get());\n }\n if (this.networkLogView) {\n this.networkLogView.switchViewMode(!this.splitWidget.isResizable());\n }\n }\n\n appendApplicableItems(\n this: NetworkPanel, event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: SDK.NetworkRequest.NetworkRequest|SDK.Resource.Resource|Workspace.UISourceCode.UISourceCode): void {\n const appendRevealItem = (request: SDK.NetworkRequest.NetworkRequest): void => {\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.revealInNetworkPanel),\n () => UI.ViewManager.ViewManager.instance()\n .showView('network')\n .then(this.networkLogView.resetFilter.bind(this.networkLogView))\n .then(this.revealAndHighlightRequest.bind(this, request)));\n };\n\n if ((event.target as Node).isSelfOrDescendant(this.element)) {\n return;\n }\n\n if (target instanceof SDK.Resource.Resource) {\n if (target.request) {\n appendRevealItem(target.request);\n }\n return;\n }\n if (target instanceof Workspace.UISourceCode.UISourceCode) {\n const resource = Bindings.ResourceUtils.resourceForURL(target.url());\n if (resource && resource.request) {\n appendRevealItem(resource.request);\n }\n return;\n }\n\n if (this.networkItemView && this.networkItemView.isShowing() && this.networkItemView.request() === target) {\n return;\n }\n\n appendRevealItem(target);\n }\n\n private onFilmFrameSelected(event: Common.EventTarget.EventTargetEvent): void {\n const timestamp = event.data;\n this.overviewPane.setWindowTimes(0, timestamp);\n }\n\n private onFilmFrameEnter(event: Common.EventTarget.EventTargetEvent): void {\n const timestamp = event.data;\n this.networkOverview.selectFilmStripFrame(timestamp);\n this.networkLogView.selectFilmStripFrame(timestamp / 1000);\n }\n\n private onFilmFrameExit(): void {\n this.networkOverview.clearFilmStripFrame();\n this.networkLogView.clearFilmStripFrame();\n }\n\n private onUpdateRequest(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n this.calculator.updateBoundaries(request);\n // FIXME: Unify all time units across the frontend!\n this.overviewPane.setBounds(\n TraceEngine.Types.Timing.MilliSeconds(this.calculator.minimumBoundary() * 1000),\n TraceEngine.Types.Timing.MilliSeconds(this.calculator.maximumBoundary() * 1000));\n this.networkOverview.updateRequest(request);\n this.overviewPane.scheduleUpdate();\n }\n\n resolveLocation(locationName: string): UI.View.ViewLocation|null {\n if (locationName === 'network-sidebar') {\n return this.sidebarLocation;\n }\n return null;\n }\n}\n\nexport class RequestRevealer implements Common.Revealer.Revealer {\n reveal(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const panel = NetworkPanel.instance();\n return UI.ViewManager.ViewManager.instance().showView('network').then(\n panel.revealAndHighlightRequest.bind(panel, request));\n }\n}\n\nexport class RequestIdRevealer implements Common.Revealer.Revealer {\n reveal(requestId: NetworkForward.NetworkRequestId.NetworkRequestId): Promise {\n const panel = NetworkPanel.instance();\n return UI.ViewManager.ViewManager.instance().showView('network').then(\n panel.revealAndHighlightRequestWithId.bind(panel, requestId));\n }\n}\n\nexport class NetworkLogWithFilterRevealer implements Common.Revealer.Revealer {\n reveal(request: NetworkForward.UIFilter.UIRequestFilter): Promise {\n return NetworkPanel.revealAndFilter(request.filters);\n }\n}\n\nexport class FilmStripRecorder implements TraceEngine.TracingManager.TracingManagerClient {\n private tracingManager: TraceEngine.TracingManager.TracingManager|null;\n private resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel|null;\n private readonly timeCalculator: NetworkTimeCalculator;\n private readonly filmStripView: PerfUI.FilmStripView.FilmStripView;\n private tracingModel: TraceEngine.Legacy.TracingModel|null;\n private callback: ((filmStrip: TraceEngine.Extras.FilmStrip.Data) => void)|null;\n // Used to fetch screenshots of the page load and show them in the panel.\n #traceEngine: TraceEngine.TraceModel.Model;\n\n constructor(timeCalculator: NetworkTimeCalculator, filmStripView: PerfUI.FilmStripView.FilmStripView) {\n this.#traceEngine = new TraceEngine.TraceModel.Model({\n Screenshots: TraceEngine.Handlers.ModelHandlers.Screenshots,\n });\n\n this.tracingManager = null;\n this.resourceTreeModel = null;\n this.timeCalculator = timeCalculator;\n this.filmStripView = filmStripView;\n this.tracingModel = null;\n this.callback = null;\n }\n\n traceEventsCollected(events: TraceEngine.TracingManager.EventPayload[]): void {\n if (this.tracingModel) {\n this.tracingModel.addEvents(events);\n }\n }\n\n async tracingComplete(): Promise {\n if (!this.tracingModel || !this.tracingManager) {\n return;\n }\n this.tracingModel.tracingComplete();\n this.tracingManager = null;\n await this.#traceEngine.parse(\n // OPP's data layer uses `EventPayload` as the type to represent raw JSON from the trace.\n // When we pass this into the new data engine, we need to tell TS to use the new TraceEventData type.\n this.tracingModel.allRawEvents() as unknown as TraceEngine.Types.TraceEvents.TraceEventData[],\n );\n\n const data = this.#traceEngine.traceParsedData(this.#traceEngine.size() - 1);\n if (!data) {\n return;\n }\n const zeroTimeInSeconds = TraceEngine.Types.Timing.Seconds(this.timeCalculator.minimumBoundary());\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(\n data, TraceEngine.Helpers.Timing.secondsToMicroseconds(zeroTimeInSeconds));\n\n if (this.callback) {\n this.callback(filmStrip);\n }\n this.callback = null;\n // Now we have created the film strip and stored the data, we need to reset\n // the trace processor so that it is ready to record again if the user\n // refreshes the page.\n this.#traceEngine.resetProcessor();\n\n if (this.resourceTreeModel) {\n this.resourceTreeModel.resumeReload();\n }\n this.resourceTreeModel = null;\n }\n\n tracingBufferUsage(): void {\n }\n\n eventsRetrievalProgress(_progress: number): void {\n }\n\n startRecording(): void {\n this.filmStripView.reset();\n this.filmStripView.setStatusText(i18nString(UIStrings.recordingFrames));\n const tracingManager =\n SDK.TargetManager.TargetManager.instance().scopeTarget()?.model(TraceEngine.TracingManager.TracingManager);\n if (this.tracingManager || !tracingManager) {\n return;\n }\n\n this.tracingManager = tracingManager;\n this.resourceTreeModel = this.tracingManager.target().model(SDK.ResourceTreeModel.ResourceTreeModel);\n this.tracingModel = new TraceEngine.Legacy.TracingModel();\n void this.tracingManager.start(this, '-*,disabled-by-default-devtools.screenshot', '');\n\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.FilmStripStartedRecording);\n }\n\n isRecording(): boolean {\n return Boolean(this.tracingManager);\n }\n\n stopRecording(callback: (filmStrip: TraceEngine.Extras.FilmStrip.Data) => void): void {\n if (!this.tracingManager) {\n return;\n }\n\n this.tracingManager.stop();\n if (this.resourceTreeModel) {\n this.resourceTreeModel.suspendReload();\n }\n this.callback = callback;\n this.filmStripView.setStatusText(i18nString(UIStrings.fetchingFrames));\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = context.flavor(NetworkPanel);\n if (panel === null) {\n return false;\n }\n switch (actionId) {\n case 'network.toggle-recording': {\n panel.toggleRecord(!panel.recordLogSetting.get());\n return true;\n }\n case 'network.hide-request-details': {\n if (!panel.networkItemView) {\n return false;\n }\n panel.hideRequestPanel();\n panel.networkLogView.resetFocus();\n return true;\n }\n case 'network.search': {\n const selection = UI.InspectorView.InspectorView.instance().element.window().getSelection();\n if (!selection) {\n return false;\n }\n let queryCandidate = '';\n if (selection.rangeCount) {\n queryCandidate = selection.toString().replace(/\\r?\\n.*/, '');\n }\n void SearchNetworkView.openSearch(queryCandidate);\n return true;\n }\n case 'network.clear': {\n Logs.NetworkLog.NetworkLog.instance().reset(true);\n return true;\n }\n }\n return false;\n }\n}\n\nexport class RequestLocationRevealer implements\n Common.Revealer.Revealer {\n async reveal(location: NetworkForward.UIRequestLocation.UIRequestLocation): Promise {\n const view =\n await NetworkPanel.instance().selectAndActivateRequest(location.request, location.tab, location.filterOptions);\n if (!view) {\n return;\n }\n if (location.searchMatch) {\n const {lineNumber, columnNumber, matchLength} = location.searchMatch;\n const revealPosition = {\n from: {lineNumber, columnNumber},\n to: {lineNumber, columnNumber: columnNumber + matchLength},\n };\n await view.revealResponseBody(revealPosition);\n }\n if (location.header) {\n view.revealHeader(location.header.section, location.header.header?.name);\n }\n }\n}\n\nlet searchNetworkViewInstance: SearchNetworkView;\n\nexport class SearchNetworkView extends Search.SearchView.SearchView {\n private constructor() {\n super('network', new Common.Throttler.Throttler(/* timeoutMs */ 200));\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): SearchNetworkView {\n const {forceNew} = opts;\n if (!searchNetworkViewInstance || forceNew) {\n searchNetworkViewInstance = new SearchNetworkView();\n }\n\n return searchNetworkViewInstance;\n }\n\n static async openSearch(query: string, searchImmediately?: boolean): Promise {\n await UI.ViewManager.ViewManager.instance().showView('network.search-network-tab');\n const searchView = SearchNetworkView.instance();\n searchView.toggle(query, Boolean(searchImmediately));\n return searchView;\n }\n\n override createScope(): Search.SearchScope.SearchScope {\n return new NetworkSearchScope(Logs.NetworkLog.NetworkLog.instance());\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"NetworkPanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/NetworkPanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,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Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2008, 2009 Anthony Ricaud \n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Logs from '../../models/logs/logs.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport type * as NetworkForward from '../../panels/network/forward/forward.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';\nimport * as Search from '../search/search.js';\n\nimport {Events, type RequestActivatedEvent} from './NetworkDataGridNode.js';\nimport {NetworkItemView} from './NetworkItemView.js';\nimport {NetworkLogView} from './NetworkLogView.js';\nimport {NetworkOverview} from './NetworkOverview.js';\nimport networkPanelStyles from './networkPanel.css.js';\nimport {NetworkSearchScope} from './NetworkSearchScope.js';\nimport {type NetworkTimeCalculator, NetworkTransferTimeCalculator} from './NetworkTimeCalculator.js';\n\nconst UIStrings = {\n /**\n *@description Text to close something\n */\n close: 'Close',\n /**\n *@description Title of a search bar or tool\n */\n search: 'Search',\n /**\n *@description Tooltip text that appears on the setting to preserve log when hovering over the item\n */\n doNotClearLogOnPageReload: 'Do not clear log on page reload / navigation',\n /**\n *@description Text to preserve the log after refreshing\n */\n preserveLog: 'Preserve log',\n /**\n *@description Text to disable cache while DevTools is open\n */\n disableCacheWhileDevtoolsIsOpen: 'Disable cache (while DevTools is open)',\n /**\n *@description Text in Network Config View of the Network panel\n */\n disableCache: 'Disable cache',\n /**\n *@description Tooltip text that appears when hovering over the largeicon settings gear in show settings pane setting in network panel of the network panel\n */\n networkSettings: 'Network settings',\n /**\n *@description Tooltip for expanding network request row setting\n */\n showMoreInformationInRequestRows: 'Show more information in request rows',\n /**\n *@description Text in Network Panel of the Network panel\n */\n useLargeRequestRows: 'Big request rows',\n /**\n *@description Tooltip text for network request overview setting\n */\n showOverviewOfNetworkRequests: 'Show overview of network requests',\n /**\n *@description Text in Network Panel of the Network panel\n */\n showOverview: 'Overview',\n /**\n *@description Tooltip for group by frame network setting\n */\n groupRequestsByTopLevelRequest: 'Group requests by top level request frame',\n /**\n *@description Text in Network Panel of the Network panel\n */\n groupByFrame: 'Group by frame',\n /**\n *@description Tooltip for capture screenshot network setting\n */\n captureScreenshotsWhenLoadingA: 'Capture screenshots when loading a page',\n /**\n *@description Text to take screenshots\n */\n captureScreenshots: 'Screenshots',\n /**\n * @description Tooltip text that appears when hovering over the largeicon load button in the\n * Network Panel. This action prompts the user to select a HAR file to upload to DevTools.\n */\n importHarFile: 'Import `HAR` file...',\n /**\n * @description Tooltip text that appears when hovering over the largeicon download button in the\n * Network Panel. HAR is a file format (HTTP Archive) and should not be translated. This action\n * triggers the download of a HAR file.\n */\n exportHar: 'Export `HAR`...',\n /**\n *@description Text for throttling the network\n */\n throttling: 'Throttling',\n /**\n *@description Text in Network Panel of the Network panel\n *@example {Ctrl + R} PH1\n */\n hitSToReloadAndCaptureFilmstrip: 'Hit {PH1} to reload and capture filmstrip.',\n /**\n *@description A context menu item in the Network Panel of the Network panel\n */\n revealInNetworkPanel: 'Reveal in Network panel',\n /**\n *@description Text in Network Panel of the Network panel\n */\n recordingFrames: 'Recording frames...',\n /**\n *@description Text in Network Panel of the Network panel\n */\n fetchingFrames: 'Fetching frames...',\n /**\n * @description Text of a button in the Network panel's toolbar that open Network Conditions panel in the drawer.\n */\n moreNetworkConditions: 'More network conditions…',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/NetworkPanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet networkPanelInstance: NetworkPanel;\n\nexport class NetworkPanel extends UI.Panel.Panel implements\n UI.ContextMenu\n .Provider,\n UI.View.ViewLocationResolver {\n private readonly networkLogShowOverviewSetting: Common.Settings.Setting;\n private readonly networkLogLargeRowsSetting: Common.Settings.Setting;\n private readonly networkRecordFilmStripSetting: Common.Settings.Setting;\n private readonly toggleRecordAction: UI.ActionRegistration.Action;\n private pendingStopTimer!: number|undefined;\n networkItemView: NetworkItemView|null;\n private filmStripView: PerfUI.FilmStripView.FilmStripView|null;\n private filmStripRecorder: FilmStripRecorder|null;\n private currentRequest: SDK.NetworkRequest.NetworkRequest|null;\n private readonly panelToolbar: UI.Toolbar.Toolbar;\n private readonly rightToolbar: UI.Toolbar.Toolbar;\n private readonly filterBar: UI.FilterBar.FilterBar;\n private readonly settingsPane: UI.Widget.HBox;\n private showSettingsPaneSetting: Common.Settings.Setting;\n private readonly filmStripPlaceholderElement: HTMLElement;\n private readonly overviewPane: PerfUI.TimelineOverviewPane.TimelineOverviewPane;\n private readonly networkOverview: NetworkOverview;\n private readonly overviewPlaceholderElement: HTMLElement;\n private readonly calculator: NetworkTransferTimeCalculator;\n private splitWidget: UI.SplitWidget.SplitWidget;\n private readonly sidebarLocation: UI.View.TabbedViewLocation;\n private readonly progressBarContainer: HTMLDivElement;\n networkLogView: NetworkLogView;\n private readonly fileSelectorElement: HTMLElement;\n private readonly detailsWidget: UI.Widget.VBox;\n private readonly closeButtonElement: HTMLDivElement;\n private preserveLogSetting: Common.Settings.Setting;\n recordLogSetting: Common.Settings.Setting;\n private readonly throttlingSelect: UI.Toolbar.ToolbarComboBox;\n private readonly displayScreenshotDelay: number;\n\n constructor(displayScreenshotDelay: number) {\n super('network');\n\n this.displayScreenshotDelay = displayScreenshotDelay;\n this.networkLogShowOverviewSetting =\n Common.Settings.Settings.instance().createSetting('networkLogShowOverview', true);\n this.networkLogLargeRowsSetting = Common.Settings.Settings.instance().createSetting('networkLogLargeRows', false);\n this.networkRecordFilmStripSetting =\n Common.Settings.Settings.instance().createSetting('networkRecordFilmStripSetting', false);\n this.toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction('network.toggle-recording');\n this.networkItemView = null;\n this.filmStripView = null;\n this.filmStripRecorder = null;\n this.currentRequest = null;\n\n const panel = new UI.Widget.VBox();\n\n const networkToolbarContainer = panel.contentElement.createChild('div', 'network-toolbar-container');\n this.panelToolbar = new UI.Toolbar.Toolbar('', networkToolbarContainer);\n this.panelToolbar.makeWrappable(true);\n this.rightToolbar = new UI.Toolbar.Toolbar('', networkToolbarContainer);\n\n this.filterBar = new UI.FilterBar.FilterBar('networkPanel', true);\n this.filterBar.show(panel.contentElement);\n this.filterBar.addEventListener(UI.FilterBar.FilterBarEvents.Changed, this.handleFilterChanged.bind(this));\n\n this.settingsPane = new UI.Widget.HBox();\n this.settingsPane.element.classList.add('network-settings-pane');\n this.settingsPane.show(panel.contentElement);\n this.showSettingsPaneSetting =\n Common.Settings.Settings.instance().createSetting('networkShowSettingsToolbar', false);\n this.showSettingsPaneSetting.addChangeListener(this.updateSettingsPaneVisibility.bind(this));\n this.updateSettingsPaneVisibility();\n\n this.filmStripPlaceholderElement = panel.contentElement.createChild('div', 'network-film-strip-placeholder');\n\n // Create top overview component.\n this.overviewPane = new PerfUI.TimelineOverviewPane.TimelineOverviewPane('network');\n this.overviewPane.addEventListener(\n PerfUI.TimelineOverviewPane.Events.OverviewPaneWindowChanged, this.onWindowChanged.bind(this));\n this.overviewPane.element.id = 'network-overview-panel';\n this.networkOverview = new NetworkOverview();\n this.overviewPane.setOverviewControls([this.networkOverview]);\n this.overviewPlaceholderElement = panel.contentElement.createChild('div');\n\n this.calculator = new NetworkTransferTimeCalculator();\n\n this.splitWidget = new UI.SplitWidget.SplitWidget(true, false, 'networkPanelSplitViewState');\n this.splitWidget.hideMain();\n this.splitWidget.show(panel.contentElement);\n\n panel.setDefaultFocusedChild(this.filterBar);\n\n const initialSidebarWidth = 225;\n const splitWidget = new UI.SplitWidget.SplitWidget(true, false, 'networkPanelSidebarState', initialSidebarWidth);\n splitWidget.hideSidebar();\n splitWidget.enableShowModeSaving();\n splitWidget.show(this.element);\n this.sidebarLocation = UI.ViewManager.ViewManager.instance().createTabbedLocation(async () => {\n void UI.ViewManager.ViewManager.instance().showView('network');\n splitWidget.showBoth();\n }, 'network-sidebar', true);\n const tabbedPane = this.sidebarLocation.tabbedPane();\n tabbedPane.setMinimumSize(100, 25);\n tabbedPane.element.classList.add('network-tabbed-pane');\n tabbedPane.element.addEventListener('keydown', event => {\n if (event.key !== Platform.KeyboardUtilities.ESCAPE_KEY) {\n return;\n }\n splitWidget.hideSidebar();\n event.consume();\n });\n const closeSidebar = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.close), 'cross');\n closeSidebar.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => splitWidget.hideSidebar());\n tabbedPane.rightToolbar().appendToolbarItem(closeSidebar);\n splitWidget.setSidebarWidget(tabbedPane);\n splitWidget.setMainWidget(panel);\n splitWidget.setDefaultFocusedChild(panel);\n this.setDefaultFocusedChild(splitWidget);\n\n this.progressBarContainer = document.createElement('div');\n\n this.networkLogView =\n new NetworkLogView(this.filterBar, this.progressBarContainer, this.networkLogLargeRowsSetting);\n this.splitWidget.setSidebarWidget(this.networkLogView);\n this.fileSelectorElement =\n (UI.UIUtils.createFileSelectorElement(this.networkLogView.onLoadFromFile.bind(this.networkLogView)) as\n HTMLElement);\n panel.element.appendChild(this.fileSelectorElement);\n\n this.detailsWidget = new UI.Widget.VBox();\n this.detailsWidget.element.classList.add('network-details-view');\n this.splitWidget.setMainWidget(this.detailsWidget);\n\n this.closeButtonElement = document.createElement('div', {is: 'dt-close-button'});\n this.closeButtonElement.addEventListener('click', async () => {\n const action = UI.ActionRegistry.ActionRegistry.instance().getAction('network.hide-request-details');\n await action.execute();\n }, false);\n this.closeButtonElement.style.margin = '0 5px';\n\n this.networkLogShowOverviewSetting.addChangeListener(this.toggleShowOverview, this);\n this.networkLogLargeRowsSetting.addChangeListener(this.toggleLargerRequests, this);\n this.networkRecordFilmStripSetting.addChangeListener(this.toggleRecordFilmStrip, this);\n\n this.preserveLogSetting = Common.Settings.Settings.instance().moduleSetting('network_log.preserve-log');\n this.recordLogSetting = Common.Settings.Settings.instance().moduleSetting('network_log.record-log');\n this.recordLogSetting.addChangeListener(({data}) => this.toggleRecord(data));\n\n this.throttlingSelect = this.createThrottlingConditionsSelect();\n this.setupToolbarButtons(splitWidget);\n\n this.toggleRecord(this.recordLogSetting.get());\n this.toggleShowOverview();\n this.toggleLargerRequests();\n this.toggleRecordFilmStrip();\n this.updateUI();\n\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.WillReloadPage, this.willReloadPage, this,\n {scoped: true});\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load, this.load, this, {scoped: true});\n this.networkLogView.addEventListener(Events.RequestSelected, this.onRequestSelected, this);\n this.networkLogView.addEventListener(Events.RequestActivated, this.onRequestActivated, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestAdded, this.onUpdateRequest, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(\n Logs.NetworkLog.Events.RequestUpdated, this.onUpdateRequest, this);\n Logs.NetworkLog.NetworkLog.instance().addEventListener(Logs.NetworkLog.Events.Reset, this.onNetworkLogReset, this);\n }\n\n static instance(opts?: {\n forceNew: boolean,\n displayScreenshotDelay?: number,\n }): NetworkPanel {\n if (!networkPanelInstance || opts?.forceNew) {\n networkPanelInstance = new NetworkPanel(opts?.displayScreenshotDelay ?? 1000);\n }\n\n return networkPanelInstance;\n }\n\n static revealAndFilter(filters: {\n filterType: NetworkForward.UIFilter.FilterType|null,\n filterValue: string,\n }[]): Promise {\n const panel = NetworkPanel.instance();\n let filterString = '';\n for (const filter of filters) {\n if (filter.filterType) {\n filterString += `${filter.filterType}:${filter.filterValue} `;\n } else {\n filterString += `${filter.filterValue} `;\n }\n }\n panel.networkLogView.setTextFilterValue(filterString);\n return UI.ViewManager.ViewManager.instance().showView('network');\n }\n\n static async selectAndShowRequest(\n request: SDK.NetworkRequest.NetworkRequest, tab: NetworkForward.UIRequestLocation.UIRequestTabs,\n options?: NetworkForward.UIRequestLocation.FilterOptions): Promise {\n const panel = NetworkPanel.instance();\n await panel.selectAndActivateRequest(request, tab, options);\n }\n\n throttlingSelectForTest(): UI.Toolbar.ToolbarComboBox {\n return this.throttlingSelect;\n }\n\n private onWindowChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n const startTime = Math.max(this.calculator.minimumBoundary(), event.data.startTime / 1000);\n const endTime = Math.min(this.calculator.maximumBoundary(), event.data.endTime / 1000);\n if (startTime === this.calculator.minimumBoundary() && endTime === this.calculator.maximumBoundary()) {\n // Reset the filters for NetworkLogView when the window is reset\n // to its boundaries. This clears the filters and allows the users\n // to see the incoming requests after they have updated the curtains\n // to be in the edges. (ex: by double clicking on the overview grid)\n this.networkLogView.setWindow(0, 0);\n } else {\n this.networkLogView.setWindow(startTime, endTime);\n }\n }\n\n private async searchToggleClick(): Promise {\n const action = UI.ActionRegistry.ActionRegistry.instance().getAction('network.search');\n await action.execute();\n }\n\n private setupToolbarButtons(splitWidget: UI.SplitWidget.SplitWidget): void {\n const searchToggle = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.search), 'search');\n function updateSidebarToggle(): void {\n const isSidebarShowing = splitWidget.showMode() !== UI.SplitWidget.ShowMode.OnlyMain;\n searchToggle.setToggled(isSidebarShowing);\n if (!isSidebarShowing) {\n (searchToggle.element as HTMLElement).focus();\n }\n }\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction));\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('network.clear'));\n this.panelToolbar.appendSeparator();\n\n this.panelToolbar.appendToolbarItem(this.filterBar.filterButton());\n updateSidebarToggle();\n splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, updateSidebarToggle);\n searchToggle.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n void this.searchToggleClick();\n });\n this.panelToolbar.appendToolbarItem(searchToggle);\n this.panelToolbar.appendSeparator();\n\n this.panelToolbar.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n this.preserveLogSetting, i18nString(UIStrings.doNotClearLogOnPageReload), i18nString(UIStrings.preserveLog)));\n\n this.panelToolbar.appendSeparator();\n const disableCacheCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n Common.Settings.Settings.instance().moduleSetting('cacheDisabled'),\n i18nString(UIStrings.disableCacheWhileDevtoolsIsOpen), i18nString(UIStrings.disableCache));\n this.panelToolbar.appendToolbarItem(disableCacheCheckbox);\n\n this.panelToolbar.appendToolbarItem(this.throttlingSelect);\n\n const networkConditionsIcon = new IconButton.Icon.Icon();\n networkConditionsIcon.data = {\n iconName: 'network-settings',\n color: 'var(--icon-default)',\n width: '20px',\n height: '20px',\n };\n const networkConditionsButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.moreNetworkConditions), networkConditionsIcon);\n networkConditionsButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n void UI.ViewManager.ViewManager.instance().showView('network.config');\n }, this);\n this.panelToolbar.appendToolbarItem(networkConditionsButton);\n\n this.rightToolbar.appendToolbarItem(new UI.Toolbar.ToolbarItem(this.progressBarContainer));\n this.rightToolbar.appendSeparator();\n this.rightToolbar.appendToolbarItem(new UI.Toolbar.ToolbarSettingToggle(\n this.showSettingsPaneSetting, 'gear', i18nString(UIStrings.networkSettings), 'gear-filled'));\n\n const settingsToolbarLeft = new UI.Toolbar.Toolbar('', this.settingsPane.element);\n settingsToolbarLeft.makeVertical();\n settingsToolbarLeft.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n this.networkLogLargeRowsSetting, i18nString(UIStrings.showMoreInformationInRequestRows),\n i18nString(UIStrings.useLargeRequestRows)));\n settingsToolbarLeft.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n this.networkLogShowOverviewSetting, i18nString(UIStrings.showOverviewOfNetworkRequests),\n i18nString(UIStrings.showOverview)));\n\n const settingsToolbarRight = new UI.Toolbar.Toolbar('', this.settingsPane.element);\n settingsToolbarRight.makeVertical();\n settingsToolbarRight.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n Common.Settings.Settings.instance().moduleSetting('network.group-by-frame'),\n i18nString(UIStrings.groupRequestsByTopLevelRequest), i18nString(UIStrings.groupByFrame)));\n settingsToolbarRight.appendToolbarItem(new UI.Toolbar.ToolbarSettingCheckbox(\n this.networkRecordFilmStripSetting, i18nString(UIStrings.captureScreenshotsWhenLoadingA),\n i18nString(UIStrings.captureScreenshots)));\n\n this.panelToolbar.appendSeparator();\n const importHarButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.importHarFile), 'import');\n importHarButton.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click, () => this.fileSelectorElement.click(), this);\n this.panelToolbar.appendToolbarItem(importHarButton);\n const exportHarButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.exportHar), 'download');\n exportHarButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n void this.networkLogView.exportAll();\n }, this);\n this.panelToolbar.appendToolbarItem(exportHarButton);\n }\n\n private updateSettingsPaneVisibility(): void {\n this.settingsPane.element.classList.toggle('hidden', !this.showSettingsPaneSetting.get());\n }\n\n private createThrottlingConditionsSelect(): UI.Toolbar.ToolbarComboBox {\n const toolbarItem = new UI.Toolbar.ToolbarComboBox(null, i18nString(UIStrings.throttling));\n toolbarItem.setMaxWidth(160);\n MobileThrottling.ThrottlingManager.throttlingManager().decorateSelectWithNetworkThrottling(\n toolbarItem.selectElement());\n return toolbarItem;\n }\n\n toggleRecord(toggled: boolean): void {\n this.toggleRecordAction.setToggled(toggled);\n if (this.recordLogSetting.get() !== toggled) {\n this.recordLogSetting.set(toggled);\n }\n\n this.networkLogView.setRecording(toggled);\n if (!toggled && this.filmStripRecorder) {\n this.filmStripRecorder.stopRecording(this.filmStripAvailable.bind(this));\n }\n }\n\n private filmStripAvailable(filmStrip: TraceEngine.Extras.FilmStrip.Data): void {\n if (this.filmStripView) {\n this.filmStripView.setModel(filmStrip);\n }\n const timestamps = filmStrip.frames.map(frame => {\n // The network view works in seconds.\n return TraceEngine.Helpers.Timing.microSecondsToSeconds(frame.screenshotEvent.ts);\n });\n\n this.networkLogView.addFilmStripFrames(timestamps);\n }\n\n private onNetworkLogReset(event: Common.EventTarget.EventTargetEvent): void {\n const {clearIfPreserved} = event.data;\n if (!this.preserveLogSetting.get() || clearIfPreserved) {\n this.calculator.reset();\n this.overviewPane.reset();\n }\n if (this.filmStripView) {\n this.resetFilmStripView();\n }\n }\n\n private willReloadPage(): void {\n if (this.pendingStopTimer) {\n clearTimeout(this.pendingStopTimer);\n delete this.pendingStopTimer;\n }\n if (this.isShowing() && this.filmStripRecorder) {\n this.filmStripRecorder.startRecording();\n }\n }\n\n private load(): void {\n if (this.filmStripRecorder && this.filmStripRecorder.isRecording()) {\n if (this.pendingStopTimer) {\n window.clearTimeout(this.pendingStopTimer);\n }\n this.pendingStopTimer = window.setTimeout(this.stopFilmStripRecording.bind(this), this.displayScreenshotDelay);\n }\n }\n\n private stopFilmStripRecording(): void {\n if (this.filmStripRecorder) {\n this.filmStripRecorder.stopRecording(this.filmStripAvailable.bind(this));\n }\n delete this.pendingStopTimer;\n }\n\n private toggleLargerRequests(): void {\n this.updateUI();\n }\n\n private toggleShowOverview(): void {\n const toggled = this.networkLogShowOverviewSetting.get();\n if (toggled) {\n this.overviewPane.show(this.overviewPlaceholderElement);\n } else {\n this.overviewPane.detach();\n }\n this.doResize();\n }\n\n private toggleRecordFilmStrip(): void {\n const toggled = this.networkRecordFilmStripSetting.get();\n if (toggled && !this.filmStripRecorder) {\n this.filmStripView = new PerfUI.FilmStripView.FilmStripView();\n this.filmStripView.element.classList.add('network-film-strip');\n this.filmStripRecorder = new FilmStripRecorder(this.networkLogView.timeCalculator(), this.filmStripView);\n this.filmStripView.show(this.filmStripPlaceholderElement);\n this.filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameSelected, this.onFilmFrameSelected, this);\n this.filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameEnter, this.onFilmFrameEnter, this);\n this.filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameExit, this.onFilmFrameExit, this);\n this.resetFilmStripView();\n }\n\n if (!toggled && this.filmStripRecorder) {\n if (this.filmStripView) {\n this.filmStripView.detach();\n }\n this.filmStripView = null;\n this.filmStripRecorder = null;\n }\n }\n\n private resetFilmStripView(): void {\n const reloadShortcut =\n UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction('inspector_main.reload')[0];\n\n if (this.filmStripView) {\n this.filmStripView.reset();\n if (reloadShortcut) {\n this.filmStripView.setStatusText(\n i18nString(UIStrings.hitSToReloadAndCaptureFilmstrip, {PH1: reloadShortcut.title()}));\n }\n }\n }\n\n override elementsToRestoreScrollPositionsFor(): Element[] {\n return this.networkLogView.elementsToRestoreScrollPositionsFor();\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(NetworkPanel, this);\n this.registerCSSFiles([networkPanelStyles]);\n\n // Record the network tool load time after the panel has loaded.\n Host.userMetrics.panelLoaded('network', 'DevTools.Launch.Network');\n }\n\n override willHide(): void {\n UI.Context.Context.instance().setFlavor(NetworkPanel, null);\n }\n\n revealAndHighlightRequest(request: SDK.NetworkRequest.NetworkRequest): void {\n this.hideRequestPanel();\n if (request) {\n this.networkLogView.revealAndHighlightRequest(request);\n }\n }\n\n revealAndHighlightRequestWithId(request: NetworkForward.NetworkRequestId.NetworkRequestId): void {\n this.hideRequestPanel();\n if (request) {\n this.networkLogView.revealAndHighlightRequestWithId(request);\n }\n }\n\n async selectAndActivateRequest(\n request: SDK.NetworkRequest.NetworkRequest, shownTab?: NetworkForward.UIRequestLocation.UIRequestTabs,\n options?: NetworkForward.UIRequestLocation.FilterOptions): Promise {\n await UI.ViewManager.ViewManager.instance().showView('network');\n this.networkLogView.selectRequest(request, options);\n this.showRequestPanel(shownTab);\n this.networkLogView.revealAndHighlightRequest(request);\n return this.networkItemView;\n }\n\n private handleFilterChanged(): void {\n this.hideRequestPanel();\n }\n\n private onRowSizeChanged(): void {\n this.updateUI();\n }\n\n private onRequestSelected(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n this.currentRequest = request;\n this.networkOverview.setHighlightedRequest(request);\n this.updateNetworkItemView();\n }\n\n private onRequestActivated(event: Common.EventTarget.EventTargetEvent): void {\n const {showPanel, tab, takeFocus} = event.data;\n if (showPanel) {\n this.showRequestPanel(tab, takeFocus);\n } else {\n this.hideRequestPanel();\n }\n }\n\n private showRequestPanel(shownTab?: NetworkForward.UIRequestLocation.UIRequestTabs, takeFocus?: boolean): void {\n if (this.splitWidget.showMode() === UI.SplitWidget.ShowMode.Both && !shownTab && !takeFocus) {\n // If panel is already shown, and we are not forcing a specific tab, return.\n return;\n }\n this.clearNetworkItemView();\n if (this.currentRequest) {\n const networkItemView = this.createNetworkItemView(shownTab);\n if (networkItemView && takeFocus) {\n networkItemView.focus();\n }\n }\n this.updateUI();\n }\n\n hideRequestPanel(): void {\n this.clearNetworkItemView();\n this.splitWidget.hideMain();\n this.updateUI();\n }\n\n private updateNetworkItemView(): void {\n if (this.splitWidget.showMode() === UI.SplitWidget.ShowMode.Both) {\n this.clearNetworkItemView();\n this.createNetworkItemView();\n this.updateUI();\n }\n }\n\n private clearNetworkItemView(): void {\n if (this.networkItemView) {\n this.networkItemView.detach();\n this.networkItemView = null;\n }\n }\n private createNetworkItemView(initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs): NetworkItemView\n |undefined {\n if (!this.currentRequest) {\n return;\n }\n this.networkItemView = new NetworkItemView(this.currentRequest, this.networkLogView.timeCalculator(), initialTab);\n this.networkItemView.leftToolbar().appendToolbarItem(new UI.Toolbar.ToolbarItem(this.closeButtonElement));\n this.networkItemView.show(this.detailsWidget.element);\n this.splitWidget.showBoth();\n return this.networkItemView;\n }\n\n private updateUI(): void {\n if (this.detailsWidget) {\n this.detailsWidget.element.classList.toggle(\n 'network-details-view-tall-header', this.networkLogLargeRowsSetting.get());\n }\n if (this.networkLogView) {\n this.networkLogView.switchViewMode(!this.splitWidget.isResizable());\n }\n }\n\n appendApplicableItems(\n this: NetworkPanel, event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: SDK.NetworkRequest.NetworkRequest|SDK.Resource.Resource|Workspace.UISourceCode.UISourceCode): void {\n const appendRevealItem = (request: SDK.NetworkRequest.NetworkRequest): void => {\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.revealInNetworkPanel),\n () => UI.ViewManager.ViewManager.instance()\n .showView('network')\n .then(this.networkLogView.resetFilter.bind(this.networkLogView))\n .then(this.revealAndHighlightRequest.bind(this, request)));\n };\n\n if ((event.target as Node).isSelfOrDescendant(this.element)) {\n return;\n }\n\n if (target instanceof SDK.Resource.Resource) {\n if (target.request) {\n appendRevealItem(target.request);\n }\n return;\n }\n if (target instanceof Workspace.UISourceCode.UISourceCode) {\n const resource = Bindings.ResourceUtils.resourceForURL(target.url());\n if (resource && resource.request) {\n appendRevealItem(resource.request);\n }\n return;\n }\n\n if (this.networkItemView && this.networkItemView.isShowing() && this.networkItemView.request() === target) {\n return;\n }\n\n appendRevealItem(target);\n }\n\n private onFilmFrameSelected(event: Common.EventTarget.EventTargetEvent): void {\n const timestamp = event.data;\n this.overviewPane.setWindowTimes(0, timestamp);\n }\n\n private onFilmFrameEnter(event: Common.EventTarget.EventTargetEvent): void {\n const timestamp = event.data;\n this.networkOverview.selectFilmStripFrame(timestamp);\n this.networkLogView.selectFilmStripFrame(timestamp / 1000);\n }\n\n private onFilmFrameExit(): void {\n this.networkOverview.clearFilmStripFrame();\n this.networkLogView.clearFilmStripFrame();\n }\n\n private onUpdateRequest(event: Common.EventTarget.EventTargetEvent): void {\n const request = event.data;\n this.calculator.updateBoundaries(request);\n // FIXME: Unify all time units across the frontend!\n this.overviewPane.setBounds(\n TraceEngine.Types.Timing.MilliSeconds(this.calculator.minimumBoundary() * 1000),\n TraceEngine.Types.Timing.MilliSeconds(this.calculator.maximumBoundary() * 1000));\n this.networkOverview.updateRequest(request);\n }\n\n resolveLocation(locationName: string): UI.View.ViewLocation|null {\n if (locationName === 'network-sidebar') {\n return this.sidebarLocation;\n }\n return null;\n }\n}\n\nexport class RequestRevealer implements Common.Revealer.Revealer {\n reveal(request: SDK.NetworkRequest.NetworkRequest): Promise {\n const panel = NetworkPanel.instance();\n return UI.ViewManager.ViewManager.instance().showView('network').then(\n panel.revealAndHighlightRequest.bind(panel, request));\n }\n}\n\nexport class RequestIdRevealer implements Common.Revealer.Revealer {\n reveal(requestId: NetworkForward.NetworkRequestId.NetworkRequestId): Promise {\n const panel = NetworkPanel.instance();\n return UI.ViewManager.ViewManager.instance().showView('network').then(\n panel.revealAndHighlightRequestWithId.bind(panel, requestId));\n }\n}\n\nexport class NetworkLogWithFilterRevealer implements Common.Revealer.Revealer {\n reveal(request: NetworkForward.UIFilter.UIRequestFilter): Promise {\n return NetworkPanel.revealAndFilter(request.filters);\n }\n}\n\nexport class FilmStripRecorder implements TraceEngine.TracingManager.TracingManagerClient {\n private tracingManager: TraceEngine.TracingManager.TracingManager|null;\n private resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel|null;\n private readonly timeCalculator: NetworkTimeCalculator;\n private readonly filmStripView: PerfUI.FilmStripView.FilmStripView;\n private tracingModel: TraceEngine.Legacy.TracingModel|null;\n private callback: ((filmStrip: TraceEngine.Extras.FilmStrip.Data) => void)|null;\n // Used to fetch screenshots of the page load and show them in the panel.\n #traceEngine: TraceEngine.TraceModel.Model;\n\n constructor(timeCalculator: NetworkTimeCalculator, filmStripView: PerfUI.FilmStripView.FilmStripView) {\n this.#traceEngine = new TraceEngine.TraceModel.Model({\n Screenshots: TraceEngine.Handlers.ModelHandlers.Screenshots,\n });\n\n this.tracingManager = null;\n this.resourceTreeModel = null;\n this.timeCalculator = timeCalculator;\n this.filmStripView = filmStripView;\n this.tracingModel = null;\n this.callback = null;\n }\n\n traceEventsCollected(events: TraceEngine.TracingManager.EventPayload[]): void {\n if (this.tracingModel) {\n this.tracingModel.addEvents(events);\n }\n }\n\n async tracingComplete(): Promise {\n if (!this.tracingModel || !this.tracingManager) {\n return;\n }\n this.tracingModel.tracingComplete();\n this.tracingManager = null;\n await this.#traceEngine.parse(\n // OPP's data layer uses `EventPayload` as the type to represent raw JSON from the trace.\n // When we pass this into the new data engine, we need to tell TS to use the new TraceEventData type.\n this.tracingModel.allRawEvents() as unknown as TraceEngine.Types.TraceEvents.TraceEventData[],\n );\n\n const data = this.#traceEngine.traceParsedData(this.#traceEngine.size() - 1);\n if (!data) {\n return;\n }\n const zeroTimeInSeconds = TraceEngine.Types.Timing.Seconds(this.timeCalculator.minimumBoundary());\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(\n data, TraceEngine.Helpers.Timing.secondsToMicroseconds(zeroTimeInSeconds));\n\n if (this.callback) {\n this.callback(filmStrip);\n }\n this.callback = null;\n // Now we have created the film strip and stored the data, we need to reset\n // the trace processor so that it is ready to record again if the user\n // refreshes the page.\n this.#traceEngine.resetProcessor();\n\n if (this.resourceTreeModel) {\n this.resourceTreeModel.resumeReload();\n }\n this.resourceTreeModel = null;\n }\n\n tracingBufferUsage(): void {\n }\n\n eventsRetrievalProgress(_progress: number): void {\n }\n\n startRecording(): void {\n this.filmStripView.reset();\n this.filmStripView.setStatusText(i18nString(UIStrings.recordingFrames));\n const tracingManager =\n SDK.TargetManager.TargetManager.instance().scopeTarget()?.model(TraceEngine.TracingManager.TracingManager);\n if (this.tracingManager || !tracingManager) {\n return;\n }\n\n this.tracingManager = tracingManager;\n this.resourceTreeModel = this.tracingManager.target().model(SDK.ResourceTreeModel.ResourceTreeModel);\n this.tracingModel = new TraceEngine.Legacy.TracingModel();\n void this.tracingManager.start(this, '-*,disabled-by-default-devtools.screenshot', '');\n\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.FilmStripStartedRecording);\n }\n\n isRecording(): boolean {\n return Boolean(this.tracingManager);\n }\n\n stopRecording(callback: (filmStrip: TraceEngine.Extras.FilmStrip.Data) => void): void {\n if (!this.tracingManager) {\n return;\n }\n\n this.tracingManager.stop();\n if (this.resourceTreeModel) {\n this.resourceTreeModel.suspendReload();\n }\n this.callback = callback;\n this.filmStripView.setStatusText(i18nString(UIStrings.fetchingFrames));\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = context.flavor(NetworkPanel);\n if (panel === null) {\n return false;\n }\n switch (actionId) {\n case 'network.toggle-recording': {\n panel.toggleRecord(!panel.recordLogSetting.get());\n return true;\n }\n case 'network.hide-request-details': {\n if (!panel.networkItemView) {\n return false;\n }\n panel.hideRequestPanel();\n panel.networkLogView.resetFocus();\n return true;\n }\n case 'network.search': {\n const selection = UI.InspectorView.InspectorView.instance().element.window().getSelection();\n if (!selection) {\n return false;\n }\n let queryCandidate = '';\n if (selection.rangeCount) {\n queryCandidate = selection.toString().replace(/\\r?\\n.*/, '');\n }\n void SearchNetworkView.openSearch(queryCandidate);\n return true;\n }\n case 'network.clear': {\n Logs.NetworkLog.NetworkLog.instance().reset(true);\n return true;\n }\n }\n return false;\n }\n}\n\nexport class RequestLocationRevealer implements\n Common.Revealer.Revealer {\n async reveal(location: NetworkForward.UIRequestLocation.UIRequestLocation): Promise {\n const view =\n await NetworkPanel.instance().selectAndActivateRequest(location.request, location.tab, location.filterOptions);\n if (!view) {\n return;\n }\n if (location.searchMatch) {\n const {lineNumber, columnNumber, matchLength} = location.searchMatch;\n const revealPosition = {\n from: {lineNumber, columnNumber},\n to: {lineNumber, columnNumber: columnNumber + matchLength},\n };\n await view.revealResponseBody(revealPosition);\n }\n if (location.header) {\n view.revealHeader(location.header.section, location.header.header?.name);\n }\n }\n}\n\nlet searchNetworkViewInstance: SearchNetworkView;\n\nexport class SearchNetworkView extends Search.SearchView.SearchView {\n private constructor() {\n super('network', new Common.Throttler.Throttler(/* timeoutMs */ 200));\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): SearchNetworkView {\n const {forceNew} = opts;\n if (!searchNetworkViewInstance || forceNew) {\n searchNetworkViewInstance = new SearchNetworkView();\n }\n\n return searchNetworkViewInstance;\n }\n\n static async openSearch(query: string, searchImmediately?: boolean): Promise {\n await UI.ViewManager.ViewManager.instance().showView('network.search-network-tab');\n const searchView = SearchNetworkView.instance();\n searchView.toggle(query, Boolean(searchImmediately));\n return searchView;\n }\n\n override createScope(): Search.SearchScope.SearchScope {\n return new NetworkSearchScope(Logs.NetworkLog.NetworkLog.instance());\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/network/RequestPreviewView.js b/public/panels/network/RequestPreviewView.js index 166f7622b..151553908 100644 --- a/public/panels/network/RequestPreviewView.js +++ b/public/panels/network/RequestPreviewView.js @@ -78,7 +78,9 @@ export class RequestPreviewView extends RequestResponseView { if (jsonView) { return jsonView; } - const dataURL = TextUtils.ContentProvider.contentAsDataURL(contentData.content, this.request.mimeType, contentData.encoded, this.request.charset()); + // If the content was already decoded by the backend we use UTF-8. + const charset = contentData.encoded ? this.request.charset() : 'utf-8'; + const dataURL = TextUtils.ContentProvider.contentAsDataURL(contentData.content, this.request.mimeType, contentData.encoded, charset); return dataURL ? new RequestHTMLView(dataURL) : null; } async createPreview() { diff --git a/public/panels/network/RequestPreviewView.js.map b/public/panels/network/RequestPreviewView.js.map index b89fe52b7..9aecd0eb4 100644 --- a/public/panels/network/RequestPreviewView.js.map +++ b/public/panels/network/RequestPreviewView.js.map @@ -1 +1 @@ -{"version":3,"file":"RequestPreviewView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/RequestPreviewView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,WAAW,MAAM,yDAAyD,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,K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AAC,CAAC;SACjD;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE;YAChC,OAAO,aAAa,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;SACvG;QAED,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAClD,IAAI,gBAAgB,EAAE;YACpB,OAAO,gBAAgB,CAAC;SACzB;QAED,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpH,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC;SACjB;QAED,OAAO,IAAI,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACnF,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as SDK from '../../core/sdk/sdk.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';\n\nimport {RequestHTMLView} from './RequestHTMLView.js';\nimport {RequestResponseView} from './RequestResponseView.js';\nimport {SignedExchangeInfoView} from './SignedExchangeInfoView.js';\nimport {WebBundleInfoView} from './components/WebBundleInfoView.js';\n\nconst UIStrings = {\n /**\n *@description Text in Request Preview View of the Network panel\n */\n failedToLoadResponseData: 'Failed to load response data',\n /**\n *@description Text in Request Preview View of the Network panel\n */\n previewNotAvailable: 'Preview not available',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/RequestPreviewView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class RequestPreviewView extends RequestResponseView {\n constructor(request: SDK.NetworkRequest.NetworkRequest) {\n super(request);\n }\n\n override async showPreview(): Promise {\n const view = await super.showPreview();\n if (!(view instanceof UI.View.SimpleView)) {\n return view;\n }\n const toolbar = new UI.Toolbar.Toolbar('network-item-preview-toolbar', this.element);\n void view.toolbarItems().then(items => {\n items.map(item => toolbar.appendToolbarItem(item));\n });\n return view;\n }\n\n private async htmlPreview(): Promise {\n const contentData = await this.request.contentData();\n if (contentData.error) {\n return new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.failedToLoadResponseData) + ': ' + contentData.error);\n }\n\n const allowlist = new Set(['text/html', 'text/plain', 'application/xhtml+xml']);\n if (!allowlist.has(this.request.mimeType)) {\n return null;\n }\n\n const content = contentData.encoded ? window.atob((contentData.content as string)) : contentData.content as string;\n\n // http://crbug.com/767393 - DevTools should recognize JSON regardless of the content type\n const jsonView = await SourceFrame.JSONView.JSONView.createView(content);\n if (jsonView) {\n return jsonView;\n }\n\n const dataURL = TextUtils.ContentProvider.contentAsDataURL(\n contentData.content, this.request.mimeType, contentData.encoded, this.request.charset());\n return dataURL ? new RequestHTMLView(dataURL) : null;\n }\n\n override async createPreview(): Promise {\n if (this.request.signedExchangeInfo()) {\n return new SignedExchangeInfoView(this.request);\n }\n\n if (this.request.webBundleInfo()) {\n return LegacyWrapper.LegacyWrapper.legacyWrapper(UI.Widget.VBox, new WebBundleInfoView(this.request));\n }\n\n const htmlErrorPreview = await this.htmlPreview();\n if (htmlErrorPreview) {\n return htmlErrorPreview;\n }\n\n const provided = await SourceFrame.PreviewFactory.PreviewFactory.createPreview(this.request, this.request.mimeType);\n if (provided) {\n return provided;\n }\n\n return new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.previewNotAvailable));\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"RequestPreviewView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/RequestPreviewView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,WAAW,MAAM,yDAAyD,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,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1B,IAAI,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE;YACrC,OAAO,IAAI,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACjD;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE;YAChC,OAAO,aAAa,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;SACvG;QAED,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAClD,IAAI,gBAAgB,EAAE;YACpB,OAAO,gBAAgB,CAAC;SACzB;QAED,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpH,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC;SACjB;QAED,OAAO,IAAI,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACnF,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as SDK from '../../core/sdk/sdk.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';\n\nimport {RequestHTMLView} from './RequestHTMLView.js';\nimport {RequestResponseView} from './RequestResponseView.js';\nimport {SignedExchangeInfoView} from './SignedExchangeInfoView.js';\nimport {WebBundleInfoView} from './components/WebBundleInfoView.js';\n\nconst UIStrings = {\n /**\n *@description Text in Request Preview View of the Network panel\n */\n failedToLoadResponseData: 'Failed to load response data',\n /**\n *@description Text in Request Preview View of the Network panel\n */\n previewNotAvailable: 'Preview not available',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/RequestPreviewView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class RequestPreviewView extends RequestResponseView {\n constructor(request: SDK.NetworkRequest.NetworkRequest) {\n super(request);\n }\n\n override async showPreview(): Promise {\n const view = await super.showPreview();\n if (!(view instanceof UI.View.SimpleView)) {\n return view;\n }\n const toolbar = new UI.Toolbar.Toolbar('network-item-preview-toolbar', this.element);\n void view.toolbarItems().then(items => {\n items.map(item => toolbar.appendToolbarItem(item));\n });\n return view;\n }\n\n private async htmlPreview(): Promise {\n const contentData = await this.request.contentData();\n if (contentData.error) {\n return new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.failedToLoadResponseData) + ': ' + contentData.error);\n }\n\n const allowlist = new Set(['text/html', 'text/plain', 'application/xhtml+xml']);\n if (!allowlist.has(this.request.mimeType)) {\n return null;\n }\n\n const content = contentData.encoded ? window.atob((contentData.content as string)) : contentData.content as string;\n\n // http://crbug.com/767393 - DevTools should recognize JSON regardless of the content type\n const jsonView = await SourceFrame.JSONView.JSONView.createView(content);\n if (jsonView) {\n return jsonView;\n }\n\n // If the content was already decoded by the backend we use UTF-8.\n const charset = contentData.encoded ? this.request.charset() : 'utf-8';\n const dataURL = TextUtils.ContentProvider.contentAsDataURL(\n contentData.content, this.request.mimeType, contentData.encoded, charset);\n return dataURL ? new RequestHTMLView(dataURL) : null;\n }\n\n override async createPreview(): Promise {\n if (this.request.signedExchangeInfo()) {\n return new SignedExchangeInfoView(this.request);\n }\n\n if (this.request.webBundleInfo()) {\n return LegacyWrapper.LegacyWrapper.legacyWrapper(UI.Widget.VBox, new WebBundleInfoView(this.request));\n }\n\n const htmlErrorPreview = await this.htmlPreview();\n if (htmlErrorPreview) {\n return htmlErrorPreview;\n }\n\n const provided = await SourceFrame.PreviewFactory.PreviewFactory.createPreview(this.request, this.request.mimeType);\n if (provided) {\n return provided;\n }\n\n return new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.previewNotAvailable));\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/network/components/RequestHeadersView.js b/public/panels/network/components/RequestHeadersView.js index dd93f5e25..cf8b0e6db 100644 --- a/public/panels/network/components/RequestHeadersView.js +++ b/public/panels/network/components/RequestHeadersView.js @@ -221,7 +221,7 @@ export class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableCom const uiSourceCode = this.#workspace.uiSourceCodeForURL(this.#getHeaderOverridesFileUrl()); if (uiSourceCode) { Sources.SourcesPanel.SourcesPanel.instance().showUISourceCode(uiSourceCode); - Sources.SourcesPanel.SourcesPanel.instance().revealInNavigator(uiSourceCode); + void Sources.SourcesPanel.SourcesPanel.instance().revealInNavigator(uiSourceCode); } }; // Disabled until https://crbug.com/1079231 is fixed. diff --git a/public/panels/network/components/RequestHeadersView.js.map b/public/panels/network/components/RequestHeadersView.js.map index bedcb92d8..f4c1eaef2 100644 --- a/public/panels/network/components/RequestHeadersView.js.map +++ b/public/panels/network/components/RequestHeadersView.js.map @@ -1 +1 @@ -{"version":3,"file":"RequestHeadersView.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/network/components/RequestHeadersView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,GAAG,MAAM,0BAA0B,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,4CAA4C,CAAC;AAC1E,OAAO,KAAK,SAAS,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,cAAc,MAAM,4CAA4C,CAAC;AAC7E,OAAO,KAAK,OAAO,MAAM,2CAA2C,CAAC;AACrE,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,uCAAuC,CAAC;AAC/D,OAAO,KAAK,aAAa,MAAM,yDAAyD,CAAC;AACzF,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,OAA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Y,UAAU,CAAC,CAAC;YACjE,OAAO,CAAC,OACV;;;gBAGE,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA;yDACO,IAAI,CAAC,QAAQ,YAAY,IAAI,CAAC,iBAAiB,MAAM,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC;eACxH,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO;;4CAEW,IAAI,CAAC,kBAAkB;;;;KAI9D,EAAE,IAAI,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;QAC/B,kBAAkB;IACpB,CAAC;IAED,iBAAiB,CAAC,KAAoB;QACpC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACjB,OAAO;SACR;QACD,MAAM,cAAc,GAAG,KAAK,CAAC,MAAqB,CAAC;QACnD,MAAM,cAAc,GAAG,cAAc,CAAC,aAAmC,CAAC;QAC1E,IAAI,CAAC,cAAc,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;SAC3E;QACD,QAAQ,KAAK,CAAC,GAAG,EAAE;YACjB,KAAK,WAAW;gBACd,cAAc,CAAC,IAAI,GAAG,KAAK,CAAC;gBAC5B,MAAM;YACR,KAAK,YAAY;gBACf,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC;gBAC3B,MAAM;SACT;IACH,CAAC;IAED,SAAS,CAAC,KAAY;QACpB,IAAI,CAAC,gBAAgB,EAAE,GAAG,CAAE,KAAK,CAAC,MAA6B,CAAC,IAAI,CAAC,CAAC;IACxE,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAChG,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,mCAAmC,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Copyright 2022 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../../core/common/common.js';\nimport * as Host from '../../../core/host/host.js';\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as Platform from '../../../core/platform/platform.js';\nimport * as SDK from '../../../core/sdk/sdk.js';\nimport * as Persistence from '../../../models/persistence/persistence.js';\nimport * as Workspace from '../../../models/workspace/workspace.js';\nimport * as NetworkForward from '../../../panels/network/forward/forward.js';\nimport * as Buttons from '../../../ui/components/buttons/buttons.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as Input from '../../../ui/components/input/input.js';\nimport * as LegacyWrapper from '../../../ui/components/legacy_wrapper/legacy_wrapper.js';\nimport * as UI from '../../../ui/legacy/legacy.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as Sources from '../../sources/sources.js';\n\nimport {type RequestHeaderSectionData, RequestHeaderSection} from './RequestHeaderSection.js';\nimport {\n type ResponseHeaderSectionData,\n ResponseHeaderSection,\n RESPONSE_HEADER_SECTION_DATA_KEY,\n} from './ResponseHeaderSection.js';\n\nimport requestHeadersViewStyles from './RequestHeadersView.css.js';\n\nconst RAW_HEADER_CUTOFF = 3000;\nconst {render, html} = LitHtml;\n\nconst UIStrings = {\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromDiskCache: '(from disk cache)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromMemoryCache: '(from memory cache)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromPrefetchCache: '(from prefetch cache)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromServiceWorker: '(from `service worker`)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromSignedexchange: '(from signed-exchange)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromWebBundle: '(from Web Bundle)',\n /**\n *@description Section header for a list of the main aspects of a http request\n */\n general: 'General',\n /**\n *@description Label for a checkbox to switch between raw and parsed headers\n */\n raw: 'Raw',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n referrerPolicy: 'Referrer Policy',\n /**\n *@description Text in Network Log View Columns of the Network panel\n */\n remoteAddress: 'Remote Address',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n requestHeaders: 'Request Headers',\n /**\n *@description The HTTP method of a request\n */\n requestMethod: 'Request Method',\n /**\n *@description The URL of a request\n */\n requestUrl: 'Request URL',\n /**\n *@description A context menu item in the Network Log View Columns of the Network panel\n */\n responseHeaders: 'Response Headers',\n /**\n *@description Title text for a link to the Sources panel to the file containing the header override definitions\n */\n revealHeaderOverrides: 'Reveal header override definitions',\n /**\n *@description Text to show more content\n */\n showMore: 'Show more',\n /**\n *@description HTTP response code\n */\n statusCode: 'Status Code',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/components/RequestHeadersView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableComponent {\n #request: Readonly;\n static readonly litTagName = LitHtml.literal`devtools-request-headers`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n #showResponseHeadersText = false;\n #showRequestHeadersText = false;\n #showResponseHeadersTextFull = false;\n #showRequestHeadersTextFull = false;\n #toReveal?: {section: NetworkForward.UIRequestLocation.UIHeaderSection, header?: string} = undefined;\n readonly #workspace = Workspace.Workspace.WorkspaceImpl.instance();\n\n constructor(request: SDK.NetworkRequest.NetworkRequest) {\n super();\n this.#request = request;\n }\n\n override wasShown(): void {\n this.#request.addEventListener(SDK.NetworkRequest.Events.RemoteAddressChanged, this.#refreshHeadersView, this);\n this.#request.addEventListener(SDK.NetworkRequest.Events.FinishedLoading, this.#refreshHeadersView, this);\n this.#request.addEventListener(SDK.NetworkRequest.Events.RequestHeadersChanged, this.#refreshHeadersView, this);\n this.#request.addEventListener(\n SDK.NetworkRequest.Events.ResponseHeadersChanged, this.#resetAndRefreshHeadersView, this);\n this.#toReveal = undefined;\n this.#refreshHeadersView();\n }\n\n override willHide(): void {\n this.#request.removeEventListener(SDK.NetworkRequest.Events.RemoteAddressChanged, this.#refreshHeadersView, this);\n this.#request.removeEventListener(SDK.NetworkRequest.Events.FinishedLoading, this.#refreshHeadersView, this);\n this.#request.removeEventListener(SDK.NetworkRequest.Events.RequestHeadersChanged, this.#refreshHeadersView, this);\n this.#request.removeEventListener(\n SDK.NetworkRequest.Events.ResponseHeadersChanged, this.#resetAndRefreshHeadersView, this);\n }\n\n #resetAndRefreshHeadersView(): void {\n this.#request.deleteAssociatedData(RESPONSE_HEADER_SECTION_DATA_KEY);\n void this.render();\n }\n\n #refreshHeadersView(): void {\n void this.render();\n }\n\n revealHeader(section: NetworkForward.UIRequestLocation.UIHeaderSection, header?: string): void {\n this.#toReveal = {section, header};\n void this.render();\n }\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [requestHeadersViewStyles];\n this.#workspace.addEventListener(\n Workspace.Workspace.Events.UISourceCodeAdded, this.#uiSourceCodeAddedOrRemoved, this);\n this.#workspace.addEventListener(\n Workspace.Workspace.Events.UISourceCodeRemoved, this.#uiSourceCodeAddedOrRemoved, this);\n Common.Settings.Settings.instance()\n .moduleSetting('persistenceNetworkOverridesEnabled')\n .addChangeListener(this.render, this);\n }\n\n disconnectedCallback(): void {\n this.#workspace.removeEventListener(\n Workspace.Workspace.Events.UISourceCodeAdded, this.#uiSourceCodeAddedOrRemoved, this);\n this.#workspace.removeEventListener(\n Workspace.Workspace.Events.UISourceCodeRemoved, this.#uiSourceCodeAddedOrRemoved, this);\n Common.Settings.Settings.instance()\n .moduleSetting('persistenceNetworkOverridesEnabled')\n .removeChangeListener(this.render, this);\n }\n\n #uiSourceCodeAddedOrRemoved(event: Common.EventTarget.EventTargetEvent): void {\n if (this.#getHeaderOverridesFileUrl() === event.data.url()) {\n void this.render();\n }\n }\n\n override async render(): Promise {\n if (!this.#request) {\n return;\n }\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n render(html`\n ${this.#renderGeneralSection()}\n ${this.#renderResponseHeaders()}\n ${this.#renderRequestHeaders()}\n `, this.#shadow, {host: this});\n // clang-format on\n }\n\n #renderResponseHeaders(): LitHtml.LitTemplate {\n if (!this.#request) {\n return LitHtml.nothing;\n }\n\n const toggleShowRaw = (): void => {\n this.#showResponseHeadersText = !this.#showResponseHeadersText;\n void this.render();\n };\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n <${Category.litTagName}\n @togglerawevent=${toggleShowRaw}\n .data=${{\n name: 'responseHeaders',\n title: i18nString(UIStrings.responseHeaders),\n headerCount: this.#request.sortedResponseHeaders.length,\n checked: this.#request.responseHeadersText ? this.#showResponseHeadersText : undefined,\n additionalContent: this.#renderHeaderOverridesLink(),\n forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.Response,\n } as CategoryData}\n aria-label=${i18nString(UIStrings.responseHeaders)}\n >\n ${this.#showResponseHeadersText ?\n this.#renderRawHeaders(this.#request.responseHeadersText, true) : html`\n <${ResponseHeaderSection.litTagName} .data=${{\n request: this.#request,\n toReveal: this.#toReveal,\n } as ResponseHeaderSectionData}>\n `}\n \n `;\n // clang-format on\n }\n\n #renderHeaderOverridesLink(): LitHtml.LitTemplate {\n if (!this.#workspace.uiSourceCodeForURL(this.#getHeaderOverridesFileUrl())) {\n return LitHtml.nothing;\n }\n\n const overridesSetting: Common.Settings.Setting =\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled');\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n const fileIcon = html`\n <${IconButton.Icon.Icon.litTagName} class=${overridesSetting.get() ? 'inline-icon dot purple': 'inline-icon'} .data=${{\n iconName: 'document',\n color: 'var(--icon-default)',\n width: '16px',\n height: '16px',\n } as IconButton.Icon.IconData}>\n `;\n // clang-format on\n\n const revealHeadersFile = (event: Event): void => {\n event.preventDefault();\n const uiSourceCode = this.#workspace.uiSourceCodeForURL(this.#getHeaderOverridesFileUrl());\n if (uiSourceCode) {\n Sources.SourcesPanel.SourcesPanel.instance().showUISourceCode(uiSourceCode);\n Sources.SourcesPanel.SourcesPanel.instance().revealInNavigator(uiSourceCode);\n }\n };\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n \n <${IconButton.Icon.Icon.litTagName} class=\"inline-icon\" .data=${{\n iconName: 'help',\n color: 'var(--icon-link)',\n width: '16px',\n height: '16px',\n } as IconButton.Icon.IconData}>\n \n \n ${fileIcon}${Persistence.NetworkPersistenceManager.HEADERS_FILENAME}\n \n `;\n // clang-format on\n }\n\n #getHeaderOverridesFileUrl(): Platform.DevToolsPath.UrlString {\n if (!this.#request) {\n return Platform.DevToolsPath.EmptyUrlString;\n }\n const fileUrl = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().fileUrlFromNetworkUrl(\n this.#request.url(), /* ignoreInactive */ true);\n return fileUrl.substring(0, fileUrl.lastIndexOf('/')) + '/' +\n Persistence.NetworkPersistenceManager.HEADERS_FILENAME as Platform.DevToolsPath.UrlString;\n }\n\n #renderRequestHeaders(): LitHtml.LitTemplate {\n if (!this.#request) {\n return LitHtml.nothing;\n }\n const requestHeadersText = this.#request.requestHeadersText();\n\n const toggleShowRaw = (): void => {\n this.#showRequestHeadersText = !this.#showRequestHeadersText;\n void this.render();\n };\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n <${Category.litTagName}\n @togglerawevent=${toggleShowRaw}\n .data=${{\n name: 'requestHeaders',\n title: i18nString(UIStrings.requestHeaders),\n headerCount: this.#request.requestHeaders().length,\n checked: requestHeadersText? this.#showRequestHeadersText : undefined,\n forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.Request,\n } as CategoryData}\n aria-label=${i18nString(UIStrings.requestHeaders)}\n >\n ${(this.#showRequestHeadersText && requestHeadersText) ?\n this.#renderRawHeaders(requestHeadersText, false) : html`\n <${RequestHeaderSection.litTagName} .data=${{\n request: this.#request,\n toReveal: this.#toReveal,\n } as RequestHeaderSectionData}>\n `}\n \n `;\n // clang-format on\n }\n\n #renderRawHeaders(rawHeadersText: string, forResponseHeaders: boolean): LitHtml.TemplateResult {\n const trimmed = rawHeadersText.trim();\n const showFull = forResponseHeaders ? this.#showResponseHeadersTextFull : this.#showRequestHeadersTextFull;\n const isShortened = !showFull && trimmed.length > RAW_HEADER_CUTOFF;\n\n const showMore = ():void => {\n if (forResponseHeaders) {\n this.#showResponseHeadersTextFull = true;\n } else {\n this.#showRequestHeadersTextFull = true;\n }\n void this.render();\n };\n\n const onContextMenuOpen = (event: Event): void => {\n const showFull = forResponseHeaders ? this.#showResponseHeadersTextFull : this.#showRequestHeadersTextFull;\n if (!showFull) {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n const section = contextMenu.newSection();\n section.appendItem(i18nString(UIStrings.showMore), showMore);\n void contextMenu.show();\n }\n };\n\n const addContextMenuListener = (el: Element):void => {\n if (isShortened) {\n el.addEventListener('contextmenu', onContextMenuOpen);\n }\n };\n\n return html`\n
\n
${isShortened ? trimmed.substring(0, RAW_HEADER_CUTOFF) : trimmed}
\n ${isShortened ? html`\n <${Buttons.Button.Button.litTagName}\n .size=${Buttons.Button.Size.SMALL}\n .variant=${Buttons.Button.Variant.SECONDARY}\n @click=${showMore}\n >${i18nString(UIStrings.showMore)}\n ` : LitHtml.nothing}\n
\n `;\n }\n\n #renderGeneralSection(): LitHtml.LitTemplate {\n if (!this.#request) {\n return LitHtml.nothing;\n }\n\n const statusClasses = ['status'];\n if (this.#request.statusCode < 300 || this.#request.statusCode === 304) {\n statusClasses.push('green-circle');\n } else if (this.#request.statusCode < 400) {\n statusClasses.push('yellow-circle');\n } else {\n statusClasses.push('red-circle');\n }\n\n let comment = '';\n if (this.#request.cachedInMemory()) {\n comment = i18nString(UIStrings.fromMemoryCache);\n } else if (this.#request.fetchedViaServiceWorker) {\n comment = i18nString(UIStrings.fromServiceWorker);\n } else if (this.#request.redirectSourceSignedExchangeInfoHasNoErrors()) {\n comment = i18nString(UIStrings.fromSignedexchange);\n } else if (this.#request.webBundleInnerRequestInfo()) {\n comment = i18nString(UIStrings.fromWebBundle);\n } else if (this.#request.fromPrefetchCache()) {\n comment = i18nString(UIStrings.fromPrefetchCache);\n } else if (this.#request.cached()) {\n comment = i18nString(UIStrings.fromDiskCache);\n }\n\n if (comment) {\n statusClasses.push('status-with-comment');\n }\n\n const statusText = [this.#request.statusCode, this.#request.getInferredStatusText(), comment].join(' ');\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n <${Category.litTagName}\n .data=${{\n name: 'general',\n title: i18nString(UIStrings.general),\n forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.General,\n } as CategoryData}\n aria-label=${i18nString(UIStrings.general)}\n >\n ${this.#renderGeneralRow(i18nString(UIStrings.requestUrl), this.#request.url())}\n ${this.#request.statusCode? this.#renderGeneralRow(i18nString(UIStrings.requestMethod), this.#request.requestMethod) : LitHtml.nothing}\n ${this.#request.statusCode? this.#renderGeneralRow(i18nString(UIStrings.statusCode), statusText, statusClasses) : LitHtml.nothing}\n ${this.#request.remoteAddress()? this.#renderGeneralRow(i18nString(UIStrings.remoteAddress), this.#request.remoteAddress()) : LitHtml.nothing}\n ${this.#request.referrerPolicy()? this.#renderGeneralRow(i18nString(UIStrings.referrerPolicy), String(this.#request.referrerPolicy())) : LitHtml.nothing}\n \n `;\n // clang-format on\n }\n\n #renderGeneralRow(name: Common.UIString.LocalizedString, value: string, classNames?: string[]): LitHtml.LitTemplate {\n const isHighlighted = this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.General &&\n name.toLowerCase() === this.#toReveal?.header?.toLowerCase();\n return html`\n
\n
${name}:
\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue)}\n >${value}
\n
\n `;\n }\n}\n\nexport class ToggleRawHeadersEvent extends Event {\n static readonly eventName = 'togglerawevent';\n\n constructor() {\n super(ToggleRawHeadersEvent.eventName, {});\n }\n}\n\nexport interface CategoryData {\n name: string;\n title: Common.UIString.LocalizedString;\n headerCount?: number;\n checked?: boolean;\n additionalContent?: LitHtml.LitTemplate;\n forceOpen?: boolean;\n}\n\nexport class Category extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-request-headers-category`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n #expandedSetting?: Common.Settings.Setting;\n #title: Common.UIString.LocalizedString = Common.UIString.LocalizedEmptyString;\n #headerCount?: number = undefined;\n #checked: boolean|undefined = undefined;\n #additionalContent: LitHtml.LitTemplate|undefined = undefined;\n #forceOpen: boolean|undefined = undefined;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [requestHeadersViewStyles, Input.checkboxStyles];\n }\n\n set data(data: CategoryData) {\n this.#title = data.title;\n this.#expandedSetting =\n Common.Settings.Settings.instance().createSetting('request-info-' + data.name + '-category-expanded', true);\n this.#headerCount = data.headerCount;\n this.#checked = data.checked;\n this.#additionalContent = data.additionalContent;\n this.#forceOpen = data.forceOpen;\n this.#render();\n }\n\n #onCheckboxToggle(): void {\n this.dispatchEvent(new ToggleRawHeadersEvent());\n }\n\n #render(): void {\n const isOpen = (this.#expandedSetting ? this.#expandedSetting.get() : true) || this.#forceOpen;\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n render(html`\n
\n \n
\n
\n ${this.#title}${this.#headerCount !== undefined ?\n html` (${this.#headerCount})` :\n LitHtml.nothing\n }\n
\n
\n ${this.#checked !== undefined ? html`\n \n ` : LitHtml.nothing}\n
\n
${this.#additionalContent}
\n
\n \n
\n `, this.#shadow, {host: this});\n // clang-format on\n }\n\n #onSummaryKeyDown(event: KeyboardEvent): void {\n if (!event.target) {\n return;\n }\n const summaryElement = event.target as HTMLElement;\n const detailsElement = summaryElement.parentElement as HTMLDetailsElement;\n if (!detailsElement) {\n throw new Error('
element is not found for a element');\n }\n switch (event.key) {\n case 'ArrowLeft':\n detailsElement.open = false;\n break;\n case 'ArrowRight':\n detailsElement.open = true;\n break;\n }\n }\n\n #onToggle(event: Event): void {\n this.#expandedSetting?.set((event.target as HTMLDetailsElement).open);\n }\n}\n\nComponentHelpers.CustomElements.defineComponent('devtools-request-headers', RequestHeadersView);\nComponentHelpers.CustomElements.defineComponent('devtools-request-headers-category', Category);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-request-headers': RequestHeadersView;\n 'devtools-request-headers-category': Category;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"RequestHeadersView.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/network/components/RequestHeadersView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,GAAG,MAAM,0BAA0B,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,4CAA4C,CAAC;AAC1E,OAAO,KAAK,SAAS,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,cAAc,MAAM,4CAA4C,CAAC;AAC7E,OAAO,KAAK,OAAO,MAAM,2CAA2C,CAAC;AACrE,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,uCAAuC,CAAC;AAC/D,OAAO,KAAK,aAAa,MAAM,yDAAyD,CAAC;AACzF,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAgC,oBAAoB,E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C,CAAC,IAAI,CAAA;yDACO,IAAI,CAAC,QAAQ,YAAY,IAAI,CAAC,iBAAiB,MAAM,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC;eACxH,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO;;4CAEW,IAAI,CAAC,kBAAkB;;;;KAI9D,EAAE,IAAI,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;QAC/B,kBAAkB;IACpB,CAAC;IAED,iBAAiB,CAAC,KAAoB;QACpC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACjB,OAAO;SACR;QACD,MAAM,cAAc,GAAG,KAAK,CAAC,MAAqB,CAAC;QACnD,MAAM,cAAc,GAAG,cAAc,CAAC,aAAmC,CAAC;QAC1E,IAAI,CAAC,cAAc,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;SAC3E;QACD,QAAQ,KAAK,CAAC,GAAG,EAAE;YACjB,KAAK,WAAW;gBACd,cAAc,CAAC,IAAI,GAAG,KAAK,CAAC;gBAC5B,MAAM;YACR,KAAK,YAAY;gBACf,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC;gBAC3B,MAAM;SACT;IACH,CAAC;IAED,SAAS,CAAC,KAAY;QACpB,IAAI,CAAC,gBAAgB,EAAE,GAAG,CAAE,KAAK,CAAC,MAA6B,CAAC,IAAI,CAAC,CAAC;IACxE,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAChG,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,mCAAmC,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Copyright 2022 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../../core/common/common.js';\nimport * as Host from '../../../core/host/host.js';\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as Platform from '../../../core/platform/platform.js';\nimport * as SDK from '../../../core/sdk/sdk.js';\nimport * as Persistence from '../../../models/persistence/persistence.js';\nimport * as Workspace from '../../../models/workspace/workspace.js';\nimport * as NetworkForward from '../../../panels/network/forward/forward.js';\nimport * as Buttons from '../../../ui/components/buttons/buttons.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as Input from '../../../ui/components/input/input.js';\nimport * as LegacyWrapper from '../../../ui/components/legacy_wrapper/legacy_wrapper.js';\nimport * as UI from '../../../ui/legacy/legacy.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as Sources from '../../sources/sources.js';\n\nimport {type RequestHeaderSectionData, RequestHeaderSection} from './RequestHeaderSection.js';\nimport {\n type ResponseHeaderSectionData,\n ResponseHeaderSection,\n RESPONSE_HEADER_SECTION_DATA_KEY,\n} from './ResponseHeaderSection.js';\n\nimport requestHeadersViewStyles from './RequestHeadersView.css.js';\n\nconst RAW_HEADER_CUTOFF = 3000;\nconst {render, html} = LitHtml;\n\nconst UIStrings = {\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromDiskCache: '(from disk cache)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromMemoryCache: '(from memory cache)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromPrefetchCache: '(from prefetch cache)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromServiceWorker: '(from `service worker`)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromSignedexchange: '(from signed-exchange)',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n fromWebBundle: '(from Web Bundle)',\n /**\n *@description Section header for a list of the main aspects of a http request\n */\n general: 'General',\n /**\n *@description Label for a checkbox to switch between raw and parsed headers\n */\n raw: 'Raw',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n referrerPolicy: 'Referrer Policy',\n /**\n *@description Text in Network Log View Columns of the Network panel\n */\n remoteAddress: 'Remote Address',\n /**\n *@description Text in Request Headers View of the Network panel\n */\n requestHeaders: 'Request Headers',\n /**\n *@description The HTTP method of a request\n */\n requestMethod: 'Request Method',\n /**\n *@description The URL of a request\n */\n requestUrl: 'Request URL',\n /**\n *@description A context menu item in the Network Log View Columns of the Network panel\n */\n responseHeaders: 'Response Headers',\n /**\n *@description Title text for a link to the Sources panel to the file containing the header override definitions\n */\n revealHeaderOverrides: 'Reveal header override definitions',\n /**\n *@description Text to show more content\n */\n showMore: 'Show more',\n /**\n *@description HTTP response code\n */\n statusCode: 'Status Code',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/components/RequestHeadersView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class RequestHeadersView extends LegacyWrapper.LegacyWrapper.WrappableComponent {\n #request: Readonly;\n static readonly litTagName = LitHtml.literal`devtools-request-headers`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n #showResponseHeadersText = false;\n #showRequestHeadersText = false;\n #showResponseHeadersTextFull = false;\n #showRequestHeadersTextFull = false;\n #toReveal?: {section: NetworkForward.UIRequestLocation.UIHeaderSection, header?: string} = undefined;\n readonly #workspace = Workspace.Workspace.WorkspaceImpl.instance();\n\n constructor(request: SDK.NetworkRequest.NetworkRequest) {\n super();\n this.#request = request;\n }\n\n override wasShown(): void {\n this.#request.addEventListener(SDK.NetworkRequest.Events.RemoteAddressChanged, this.#refreshHeadersView, this);\n this.#request.addEventListener(SDK.NetworkRequest.Events.FinishedLoading, this.#refreshHeadersView, this);\n this.#request.addEventListener(SDK.NetworkRequest.Events.RequestHeadersChanged, this.#refreshHeadersView, this);\n this.#request.addEventListener(\n SDK.NetworkRequest.Events.ResponseHeadersChanged, this.#resetAndRefreshHeadersView, this);\n this.#toReveal = undefined;\n this.#refreshHeadersView();\n }\n\n override willHide(): void {\n this.#request.removeEventListener(SDK.NetworkRequest.Events.RemoteAddressChanged, this.#refreshHeadersView, this);\n this.#request.removeEventListener(SDK.NetworkRequest.Events.FinishedLoading, this.#refreshHeadersView, this);\n this.#request.removeEventListener(SDK.NetworkRequest.Events.RequestHeadersChanged, this.#refreshHeadersView, this);\n this.#request.removeEventListener(\n SDK.NetworkRequest.Events.ResponseHeadersChanged, this.#resetAndRefreshHeadersView, this);\n }\n\n #resetAndRefreshHeadersView(): void {\n this.#request.deleteAssociatedData(RESPONSE_HEADER_SECTION_DATA_KEY);\n void this.render();\n }\n\n #refreshHeadersView(): void {\n void this.render();\n }\n\n revealHeader(section: NetworkForward.UIRequestLocation.UIHeaderSection, header?: string): void {\n this.#toReveal = {section, header};\n void this.render();\n }\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [requestHeadersViewStyles];\n this.#workspace.addEventListener(\n Workspace.Workspace.Events.UISourceCodeAdded, this.#uiSourceCodeAddedOrRemoved, this);\n this.#workspace.addEventListener(\n Workspace.Workspace.Events.UISourceCodeRemoved, this.#uiSourceCodeAddedOrRemoved, this);\n Common.Settings.Settings.instance()\n .moduleSetting('persistenceNetworkOverridesEnabled')\n .addChangeListener(this.render, this);\n }\n\n disconnectedCallback(): void {\n this.#workspace.removeEventListener(\n Workspace.Workspace.Events.UISourceCodeAdded, this.#uiSourceCodeAddedOrRemoved, this);\n this.#workspace.removeEventListener(\n Workspace.Workspace.Events.UISourceCodeRemoved, this.#uiSourceCodeAddedOrRemoved, this);\n Common.Settings.Settings.instance()\n .moduleSetting('persistenceNetworkOverridesEnabled')\n .removeChangeListener(this.render, this);\n }\n\n #uiSourceCodeAddedOrRemoved(event: Common.EventTarget.EventTargetEvent): void {\n if (this.#getHeaderOverridesFileUrl() === event.data.url()) {\n void this.render();\n }\n }\n\n override async render(): Promise {\n if (!this.#request) {\n return;\n }\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n render(html`\n ${this.#renderGeneralSection()}\n ${this.#renderResponseHeaders()}\n ${this.#renderRequestHeaders()}\n `, this.#shadow, {host: this});\n // clang-format on\n }\n\n #renderResponseHeaders(): LitHtml.LitTemplate {\n if (!this.#request) {\n return LitHtml.nothing;\n }\n\n const toggleShowRaw = (): void => {\n this.#showResponseHeadersText = !this.#showResponseHeadersText;\n void this.render();\n };\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n <${Category.litTagName}\n @togglerawevent=${toggleShowRaw}\n .data=${{\n name: 'responseHeaders',\n title: i18nString(UIStrings.responseHeaders),\n headerCount: this.#request.sortedResponseHeaders.length,\n checked: this.#request.responseHeadersText ? this.#showResponseHeadersText : undefined,\n additionalContent: this.#renderHeaderOverridesLink(),\n forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.Response,\n } as CategoryData}\n aria-label=${i18nString(UIStrings.responseHeaders)}\n >\n ${this.#showResponseHeadersText ?\n this.#renderRawHeaders(this.#request.responseHeadersText, true) : html`\n <${ResponseHeaderSection.litTagName} .data=${{\n request: this.#request,\n toReveal: this.#toReveal,\n } as ResponseHeaderSectionData}>\n `}\n \n `;\n // clang-format on\n }\n\n #renderHeaderOverridesLink(): LitHtml.LitTemplate {\n if (!this.#workspace.uiSourceCodeForURL(this.#getHeaderOverridesFileUrl())) {\n return LitHtml.nothing;\n }\n\n const overridesSetting: Common.Settings.Setting =\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled');\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n const fileIcon = html`\n <${IconButton.Icon.Icon.litTagName} class=${overridesSetting.get() ? 'inline-icon dot purple': 'inline-icon'} .data=${{\n iconName: 'document',\n color: 'var(--icon-default)',\n width: '16px',\n height: '16px',\n } as IconButton.Icon.IconData}>\n `;\n // clang-format on\n\n const revealHeadersFile = (event: Event): void => {\n event.preventDefault();\n const uiSourceCode = this.#workspace.uiSourceCodeForURL(this.#getHeaderOverridesFileUrl());\n if (uiSourceCode) {\n Sources.SourcesPanel.SourcesPanel.instance().showUISourceCode(uiSourceCode);\n void Sources.SourcesPanel.SourcesPanel.instance().revealInNavigator(uiSourceCode);\n }\n };\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n \n <${IconButton.Icon.Icon.litTagName} class=\"inline-icon\" .data=${{\n iconName: 'help',\n color: 'var(--icon-link)',\n width: '16px',\n height: '16px',\n } as IconButton.Icon.IconData}>\n \n \n ${fileIcon}${Persistence.NetworkPersistenceManager.HEADERS_FILENAME}\n \n `;\n // clang-format on\n }\n\n #getHeaderOverridesFileUrl(): Platform.DevToolsPath.UrlString {\n if (!this.#request) {\n return Platform.DevToolsPath.EmptyUrlString;\n }\n const fileUrl = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().fileUrlFromNetworkUrl(\n this.#request.url(), /* ignoreInactive */ true);\n return fileUrl.substring(0, fileUrl.lastIndexOf('/')) + '/' +\n Persistence.NetworkPersistenceManager.HEADERS_FILENAME as Platform.DevToolsPath.UrlString;\n }\n\n #renderRequestHeaders(): LitHtml.LitTemplate {\n if (!this.#request) {\n return LitHtml.nothing;\n }\n const requestHeadersText = this.#request.requestHeadersText();\n\n const toggleShowRaw = (): void => {\n this.#showRequestHeadersText = !this.#showRequestHeadersText;\n void this.render();\n };\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n <${Category.litTagName}\n @togglerawevent=${toggleShowRaw}\n .data=${{\n name: 'requestHeaders',\n title: i18nString(UIStrings.requestHeaders),\n headerCount: this.#request.requestHeaders().length,\n checked: requestHeadersText? this.#showRequestHeadersText : undefined,\n forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.Request,\n } as CategoryData}\n aria-label=${i18nString(UIStrings.requestHeaders)}\n >\n ${(this.#showRequestHeadersText && requestHeadersText) ?\n this.#renderRawHeaders(requestHeadersText, false) : html`\n <${RequestHeaderSection.litTagName} .data=${{\n request: this.#request,\n toReveal: this.#toReveal,\n } as RequestHeaderSectionData}>\n `}\n \n `;\n // clang-format on\n }\n\n #renderRawHeaders(rawHeadersText: string, forResponseHeaders: boolean): LitHtml.TemplateResult {\n const trimmed = rawHeadersText.trim();\n const showFull = forResponseHeaders ? this.#showResponseHeadersTextFull : this.#showRequestHeadersTextFull;\n const isShortened = !showFull && trimmed.length > RAW_HEADER_CUTOFF;\n\n const showMore = ():void => {\n if (forResponseHeaders) {\n this.#showResponseHeadersTextFull = true;\n } else {\n this.#showRequestHeadersTextFull = true;\n }\n void this.render();\n };\n\n const onContextMenuOpen = (event: Event): void => {\n const showFull = forResponseHeaders ? this.#showResponseHeadersTextFull : this.#showRequestHeadersTextFull;\n if (!showFull) {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n const section = contextMenu.newSection();\n section.appendItem(i18nString(UIStrings.showMore), showMore);\n void contextMenu.show();\n }\n };\n\n const addContextMenuListener = (el: Element):void => {\n if (isShortened) {\n el.addEventListener('contextmenu', onContextMenuOpen);\n }\n };\n\n return html`\n
\n
${isShortened ? trimmed.substring(0, RAW_HEADER_CUTOFF) : trimmed}
\n ${isShortened ? html`\n <${Buttons.Button.Button.litTagName}\n .size=${Buttons.Button.Size.SMALL}\n .variant=${Buttons.Button.Variant.SECONDARY}\n @click=${showMore}\n >${i18nString(UIStrings.showMore)}\n ` : LitHtml.nothing}\n
\n `;\n }\n\n #renderGeneralSection(): LitHtml.LitTemplate {\n if (!this.#request) {\n return LitHtml.nothing;\n }\n\n const statusClasses = ['status'];\n if (this.#request.statusCode < 300 || this.#request.statusCode === 304) {\n statusClasses.push('green-circle');\n } else if (this.#request.statusCode < 400) {\n statusClasses.push('yellow-circle');\n } else {\n statusClasses.push('red-circle');\n }\n\n let comment = '';\n if (this.#request.cachedInMemory()) {\n comment = i18nString(UIStrings.fromMemoryCache);\n } else if (this.#request.fetchedViaServiceWorker) {\n comment = i18nString(UIStrings.fromServiceWorker);\n } else if (this.#request.redirectSourceSignedExchangeInfoHasNoErrors()) {\n comment = i18nString(UIStrings.fromSignedexchange);\n } else if (this.#request.webBundleInnerRequestInfo()) {\n comment = i18nString(UIStrings.fromWebBundle);\n } else if (this.#request.fromPrefetchCache()) {\n comment = i18nString(UIStrings.fromPrefetchCache);\n } else if (this.#request.cached()) {\n comment = i18nString(UIStrings.fromDiskCache);\n }\n\n if (comment) {\n statusClasses.push('status-with-comment');\n }\n\n const statusText = [this.#request.statusCode, this.#request.getInferredStatusText(), comment].join(' ');\n\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n return html`\n <${Category.litTagName}\n .data=${{\n name: 'general',\n title: i18nString(UIStrings.general),\n forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.General,\n } as CategoryData}\n aria-label=${i18nString(UIStrings.general)}\n >\n ${this.#renderGeneralRow(i18nString(UIStrings.requestUrl), this.#request.url())}\n ${this.#request.statusCode? this.#renderGeneralRow(i18nString(UIStrings.requestMethod), this.#request.requestMethod) : LitHtml.nothing}\n ${this.#request.statusCode? this.#renderGeneralRow(i18nString(UIStrings.statusCode), statusText, statusClasses) : LitHtml.nothing}\n ${this.#request.remoteAddress()? this.#renderGeneralRow(i18nString(UIStrings.remoteAddress), this.#request.remoteAddress()) : LitHtml.nothing}\n ${this.#request.referrerPolicy()? this.#renderGeneralRow(i18nString(UIStrings.referrerPolicy), String(this.#request.referrerPolicy())) : LitHtml.nothing}\n \n `;\n // clang-format on\n }\n\n #renderGeneralRow(name: Common.UIString.LocalizedString, value: string, classNames?: string[]): LitHtml.LitTemplate {\n const isHighlighted = this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.General &&\n name.toLowerCase() === this.#toReveal?.header?.toLowerCase();\n return html`\n
\n
${name}:
\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue)}\n >${value}
\n
\n `;\n }\n}\n\nexport class ToggleRawHeadersEvent extends Event {\n static readonly eventName = 'togglerawevent';\n\n constructor() {\n super(ToggleRawHeadersEvent.eventName, {});\n }\n}\n\nexport interface CategoryData {\n name: string;\n title: Common.UIString.LocalizedString;\n headerCount?: number;\n checked?: boolean;\n additionalContent?: LitHtml.LitTemplate;\n forceOpen?: boolean;\n}\n\nexport class Category extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-request-headers-category`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n #expandedSetting?: Common.Settings.Setting;\n #title: Common.UIString.LocalizedString = Common.UIString.LocalizedEmptyString;\n #headerCount?: number = undefined;\n #checked: boolean|undefined = undefined;\n #additionalContent: LitHtml.LitTemplate|undefined = undefined;\n #forceOpen: boolean|undefined = undefined;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [requestHeadersViewStyles, Input.checkboxStyles];\n }\n\n set data(data: CategoryData) {\n this.#title = data.title;\n this.#expandedSetting =\n Common.Settings.Settings.instance().createSetting('request-info-' + data.name + '-category-expanded', true);\n this.#headerCount = data.headerCount;\n this.#checked = data.checked;\n this.#additionalContent = data.additionalContent;\n this.#forceOpen = data.forceOpen;\n this.#render();\n }\n\n #onCheckboxToggle(): void {\n this.dispatchEvent(new ToggleRawHeadersEvent());\n }\n\n #render(): void {\n const isOpen = (this.#expandedSetting ? this.#expandedSetting.get() : true) || this.#forceOpen;\n // Disabled until https://crbug.com/1079231 is fixed.\n // clang-format off\n render(html`\n
\n \n
\n
\n ${this.#title}${this.#headerCount !== undefined ?\n html` (${this.#headerCount})` :\n LitHtml.nothing\n }\n
\n
\n ${this.#checked !== undefined ? html`\n \n ` : LitHtml.nothing}\n
\n
${this.#additionalContent}
\n
\n \n
\n `, this.#shadow, {host: this});\n // clang-format on\n }\n\n #onSummaryKeyDown(event: KeyboardEvent): void {\n if (!event.target) {\n return;\n }\n const summaryElement = event.target as HTMLElement;\n const detailsElement = summaryElement.parentElement as HTMLDetailsElement;\n if (!detailsElement) {\n throw new Error('
element is not found for a element');\n }\n switch (event.key) {\n case 'ArrowLeft':\n detailsElement.open = false;\n break;\n case 'ArrowRight':\n detailsElement.open = true;\n break;\n }\n }\n\n #onToggle(event: Event): void {\n this.#expandedSetting?.set((event.target as HTMLDetailsElement).open);\n }\n}\n\nComponentHelpers.CustomElements.defineComponent('devtools-request-headers', RequestHeadersView);\nComponentHelpers.CustomElements.defineComponent('devtools-request-headers-category', Category);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-request-headers': RequestHeadersView;\n 'devtools-request-headers-category': Category;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/network/network-meta.js b/public/panels/network/network-meta.js index 49d51f7cb..b1c56afba 100644 --- a/public/panels/network/network-meta.js +++ b/public/panels/network/network-meta.js @@ -152,7 +152,7 @@ UI.ViewManager.registerViewExtension({ order: 60, async loadView() { const Network = await loadNetworkModule(); - return Network.BlockedURLsPane.BlockedURLsPane.instance(); + return new Network.BlockedURLsPane.BlockedURLsPane(); }, }); UI.ViewManager.registerViewExtension({ diff --git a/public/panels/network/network-meta.js.map b/public/panels/network/network-meta.js.map index a39534990..748569612 100644 --- a/public/panels/network/network-meta.js.map +++ b/public/panels/network/network-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"network-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/network-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,cAAc,MAAM,yCAAyC,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,WAAW,EAAE,cAAc;IAC3B;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,0BAA0B,EAAE,+BAA+B;IAC3D;;OAEG;IACH,sBAAsB,EAAE,0BAA0B;IAClD;;OAEG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D,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC/B,YAAY;QACV,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IACD,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,aAAa;IAC9D,KAAK,CAAC,YAAY;QAChB,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;IACtD,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC/B,YAAY;QACV,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACnD,CAAC;IACD,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,aAAa;IAC9D,KAAK,CAAC,YAAY;QAChB,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,4BAA4B,EAAE,CAAC;IACjE,CAAC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as NetworkForward from '../../panels/network/forward/forward.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Network from './network.js';\n\nconst UIStrings = {\n /**\n *@description Command for showing the 'Network' tool\n */\n showNetwork: 'Show Network',\n /**\n *@description Title of the Network tool\n */\n network: 'Network',\n /**\n *@description Command for showing the 'Network request blocking' tool\n */\n showNetworkRequestBlocking: 'Show Network request blocking',\n /**\n *@description Title of the 'Network request blocking' tool in the bottom drawer\n */\n networkRequestBlocking: 'Network request blocking',\n /**\n *@description Command for showing the 'Network conditions' tool\n */\n showNetworkConditions: 'Show Network conditions',\n /**\n *@description Title of the 'Network conditions' tool in the bottom drawer\n */\n networkConditions: 'Network conditions',\n /**\n *@description A tag of Network Conditions tool that can be searched in the command menu\n */\n diskCache: 'disk cache',\n /**\n *@description A tag of Network Conditions tool that can be searched in the command menu\n */\n networkThrottling: 'network throttling',\n /**\n *@description Command for showing the 'Search' tool\n */\n showSearch: 'Show Search',\n /**\n *@description Title of a search bar or tool\n */\n search: 'Search',\n /**\n *@description Title of an action in the network tool to toggle recording\n */\n recordNetworkLog: 'Record network log',\n /**\n *@description Title of an action in the network tool to toggle recording\n */\n stopRecordingNetworkLog: 'Stop recording network log',\n /**\n *@description Title of an action that hides network request details\n */\n hideRequestDetails: 'Hide request details',\n /**\n *@description Title of a setting under the Network category in Settings\n */\n colorcodeResourceTypes: 'Color-code resource types',\n /**\n *@description A tag of Network color-code resource types that can be searched in the command menu\n */\n colorCode: 'color code',\n /**\n *@description A tag of Network color-code resource types that can be searched in the command menu\n */\n resourceType: 'resource type',\n /**\n *@description Title of a setting under the Network category that can be invoked through the Command Menu\n */\n colorCodeByResourceType: 'Color code by resource type',\n /**\n *@description Title of a setting under the Network category that can be invoked through the Command Menu\n */\n useDefaultColors: 'Use default colors',\n /**\n *@description Title of a setting under the Network category in Settings\n */\n groupNetworkLogByFrame: 'Group network log by frame',\n /**\n *@description A tag of Group Network by frame setting that can be searched in the command menu\n */\n netWork: 'network',\n /**\n *@description A tag of Group Network by frame setting that can be searched in the command menu\n */\n frame: 'frame',\n /**\n *@description A tag of Group Network by frame setting that can be searched in the command menu\n */\n group: 'group',\n /**\n *@description Title of a setting under the Network category that can be invoked through the Command Menu\n */\n groupNetworkLogItemsByFrame: 'Group network log items by frame',\n /**\n *@description Title of a setting under the Network category that can be invoked through the Command Menu\n */\n dontGroupNetworkLogItemsByFrame: 'Don\\'t group network log items by frame',\n /**\n *@description Title of a button for clearing the network log\n */\n clear: 'Clear network log',\n /**\n *@description Title of an action in the Network request blocking panel to add a new URL pattern to the blocklist.\n */\n addNetworkRequestBlockingPattern: 'Add network request blocking pattern',\n /**\n *@description Title of an action in the Network request blocking panel to clear all URL patterns.\n */\n removeAllNetworkRequestBlockingPatterns: 'Remove all network request blocking patterns',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/network-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\nlet loadedNetworkModule: (typeof Network|undefined);\n\nasync function loadNetworkModule(): Promise {\n if (!loadedNetworkModule) {\n loadedNetworkModule = await import('./network.js');\n }\n return loadedNetworkModule;\n}\n\nfunction maybeRetrieveContextTypes(getClassCallBack: (loadedNetworkModule: typeof Network) => T[]): T[] {\n if (loadedNetworkModule === undefined) {\n return [];\n }\n return getClassCallBack(loadedNetworkModule);\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.PANEL,\n id: 'network',\n commandPrompt: i18nLazyString(UIStrings.showNetwork),\n title: i18nLazyString(UIStrings.network),\n order: 40,\n async loadView() {\n const Network = await loadNetworkModule();\n return Network.NetworkPanel.NetworkPanel.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'network.blocked-urls',\n commandPrompt: i18nLazyString(UIStrings.showNetworkRequestBlocking),\n title: i18nLazyString(UIStrings.networkRequestBlocking),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 60,\n async loadView() {\n const Network = await loadNetworkModule();\n return Network.BlockedURLsPane.BlockedURLsPane.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'network.config',\n commandPrompt: i18nLazyString(UIStrings.showNetworkConditions),\n title: i18nLazyString(UIStrings.networkConditions),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 40,\n tags: [\n i18nLazyString(UIStrings.diskCache),\n i18nLazyString(UIStrings.networkThrottling),\n i18n.i18n.lockedLazyString('useragent'),\n i18n.i18n.lockedLazyString('user agent'),\n i18n.i18n.lockedLazyString('user-agent'),\n ],\n async loadView() {\n const Network = await loadNetworkModule();\n return Network.NetworkConfigView.NetworkConfigView.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.NETWORK_SIDEBAR,\n id: 'network.search-network-tab',\n commandPrompt: i18nLazyString(UIStrings.showSearch),\n title: i18nLazyString(UIStrings.search),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Network = await loadNetworkModule();\n return Network.NetworkPanel.SearchNetworkView.instance();\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.toggle-recording',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n iconClass: UI.ActionRegistration.IconClass.START_RECORDING,\n toggleable: true,\n toggledIconClass: UI.ActionRegistration.IconClass.STOP_RECORDING,\n toggleWithRedColor: true,\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.NetworkPanel.NetworkPanel]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.ActionDelegate();\n },\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.recordNetworkLog),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.stopRecordingNetworkLog),\n },\n ],\n bindings: [\n {\n shortcut: 'Ctrl+E',\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n },\n {\n shortcut: 'Meta+E',\n platform: UI.ActionRegistration.Platforms.Mac,\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.clear',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.clear),\n iconClass: UI.ActionRegistration.IconClass.CLEAR,\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.NetworkPanel.NetworkPanel]);\n },\n bindings: [\n {\n shortcut: 'Ctrl+L',\n },\n {\n shortcut: 'Meta+K',\n platform: UI.ActionRegistration.Platforms.Mac,\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.hide-request-details',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.hideRequestDetails),\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.NetworkPanel.NetworkPanel]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.ActionDelegate();\n },\n bindings: [\n {\n shortcut: 'Esc',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.search',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.search),\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.NetworkPanel.NetworkPanel]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.ActionDelegate();\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.add-network-request-blocking-pattern',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.addNetworkRequestBlockingPattern),\n iconClass: UI.ActionRegistration.IconClass.PLUS,\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.BlockedURLsPane.BlockedURLsPane]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.BlockedURLsPane.ActionDelegate();\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.remove-all-network-request-blocking-patterns',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.removeAllNetworkRequestBlockingPatterns),\n iconClass: UI.ActionRegistration.IconClass.CLEAR,\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.BlockedURLsPane.BlockedURLsPane]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.BlockedURLsPane.ActionDelegate();\n },\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.NETWORK,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.colorcodeResourceTypes),\n settingName: 'networkColorCodeResourceTypes',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n tags: [\n i18nLazyString(UIStrings.colorCode),\n i18nLazyString(UIStrings.resourceType),\n ],\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.colorCodeByResourceType),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.useDefaultColors),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.NETWORK,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.groupNetworkLogByFrame),\n settingName: 'network.group-by-frame',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n tags: [\n i18nLazyString(UIStrings.netWork),\n i18nLazyString(UIStrings.frame),\n i18nLazyString(UIStrings.group),\n ],\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.groupNetworkLogItemsByFrame),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.dontGroupNetworkLogItemsByFrame),\n },\n ],\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.NETWORK_SIDEBAR,\n category: UI.ViewManager.ViewLocationCategory.NETWORK,\n async loadResolver() {\n const Network = await loadNetworkModule();\n return Network.NetworkPanel.NetworkPanel.instance();\n },\n});\n\nUI.ContextMenu.registerProvider({\n contextTypes() {\n return [\n SDK.NetworkRequest.NetworkRequest,\n SDK.Resource.Resource,\n Workspace.UISourceCode.UISourceCode,\n ];\n },\n async loadProvider() {\n const Network = await loadNetworkModule();\n return Network.NetworkPanel.NetworkPanel.instance();\n },\n experiment: undefined,\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n SDK.NetworkRequest.NetworkRequest,\n ];\n },\n destination: Common.Revealer.RevealerDestination.NETWORK_PANEL,\n async loadRevealer() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.RequestRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [NetworkForward.UIRequestLocation.UIRequestLocation];\n },\n destination: undefined,\n async loadRevealer() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.RequestLocationRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [NetworkForward.NetworkRequestId.NetworkRequestId];\n },\n destination: Common.Revealer.RevealerDestination.NETWORK_PANEL,\n async loadRevealer() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.RequestIdRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [NetworkForward.UIFilter.UIRequestFilter];\n },\n destination: Common.Revealer.RevealerDestination.NETWORK_PANEL,\n async loadRevealer() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.NetworkLogWithFilterRevealer();\n },\n});\n"]} \ No newline at end of file +{"version":3,"file":"network-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/network/network-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;A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AC,YAAY,CAAC,eAAe,EAAE,CAAC;IACpD,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC/B,YAAY;QACV,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC9D,CAAC;IACD,WAAW,EAAE,SAAS;IACtB,KAAK,CAAC,YAAY;QAChB,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,uBAAuB,EAAE,CAAC;IAC5D,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC/B,YAAY;QACV,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,CAAC;IACD,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,aAAa;IAC9D,KAAK,CAAC,YAAY;QAChB,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;IACtD,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC/B,YAAY;QACV,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACnD,CAAC;IACD,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,aAAa;IAC9D,KAAK,CAAC,YAAY;QAChB,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC,4BAA4B,EAAE,CAAC;IACjE,CAAC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as NetworkForward from '../../panels/network/forward/forward.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Network from './network.js';\n\nconst UIStrings = {\n /**\n *@description Command for showing the 'Network' tool\n */\n showNetwork: 'Show Network',\n /**\n *@description Title of the Network tool\n */\n network: 'Network',\n /**\n *@description Command for showing the 'Network request blocking' tool\n */\n showNetworkRequestBlocking: 'Show Network request blocking',\n /**\n *@description Title of the 'Network request blocking' tool in the bottom drawer\n */\n networkRequestBlocking: 'Network request blocking',\n /**\n *@description Command for showing the 'Network conditions' tool\n */\n showNetworkConditions: 'Show Network conditions',\n /**\n *@description Title of the 'Network conditions' tool in the bottom drawer\n */\n networkConditions: 'Network conditions',\n /**\n *@description A tag of Network Conditions tool that can be searched in the command menu\n */\n diskCache: 'disk cache',\n /**\n *@description A tag of Network Conditions tool that can be searched in the command menu\n */\n networkThrottling: 'network throttling',\n /**\n *@description Command for showing the 'Search' tool\n */\n showSearch: 'Show Search',\n /**\n *@description Title of a search bar or tool\n */\n search: 'Search',\n /**\n *@description Title of an action in the network tool to toggle recording\n */\n recordNetworkLog: 'Record network log',\n /**\n *@description Title of an action in the network tool to toggle recording\n */\n stopRecordingNetworkLog: 'Stop recording network log',\n /**\n *@description Title of an action that hides network request details\n */\n hideRequestDetails: 'Hide request details',\n /**\n *@description Title of a setting under the Network category in Settings\n */\n colorcodeResourceTypes: 'Color-code resource types',\n /**\n *@description A tag of Network color-code resource types that can be searched in the command menu\n */\n colorCode: 'color code',\n /**\n *@description A tag of Network color-code resource types that can be searched in the command menu\n */\n resourceType: 'resource type',\n /**\n *@description Title of a setting under the Network category that can be invoked through the Command Menu\n */\n colorCodeByResourceType: 'Color code by resource type',\n /**\n *@description Title of a setting under the Network category that can be invoked through the Command Menu\n */\n useDefaultColors: 'Use default colors',\n /**\n *@description Title of a setting under the Network category in Settings\n */\n groupNetworkLogByFrame: 'Group network log by frame',\n /**\n *@description A tag of Group Network by frame setting that can be searched in the command menu\n */\n netWork: 'network',\n /**\n *@description A tag of Group Network by frame setting that can be searched in the command menu\n */\n frame: 'frame',\n /**\n *@description A tag of Group Network by frame setting that can be searched in the command menu\n */\n group: 'group',\n /**\n *@description Title of a setting under the Network category that can be invoked through the Command Menu\n */\n groupNetworkLogItemsByFrame: 'Group network log items by frame',\n /**\n *@description Title of a setting under the Network category that can be invoked through the Command Menu\n */\n dontGroupNetworkLogItemsByFrame: 'Don\\'t group network log items by frame',\n /**\n *@description Title of a button for clearing the network log\n */\n clear: 'Clear network log',\n /**\n *@description Title of an action in the Network request blocking panel to add a new URL pattern to the blocklist.\n */\n addNetworkRequestBlockingPattern: 'Add network request blocking pattern',\n /**\n *@description Title of an action in the Network request blocking panel to clear all URL patterns.\n */\n removeAllNetworkRequestBlockingPatterns: 'Remove all network request blocking patterns',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/network/network-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\nlet loadedNetworkModule: (typeof Network|undefined);\n\nasync function loadNetworkModule(): Promise {\n if (!loadedNetworkModule) {\n loadedNetworkModule = await import('./network.js');\n }\n return loadedNetworkModule;\n}\n\nfunction maybeRetrieveContextTypes(getClassCallBack: (loadedNetworkModule: typeof Network) => T[]): T[] {\n if (loadedNetworkModule === undefined) {\n return [];\n }\n return getClassCallBack(loadedNetworkModule);\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.PANEL,\n id: 'network',\n commandPrompt: i18nLazyString(UIStrings.showNetwork),\n title: i18nLazyString(UIStrings.network),\n order: 40,\n async loadView() {\n const Network = await loadNetworkModule();\n return Network.NetworkPanel.NetworkPanel.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'network.blocked-urls',\n commandPrompt: i18nLazyString(UIStrings.showNetworkRequestBlocking),\n title: i18nLazyString(UIStrings.networkRequestBlocking),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 60,\n async loadView() {\n const Network = await loadNetworkModule();\n return new Network.BlockedURLsPane.BlockedURLsPane();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'network.config',\n commandPrompt: i18nLazyString(UIStrings.showNetworkConditions),\n title: i18nLazyString(UIStrings.networkConditions),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 40,\n tags: [\n i18nLazyString(UIStrings.diskCache),\n i18nLazyString(UIStrings.networkThrottling),\n i18n.i18n.lockedLazyString('useragent'),\n i18n.i18n.lockedLazyString('user agent'),\n i18n.i18n.lockedLazyString('user-agent'),\n ],\n async loadView() {\n const Network = await loadNetworkModule();\n return Network.NetworkConfigView.NetworkConfigView.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.NETWORK_SIDEBAR,\n id: 'network.search-network-tab',\n commandPrompt: i18nLazyString(UIStrings.showSearch),\n title: i18nLazyString(UIStrings.search),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Network = await loadNetworkModule();\n return Network.NetworkPanel.SearchNetworkView.instance();\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.toggle-recording',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n iconClass: UI.ActionRegistration.IconClass.START_RECORDING,\n toggleable: true,\n toggledIconClass: UI.ActionRegistration.IconClass.STOP_RECORDING,\n toggleWithRedColor: true,\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.NetworkPanel.NetworkPanel]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.ActionDelegate();\n },\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.recordNetworkLog),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.stopRecordingNetworkLog),\n },\n ],\n bindings: [\n {\n shortcut: 'Ctrl+E',\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n },\n {\n shortcut: 'Meta+E',\n platform: UI.ActionRegistration.Platforms.Mac,\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.clear',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.clear),\n iconClass: UI.ActionRegistration.IconClass.CLEAR,\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.NetworkPanel.NetworkPanel]);\n },\n bindings: [\n {\n shortcut: 'Ctrl+L',\n },\n {\n shortcut: 'Meta+K',\n platform: UI.ActionRegistration.Platforms.Mac,\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.hide-request-details',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.hideRequestDetails),\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.NetworkPanel.NetworkPanel]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.ActionDelegate();\n },\n bindings: [\n {\n shortcut: 'Esc',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.search',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.search),\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.NetworkPanel.NetworkPanel]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.ActionDelegate();\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.add-network-request-blocking-pattern',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.addNetworkRequestBlockingPattern),\n iconClass: UI.ActionRegistration.IconClass.PLUS,\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.BlockedURLsPane.BlockedURLsPane]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.BlockedURLsPane.ActionDelegate();\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'network.remove-all-network-request-blocking-patterns',\n category: UI.ActionRegistration.ActionCategory.NETWORK,\n title: i18nLazyString(UIStrings.removeAllNetworkRequestBlockingPatterns),\n iconClass: UI.ActionRegistration.IconClass.CLEAR,\n contextTypes() {\n return maybeRetrieveContextTypes(Network => [Network.BlockedURLsPane.BlockedURLsPane]);\n },\n async loadActionDelegate() {\n const Network = await loadNetworkModule();\n return new Network.BlockedURLsPane.ActionDelegate();\n },\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.NETWORK,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.colorcodeResourceTypes),\n settingName: 'networkColorCodeResourceTypes',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n tags: [\n i18nLazyString(UIStrings.colorCode),\n i18nLazyString(UIStrings.resourceType),\n ],\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.colorCodeByResourceType),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.useDefaultColors),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.NETWORK,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.groupNetworkLogByFrame),\n settingName: 'network.group-by-frame',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n tags: [\n i18nLazyString(UIStrings.netWork),\n i18nLazyString(UIStrings.frame),\n i18nLazyString(UIStrings.group),\n ],\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.groupNetworkLogItemsByFrame),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.dontGroupNetworkLogItemsByFrame),\n },\n ],\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.NETWORK_SIDEBAR,\n category: UI.ViewManager.ViewLocationCategory.NETWORK,\n async loadResolver() {\n const Network = await loadNetworkModule();\n return Network.NetworkPanel.NetworkPanel.instance();\n },\n});\n\nUI.ContextMenu.registerProvider({\n contextTypes() {\n return [\n SDK.NetworkRequest.NetworkRequest,\n SDK.Resource.Resource,\n Workspace.UISourceCode.UISourceCode,\n ];\n },\n async loadProvider() {\n const Network = await loadNetworkModule();\n return Network.NetworkPanel.NetworkPanel.instance();\n },\n experiment: undefined,\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n SDK.NetworkRequest.NetworkRequest,\n ];\n },\n destination: Common.Revealer.RevealerDestination.NETWORK_PANEL,\n async loadRevealer() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.RequestRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [NetworkForward.UIRequestLocation.UIRequestLocation];\n },\n destination: undefined,\n async loadRevealer() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.RequestLocationRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [NetworkForward.NetworkRequestId.NetworkRequestId];\n },\n destination: Common.Revealer.RevealerDestination.NETWORK_PANEL,\n async loadRevealer() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.RequestIdRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [NetworkForward.UIFilter.UIRequestFilter];\n },\n destination: Common.Revealer.RevealerDestination.NETWORK_PANEL,\n async loadRevealer() {\n const Network = await loadNetworkModule();\n return new Network.NetworkPanel.NetworkLogWithFilterRevealer();\n },\n});\n"]} \ No newline at end of file diff --git a/public/panels/performance_monitor/PerformanceMonitor.d.ts b/public/panels/performance_monitor/PerformanceMonitor.d.ts index 91475420b..e1820010f 100644 --- a/public/panels/performance_monitor/PerformanceMonitor.d.ts +++ b/public/panels/performance_monitor/PerformanceMonitor.d.ts @@ -16,10 +16,7 @@ export declare class PerformanceMonitorImpl extends UI.Widget.HBox implements SD private model?; private startTimestamp?; private pollTimer?; - constructor(pollIntervalMs: number); - static instance(opts?: { - forceNew: null; - }): PerformanceMonitorImpl; + constructor(pollIntervalMs?: number); wasShown(): void; willHide(): void; modelAdded(model: SDK.PerformanceMetricsModel.PerformanceMetricsModel): void; diff --git a/public/panels/performance_monitor/PerformanceMonitor.js b/public/panels/performance_monitor/PerformanceMonitor.js index 40d0eb9d7..4f1d60187 100644 --- a/public/panels/performance_monitor/PerformanceMonitor.js +++ b/public/panels/performance_monitor/PerformanceMonitor.js @@ -55,7 +55,6 @@ const UIStrings = { }; const str_ = i18n.i18n.registerUIStrings('panels/performance_monitor/PerformanceMonitor.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -let performanceMonitorImplInstance; export class PerformanceMonitorImpl extends UI.Widget.HBox { metricsBuffer; pixelsPerMs; @@ -71,7 +70,7 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox { model; startTimestamp; pollTimer; - constructor(pollIntervalMs) { + constructor(pollIntervalMs = 500) { super(true); this.element.setAttribute('jslog', `${VisualLogging.panel().context('performance-monitor')}`); this.contentElement.classList.add('perfmon-pane'); @@ -95,13 +94,6 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox { this.controlPane.addEventListener("MetricChanged" /* Events.MetricChanged */, this.recalcChartHeight, this); SDK.TargetManager.TargetManager.instance().observeModels(SDK.PerformanceMetricsModel.PerformanceMetricsModel, this); } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!performanceMonitorImplInstance || forceNew) { - performanceMonitorImplInstance = new PerformanceMonitorImpl(500); - } - return performanceMonitorImplInstance; - } wasShown() { if (!this.model) { return; diff --git a/public/panels/performance_monitor/PerformanceMonitor.js.map b/public/panels/performance_monitor/PerformanceMonitor.js.map index 2a6f0c7bd..10aa8b483 100644 --- a/public/panels/performance_monitor/PerformanceMonitor.js.map +++ b/public/panels/performance_monitor/PerformanceMonitor.js.map @@ -1 +1 @@ -{"version":3,"file":"PerformanceMonitor.js","sourceRoot":"","sources":["../../../../../../front_end/panels/performance_monitor/PerformanceMonitor.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAC/E,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,+BAA+B,EAAE,2DAA2D;IAC5F;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,QAAQ,EAAE,WAAW;IACrB;;OAEG;IACH,UAAU,EAAE,cAAc;IAC1B;;OAEG;IACH,QAAQ,EAAE,WAAW;IACrB;;OAEG;IACH,gBAAgB,EAAE,oBAAoB;IACtC;;OAEG;IACH,SAAS,EAAE,WAAW;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,CAAC;SACxB;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAC,qBAAqB,EAAE,CAAC,EAAC,CAAC,CAAC","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport performanceMonitorStyles from './performanceMonitor.css.js';\n\nconst UIStrings = {\n /**\n *@description Aria accessible name in Performance Monitor of the Performance monitor tab\n */\n graphsDisplayingARealtimeViewOf: 'Graphs displaying a real-time view of performance metrics',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n paused: 'Paused',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n cpuUsage: 'CPU usage',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n jsHeapSize: 'JS heap size',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n domNodes: 'DOM Nodes',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n jsEventListeners: 'JS event listeners',\n /**\n *@description Text for documents, a type of resources\n */\n documents: 'Documents',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n documentFrames: 'Document Frames',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n layoutsSec: 'Layouts / sec',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n styleRecalcsSec: 'Style recalcs / sec',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/performance_monitor/PerformanceMonitor.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet performanceMonitorImplInstance: PerformanceMonitorImpl;\n\nexport class PerformanceMonitorImpl extends UI.Widget.HBox implements\n SDK.TargetManager.SDKModelObserver {\n private metricsBuffer: {timestamp: number, metrics: Map}[];\n private readonly pixelsPerMs: number;\n private pollIntervalMs: number;\n private readonly scaleHeight: number;\n private graphHeight: number;\n private gridColor: string;\n private controlPane: ControlPane;\n private canvas: HTMLCanvasElement;\n private animationId!: number;\n private width!: number;\n private height!: number;\n private model?: SDK.PerformanceMetricsModel.PerformanceMetricsModel|null;\n private startTimestamp?: number;\n private pollTimer?: number;\n\n constructor(pollIntervalMs: number) {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('performance-monitor')}`);\n\n this.contentElement.classList.add('perfmon-pane');\n this.metricsBuffer = [];\n /** @const */\n this.pixelsPerMs = 10 / 1000;\n /** @const */\n this.pollIntervalMs = pollIntervalMs;\n /** @const */\n this.scaleHeight = 16;\n /** @const */\n this.graphHeight = 90;\n this.gridColor = ThemeSupport.ThemeSupport.instance().getComputedValue('--divider-line');\n this.controlPane = new ControlPane(this.contentElement);\n const chartContainer = this.contentElement.createChild('div', 'perfmon-chart-container');\n this.canvas = chartContainer.createChild('canvas') as HTMLCanvasElement;\n this.canvas.tabIndex = -1;\n UI.ARIAUtils.setLabel(this.canvas, i18nString(UIStrings.graphsDisplayingARealtimeViewOf));\n this.contentElement.createChild('div', 'perfmon-chart-suspend-overlay fill').createChild('div').textContent =\n i18nString(UIStrings.paused);\n this.controlPane.addEventListener(Events.MetricChanged, this.recalcChartHeight, this);\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.PerformanceMetricsModel.PerformanceMetricsModel, this);\n }\n\n static instance(opts = {forceNew: null}): PerformanceMonitorImpl {\n const {forceNew} = opts;\n if (!performanceMonitorImplInstance || forceNew) {\n performanceMonitorImplInstance = new PerformanceMonitorImpl(500);\n }\n\n return performanceMonitorImplInstance;\n }\n\n override wasShown(): void {\n if (!this.model) {\n return;\n }\n this.registerCSSFiles([performanceMonitorStyles]);\n this.controlPane.instantiateMetricData();\n const themeSupport = ThemeSupport.ThemeSupport.instance();\n themeSupport.addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n // instantiateMetricData sets the colors for the metrics, which we need\n // to re-evaluate when the theme changes before re-drawing the canvas.\n this.controlPane.instantiateMetricData();\n this.draw();\n });\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.SuspendStateChanged, this.suspendStateChanged, this);\n void this.model.enable();\n this.suspendStateChanged();\n }\n\n override willHide(): void {\n if (!this.model) {\n return;\n }\n SDK.TargetManager.TargetManager.instance().removeEventListener(\n SDK.TargetManager.Events.SuspendStateChanged, this.suspendStateChanged, this);\n this.stopPolling();\n void this.model.disable();\n }\n\n modelAdded(model: SDK.PerformanceMetricsModel.PerformanceMetricsModel): void {\n if (model.target() !== SDK.TargetManager.TargetManager.instance().primaryPageTarget()) {\n return;\n }\n this.model = model;\n if (this.isShowing()) {\n this.wasShown();\n }\n }\n\n modelRemoved(model: SDK.PerformanceMetricsModel.PerformanceMetricsModel): void {\n if (this.model !== model) {\n return;\n }\n if (this.isShowing()) {\n this.willHide();\n }\n this.model = null;\n }\n\n private suspendStateChanged(): void {\n const suspended = SDK.TargetManager.TargetManager.instance().allTargetsSuspended();\n if (suspended) {\n this.stopPolling();\n } else {\n this.startPolling();\n }\n this.contentElement.classList.toggle('suspended', suspended);\n }\n\n private startPolling(): void {\n this.startTimestamp = 0;\n this.pollTimer = window.setInterval(() => this.poll(), this.pollIntervalMs);\n this.onResize();\n const animate = (): void => {\n this.draw();\n this.animationId = this.contentElement.window().requestAnimationFrame(() => {\n animate();\n });\n };\n animate();\n }\n\n private stopPolling(): void {\n window.clearInterval(this.pollTimer);\n this.contentElement.window().cancelAnimationFrame(this.animationId);\n this.metricsBuffer = [];\n }\n\n private async poll(): Promise {\n if (!this.model) {\n return;\n }\n const data = await this.model.requestMetrics();\n const timestamp = data.timestamp;\n const metrics = data.metrics;\n this.metricsBuffer.push({timestamp, metrics: metrics});\n const millisPerWidth = this.width / this.pixelsPerMs;\n // Multiply by 2 as the pollInterval has some jitter and to have some extra samples if window is resized.\n const maxCount = Math.ceil(millisPerWidth / this.pollIntervalMs * 2);\n if (this.metricsBuffer.length > maxCount * 2) // Multiply by 2 to have a hysteresis.\n {\n this.metricsBuffer.splice(0, this.metricsBuffer.length - maxCount);\n }\n this.controlPane.updateMetrics(metrics);\n }\n\n private draw(): void {\n const ctx = this.canvas.getContext('2d') as CanvasRenderingContext2D;\n ctx.save();\n ctx.scale(window.devicePixelRatio, window.devicePixelRatio);\n ctx.clearRect(0, 0, this.width, this.height);\n ctx.save();\n ctx.translate(0, this.scaleHeight); // Reserve space for the scale bar.\n for (const chartInfo of this.controlPane.charts()) {\n if (!this.controlPane.isActive(chartInfo.metrics[0].name)) {\n continue;\n }\n this.drawChart(ctx, chartInfo, this.graphHeight);\n ctx.translate(0, this.graphHeight);\n }\n ctx.restore();\n this.drawHorizontalGrid(ctx);\n ctx.restore();\n }\n\n private drawHorizontalGrid(ctx: CanvasRenderingContext2D): void {\n const labelDistanceSeconds = 10;\n const lightGray = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-2');\n ctx.font = '10px ' + Host.Platform.fontFamily();\n ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');\n const currentTime = Date.now() / 1000;\n for (let sec = Math.ceil(currentTime);; --sec) {\n const x = this.width - ((currentTime - sec) * 1000 - this.pollIntervalMs) * this.pixelsPerMs;\n if (x < -50) {\n break;\n }\n ctx.beginPath();\n ctx.moveTo(x, 0);\n ctx.lineTo(x, this.height);\n if (sec >= 0 && sec % labelDistanceSeconds === 0) {\n ctx.fillText(new Date(sec * 1000).toLocaleTimeString(), x + 4, 12);\n }\n ctx.strokeStyle = sec % labelDistanceSeconds ? lightGray : this.gridColor;\n ctx.stroke();\n }\n }\n\n private drawChart(ctx: CanvasRenderingContext2D, chartInfo: ChartInfo, height: number): void {\n ctx.save();\n ctx.rect(0, 0, this.width, height);\n ctx.clip();\n const bottomPadding = 8;\n const extraSpace = 1.05;\n const max = this.calcMax(chartInfo) * extraSpace;\n const stackedChartBaseLandscape = chartInfo.stacked ? new Map() : null;\n const paths = [];\n for (let i = chartInfo.metrics.length - 1; i >= 0; --i) {\n const metricInfo = chartInfo.metrics[i];\n paths.push({\n path: this.buildMetricPath(\n chartInfo, metricInfo, height - bottomPadding, max, i ? stackedChartBaseLandscape : null),\n color: metricInfo.color,\n });\n }\n const backgroundColor =\n Common.Color.parse(ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container'))\n ?.asLegacyColor();\n\n if (backgroundColor) {\n for (const path of paths.reverse()) {\n const color = path.color;\n ctx.save();\n const parsedColor = Common.Color.parse(color);\n if (!parsedColor) {\n continue;\n }\n ctx.fillStyle = backgroundColor.blendWith(parsedColor.setAlpha(0.2).asLegacyColor()).asString() || '';\n ctx.fill(path.path);\n ctx.strokeStyle = color;\n ctx.lineWidth = 0.5;\n ctx.stroke(path.path);\n ctx.restore();\n }\n }\n ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');\n ctx.font = `10px ${Host.Platform.fontFamily()}`;\n ctx.fillText(chartInfo.title, 8, 10);\n this.drawVerticalGrid(ctx, height - bottomPadding, max, chartInfo);\n ctx.restore();\n }\n\n private calcMax(chartInfo: ChartInfo): number {\n if (chartInfo.max) {\n return chartInfo.max;\n }\n const width = this.width;\n const startTime = performance.now() - this.pollIntervalMs - width / this.pixelsPerMs;\n let max: number = -Infinity;\n for (const metricInfo of chartInfo.metrics) {\n for (let i = this.metricsBuffer.length - 1; i >= 0; --i) {\n const metrics = this.metricsBuffer[i];\n const value = metrics.metrics.get(metricInfo.name);\n if (value !== undefined) {\n max = Math.max(max, value);\n }\n if (metrics.timestamp < startTime) {\n break;\n }\n }\n }\n if (!this.metricsBuffer.length) {\n return 10;\n }\n\n const base10 = Math.pow(10, Math.floor(Math.log10(max)));\n max = Math.ceil(max / base10 / 2) * base10 * 2;\n\n const alpha = 0.2;\n chartInfo.currentMax = max * alpha + (chartInfo.currentMax || max) * (1 - alpha);\n return chartInfo.currentMax;\n }\n\n private drawVerticalGrid(ctx: CanvasRenderingContext2D, height: number, max: number, info: ChartInfo): void {\n let base = Math.pow(10, Math.floor(Math.log10(max)));\n const firstDigit = Math.floor(max / base);\n if (firstDigit !== 1 && firstDigit % 2 === 1) {\n base *= 2;\n }\n let scaleValue = Math.floor(max / base) * base;\n\n const span = max;\n const topPadding = 18;\n const visibleHeight = height - topPadding;\n ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');\n ctx.strokeStyle = this.gridColor;\n ctx.beginPath();\n for (let i = 0; i < 2; ++i) {\n const y = calcY(scaleValue);\n const labelText = MetricIndicator.formatNumber(scaleValue, info);\n ctx.moveTo(0, y);\n ctx.lineTo(4, y);\n ctx.moveTo(ctx.measureText(labelText).width + 12, y);\n ctx.lineTo(this.width, y);\n ctx.fillText(labelText, 8, calcY(scaleValue) + 3);\n scaleValue /= 2;\n }\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(0, height + 0.5);\n ctx.lineTo(this.width, height + 0.5);\n ctx.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-2');\n ctx.stroke();\n function calcY(value: number): number {\n return Math.round(height - visibleHeight * value / span) + 0.5;\n }\n }\n\n private buildMetricPath(\n chartInfo: ChartInfo, metricInfo: MetricInfo, height: number, scaleMax: number,\n stackedChartBaseLandscape: Map|null): Path2D {\n const path = new Path2D();\n const topPadding = 18;\n const visibleHeight = height - topPadding;\n if (visibleHeight < 1) {\n return path;\n }\n const span = scaleMax;\n const metricName = metricInfo.name;\n const pixelsPerMs = this.pixelsPerMs;\n const startTime = performance.now() - this.pollIntervalMs - this.width / pixelsPerMs;\n const smooth = chartInfo.smooth;\n\n let x = 0;\n let lastY = 0;\n let lastX = 0;\n if (this.metricsBuffer.length) {\n x = (this.metricsBuffer[0].timestamp - startTime) * pixelsPerMs;\n path.moveTo(x, calcY(0));\n path.lineTo(this.width + 5, calcY(0));\n lastY = calcY(\n (this.metricsBuffer[this.metricsBuffer.length - 1] as {\n metrics: Map,\n }).metrics.get(metricName) ||\n 0);\n lastX = this.width + 5;\n path.lineTo(lastX, lastY);\n }\n for (let i = this.metricsBuffer.length - 1; i >= 0; --i) {\n const metrics = this.metricsBuffer[i];\n const timestamp = metrics.timestamp;\n let value: number = metrics.metrics.get(metricName) || 0;\n if (stackedChartBaseLandscape) {\n value += stackedChartBaseLandscape.get(timestamp) || 0;\n value = Platform.NumberUtilities.clamp(value, 0, 1);\n stackedChartBaseLandscape.set(timestamp, value);\n }\n const y = calcY(value);\n x = (timestamp - startTime) * pixelsPerMs;\n if (smooth) {\n const midX = (lastX + x) / 2;\n path.bezierCurveTo(midX, lastY, midX, y, x, y);\n } else {\n path.lineTo(x, lastY);\n path.lineTo(x, y);\n }\n lastX = x;\n lastY = y;\n if (timestamp < startTime) {\n break;\n }\n }\n return path;\n\n function calcY(value: number): number {\n return Math.round(height - visibleHeight * value / span) + 0.5;\n }\n }\n\n override onResize(): void {\n super.onResize();\n this.width = this.canvas.offsetWidth;\n this.canvas.width = Math.round(this.width * window.devicePixelRatio);\n this.recalcChartHeight();\n }\n\n private recalcChartHeight(): void {\n let height = this.scaleHeight;\n for (const chartInfo of this.controlPane.charts()) {\n if (this.controlPane.isActive(chartInfo.metrics[0].name)) {\n height += this.graphHeight;\n }\n }\n this.height = Math.ceil(height * window.devicePixelRatio);\n this.canvas.height = this.height;\n this.canvas.style.height = `${this.height / window.devicePixelRatio}px`;\n }\n}\n\nexport const enum Format {\n Percent = 'Percent',\n Bytes = 'Bytes',\n}\n\nexport class ControlPane extends Common.ObjectWrapper.ObjectWrapper {\n element: Element;\n private readonly enabledChartsSetting: Common.Settings.Setting;\n private readonly enabledCharts: Set;\n\n private chartsInfo: ChartInfo[] = [];\n private indicators: Map = new Map();\n\n constructor(parent: Element) {\n super();\n this.element = parent.createChild('div', 'perfmon-control-pane');\n\n this.enabledChartsSetting = Common.Settings.Settings.instance().createSetting(\n 'perfmonActiveIndicators2', ['TaskDuration', 'JSHeapTotalSize', 'Nodes']);\n this.enabledCharts = new Set(this.enabledChartsSetting.get());\n }\n\n instantiateMetricData(): void {\n const defaults = {\n color: undefined,\n format: undefined,\n currentMax: undefined,\n max: undefined,\n smooth: undefined,\n stacked: undefined,\n };\n\n // Get ThemeSupport instance here just to make things a little less verbose.\n const themeSupport = ThemeSupport.ThemeSupport.instance();\n this.chartsInfo = [\n {\n ...defaults,\n title: i18nString(UIStrings.cpuUsage),\n metrics: [\n {\n name: 'TaskDuration',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-task-duration', this.element),\n },\n {\n name: 'ScriptDuration',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-script-duration', this.element),\n },\n {\n name: 'LayoutDuration',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-layout-duration', this.element),\n },\n {\n name: 'RecalcStyleDuration',\n color:\n themeSupport.getComputedValue('--override-color-perf-monitor-cpu-recalc-style-duration', this.element),\n },\n ],\n format: Format.Percent,\n smooth: true,\n stacked: true,\n color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu', this.element),\n max: 1,\n currentMax: undefined,\n },\n {\n ...defaults,\n title: i18nString(UIStrings.jsHeapSize),\n metrics: [\n {\n name: 'JSHeapTotalSize',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap-total-size', this.element),\n },\n {\n name: 'JSHeapUsedSize',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap-used-size', this.element),\n },\n ],\n format: Format.Bytes,\n color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap'),\n },\n {\n ...defaults,\n title: i18nString(UIStrings.domNodes),\n metrics: [\n {\n name: 'Nodes',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-dom-nodes', this.element),\n },\n ],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.jsEventListeners),\n metrics: [\n {\n name: 'JSEventListeners',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-js-event-listeners', this.element),\n },\n ],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.documents),\n metrics: [{\n name: 'Documents',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-documents', this.element),\n }],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.documentFrames),\n metrics: [{\n name: 'Frames',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-document-frames', this.element),\n }],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.layoutsSec),\n metrics: [{\n name: 'LayoutCount',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-layout-count', this.element),\n }],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.styleRecalcsSec),\n metrics: [\n {\n name: 'RecalcStyleCount',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-recalc-style-count', this.element),\n },\n ],\n },\n ];\n\n // Clear any existing child elements.\n this.element.removeChildren();\n\n this.indicators = new Map();\n for (const chartInfo of this.chartsInfo) {\n const chartName = chartInfo.metrics[0].name;\n const active = this.enabledCharts.has(chartName);\n const indicator = new MetricIndicator(this.element, chartInfo, active, this.onToggle.bind(this, chartName));\n indicator.element.setAttribute(\n 'jslog', `${VisualLogging.toggle().track({click: true, keydown: 'Enter'}).context(chartName)}`);\n this.indicators.set(chartName, indicator);\n }\n }\n\n private onToggle(chartName: string, active: boolean): void {\n if (active) {\n this.enabledCharts.add(chartName);\n } else {\n this.enabledCharts.delete(chartName);\n }\n this.enabledChartsSetting.set(Array.from(this.enabledCharts));\n this.dispatchEventToListeners(Events.MetricChanged);\n }\n\n charts(): ChartInfo[] {\n return this.chartsInfo;\n }\n\n isActive(metricName: string): boolean {\n return this.enabledCharts.has(metricName);\n }\n\n updateMetrics(metrics: Map): void {\n for (const name of this.indicators.keys()) {\n const metric = metrics.get(name);\n if (metric !== undefined) {\n const indicator = this.indicators.get(name);\n if (indicator) {\n indicator.setValue(metric);\n }\n }\n }\n }\n}\n\nconst enum Events {\n MetricChanged = 'MetricChanged',\n}\n\ntype EventTypes = {\n [Events.MetricChanged]: void,\n};\n\nlet numberFormatter: Intl.NumberFormat;\nlet percentFormatter: Intl.NumberFormat;\n\nexport class MetricIndicator {\n private info: ChartInfo;\n private active: boolean;\n private readonly onToggle: (arg0: boolean) => void;\n element: HTMLElement;\n private readonly swatchElement: IconButton.Icon.Icon;\n private valueElement: HTMLElement;\n private color: string;\n\n constructor(parent: Element, info: ChartInfo, active: boolean, onToggle: (arg0: boolean) => void) {\n this.color = info.color || info.metrics[0].color;\n this.info = info;\n this.active = active;\n this.onToggle = onToggle;\n this.element = parent.createChild('div', 'perfmon-indicator') as HTMLElement;\n this.swatchElement = new IconButton.Icon.Icon();\n this.swatchElement.classList.add('perfmon-indicator-swatch');\n this.updateSwatchElement();\n this.element.appendChild(this.swatchElement);\n this.element.createChild('div', 'perfmon-indicator-title').textContent = info.title;\n this.valueElement = this.element.createChild('div', 'perfmon-indicator-value') as HTMLElement;\n this.valueElement.style.color = this.color;\n this.element.addEventListener('click', () => this.toggleIndicator());\n this.element.addEventListener('keypress', event => this.handleKeypress(event));\n this.element.classList.toggle('active', active);\n UI.ARIAUtils.markAsCheckbox(this.element);\n UI.ARIAUtils.setChecked(this.element, this.active);\n this.element.tabIndex = 0;\n }\n\n static formatNumber(value: number, info: ChartInfo): string {\n if (!numberFormatter) {\n numberFormatter = new Intl.NumberFormat('en-US', {maximumFractionDigits: 1});\n percentFormatter = new Intl.NumberFormat('en-US', {maximumFractionDigits: 1, style: 'percent'});\n }\n switch (info.format) {\n case Format.Percent:\n return percentFormatter.format(value);\n case Format.Bytes:\n return Platform.NumberUtilities.bytesToString(value);\n default:\n return numberFormatter.format(value);\n }\n }\n\n setValue(value: number): void {\n this.valueElement.textContent = MetricIndicator.formatNumber(value, this.info);\n }\n\n private updateSwatchElement(): void {\n const color = this.active ? this.color : 'var(--icon-disabled)';\n this.swatchElement.data = {iconName: 'checkmark', color, width: '16px', height: '14px'};\n }\n\n private toggleIndicator(): void {\n this.active = !this.active;\n this.updateSwatchElement();\n this.element.classList.toggle('active', this.active);\n UI.ARIAUtils.setChecked(this.element, this.active);\n this.onToggle(this.active);\n }\n\n private handleKeypress(event: Event): void {\n const keyboardEvent = event as KeyboardEvent;\n if (keyboardEvent.key === ' ' || keyboardEvent.key === 'Enter') {\n this.toggleIndicator();\n }\n }\n}\n\nexport const format = new Intl.NumberFormat('en-US', {maximumFractionDigits: 1});\nexport interface MetricInfo {\n name: string;\n color: string;\n}\nexport interface ChartInfo {\n title: string;\n metrics: {name: string, color: string}[];\n max?: number;\n currentMax?: number;\n format?: Format;\n smooth?: boolean;\n color?: string;\n stacked?: boolean;\n}\n"]} \ No newline at end of file +{"version":3,"file":"PerformanceMonitor.js","sourceRoot":"","sources":["../../../../../../front_end/panels/performance_monitor/PerformanceMonitor.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAC/E,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,MAAM,SAAS,GAAG;IAChB;;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ED,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAC,qBAAqB,EAAE,CAAC,EAAC,CAAC,CAAC","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport performanceMonitorStyles from './performanceMonitor.css.js';\n\nconst UIStrings = {\n /**\n *@description Aria accessible name in Performance Monitor of the Performance monitor tab\n */\n graphsDisplayingARealtimeViewOf: 'Graphs displaying a real-time view of performance metrics',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n paused: 'Paused',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n cpuUsage: 'CPU usage',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n jsHeapSize: 'JS heap size',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n domNodes: 'DOM Nodes',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n jsEventListeners: 'JS event listeners',\n /**\n *@description Text for documents, a type of resources\n */\n documents: 'Documents',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n documentFrames: 'Document Frames',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n layoutsSec: 'Layouts / sec',\n /**\n *@description Text in Performance Monitor of the Performance monitor tab\n */\n styleRecalcsSec: 'Style recalcs / sec',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/performance_monitor/PerformanceMonitor.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class PerformanceMonitorImpl extends UI.Widget.HBox implements\n SDK.TargetManager.SDKModelObserver {\n private metricsBuffer: {timestamp: number, metrics: Map}[];\n private readonly pixelsPerMs: number;\n private pollIntervalMs: number;\n private readonly scaleHeight: number;\n private graphHeight: number;\n private gridColor: string;\n private controlPane: ControlPane;\n private canvas: HTMLCanvasElement;\n private animationId!: number;\n private width!: number;\n private height!: number;\n private model?: SDK.PerformanceMetricsModel.PerformanceMetricsModel|null;\n private startTimestamp?: number;\n private pollTimer?: number;\n\n constructor(pollIntervalMs: number = 500) {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('performance-monitor')}`);\n\n this.contentElement.classList.add('perfmon-pane');\n this.metricsBuffer = [];\n /** @const */\n this.pixelsPerMs = 10 / 1000;\n /** @const */\n this.pollIntervalMs = pollIntervalMs;\n /** @const */\n this.scaleHeight = 16;\n /** @const */\n this.graphHeight = 90;\n this.gridColor = ThemeSupport.ThemeSupport.instance().getComputedValue('--divider-line');\n this.controlPane = new ControlPane(this.contentElement);\n const chartContainer = this.contentElement.createChild('div', 'perfmon-chart-container');\n this.canvas = chartContainer.createChild('canvas') as HTMLCanvasElement;\n this.canvas.tabIndex = -1;\n UI.ARIAUtils.setLabel(this.canvas, i18nString(UIStrings.graphsDisplayingARealtimeViewOf));\n this.contentElement.createChild('div', 'perfmon-chart-suspend-overlay fill').createChild('div').textContent =\n i18nString(UIStrings.paused);\n this.controlPane.addEventListener(Events.MetricChanged, this.recalcChartHeight, this);\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.PerformanceMetricsModel.PerformanceMetricsModel, this);\n }\n\n override wasShown(): void {\n if (!this.model) {\n return;\n }\n this.registerCSSFiles([performanceMonitorStyles]);\n this.controlPane.instantiateMetricData();\n const themeSupport = ThemeSupport.ThemeSupport.instance();\n themeSupport.addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n // instantiateMetricData sets the colors for the metrics, which we need\n // to re-evaluate when the theme changes before re-drawing the canvas.\n this.controlPane.instantiateMetricData();\n this.draw();\n });\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.SuspendStateChanged, this.suspendStateChanged, this);\n void this.model.enable();\n this.suspendStateChanged();\n }\n\n override willHide(): void {\n if (!this.model) {\n return;\n }\n SDK.TargetManager.TargetManager.instance().removeEventListener(\n SDK.TargetManager.Events.SuspendStateChanged, this.suspendStateChanged, this);\n this.stopPolling();\n void this.model.disable();\n }\n\n modelAdded(model: SDK.PerformanceMetricsModel.PerformanceMetricsModel): void {\n if (model.target() !== SDK.TargetManager.TargetManager.instance().primaryPageTarget()) {\n return;\n }\n this.model = model;\n if (this.isShowing()) {\n this.wasShown();\n }\n }\n\n modelRemoved(model: SDK.PerformanceMetricsModel.PerformanceMetricsModel): void {\n if (this.model !== model) {\n return;\n }\n if (this.isShowing()) {\n this.willHide();\n }\n this.model = null;\n }\n\n private suspendStateChanged(): void {\n const suspended = SDK.TargetManager.TargetManager.instance().allTargetsSuspended();\n if (suspended) {\n this.stopPolling();\n } else {\n this.startPolling();\n }\n this.contentElement.classList.toggle('suspended', suspended);\n }\n\n private startPolling(): void {\n this.startTimestamp = 0;\n this.pollTimer = window.setInterval(() => this.poll(), this.pollIntervalMs);\n this.onResize();\n const animate = (): void => {\n this.draw();\n this.animationId = this.contentElement.window().requestAnimationFrame(() => {\n animate();\n });\n };\n animate();\n }\n\n private stopPolling(): void {\n window.clearInterval(this.pollTimer);\n this.contentElement.window().cancelAnimationFrame(this.animationId);\n this.metricsBuffer = [];\n }\n\n private async poll(): Promise {\n if (!this.model) {\n return;\n }\n const data = await this.model.requestMetrics();\n const timestamp = data.timestamp;\n const metrics = data.metrics;\n this.metricsBuffer.push({timestamp, metrics: metrics});\n const millisPerWidth = this.width / this.pixelsPerMs;\n // Multiply by 2 as the pollInterval has some jitter and to have some extra samples if window is resized.\n const maxCount = Math.ceil(millisPerWidth / this.pollIntervalMs * 2);\n if (this.metricsBuffer.length > maxCount * 2) // Multiply by 2 to have a hysteresis.\n {\n this.metricsBuffer.splice(0, this.metricsBuffer.length - maxCount);\n }\n this.controlPane.updateMetrics(metrics);\n }\n\n private draw(): void {\n const ctx = this.canvas.getContext('2d') as CanvasRenderingContext2D;\n ctx.save();\n ctx.scale(window.devicePixelRatio, window.devicePixelRatio);\n ctx.clearRect(0, 0, this.width, this.height);\n ctx.save();\n ctx.translate(0, this.scaleHeight); // Reserve space for the scale bar.\n for (const chartInfo of this.controlPane.charts()) {\n if (!this.controlPane.isActive(chartInfo.metrics[0].name)) {\n continue;\n }\n this.drawChart(ctx, chartInfo, this.graphHeight);\n ctx.translate(0, this.graphHeight);\n }\n ctx.restore();\n this.drawHorizontalGrid(ctx);\n ctx.restore();\n }\n\n private drawHorizontalGrid(ctx: CanvasRenderingContext2D): void {\n const labelDistanceSeconds = 10;\n const lightGray = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-2');\n ctx.font = '10px ' + Host.Platform.fontFamily();\n ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');\n const currentTime = Date.now() / 1000;\n for (let sec = Math.ceil(currentTime);; --sec) {\n const x = this.width - ((currentTime - sec) * 1000 - this.pollIntervalMs) * this.pixelsPerMs;\n if (x < -50) {\n break;\n }\n ctx.beginPath();\n ctx.moveTo(x, 0);\n ctx.lineTo(x, this.height);\n if (sec >= 0 && sec % labelDistanceSeconds === 0) {\n ctx.fillText(new Date(sec * 1000).toLocaleTimeString(), x + 4, 12);\n }\n ctx.strokeStyle = sec % labelDistanceSeconds ? lightGray : this.gridColor;\n ctx.stroke();\n }\n }\n\n private drawChart(ctx: CanvasRenderingContext2D, chartInfo: ChartInfo, height: number): void {\n ctx.save();\n ctx.rect(0, 0, this.width, height);\n ctx.clip();\n const bottomPadding = 8;\n const extraSpace = 1.05;\n const max = this.calcMax(chartInfo) * extraSpace;\n const stackedChartBaseLandscape = chartInfo.stacked ? new Map() : null;\n const paths = [];\n for (let i = chartInfo.metrics.length - 1; i >= 0; --i) {\n const metricInfo = chartInfo.metrics[i];\n paths.push({\n path: this.buildMetricPath(\n chartInfo, metricInfo, height - bottomPadding, max, i ? stackedChartBaseLandscape : null),\n color: metricInfo.color,\n });\n }\n const backgroundColor =\n Common.Color.parse(ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container'))\n ?.asLegacyColor();\n\n if (backgroundColor) {\n for (const path of paths.reverse()) {\n const color = path.color;\n ctx.save();\n const parsedColor = Common.Color.parse(color);\n if (!parsedColor) {\n continue;\n }\n ctx.fillStyle = backgroundColor.blendWith(parsedColor.setAlpha(0.2).asLegacyColor()).asString() || '';\n ctx.fill(path.path);\n ctx.strokeStyle = color;\n ctx.lineWidth = 0.5;\n ctx.stroke(path.path);\n ctx.restore();\n }\n }\n ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');\n ctx.font = `10px ${Host.Platform.fontFamily()}`;\n ctx.fillText(chartInfo.title, 8, 10);\n this.drawVerticalGrid(ctx, height - bottomPadding, max, chartInfo);\n ctx.restore();\n }\n\n private calcMax(chartInfo: ChartInfo): number {\n if (chartInfo.max) {\n return chartInfo.max;\n }\n const width = this.width;\n const startTime = performance.now() - this.pollIntervalMs - width / this.pixelsPerMs;\n let max: number = -Infinity;\n for (const metricInfo of chartInfo.metrics) {\n for (let i = this.metricsBuffer.length - 1; i >= 0; --i) {\n const metrics = this.metricsBuffer[i];\n const value = metrics.metrics.get(metricInfo.name);\n if (value !== undefined) {\n max = Math.max(max, value);\n }\n if (metrics.timestamp < startTime) {\n break;\n }\n }\n }\n if (!this.metricsBuffer.length) {\n return 10;\n }\n\n const base10 = Math.pow(10, Math.floor(Math.log10(max)));\n max = Math.ceil(max / base10 / 2) * base10 * 2;\n\n const alpha = 0.2;\n chartInfo.currentMax = max * alpha + (chartInfo.currentMax || max) * (1 - alpha);\n return chartInfo.currentMax;\n }\n\n private drawVerticalGrid(ctx: CanvasRenderingContext2D, height: number, max: number, info: ChartInfo): void {\n let base = Math.pow(10, Math.floor(Math.log10(max)));\n const firstDigit = Math.floor(max / base);\n if (firstDigit !== 1 && firstDigit % 2 === 1) {\n base *= 2;\n }\n let scaleValue = Math.floor(max / base) * base;\n\n const span = max;\n const topPadding = 18;\n const visibleHeight = height - topPadding;\n ctx.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-50');\n ctx.strokeStyle = this.gridColor;\n ctx.beginPath();\n for (let i = 0; i < 2; ++i) {\n const y = calcY(scaleValue);\n const labelText = MetricIndicator.formatNumber(scaleValue, info);\n ctx.moveTo(0, y);\n ctx.lineTo(4, y);\n ctx.moveTo(ctx.measureText(labelText).width + 12, y);\n ctx.lineTo(this.width, y);\n ctx.fillText(labelText, 8, calcY(scaleValue) + 3);\n scaleValue /= 2;\n }\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(0, height + 0.5);\n ctx.lineTo(this.width, height + 0.5);\n ctx.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--color-background-inverted-opacity-2');\n ctx.stroke();\n function calcY(value: number): number {\n return Math.round(height - visibleHeight * value / span) + 0.5;\n }\n }\n\n private buildMetricPath(\n chartInfo: ChartInfo, metricInfo: MetricInfo, height: number, scaleMax: number,\n stackedChartBaseLandscape: Map|null): Path2D {\n const path = new Path2D();\n const topPadding = 18;\n const visibleHeight = height - topPadding;\n if (visibleHeight < 1) {\n return path;\n }\n const span = scaleMax;\n const metricName = metricInfo.name;\n const pixelsPerMs = this.pixelsPerMs;\n const startTime = performance.now() - this.pollIntervalMs - this.width / pixelsPerMs;\n const smooth = chartInfo.smooth;\n\n let x = 0;\n let lastY = 0;\n let lastX = 0;\n if (this.metricsBuffer.length) {\n x = (this.metricsBuffer[0].timestamp - startTime) * pixelsPerMs;\n path.moveTo(x, calcY(0));\n path.lineTo(this.width + 5, calcY(0));\n lastY = calcY(\n (this.metricsBuffer[this.metricsBuffer.length - 1] as {\n metrics: Map,\n }).metrics.get(metricName) ||\n 0);\n lastX = this.width + 5;\n path.lineTo(lastX, lastY);\n }\n for (let i = this.metricsBuffer.length - 1; i >= 0; --i) {\n const metrics = this.metricsBuffer[i];\n const timestamp = metrics.timestamp;\n let value: number = metrics.metrics.get(metricName) || 0;\n if (stackedChartBaseLandscape) {\n value += stackedChartBaseLandscape.get(timestamp) || 0;\n value = Platform.NumberUtilities.clamp(value, 0, 1);\n stackedChartBaseLandscape.set(timestamp, value);\n }\n const y = calcY(value);\n x = (timestamp - startTime) * pixelsPerMs;\n if (smooth) {\n const midX = (lastX + x) / 2;\n path.bezierCurveTo(midX, lastY, midX, y, x, y);\n } else {\n path.lineTo(x, lastY);\n path.lineTo(x, y);\n }\n lastX = x;\n lastY = y;\n if (timestamp < startTime) {\n break;\n }\n }\n return path;\n\n function calcY(value: number): number {\n return Math.round(height - visibleHeight * value / span) + 0.5;\n }\n }\n\n override onResize(): void {\n super.onResize();\n this.width = this.canvas.offsetWidth;\n this.canvas.width = Math.round(this.width * window.devicePixelRatio);\n this.recalcChartHeight();\n }\n\n private recalcChartHeight(): void {\n let height = this.scaleHeight;\n for (const chartInfo of this.controlPane.charts()) {\n if (this.controlPane.isActive(chartInfo.metrics[0].name)) {\n height += this.graphHeight;\n }\n }\n this.height = Math.ceil(height * window.devicePixelRatio);\n this.canvas.height = this.height;\n this.canvas.style.height = `${this.height / window.devicePixelRatio}px`;\n }\n}\n\nexport const enum Format {\n Percent = 'Percent',\n Bytes = 'Bytes',\n}\n\nexport class ControlPane extends Common.ObjectWrapper.ObjectWrapper {\n element: Element;\n private readonly enabledChartsSetting: Common.Settings.Setting;\n private readonly enabledCharts: Set;\n\n private chartsInfo: ChartInfo[] = [];\n private indicators: Map = new Map();\n\n constructor(parent: Element) {\n super();\n this.element = parent.createChild('div', 'perfmon-control-pane');\n\n this.enabledChartsSetting = Common.Settings.Settings.instance().createSetting(\n 'perfmonActiveIndicators2', ['TaskDuration', 'JSHeapTotalSize', 'Nodes']);\n this.enabledCharts = new Set(this.enabledChartsSetting.get());\n }\n\n instantiateMetricData(): void {\n const defaults = {\n color: undefined,\n format: undefined,\n currentMax: undefined,\n max: undefined,\n smooth: undefined,\n stacked: undefined,\n };\n\n // Get ThemeSupport instance here just to make things a little less verbose.\n const themeSupport = ThemeSupport.ThemeSupport.instance();\n this.chartsInfo = [\n {\n ...defaults,\n title: i18nString(UIStrings.cpuUsage),\n metrics: [\n {\n name: 'TaskDuration',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-task-duration', this.element),\n },\n {\n name: 'ScriptDuration',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-script-duration', this.element),\n },\n {\n name: 'LayoutDuration',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu-layout-duration', this.element),\n },\n {\n name: 'RecalcStyleDuration',\n color:\n themeSupport.getComputedValue('--override-color-perf-monitor-cpu-recalc-style-duration', this.element),\n },\n ],\n format: Format.Percent,\n smooth: true,\n stacked: true,\n color: themeSupport.getComputedValue('--override-color-perf-monitor-cpu', this.element),\n max: 1,\n currentMax: undefined,\n },\n {\n ...defaults,\n title: i18nString(UIStrings.jsHeapSize),\n metrics: [\n {\n name: 'JSHeapTotalSize',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap-total-size', this.element),\n },\n {\n name: 'JSHeapUsedSize',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap-used-size', this.element),\n },\n ],\n format: Format.Bytes,\n color: themeSupport.getComputedValue('--override-color-perf-monitor-jsheap'),\n },\n {\n ...defaults,\n title: i18nString(UIStrings.domNodes),\n metrics: [\n {\n name: 'Nodes',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-dom-nodes', this.element),\n },\n ],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.jsEventListeners),\n metrics: [\n {\n name: 'JSEventListeners',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-js-event-listeners', this.element),\n },\n ],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.documents),\n metrics: [{\n name: 'Documents',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-documents', this.element),\n }],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.documentFrames),\n metrics: [{\n name: 'Frames',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-document-frames', this.element),\n }],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.layoutsSec),\n metrics: [{\n name: 'LayoutCount',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-layout-count', this.element),\n }],\n },\n {\n ...defaults,\n title: i18nString(UIStrings.styleRecalcsSec),\n metrics: [\n {\n name: 'RecalcStyleCount',\n color: themeSupport.getComputedValue('--override-color-perf-monitor-recalc-style-count', this.element),\n },\n ],\n },\n ];\n\n // Clear any existing child elements.\n this.element.removeChildren();\n\n this.indicators = new Map();\n for (const chartInfo of this.chartsInfo) {\n const chartName = chartInfo.metrics[0].name;\n const active = this.enabledCharts.has(chartName);\n const indicator = new MetricIndicator(this.element, chartInfo, active, this.onToggle.bind(this, chartName));\n indicator.element.setAttribute(\n 'jslog', `${VisualLogging.toggle().track({click: true, keydown: 'Enter'}).context(chartName)}`);\n this.indicators.set(chartName, indicator);\n }\n }\n\n private onToggle(chartName: string, active: boolean): void {\n if (active) {\n this.enabledCharts.add(chartName);\n } else {\n this.enabledCharts.delete(chartName);\n }\n this.enabledChartsSetting.set(Array.from(this.enabledCharts));\n this.dispatchEventToListeners(Events.MetricChanged);\n }\n\n charts(): ChartInfo[] {\n return this.chartsInfo;\n }\n\n isActive(metricName: string): boolean {\n return this.enabledCharts.has(metricName);\n }\n\n updateMetrics(metrics: Map): void {\n for (const name of this.indicators.keys()) {\n const metric = metrics.get(name);\n if (metric !== undefined) {\n const indicator = this.indicators.get(name);\n if (indicator) {\n indicator.setValue(metric);\n }\n }\n }\n }\n}\n\nconst enum Events {\n MetricChanged = 'MetricChanged',\n}\n\ntype EventTypes = {\n [Events.MetricChanged]: void,\n};\n\nlet numberFormatter: Intl.NumberFormat;\nlet percentFormatter: Intl.NumberFormat;\n\nexport class MetricIndicator {\n private info: ChartInfo;\n private active: boolean;\n private readonly onToggle: (arg0: boolean) => void;\n element: HTMLElement;\n private readonly swatchElement: IconButton.Icon.Icon;\n private valueElement: HTMLElement;\n private color: string;\n\n constructor(parent: Element, info: ChartInfo, active: boolean, onToggle: (arg0: boolean) => void) {\n this.color = info.color || info.metrics[0].color;\n this.info = info;\n this.active = active;\n this.onToggle = onToggle;\n this.element = parent.createChild('div', 'perfmon-indicator') as HTMLElement;\n this.swatchElement = new IconButton.Icon.Icon();\n this.swatchElement.classList.add('perfmon-indicator-swatch');\n this.updateSwatchElement();\n this.element.appendChild(this.swatchElement);\n this.element.createChild('div', 'perfmon-indicator-title').textContent = info.title;\n this.valueElement = this.element.createChild('div', 'perfmon-indicator-value') as HTMLElement;\n this.valueElement.style.color = this.color;\n this.element.addEventListener('click', () => this.toggleIndicator());\n this.element.addEventListener('keypress', event => this.handleKeypress(event));\n this.element.classList.toggle('active', active);\n UI.ARIAUtils.markAsCheckbox(this.element);\n UI.ARIAUtils.setChecked(this.element, this.active);\n this.element.tabIndex = 0;\n }\n\n static formatNumber(value: number, info: ChartInfo): string {\n if (!numberFormatter) {\n numberFormatter = new Intl.NumberFormat('en-US', {maximumFractionDigits: 1});\n percentFormatter = new Intl.NumberFormat('en-US', {maximumFractionDigits: 1, style: 'percent'});\n }\n switch (info.format) {\n case Format.Percent:\n return percentFormatter.format(value);\n case Format.Bytes:\n return Platform.NumberUtilities.bytesToString(value);\n default:\n return numberFormatter.format(value);\n }\n }\n\n setValue(value: number): void {\n this.valueElement.textContent = MetricIndicator.formatNumber(value, this.info);\n }\n\n private updateSwatchElement(): void {\n const color = this.active ? this.color : 'var(--icon-disabled)';\n this.swatchElement.data = {iconName: 'checkmark', color, width: '16px', height: '14px'};\n }\n\n private toggleIndicator(): void {\n this.active = !this.active;\n this.updateSwatchElement();\n this.element.classList.toggle('active', this.active);\n UI.ARIAUtils.setChecked(this.element, this.active);\n this.onToggle(this.active);\n }\n\n private handleKeypress(event: Event): void {\n const keyboardEvent = event as KeyboardEvent;\n if (keyboardEvent.key === ' ' || keyboardEvent.key === 'Enter') {\n this.toggleIndicator();\n }\n }\n}\n\nexport const format = new Intl.NumberFormat('en-US', {maximumFractionDigits: 1});\nexport interface MetricInfo {\n name: string;\n color: string;\n}\nexport interface ChartInfo {\n title: string;\n metrics: {name: string, color: string}[];\n max?: number;\n currentMax?: number;\n format?: Format;\n smooth?: boolean;\n color?: string;\n stacked?: boolean;\n}\n"]} \ No newline at end of file diff --git a/public/panels/performance_monitor/performance_monitor-meta.js b/public/panels/performance_monitor/performance_monitor-meta.js index bc92e971b..cf0ff43c6 100644 --- a/public/panels/performance_monitor/performance_monitor-meta.js +++ b/public/panels/performance_monitor/performance_monitor-meta.js @@ -51,7 +51,7 @@ UI.ViewManager.registerViewExtension({ order: 100, async loadView() { const PerformanceMonitor = await loadPerformanceMonitorModule(); - return PerformanceMonitor.PerformanceMonitor.PerformanceMonitorImpl.instance(); + return new PerformanceMonitor.PerformanceMonitor.PerformanceMonitorImpl(); }, tags: [ i18nLazyString(UIStrings.performance), diff --git a/public/panels/performance_monitor/performance_monitor-meta.js.map b/public/panels/performance_monitor/performance_monitor-meta.js.map index 307ec367c..eaddf7313 100644 --- a/public/panels/performance_monitor/performance_monitor-meta.js.map +++ b/public/panels/performance_monitor/performance_monitor-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"performance_monitor-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/performance_monitor/performance_monitor-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,kBAAkB,EAAE,qBAAqB;IACz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,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC;KAClC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as PerformanceMonitor from './performance_monitor.js';\n\nconst UIStrings = {\n /**\n *@description Title of the 'Performance monitor' tool in the bottom drawer\n */\n performanceMonitor: 'Performance monitor',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n performance: 'performance',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n systemMonitor: 'system monitor',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n monitor: 'monitor',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n activity: 'activity',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n metrics: 'metrics',\n /**\n *@description Command for showing the 'Performance monitor' tool in the bottom drawer\n */\n showPerformanceMonitor: 'Show Performance monitor',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/performance_monitor/performance_monitor-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedPerformanceMonitorModule: (typeof PerformanceMonitor|undefined);\n\nasync function loadPerformanceMonitorModule(): Promise {\n if (!loadedPerformanceMonitorModule) {\n loadedPerformanceMonitorModule = await import('./performance_monitor.js');\n }\n return loadedPerformanceMonitorModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'performance.monitor',\n title: i18nLazyString(UIStrings.performanceMonitor),\n commandPrompt: i18nLazyString(UIStrings.showPerformanceMonitor),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 100,\n async loadView() {\n const PerformanceMonitor = await loadPerformanceMonitorModule();\n return PerformanceMonitor.PerformanceMonitor.PerformanceMonitorImpl.instance();\n },\n tags: [\n i18nLazyString(UIStrings.performance),\n i18nLazyString(UIStrings.systemMonitor),\n i18nLazyString(UIStrings.monitor),\n i18nLazyString(UIStrings.activity),\n i18nLazyString(UIStrings.metrics),\n ],\n});\n"]} \ No newline at end of file +{"version":3,"file":"performance_monitor-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/performance_monitor/performance_monitor-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,kBAAkB,EAAE,qBAAqB;IACzC;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,sBAAsB,EAAE,0BAA0B;CACnD,CAAC;AAEF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,wDAAwD,EAAE,SAAS,CAAC,CAAC;AAC9G,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,8BAAqE,CAAC;AAE1E,KAAK,UAAU,4BAA4B;IACzC,IAAI,CAAC,8BAA8B,EAAE;QACnC,8BAA8B,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;KAC3E;IACD,OAAO,8BAA8B,CAAC;AACxC,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,mEAA+C;IACvD,EAAE,EAAE,qBAAqB;IACzB,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,kBAAkB,CAAC;IACnD,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,sBAAsB,CAAC;IAC/D,WAAW,4DAA0C;IACrD,KAAK,EAAE,GAAG;IACV,KAAK,CAAC,QAAQ;QACZ,MAAM,kBAAkB,GAAG,MAAM,4BAA4B,EAAE,CAAC;QAChE,OAAO,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,CAAC;IAC5E,CAAC;IACD,IAAI,EAAE;QACJ,cAAc,CAAC,SAAS,CAAC,WAAW,CAAC;QACrC,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC;QACvC,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC;QAClC,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC;KAClC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as PerformanceMonitor from './performance_monitor.js';\n\nconst UIStrings = {\n /**\n *@description Title of the 'Performance monitor' tool in the bottom drawer\n */\n performanceMonitor: 'Performance monitor',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n performance: 'performance',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n systemMonitor: 'system monitor',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n monitor: 'monitor',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n activity: 'activity',\n /**\n *@description A tag of Performance Monitor that can be searched in the command menu\n */\n metrics: 'metrics',\n /**\n *@description Command for showing the 'Performance monitor' tool in the bottom drawer\n */\n showPerformanceMonitor: 'Show Performance monitor',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/performance_monitor/performance_monitor-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedPerformanceMonitorModule: (typeof PerformanceMonitor|undefined);\n\nasync function loadPerformanceMonitorModule(): Promise {\n if (!loadedPerformanceMonitorModule) {\n loadedPerformanceMonitorModule = await import('./performance_monitor.js');\n }\n return loadedPerformanceMonitorModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'performance.monitor',\n title: i18nLazyString(UIStrings.performanceMonitor),\n commandPrompt: i18nLazyString(UIStrings.showPerformanceMonitor),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 100,\n async loadView() {\n const PerformanceMonitor = await loadPerformanceMonitorModule();\n return new PerformanceMonitor.PerformanceMonitor.PerformanceMonitorImpl();\n },\n tags: [\n i18nLazyString(UIStrings.performance),\n i18nLazyString(UIStrings.systemMonitor),\n i18nLazyString(UIStrings.monitor),\n i18nLazyString(UIStrings.activity),\n i18nLazyString(UIStrings.metrics),\n ],\n});\n"]} \ No newline at end of file diff --git a/public/panels/profiler/HeapSnapshotView.js b/public/panels/profiler/HeapSnapshotView.js index 8be9d3d88..1d5732e96 100644 --- a/public/panels/profiler/HeapSnapshotView.js +++ b/public/panels/profiler/HeapSnapshotView.js @@ -224,11 +224,6 @@ const UIStrings = { *@example {30} PH1 */ savingD: 'Saving… {PH1}%', - /** - *@description Text in Heap Snapshot View of a profiler tool - *@example {1,021} PH1 - */ - sKb: '{PH1} kB', /** *@description Text in Heap Snapshot View of a profiler tool */ @@ -1521,7 +1516,11 @@ export class HeapSnapshotStatisticsView extends UI.Widget.VBox { this.element.appendChild(this.pieChart); } static valueFormatter(value) { - return i18nString(UIStrings.sKb, { PH1: Platform.NumberUtilities.withThousandsSeparator(Math.round(value / 1000)) }); + const formatter = new Intl.NumberFormat(i18n.DevToolsLocale.DevToolsLocale.instance().locale, { + style: 'unit', + unit: 'kilobyte', + }); + return formatter.format(Math.round(value / 1000)); } setTotalAndRecords(total, records) { this.pieChart.data = { diff --git a/public/panels/profiler/HeapSnapshotView.js.map b/public/panels/profiler/HeapSnapshotView.js.map index efd4bbbfc..3c98539b7 100644 --- a/public/panels/profiler/HeapSnapshotView.js.map +++ b/public/panels/profiler/HeapSnapshotView.js.map @@ -1 +1 @@ -{"version":3,"file":"HeapSnapshotView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/profiler/HeapSnapshotView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,iBAAiB,MAAM,yDAAyD,CAAC;AAC7F,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,+BAA+B,EAC/B,wBAAwB,EACxB,8BAA8B,EAE9B,kCAAkC,GACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,6BAA6B,GAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAyB,uBAAuB,EAAC,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAS,oBAAoB,EAA6B,OAAO,EAA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AAK,EAAE,CAAC;IACzB,CAAC;CACF;AAED,MAAM,sBAAsB,GAAG,IAAI,OAAO,EAA4B,CAAC","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as HeapSnapshotModel from '../../models/heap_snapshot_model/heap_snapshot_model.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {\n AllocationDataGrid,\n HeapSnapshotConstructorsDataGrid,\n HeapSnapshotContainmentDataGrid,\n HeapSnapshotDiffDataGrid,\n HeapSnapshotRetainmentDataGrid,\n type HeapSnapshotSortableDataGrid,\n HeapSnapshotSortableDataGridEvents,\n} from './HeapSnapshotDataGrids.js';\nimport {\n type AllocationGridNode,\n HeapSnapshotGenericObjectNode,\n type HeapSnapshotGridNode,\n} from './HeapSnapshotGridNodes.js';\nimport {type HeapSnapshotProxy, HeapSnapshotWorkerProxy} from './HeapSnapshotProxy.js';\nimport {Events, HeapTimelineOverview, type IdsRangeChangedEvent, Samples} from './HeapTimelineOverview.js';\nimport * as ModuleUIStrings from './ModuleUIStrings.js';\nimport {\n type DataDisplayDelegate,\n Events as ProfileHeaderEvents,\n ProfileEvents as ProfileTypeEvents,\n ProfileHeader,\n ProfileType,\n} from './ProfileHeader.js';\nimport {ProfileSidebarTreeElement} from './ProfileSidebarTreeElement.js';\nimport {instance} from './ProfileTypeRegistry.js';\n\nconst UIStrings = {\n /**\n *@description Text to find an item\n */\n find: 'Find',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n containment: 'Containment',\n /**\n *@description Retaining paths title text content in Heap Snapshot View of a profiler tool\n */\n retainers: 'Retainers',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allocationStack: 'Allocation stack',\n /**\n *@description Screen reader label for a select box that chooses the perspective in the Memory panel when vieweing a Heap Snapshot\n */\n perspective: 'Perspective',\n /**\n *@description Screen reader label for a select box that chooses the snapshot to use as a base in the Memory panel when vieweing a Heap Snapshot\n */\n baseSnapshot: 'Base snapshot',\n /**\n *@description Text to filter result items\n */\n filter: 'Filter',\n /**\n * @description Filter label text in the Memory tool to filter by JavaScript class names for a heap\n * snapshot.\n */\n classFilter: 'Class filter',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n code: 'Code',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n strings: 'Strings',\n /**\n *@description Label on a pie chart in the statistics view for the Heap Snapshot tool\n */\n jsArrays: 'JS arrays',\n /**\n *@description Label on a pie chart in the statistics view for the Heap Snapshot tool\n */\n typedArrays: 'Typed arrays',\n /**\n *@description Label on a pie chart in the statistics view for the Heap Snapshot tool\n */\n systemObjects: 'System objects',\n /**\n *@description The reported total size used in the selected time frame of the allocation sampling profile\n *@example {3 MB} PH1\n */\n selectedSizeS: 'Selected size: {PH1}',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allObjects: 'All objects',\n /**\n *@description Title in Heap Snapshot View of a profiler tool\n *@example {Profile 2} PH1\n */\n objectsAllocatedBeforeS: 'Objects allocated before {PH1}',\n /**\n *@description Title in Heap Snapshot View of a profiler tool\n *@example {Profile 1} PH1\n *@example {Profile 2} PH2\n */\n objectsAllocatedBetweenSAndS: 'Objects allocated between {PH1} and {PH2}',\n /**\n *@description Text for the summary view\n */\n summary: 'Summary',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n comparison: 'Comparison',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allocation: 'Allocation',\n /**\n *@description Title text content in Heap Snapshot View of a profiler tool\n */\n liveObjects: 'Live objects',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n statistics: 'Statistics',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n heapSnapshot: 'Heap snapshot',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n takeHeapSnapshot: 'Take heap snapshot',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n heapSnapshots: 'HEAP SNAPSHOTS',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n heapSnapshotProfilesShowMemory:\n 'Heap snapshot profiles show memory distribution among your page\\'s JavaScript objects and related DOM nodes.',\n /**\n *@description Label for a checkbox in the heap snapshot view of the profiler tool. The \"heap snapshot\" contains the\n * current state of JavaScript memory. With this checkbox enabled, the snapshot also includes internal data that is\n * specific to Chrome (hence implementation-specific).\n */\n exposeInternals: 'Expose internals (includes additional implementation-specific details)',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n * This option turns on inclusion of numerical values in the heap snapshot.\n */\n captureNumericValue: 'Include numerical values in capture',\n /**\n *@description Progress update that the profiler is capturing a snapshot of the heap\n */\n snapshotting: 'Snapshotting…',\n /**\n *@description Profile title in Heap Snapshot View of a profiler tool\n *@example {1} PH1\n */\n snapshotD: 'Snapshot {PH1}',\n /**\n *@description Text for a percentage value\n *@example {13.0} PH1\n */\n percentagePlaceholder: '{PH1}%',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allocationInstrumentationOn: 'Allocation instrumentation on timeline',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n stopRecordingHeapProfile: 'Stop recording heap profile',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n startRecordingHeapProfile: 'Start recording heap profile',\n /**\n *@description Text in Heap Snapshot View of a profiler tool.\n * A stack trace is a list of functions that were called.\n * This option turns on recording of a stack trace at each allocation.\n * The recording itself is a somewhat expensive operation, so turning this option on, the website's performance may be affected negatively (e.g. everything becomes slower).\n */\n recordAllocationStacksExtra: 'Record stack traces of allocations (extra performance overhead)',\n /**\n *@description Text in CPUProfile View of a profiler tool\n */\n recording: 'Recording…',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allocationTimelines: 'ALLOCATION TIMELINES',\n /**\n *@description Description for the 'Allocation timeline' tool in the Memory panel.\n */\n AllocationTimelinesShowInstrumented:\n 'Allocation timelines show instrumented JavaScript memory allocations over time. Once profile is recorded you can select a time interval to see objects that were allocated within it and still alive by the end of recording. Use this profile type to isolate memory leaks.',\n /**\n *@description Text when something is loading\n */\n loading: 'Loading…',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n *@example {30} PH1\n */\n savingD: 'Saving… {PH1}%',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n *@example {1,021} PH1\n */\n sKb: '{PH1} kB',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n heapMemoryUsage: 'Heap memory usage',\n /**\n *@description Text of a DOM element in Heap Snapshot View of a profiler tool\n */\n stackWasNotRecordedForThisObject:\n 'Stack was not recorded for this object because it had been allocated before this profile recording started.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/profiler/HeapSnapshotView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// The way this is handled is to workaround the strings inside the heap_snapshot_worker\n// If strings are removed from inside the worker strings can be declared in this module\n// as any other.\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst moduleUIstr_ = i18n.i18n.registerUIStrings('panels/profiler/ModuleUIStrings.ts', ModuleUIStrings.UIStrings);\nconst moduleI18nString = i18n.i18n.getLocalizedString.bind(undefined, moduleUIstr_);\nexport class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayDelegate, UI.SearchableView.Searchable {\n searchResults: number[];\n profile: HeapProfileHeader;\n readonly linkifier: Components.Linkifier.Linkifier;\n readonly parentDataDisplayDelegate: DataDisplayDelegate;\n readonly searchableViewInternal: UI.SearchableView.SearchableView;\n readonly splitWidget: UI.SplitWidget.SplitWidget;\n readonly containmentDataGrid: HeapSnapshotContainmentDataGrid;\n readonly containmentWidget: DataGrid.DataGrid.DataGridWidget;\n readonly statisticsView: HeapSnapshotStatisticsView;\n readonly constructorsDataGrid: HeapSnapshotConstructorsDataGrid;\n readonly constructorsWidget: DataGrid.DataGrid.DataGridWidget;\n readonly diffDataGrid: HeapSnapshotDiffDataGrid;\n readonly diffWidget: DataGrid.DataGrid.DataGridWidget;\n readonly allocationDataGrid: AllocationDataGrid|null;\n readonly allocationWidget: DataGrid.DataGrid.DataGridWidget|undefined;\n readonly allocationStackView: HeapAllocationStackView|undefined;\n readonly tabbedPane: UI.TabbedPane.TabbedPane|undefined;\n readonly retainmentDataGrid: HeapSnapshotRetainmentDataGrid;\n readonly retainmentWidget: DataGrid.DataGrid.DataGridWidget;\n readonly objectDetailsView: UI.Widget.VBox;\n readonly perspectives: (SummaryPerspective|ComparisonPerspective|ContainmentPerspective|AllocationPerspective|\n StatisticsPerspective)[];\n readonly comparisonPerspective: ComparisonPerspective;\n readonly perspectiveSelect: UI.Toolbar.ToolbarComboBox;\n baseSelect: UI.Toolbar.ToolbarComboBox;\n readonly filterSelect: UI.Toolbar.ToolbarComboBox;\n readonly classNameFilter: UI.Toolbar.ToolbarInput;\n readonly selectedSizeText: UI.Toolbar.ToolbarText;\n readonly popoverHelper: UI.PopoverHelper.PopoverHelper;\n currentPerspectiveIndex: number;\n currentPerspective: SummaryPerspective|ComparisonPerspective|ContainmentPerspective|AllocationPerspective|\n StatisticsPerspective;\n dataGrid: HeapSnapshotSortableDataGrid|null;\n readonly searchThrottler: Common.Throttler.Throttler;\n baseProfile!: HeapProfileHeader|null;\n trackingOverviewGrid?: HeapTimelineOverview;\n currentSearchResultIndex: number = -1;\n currentQuery?: HeapSnapshotModel.HeapSnapshotModel.SearchConfig;\n constructor(dataDisplayDelegate: DataDisplayDelegate, profile: HeapProfileHeader) {\n super(i18nString(UIStrings.heapSnapshot));\n\n this.searchResults = [];\n\n this.element.classList.add('heap-snapshot-view');\n this.profile = profile;\n this.linkifier = new Components.Linkifier.Linkifier();\n const profileType = profile.profileType();\n\n profileType.addEventListener(HeapSnapshotProfileTypeEvents.SnapshotReceived, this.onReceiveSnapshot, this);\n profileType.addEventListener(ProfileTypeEvents.RemoveProfileHeader, this.onProfileHeaderRemoved, this);\n\n const isHeapTimeline = profileType.id === TrackingHeapSnapshotProfileType.TypeId;\n if (isHeapTimeline) {\n this.createOverview();\n }\n const hasAllocationStacks = instance.trackingHeapSnapshotProfileType.recordAllocationStacksSetting().get();\n\n this.parentDataDisplayDelegate = dataDisplayDelegate;\n\n this.searchableViewInternal = new UI.SearchableView.SearchableView(this, null);\n this.searchableViewInternal.setPlaceholder(i18nString(UIStrings.find), i18nString(UIStrings.find));\n this.searchableViewInternal.show(this.element);\n\n this.splitWidget = new UI.SplitWidget.SplitWidget(false, true, 'heapSnapshotSplitViewState', 200, 200);\n this.splitWidget.show(this.searchableViewInternal.element);\n\n const heapProfilerModel = profile.heapProfilerModel();\n this.containmentDataGrid = new HeapSnapshotContainmentDataGrid(\n heapProfilerModel, this, /* displayName */ i18nString(UIStrings.containment));\n this.containmentDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.selectionChanged, this);\n this.containmentWidget = this.containmentDataGrid.asWidget();\n this.containmentWidget.setMinimumSize(50, 25);\n\n this.statisticsView = new HeapSnapshotStatisticsView();\n\n this.constructorsDataGrid = new HeapSnapshotConstructorsDataGrid(heapProfilerModel, this);\n this.constructorsDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.selectionChanged, this);\n this.constructorsWidget = this.constructorsDataGrid.asWidget();\n this.constructorsWidget.setMinimumSize(50, 25);\n this.constructorsWidget.element.setAttribute(\n 'jslog', `${VisualLogging.section().context('heap-snapshot.constructors-view')}`);\n\n this.diffDataGrid = new HeapSnapshotDiffDataGrid(heapProfilerModel, this);\n this.diffDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.selectionChanged, this);\n this.diffWidget = this.diffDataGrid.asWidget();\n this.diffWidget.setMinimumSize(50, 25);\n\n this.allocationDataGrid = null;\n\n if (isHeapTimeline && hasAllocationStacks) {\n this.allocationDataGrid = new AllocationDataGrid(heapProfilerModel, this);\n this.allocationDataGrid.addEventListener(\n DataGrid.DataGrid.Events.SelectedNode, this.onSelectAllocationNode, this);\n this.allocationWidget = this.allocationDataGrid.asWidget();\n this.allocationWidget.setMinimumSize(50, 25);\n\n this.allocationStackView = new HeapAllocationStackView(heapProfilerModel);\n this.allocationStackView.setMinimumSize(50, 25);\n\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n }\n\n this.retainmentDataGrid = new HeapSnapshotRetainmentDataGrid(heapProfilerModel, this);\n this.retainmentWidget = this.retainmentDataGrid.asWidget();\n this.retainmentWidget.setMinimumSize(50, 21);\n this.retainmentWidget.element.classList.add('retaining-paths-view');\n this.retainmentWidget.element.setAttribute(\n 'jslog', `${VisualLogging.section().context('heap-snapshot.retaining-paths-view')}`);\n\n let splitWidgetResizer;\n if (this.allocationStackView) {\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n\n this.tabbedPane.appendTab('retainers', i18nString(UIStrings.retainers), this.retainmentWidget);\n this.tabbedPane.appendTab('allocation-stack', i18nString(UIStrings.allocationStack), this.allocationStackView);\n\n splitWidgetResizer = this.tabbedPane.headerElement();\n this.objectDetailsView = this.tabbedPane;\n } else {\n const retainmentViewHeader = document.createElement('div');\n retainmentViewHeader.classList.add('heap-snapshot-view-resizer');\n const retainingPathsTitleDiv = retainmentViewHeader.createChild('div', 'title');\n retainmentViewHeader.createChild('div', 'verticalResizerIcon');\n const retainingPathsTitle = retainingPathsTitleDiv.createChild('span');\n retainingPathsTitle.textContent = i18nString(UIStrings.retainers);\n\n splitWidgetResizer = retainmentViewHeader;\n this.objectDetailsView = new UI.Widget.VBox();\n this.objectDetailsView.element.appendChild(retainmentViewHeader);\n this.retainmentWidget.show(this.objectDetailsView.element);\n }\n this.splitWidget.hideDefaultResizer();\n this.splitWidget.installResizer(splitWidgetResizer);\n\n this.retainmentDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.inspectedObjectChanged, this);\n this.retainmentDataGrid.reset();\n\n this.perspectives = [];\n this.comparisonPerspective = new ComparisonPerspective();\n this.perspectives.push(new SummaryPerspective());\n if (profile.profileType() !== instance.trackingHeapSnapshotProfileType) {\n this.perspectives.push(this.comparisonPerspective);\n }\n this.perspectives.push(new ContainmentPerspective());\n if (this.allocationWidget) {\n this.perspectives.push(new AllocationPerspective());\n }\n this.perspectives.push(new StatisticsPerspective());\n\n this.perspectiveSelect = new UI.Toolbar.ToolbarComboBox(\n this.onSelectedPerspectiveChanged.bind(this), i18nString(UIStrings.perspective), undefined,\n 'profiler.heap-snapshot-perspective');\n this.updatePerspectiveOptions();\n\n this.baseSelect = new UI.Toolbar.ToolbarComboBox(\n this.changeBase.bind(this), i18nString(UIStrings.baseSnapshot), undefined, 'profiler.heap-snapshot-base');\n this.baseSelect.setVisible(false);\n this.updateBaseOptions();\n\n this.filterSelect = new UI.Toolbar.ToolbarComboBox(\n this.changeFilter.bind(this), i18nString(UIStrings.filter), undefined, 'profiler.heap-snapshot-filter');\n this.filterSelect.setVisible(false);\n this.updateFilterOptions();\n\n this.classNameFilter = new UI.Toolbar.ToolbarInput(i18nString(UIStrings.classFilter));\n this.classNameFilter.setVisible(false);\n this.constructorsDataGrid.setNameFilter(this.classNameFilter);\n this.diffDataGrid.setNameFilter(this.classNameFilter);\n\n this.selectedSizeText = new UI.Toolbar.ToolbarText();\n\n this.popoverHelper = new UI.PopoverHelper.PopoverHelper(this.element, this.getPopoverRequest.bind(this));\n this.popoverHelper.setDisableOnClick(true);\n this.popoverHelper.setHasPadding(true);\n this.element.addEventListener('scroll', this.popoverHelper.hidePopover.bind(this.popoverHelper), true);\n\n this.currentPerspectiveIndex = 0;\n this.currentPerspective = this.perspectives[0];\n this.currentPerspective.activate(this);\n this.dataGrid = this.currentPerspective.masterGrid(this);\n\n void this.populate();\n this.searchThrottler = new Common.Throttler.Throttler(0);\n\n for (const existingProfile of this.profiles()) {\n existingProfile.addEventListener(ProfileHeaderEvents.ProfileTitleChanged, this.updateControls, this);\n }\n }\n\n createOverview(): void {\n const profileType = this.profile.profileType();\n this.trackingOverviewGrid = new HeapTimelineOverview();\n this.trackingOverviewGrid.addEventListener(Events.IdsRangeChanged, this.onIdsRangeChanged.bind(this));\n if (!this.profile.fromFile() && profileType.profileBeingRecorded() === this.profile) {\n (profileType as TrackingHeapSnapshotProfileType)\n .addEventListener(TrackingHeapSnapshotProfileTypeEvents.HeapStatsUpdate, this.onHeapStatsUpdate, this);\n (profileType as TrackingHeapSnapshotProfileType)\n .addEventListener(TrackingHeapSnapshotProfileTypeEvents.TrackingStopped, this.onStopTracking, this);\n this.trackingOverviewGrid.start();\n }\n }\n\n onStopTracking(): void {\n const profileType = this.profile.profileType() as TrackingHeapSnapshotProfileType;\n profileType.removeEventListener(\n TrackingHeapSnapshotProfileTypeEvents.HeapStatsUpdate, this.onHeapStatsUpdate, this);\n profileType.removeEventListener(TrackingHeapSnapshotProfileTypeEvents.TrackingStopped, this.onStopTracking, this);\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.stop();\n }\n }\n\n onHeapStatsUpdate({data: samples}: Common.EventTarget.EventTargetEvent): void {\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.setSamples(samples);\n }\n }\n\n searchableView(): UI.SearchableView.SearchableView {\n return this.searchableViewInternal;\n }\n\n showProfile(profile: ProfileHeader|null): UI.Widget.Widget|null {\n return this.parentDataDisplayDelegate.showProfile(profile);\n }\n\n showObject(snapshotObjectId: string, perspectiveName: string): void {\n if (Number(snapshotObjectId) <= this.profile.maxJSObjectId) {\n void this.selectLiveObject(perspectiveName, snapshotObjectId);\n } else {\n this.parentDataDisplayDelegate.showObject(snapshotObjectId, perspectiveName);\n }\n }\n\n async linkifyObject(nodeIndex: number): Promise {\n const heapProfilerModel = this.profile.heapProfilerModel();\n // heapProfilerModel is null if snapshot was loaded from file\n if (!heapProfilerModel) {\n return null;\n }\n const location = await this.profile.getLocation(nodeIndex);\n if (!location) {\n return null;\n }\n const debuggerModel = heapProfilerModel.runtimeModel().debuggerModel();\n const rawLocation = debuggerModel.createRawLocationByScriptId(\n String(location.scriptId) as Protocol.Runtime.ScriptId, location.lineNumber, location.columnNumber);\n if (!rawLocation) {\n return null;\n }\n const script = rawLocation.script();\n const sourceURL = script && script.sourceURL;\n return sourceURL && this.linkifier ? this.linkifier.linkifyRawLocation(rawLocation, sourceURL) : null;\n }\n\n async populate(): Promise {\n const heapSnapshotProxy = await this.profile.loadPromise;\n\n void this.retrieveStatistics(heapSnapshotProxy);\n if (this.dataGrid) {\n void this.dataGrid.setDataSource(heapSnapshotProxy, 0);\n }\n\n if (this.profile.profileType().id === TrackingHeapSnapshotProfileType.TypeId && this.profile.fromFile()) {\n const samples = await heapSnapshotProxy.getSamples();\n if (samples) {\n console.assert(Boolean(samples.timestamps.length));\n const profileSamples = new Samples();\n profileSamples.sizes = samples.sizes;\n profileSamples.ids = samples.lastAssignedIds;\n profileSamples.timestamps = samples.timestamps;\n profileSamples.max = samples.sizes;\n profileSamples.totalTime = Math.max(samples.timestamps[samples.timestamps.length - 1] || 0, 10000);\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.setSamples(profileSamples);\n }\n }\n }\n\n const list = this.profiles();\n const profileIndex = list.indexOf(this.profile);\n this.baseSelect.setSelectedIndex(Math.max(0, profileIndex - 1));\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.updateGrid();\n }\n }\n\n async retrieveStatistics(heapSnapshotProxy: HeapSnapshotProxy):\n Promise {\n const statistics = await heapSnapshotProxy.getStatistics();\n\n const records = [\n {value: statistics.code, color: '#f77', title: i18nString(UIStrings.code)},\n {value: statistics.strings, color: '#5e5', title: i18nString(UIStrings.strings)},\n {value: statistics.jsArrays, color: '#7af', title: i18nString(UIStrings.jsArrays)},\n {value: statistics.native, color: '#fc5', title: i18nString(UIStrings.typedArrays)},\n {value: statistics.system, color: '#98f', title: i18nString(UIStrings.systemObjects)},\n ];\n this.statisticsView.setTotalAndRecords(statistics.total, records);\n return statistics;\n }\n\n onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent): void {\n const {minId, maxId} = event.data;\n this.selectedSizeText.setText(\n i18nString(UIStrings.selectedSizeS, {PH1: Platform.NumberUtilities.bytesToString(event.data.size)}));\n if (this.constructorsDataGrid.snapshot) {\n this.constructorsDataGrid.setSelectionRange(minId, maxId);\n }\n }\n\n override async toolbarItems(): Promise {\n const result: UI.Toolbar.ToolbarItem[] = [this.perspectiveSelect, this.classNameFilter];\n if (this.profile.profileType() !== instance.trackingHeapSnapshotProfileType) {\n result.push(this.baseSelect, this.filterSelect);\n }\n result.push(this.selectedSizeText);\n return result;\n }\n\n override willHide(): void {\n this.currentSearchResultIndex = -1;\n this.popoverHelper.hidePopover();\n }\n\n supportsCaseSensitiveSearch(): boolean {\n return true;\n }\n\n supportsRegexSearch(): boolean {\n return false;\n }\n\n onSearchCanceled(): void {\n this.currentSearchResultIndex = -1;\n this.searchResults = [];\n }\n\n selectRevealedNode(node: HeapSnapshotGridNode|null): void {\n if (node) {\n node.select();\n }\n }\n\n performSearch(searchConfig: UI.SearchableView.SearchConfig, shouldJump: boolean, jumpBackwards?: boolean): void {\n const nextQuery = new HeapSnapshotModel.HeapSnapshotModel.SearchConfig(\n searchConfig.query.trim(), searchConfig.caseSensitive, searchConfig.isRegex, shouldJump,\n jumpBackwards || false);\n\n void this.searchThrottler.schedule(this.performSearchInternal.bind(this, nextQuery));\n }\n\n async performSearchInternal(nextQuery: HeapSnapshotModel.HeapSnapshotModel.SearchConfig): Promise {\n // Call onSearchCanceled since it will reset everything we need before doing a new search.\n this.onSearchCanceled();\n\n if (!this.currentPerspective.supportsSearch()) {\n return;\n }\n\n this.currentQuery = nextQuery;\n const query = nextQuery.query.trim();\n\n if (!query) {\n return;\n }\n\n if (query.charAt(0) === '@') {\n const snapshotNodeId = parseInt(query.substring(1), 10);\n if (isNaN(snapshotNodeId)) {\n return;\n }\n if (!this.dataGrid) {\n return;\n }\n const node = await this.dataGrid.revealObjectByHeapSnapshotId(String(snapshotNodeId));\n this.selectRevealedNode(node);\n return;\n }\n\n if (!this.profile.snapshotProxy || !this.dataGrid) {\n return;\n }\n\n const filter = this.dataGrid.nodeFilter();\n this.searchResults = filter ? await this.profile.snapshotProxy.search(this.currentQuery, filter) : [];\n\n this.searchableViewInternal.updateSearchMatchesCount(this.searchResults.length);\n if (this.searchResults.length) {\n this.currentSearchResultIndex = nextQuery.jumpBackward ? this.searchResults.length - 1 : 0;\n }\n await this.jumpToSearchResult(this.currentSearchResultIndex);\n }\n\n jumpToNextSearchResult(): void {\n if (!this.searchResults.length) {\n return;\n }\n this.currentSearchResultIndex = (this.currentSearchResultIndex + 1) % this.searchResults.length;\n void this.searchThrottler.schedule(this.jumpToSearchResult.bind(this, this.currentSearchResultIndex));\n }\n\n jumpToPreviousSearchResult(): void {\n if (!this.searchResults.length) {\n return;\n }\n this.currentSearchResultIndex =\n (this.currentSearchResultIndex + this.searchResults.length - 1) % this.searchResults.length;\n void this.searchThrottler.schedule(this.jumpToSearchResult.bind(this, this.currentSearchResultIndex));\n }\n\n async jumpToSearchResult(searchResultIndex: number): Promise {\n this.searchableViewInternal.updateCurrentMatchIndex(searchResultIndex);\n if (searchResultIndex === -1) {\n return;\n }\n if (!this.dataGrid) {\n return;\n }\n const node = await this.dataGrid.revealObjectByHeapSnapshotId(String(this.searchResults[searchResultIndex]));\n this.selectRevealedNode(node);\n }\n\n refreshVisibleData(): void {\n if (!this.dataGrid) {\n return;\n }\n let child: (HeapSnapshotGridNode|null) = (this.dataGrid.rootNode().children[0] as HeapSnapshotGridNode | null);\n while (child) {\n child.refresh();\n child = (child.traverseNextNode(false, null, true) as HeapSnapshotGridNode | null);\n }\n }\n\n changeBase(): void {\n if (this.baseProfile === this.profiles()[this.baseSelect.selectedIndex()]) {\n return;\n }\n this.baseProfile = (this.profiles()[this.baseSelect.selectedIndex()] as HeapProfileHeader);\n const dataGrid = (this.dataGrid as HeapSnapshotDiffDataGrid);\n // Change set base data source only if main data source is already set.\n if (dataGrid.snapshot) {\n void this.baseProfile.loadPromise.then(dataGrid.setBaseDataSource.bind(dataGrid));\n }\n\n if (!this.currentQuery || !this.searchResults) {\n return;\n }\n\n // The current search needs to be performed again. First negate out previous match\n // count by calling the search finished callback with a negative number of matches.\n // Then perform the search again with the same query and callback.\n this.performSearch(this.currentQuery, false);\n }\n\n changeFilter(): void {\n const profileIndex = this.filterSelect.selectedIndex() - 1;\n if (!this.dataGrid) {\n return;\n }\n (this.dataGrid as HeapSnapshotConstructorsDataGrid)\n .filterSelectIndexChanged((this.profiles() as HeapProfileHeader[]), profileIndex);\n\n if (!this.currentQuery || !this.searchResults) {\n return;\n }\n\n // The current search needs to be performed again. First negate out previous match\n // count by calling the search finished callback with a negative number of matches.\n // Then perform the search again with the same query and callback.\n this.performSearch(this.currentQuery, false);\n }\n\n profiles(): ProfileHeader[] {\n return this.profile.profileType().getProfiles();\n }\n\n selectionChanged(event: Common.EventTarget.EventTargetEvent>):\n void {\n const selectedNode = (event.data as HeapSnapshotGridNode);\n this.setSelectedNodeForDetailsView(selectedNode);\n this.inspectedObjectChanged(event);\n }\n\n onSelectAllocationNode(\n event: Common.EventTarget.EventTargetEvent>): void {\n const selectedNode = (event.data as AllocationGridNode);\n this.constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId());\n this.setSelectedNodeForDetailsView(null);\n }\n\n inspectedObjectChanged(\n event: Common.EventTarget.EventTargetEvent>): void {\n const selectedNode = (event.data as HeapSnapshotGridNode);\n const heapProfilerModel = this.profile.heapProfilerModel();\n if (heapProfilerModel && selectedNode instanceof HeapSnapshotGenericObjectNode) {\n void heapProfilerModel.addInspectedHeapObject(\n String(selectedNode.snapshotNodeId) as Protocol.HeapProfiler.HeapSnapshotObjectId);\n }\n }\n\n setSelectedNodeForDetailsView(nodeItem: HeapSnapshotGridNode|null): void {\n const dataSource = nodeItem && nodeItem.retainersDataSource();\n if (dataSource) {\n void this.retainmentDataGrid.setDataSource(dataSource.snapshot, dataSource.snapshotNodeIndex);\n if (this.allocationStackView) {\n void this.allocationStackView.setAllocatedObject(dataSource.snapshot, dataSource.snapshotNodeIndex);\n }\n } else {\n if (this.allocationStackView) {\n this.allocationStackView.clear();\n }\n this.retainmentDataGrid.reset();\n }\n }\n\n async changePerspectiveAndWait(perspectiveTitle: string): Promise {\n const perspectiveIndex = this.perspectives.findIndex(perspective => perspective.title() === perspectiveTitle);\n if (perspectiveIndex === -1 || this.currentPerspectiveIndex === perspectiveIndex) {\n return;\n }\n const dataGrid = this.perspectives[perspectiveIndex].masterGrid(this);\n\n if (!dataGrid) {\n return;\n }\n\n const promise = dataGrid.once(HeapSnapshotSortableDataGridEvents.ContentShown);\n\n const option = this.perspectiveSelect.options().find(option => option.value === String(perspectiveIndex));\n this.perspectiveSelect.select((option as Element));\n this.changePerspective(perspectiveIndex);\n await promise;\n }\n\n async updateDataSourceAndView(): Promise {\n const dataGrid = this.dataGrid;\n if (!dataGrid || dataGrid.snapshot) {\n return;\n }\n\n const snapshotProxy = await this.profile.loadPromise;\n\n if (this.dataGrid !== dataGrid) {\n return;\n }\n if (dataGrid.snapshot !== snapshotProxy) {\n void dataGrid.setDataSource(snapshotProxy, 0);\n }\n if (dataGrid !== this.diffDataGrid) {\n return;\n }\n if (!this.baseProfile) {\n this.baseProfile = (this.profiles()[this.baseSelect.selectedIndex()] as HeapProfileHeader);\n }\n\n const baseSnapshotProxy = await this.baseProfile.loadPromise;\n\n if (this.diffDataGrid.baseSnapshot !== baseSnapshotProxy) {\n this.diffDataGrid.setBaseDataSource(baseSnapshotProxy);\n }\n }\n\n onSelectedPerspectiveChanged(event: Event): void {\n this.changePerspective(Number((event.target as HTMLSelectElement).selectedOptions[0].value));\n }\n\n changePerspective(selectedIndex: number): void {\n if (selectedIndex === this.currentPerspectiveIndex) {\n return;\n }\n\n this.currentPerspectiveIndex = selectedIndex;\n\n this.currentPerspective.deactivate(this);\n const perspective = this.perspectives[selectedIndex];\n this.currentPerspective = perspective;\n this.dataGrid = (perspective.masterGrid(this) as HeapSnapshotSortableDataGrid);\n perspective.activate(this);\n\n this.refreshVisibleData();\n if (this.dataGrid) {\n this.dataGrid.updateWidths();\n }\n\n void this.updateDataSourceAndView();\n\n if (!this.currentQuery || !this.searchResults) {\n return;\n }\n\n // The current search needs to be performed again. First negate out previous match\n // count by calling the search finished callback with a negative number of matches.\n // Then perform the search again the with same query and callback.\n this.performSearch(this.currentQuery, false);\n }\n\n async selectLiveObject(perspectiveName: string, snapshotObjectId: string): Promise {\n await this.changePerspectiveAndWait(perspectiveName);\n if (!this.dataGrid) {\n return;\n }\n const node = await this.dataGrid.revealObjectByHeapSnapshotId(snapshotObjectId);\n if (node) {\n node.select();\n } else {\n Common.Console.Console.instance().error('Cannot find corresponding heap snapshot node');\n }\n }\n\n getPopoverRequest(event: Event): UI.PopoverHelper.PopoverRequest|null {\n const span = UI.UIUtils.enclosingNodeOrSelfWithNodeName((event.target as Node), 'span');\n const row = UI.UIUtils.enclosingNodeOrSelfWithNodeName((event.target as Node), 'tr');\n if (!row) {\n return null;\n }\n if (!this.dataGrid) {\n return null;\n }\n const node = this.dataGrid.dataGridNodeFromNode(row) || this.containmentDataGrid.dataGridNodeFromNode(row) ||\n this.constructorsDataGrid.dataGridNodeFromNode(row) || this.diffDataGrid.dataGridNodeFromNode(row) ||\n (this.allocationDataGrid && this.allocationDataGrid.dataGridNodeFromNode(row)) ||\n this.retainmentDataGrid.dataGridNodeFromNode(row);\n const heapProfilerModel = this.profile.heapProfilerModel();\n if (!node || !span || !heapProfilerModel) {\n return null;\n }\n let objectPopoverHelper: ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper|null;\n return {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // @ts-expect-error\n box: span.boxInWindow(),\n show: async(popover: UI.GlassPane.GlassPane): Promise => {\n if (!heapProfilerModel) {\n return false;\n }\n const remoteObject = await (node as HeapSnapshotGridNode).queryObjectContent(heapProfilerModel, 'popover');\n if (!remoteObject) {\n return false;\n }\n objectPopoverHelper =\n await ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper.buildObjectPopover(remoteObject, popover);\n if (!objectPopoverHelper) {\n heapProfilerModel.runtimeModel().releaseObjectGroup('popover');\n return false;\n }\n return true;\n },\n hide: (): void => {\n heapProfilerModel.runtimeModel().releaseObjectGroup('popover');\n if (objectPopoverHelper) {\n objectPopoverHelper.dispose();\n }\n },\n };\n }\n\n updatePerspectiveOptions(): void {\n const multipleSnapshots = this.profiles().length > 1;\n this.perspectiveSelect.removeOptions();\n this.perspectives.forEach((perspective, index) => {\n if (multipleSnapshots || perspective !== this.comparisonPerspective) {\n const option = this.perspectiveSelect.createOption(perspective.title(), String(index));\n if (perspective === this.currentPerspective) {\n this.perspectiveSelect.select(option);\n }\n }\n });\n }\n\n updateBaseOptions(): void {\n const list = this.profiles();\n const selectedIndex = this.baseSelect.selectedIndex();\n\n this.baseSelect.removeOptions();\n for (const item of list) {\n this.baseSelect.createOption(item.title);\n }\n\n if (selectedIndex > -1) {\n this.baseSelect.setSelectedIndex(selectedIndex);\n }\n }\n\n updateFilterOptions(): void {\n const list = this.profiles();\n const selectedIndex = this.filterSelect.selectedIndex();\n\n this.filterSelect.removeOptions();\n this.filterSelect.createOption(i18nString(UIStrings.allObjects));\n for (let i = 0; i < list.length; ++i) {\n let title;\n if (!i) {\n title = i18nString(UIStrings.objectsAllocatedBeforeS, {PH1: list[i].title});\n } else {\n title = i18nString(UIStrings.objectsAllocatedBetweenSAndS, {PH1: list[i - 1].title, PH2: list[i].title});\n }\n this.filterSelect.createOption(title);\n }\n\n if (selectedIndex > -1) {\n this.filterSelect.setSelectedIndex(selectedIndex);\n }\n }\n\n updateControls(): void {\n this.updatePerspectiveOptions();\n this.updateBaseOptions();\n this.updateFilterOptions();\n }\n\n onReceiveSnapshot(event: Common.EventTarget.EventTargetEvent): void {\n this.updateControls();\n const profile = event.data;\n profile.addEventListener(ProfileHeaderEvents.ProfileTitleChanged, this.updateControls, this);\n }\n\n onProfileHeaderRemoved(event: Common.EventTarget.EventTargetEvent): void {\n const profile = event.data;\n profile.removeEventListener(ProfileHeaderEvents.ProfileTitleChanged, this.updateControls, this);\n\n if (this.profile === profile) {\n this.detach();\n this.profile.profileType().removeEventListener(\n HeapSnapshotProfileTypeEvents.SnapshotReceived, this.onReceiveSnapshot, this);\n this.profile.profileType().removeEventListener(\n ProfileTypeEvents.RemoveProfileHeader, this.onProfileHeaderRemoved, this);\n this.dispose();\n } else {\n this.updateControls();\n }\n }\n\n dispose(): void {\n this.linkifier.dispose();\n this.popoverHelper.dispose();\n if (this.allocationStackView) {\n this.allocationStackView.clear();\n if (this.allocationDataGrid) {\n this.allocationDataGrid.dispose();\n }\n }\n this.onStopTracking();\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.removeEventListener(Events.IdsRangeChanged, this.onIdsRangeChanged.bind(this));\n }\n }\n}\n\nexport class Perspective {\n readonly titleInternal: string;\n constructor(title: string) {\n this.titleInternal = title;\n }\n\n activate(_heapSnapshotView: HeapSnapshotView): void {\n }\n\n deactivate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.baseSelect.setVisible(false);\n heapSnapshotView.filterSelect.setVisible(false);\n heapSnapshotView.classNameFilter.setVisible(false);\n if (heapSnapshotView.trackingOverviewGrid) {\n heapSnapshotView.trackingOverviewGrid.detach();\n }\n if (heapSnapshotView.allocationWidget) {\n heapSnapshotView.allocationWidget.detach();\n }\n if (heapSnapshotView.statisticsView) {\n heapSnapshotView.statisticsView.detach();\n }\n\n heapSnapshotView.splitWidget.detach();\n heapSnapshotView.splitWidget.detachChildWidgets();\n }\n\n masterGrid(_heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid|null {\n return null;\n }\n\n title(): string {\n return this.titleInternal;\n }\n\n supportsSearch(): boolean {\n return false;\n }\n}\n\nexport class SummaryPerspective extends Perspective {\n constructor() {\n super(i18nString(UIStrings.summary));\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.splitWidget.setMainWidget(heapSnapshotView.constructorsWidget);\n heapSnapshotView.splitWidget.setSidebarWidget(heapSnapshotView.objectDetailsView);\n heapSnapshotView.splitWidget.show(heapSnapshotView.searchableViewInternal.element);\n heapSnapshotView.filterSelect.setVisible(true);\n heapSnapshotView.classNameFilter.setVisible(true);\n if (!heapSnapshotView.trackingOverviewGrid) {\n return;\n }\n heapSnapshotView.trackingOverviewGrid.show(\n heapSnapshotView.searchableViewInternal.element, heapSnapshotView.splitWidget.element);\n heapSnapshotView.trackingOverviewGrid.update();\n heapSnapshotView.trackingOverviewGrid.updateGrid();\n }\n\n override masterGrid(heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid {\n return heapSnapshotView.constructorsDataGrid;\n }\n\n override supportsSearch(): boolean {\n return true;\n }\n}\n\nexport class ComparisonPerspective extends Perspective {\n constructor() {\n super(i18nString(UIStrings.comparison));\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.splitWidget.setMainWidget(heapSnapshotView.diffWidget);\n heapSnapshotView.splitWidget.setSidebarWidget(heapSnapshotView.objectDetailsView);\n heapSnapshotView.splitWidget.show(heapSnapshotView.searchableViewInternal.element);\n heapSnapshotView.baseSelect.setVisible(true);\n heapSnapshotView.classNameFilter.setVisible(true);\n }\n\n override masterGrid(heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid {\n return heapSnapshotView.diffDataGrid;\n }\n\n override supportsSearch(): boolean {\n return true;\n }\n}\n\nexport class ContainmentPerspective extends Perspective {\n constructor() {\n super(i18nString(UIStrings.containment));\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.splitWidget.setMainWidget(heapSnapshotView.containmentWidget);\n heapSnapshotView.splitWidget.setSidebarWidget(heapSnapshotView.objectDetailsView);\n heapSnapshotView.splitWidget.show(heapSnapshotView.searchableViewInternal.element);\n }\n\n override masterGrid(heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid {\n return heapSnapshotView.containmentDataGrid;\n }\n}\n\nexport class AllocationPerspective extends Perspective {\n readonly allocationSplitWidget: UI.SplitWidget.SplitWidget;\n constructor() {\n super(i18nString(UIStrings.allocation));\n this.allocationSplitWidget =\n new UI.SplitWidget.SplitWidget(false, true, 'heapSnapshotAllocationSplitViewState', 200, 200);\n this.allocationSplitWidget.setSidebarWidget(new UI.Widget.VBox());\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n if (heapSnapshotView.allocationWidget) {\n this.allocationSplitWidget.setMainWidget(heapSnapshotView.allocationWidget);\n }\n heapSnapshotView.splitWidget.setMainWidget(heapSnapshotView.constructorsWidget);\n heapSnapshotView.splitWidget.setSidebarWidget(heapSnapshotView.objectDetailsView);\n\n const allocatedObjectsView = new UI.Widget.VBox();\n const resizer = document.createElement('div');\n resizer.classList.add('heap-snapshot-view-resizer');\n const title = resizer.createChild('div', 'title').createChild('span');\n resizer.createChild('div', 'verticalResizerIcon');\n title.textContent = i18nString(UIStrings.liveObjects);\n this.allocationSplitWidget.hideDefaultResizer();\n this.allocationSplitWidget.installResizer(resizer);\n allocatedObjectsView.element.appendChild(resizer);\n heapSnapshotView.splitWidget.show(allocatedObjectsView.element);\n this.allocationSplitWidget.setSidebarWidget(allocatedObjectsView);\n\n this.allocationSplitWidget.show(heapSnapshotView.searchableViewInternal.element);\n\n heapSnapshotView.constructorsDataGrid.clear();\n if (heapSnapshotView.allocationDataGrid) {\n const selectedNode = (heapSnapshotView.allocationDataGrid.selectedNode as AllocationGridNode);\n if (selectedNode) {\n heapSnapshotView.constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId());\n }\n }\n }\n\n override deactivate(heapSnapshotView: HeapSnapshotView): void {\n this.allocationSplitWidget.detach();\n super.deactivate(heapSnapshotView);\n }\n\n override masterGrid(heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid|null {\n return heapSnapshotView.allocationDataGrid;\n }\n}\n\nexport class StatisticsPerspective extends Perspective {\n constructor() {\n super(i18nString(UIStrings.statistics));\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.statisticsView.show(heapSnapshotView.searchableViewInternal.element);\n }\n\n override masterGrid(_heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid|null {\n return null;\n }\n}\n\nexport class HeapSnapshotProfileType extends\n Common.ObjectWrapper.eventMixin(ProfileType)\n implements SDK.TargetManager.SDKModelObserver {\n readonly exposeInternals: Common.Settings.Setting;\n readonly captureNumericValue: Common.Settings.Setting;\n customContentInternal: HTMLElement|null;\n constructor(id?: string, title?: string) {\n super(id || HeapSnapshotProfileType.TypeId, title || i18nString(UIStrings.heapSnapshot));\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.HeapProfilerModel.HeapProfilerModel, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.HeapProfilerModel.HeapProfilerModel, SDK.HeapProfilerModel.Events.ResetProfiles, this.resetProfiles, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.HeapProfilerModel.HeapProfilerModel, SDK.HeapProfilerModel.Events.AddHeapSnapshotChunk,\n this.addHeapSnapshotChunk, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.HeapProfilerModel.HeapProfilerModel, SDK.HeapProfilerModel.Events.ReportHeapSnapshotProgress,\n this.reportHeapSnapshotProgress, this);\n this.exposeInternals = Common.Settings.Settings.instance().createSetting('exposeInternals', false);\n this.captureNumericValue = Common.Settings.Settings.instance().createSetting('captureNumericValue', false);\n this.customContentInternal = null;\n }\n\n modelAdded(heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel): void {\n void heapProfilerModel.enable();\n }\n\n modelRemoved(_heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel): void {\n }\n\n override getProfiles(): HeapProfileHeader[] {\n return super.getProfiles() as HeapProfileHeader[];\n }\n\n override fileExtension(): string {\n return '.heapsnapshot';\n }\n\n override get buttonTooltip(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.takeHeapSnapshot);\n }\n\n override isInstantProfile(): boolean {\n return true;\n }\n\n override buttonClicked(): boolean {\n void this.takeHeapSnapshot();\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ProfilesHeapProfileTaken);\n return false;\n }\n\n override get treeItemTitle(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.heapSnapshots);\n }\n\n override get description(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.heapSnapshotProfilesShowMemory);\n }\n\n override customContent(): Element|null {\n const optionsContainer = document.createElement('div');\n const showOptionToExposeInternalsInHeapSnapshot =\n Root.Runtime.experiments.isEnabled('showOptionToExposeInternalsInHeapSnapshot');\n const omitParagraphElement = !showOptionToExposeInternalsInHeapSnapshot;\n if (showOptionToExposeInternalsInHeapSnapshot) {\n const exposeInternalsInHeapSnapshotCheckbox = UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.exposeInternals), this.exposeInternals, omitParagraphElement);\n optionsContainer.appendChild(exposeInternalsInHeapSnapshotCheckbox);\n }\n const captureNumericValueCheckbox = UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.captureNumericValue), this.captureNumericValue, omitParagraphElement);\n optionsContainer.appendChild(captureNumericValueCheckbox);\n this.customContentInternal = optionsContainer;\n return optionsContainer;\n }\n\n override setCustomContentEnabled(enable: boolean): void {\n if (this.customContentInternal) {\n this.customContentInternal.querySelectorAll('[is=dt-checkbox]').forEach(label => {\n (label as UI.UIUtils.CheckboxLabel).checkboxElement.disabled = !enable;\n });\n }\n }\n\n override createProfileLoadedFromFile(title: string): ProfileHeader {\n return new HeapProfileHeader(null, this, title);\n }\n\n async takeHeapSnapshot(): Promise {\n if (this.profileBeingRecorded()) {\n return;\n }\n const heapProfilerModel = UI.Context.Context.instance().flavor(SDK.HeapProfilerModel.HeapProfilerModel);\n if (!heapProfilerModel) {\n return;\n }\n\n let profile: HeapProfileHeader = new HeapProfileHeader(heapProfilerModel, this);\n this.setProfileBeingRecorded(profile);\n this.addProfile(profile);\n profile.updateStatus(i18nString(UIStrings.snapshotting));\n\n await heapProfilerModel.takeHeapSnapshot({\n reportProgress: true,\n captureNumericValue: this.captureNumericValue.get(),\n exposeInternals: this.exposeInternals.get(),\n });\n profile = this.profileBeingRecorded() as HeapProfileHeader;\n if (!profile) {\n return;\n }\n profile.title = i18nString(UIStrings.snapshotD, {PH1: profile.uid});\n profile.finishLoad();\n this.setProfileBeingRecorded(null);\n this.dispatchEventToListeners(ProfileTypeEvents.ProfileComplete, profile);\n }\n\n addHeapSnapshotChunk(event: Common.EventTarget.EventTargetEvent): void {\n const profile = (this.profileBeingRecorded() as HeapProfileHeader | null);\n if (!profile) {\n return;\n }\n profile.transferChunk(event.data);\n }\n\n reportHeapSnapshotProgress(event: Common.EventTarget.EventTargetEvent):\n void {\n const profile = (this.profileBeingRecorded() as HeapProfileHeader | null);\n if (!profile) {\n return;\n }\n const {done, total, finished} = event.data;\n profile.updateStatus(i18nString(UIStrings.percentagePlaceholder, {PH1: ((done / total) * 100).toFixed(0)}), true);\n if (finished) {\n profile.prepareToLoad();\n }\n }\n\n resetProfiles(event: Common.EventTarget.EventTargetEvent): void {\n const heapProfilerModel = event.data;\n for (const profile of this.getProfiles()) {\n if (profile.heapProfilerModel() === heapProfilerModel) {\n this.removeProfile(profile);\n }\n }\n }\n\n snapshotReceived(profile: ProfileHeader): void {\n if (this.profileBeingRecorded() === profile) {\n this.setProfileBeingRecorded(null);\n }\n this.dispatchEventToListeners(HeapSnapshotProfileTypeEvents.SnapshotReceived, profile);\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly TypeId: string = 'HEAP';\n // TODO(crbug.com/1228674): Remove event string once its no longer used in web tests.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly SnapshotReceived = 'SnapshotReceived';\n}\n\nexport const enum HeapSnapshotProfileTypeEvents {\n SnapshotReceived = 'SnapshotReceived',\n}\n\nexport type HeapSnapshotProfileTypeEventTypes = {\n [HeapSnapshotProfileTypeEvents.SnapshotReceived]: ProfileHeader,\n};\n\nexport class TrackingHeapSnapshotProfileType extends\n Common.ObjectWrapper.eventMixin(\n HeapSnapshotProfileType) {\n readonly recordAllocationStacksSettingInternal: Common.Settings.Setting;\n override customContentInternal: UI.UIUtils.CheckboxLabel|null;\n recording: boolean;\n profileSamples?: Samples|null;\n\n constructor() {\n super(TrackingHeapSnapshotProfileType.TypeId, i18nString(UIStrings.allocationInstrumentationOn));\n this.recordAllocationStacksSettingInternal =\n Common.Settings.Settings.instance().createSetting('recordAllocationStacks', false);\n this.customContentInternal = null;\n this.recording = false;\n }\n\n override modelAdded(heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel): void {\n super.modelAdded(heapProfilerModel);\n heapProfilerModel.addEventListener(SDK.HeapProfilerModel.Events.HeapStatsUpdate, this.heapStatsUpdate, this);\n heapProfilerModel.addEventListener(SDK.HeapProfilerModel.Events.LastSeenObjectId, this.lastSeenObjectId, this);\n }\n\n override modelRemoved(heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel): void {\n super.modelRemoved(heapProfilerModel);\n heapProfilerModel.removeEventListener(SDK.HeapProfilerModel.Events.HeapStatsUpdate, this.heapStatsUpdate, this);\n heapProfilerModel.removeEventListener(SDK.HeapProfilerModel.Events.LastSeenObjectId, this.lastSeenObjectId, this);\n }\n\n heapStatsUpdate(event: Common.EventTarget.EventTargetEvent): void {\n if (!this.profileSamples) {\n return;\n }\n const samples = event.data;\n let index;\n for (let i = 0; i < samples.length; i += 3) {\n index = samples[i];\n const size = samples[i + 2];\n this.profileSamples.sizes[index] = size;\n if (!this.profileSamples.max[index]) {\n this.profileSamples.max[index] = size;\n }\n }\n }\n\n lastSeenObjectId(event: Common.EventTarget.EventTargetEvent): void {\n const profileSamples = this.profileSamples;\n if (!profileSamples) {\n return;\n }\n const {lastSeenObjectId, timestamp} = event.data;\n const currentIndex = Math.max(profileSamples.ids.length, profileSamples.max.length - 1);\n profileSamples.ids[currentIndex] = lastSeenObjectId;\n if (!profileSamples.max[currentIndex]) {\n profileSamples.max[currentIndex] = 0;\n profileSamples.sizes[currentIndex] = 0;\n }\n profileSamples.timestamps[currentIndex] = timestamp;\n if (profileSamples.totalTime < timestamp - profileSamples.timestamps[0]) {\n profileSamples.totalTime *= 2;\n }\n if (this.profileSamples) {\n this.dispatchEventToListeners(TrackingHeapSnapshotProfileTypeEvents.HeapStatsUpdate, this.profileSamples);\n }\n const profile = this.profileBeingRecorded();\n if (profile) {\n profile.updateStatus(null, true);\n }\n }\n\n override hasTemporaryView(): boolean {\n return true;\n }\n\n override get buttonTooltip(): Common.UIString.LocalizedString {\n return this.recording ? i18nString(UIStrings.stopRecordingHeapProfile) :\n i18nString(UIStrings.startRecordingHeapProfile);\n }\n\n override isInstantProfile(): boolean {\n return false;\n }\n\n override buttonClicked(): boolean {\n return this.toggleRecording();\n }\n\n startRecordingProfile(): void {\n if (this.profileBeingRecorded()) {\n return;\n }\n const heapProfilerModel = this.addNewProfile();\n if (!heapProfilerModel) {\n return;\n }\n void heapProfilerModel.startTrackingHeapObjects(this.recordAllocationStacksSettingInternal.get());\n }\n\n override customContent(): Element|null {\n const checkboxSetting = UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.recordAllocationStacksExtra), this.recordAllocationStacksSettingInternal, true);\n this.customContentInternal = (checkboxSetting as UI.UIUtils.CheckboxLabel);\n return checkboxSetting;\n }\n\n override setCustomContentEnabled(enable: boolean): void {\n if (this.customContentInternal) {\n this.customContentInternal.checkboxElement.disabled = !enable;\n }\n }\n\n recordAllocationStacksSetting(): Common.Settings.Setting {\n return this.recordAllocationStacksSettingInternal;\n }\n\n addNewProfile(): SDK.HeapProfilerModel.HeapProfilerModel|null {\n const heapProfilerModel = UI.Context.Context.instance().flavor(SDK.HeapProfilerModel.HeapProfilerModel);\n if (!heapProfilerModel) {\n return null;\n }\n this.setProfileBeingRecorded(new HeapProfileHeader(heapProfilerModel, this, undefined));\n this.profileSamples = new Samples();\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.profileBeingRecorded() as any)._profileSamples = this.profileSamples;\n this.recording = true;\n this.addProfile((this.profileBeingRecorded() as ProfileHeader));\n (this.profileBeingRecorded() as HeapProfileHeader).updateStatus(i18nString(UIStrings.recording));\n this.dispatchEventToListeners(TrackingHeapSnapshotProfileTypeEvents.TrackingStarted);\n return heapProfilerModel;\n }\n\n async stopRecordingProfile(): Promise {\n let profile: HeapProfileHeader = (this.profileBeingRecorded() as HeapProfileHeader);\n profile.updateStatus(i18nString(UIStrings.snapshotting));\n const stopPromise =\n (profile.heapProfilerModel() as SDK.HeapProfilerModel.HeapProfilerModel).stopTrackingHeapObjects(true);\n this.recording = false;\n this.dispatchEventToListeners(TrackingHeapSnapshotProfileTypeEvents.TrackingStopped);\n await stopPromise;\n profile = (this.profileBeingRecorded() as HeapProfileHeader);\n if (!profile) {\n return;\n }\n profile.finishLoad();\n this.profileSamples = null;\n this.setProfileBeingRecorded(null);\n this.dispatchEventToListeners(ProfileTypeEvents.ProfileComplete, profile);\n }\n\n toggleRecording(): boolean {\n if (this.recording) {\n void this.stopRecordingProfile();\n } else {\n this.startRecordingProfile();\n }\n return this.recording;\n }\n\n override fileExtension(): string {\n return '.heaptimeline';\n }\n\n override get treeItemTitle(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.allocationTimelines);\n }\n\n override get description(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.AllocationTimelinesShowInstrumented);\n }\n\n override resetProfiles(event: Common.EventTarget.EventTargetEvent): void {\n const wasRecording = this.recording;\n // Clear current profile to avoid stopping backend.\n this.setProfileBeingRecorded(null);\n super.resetProfiles(event);\n this.profileSamples = null;\n if (wasRecording) {\n this.addNewProfile();\n }\n }\n\n override profileBeingRecordedRemoved(): void {\n void this.stopRecordingProfile();\n this.profileSamples = null;\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static override readonly TypeId = 'HEAP-RECORD';\n // TODO(crbug.com/1228674): Remove event strings once they are no longer used in web tests.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly HeapStatsUpdate = 'HeapStatsUpdate';\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly TrackingStarted = 'TrackingStarted';\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly TrackingStopped = 'TrackingStopped';\n}\n\nexport const enum TrackingHeapSnapshotProfileTypeEvents {\n HeapStatsUpdate = 'HeapStatsUpdate',\n TrackingStarted = 'TrackingStarted',\n TrackingStopped = 'TrackingStopped',\n}\n\nexport type TrackingHeapSnapshotProfileTypeEventTypes = {\n [TrackingHeapSnapshotProfileTypeEvents.HeapStatsUpdate]: Samples,\n [TrackingHeapSnapshotProfileTypeEvents.TrackingStarted]: void,\n [TrackingHeapSnapshotProfileTypeEvents.TrackingStopped]: void,\n};\n\nexport class HeapProfileHeader extends ProfileHeader {\n readonly heapProfilerModelInternal: SDK.HeapProfilerModel.HeapProfilerModel|null;\n maxJSObjectId: number;\n workerProxy: HeapSnapshotWorkerProxy|null;\n receiver: Common.StringOutputStream.OutputStream|null;\n snapshotProxy: HeapSnapshotProxy|null;\n readonly loadPromise: Promise;\n fulfillLoad?: (value: HeapSnapshotProxy|PromiseLike) => void;\n totalNumberOfChunks: number;\n bufferedWriter: Bindings.TempFile.TempFile|null;\n onTempFileReady: (() => void)|null;\n failedToCreateTempFile?: boolean;\n wasDisposed?: boolean;\n fileName?: Platform.DevToolsPath.RawPathString;\n\n constructor(\n heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, type: HeapSnapshotProfileType, title?: string) {\n super(type, title || i18nString(UIStrings.snapshotD, {PH1: type.nextProfileUid()}));\n this.heapProfilerModelInternal = heapProfilerModel;\n this.maxJSObjectId = -1;\n this.workerProxy = null;\n this.receiver = null;\n this.snapshotProxy = null;\n this.loadPromise = new Promise(resolve => {\n this.fulfillLoad = resolve;\n });\n this.totalNumberOfChunks = 0;\n this.bufferedWriter = null;\n this.onTempFileReady = null;\n }\n\n heapProfilerModel(): SDK.HeapProfilerModel.HeapProfilerModel|null {\n return this.heapProfilerModelInternal;\n }\n\n async getLocation(nodeIndex: number): Promise {\n if (!this.snapshotProxy) {\n return null;\n }\n return this.snapshotProxy.getLocation(nodeIndex);\n }\n\n override createSidebarTreeElement(dataDisplayDelegate: DataDisplayDelegate): ProfileSidebarTreeElement {\n return new ProfileSidebarTreeElement(dataDisplayDelegate, this, 'heap-snapshot-sidebar-tree-item');\n }\n\n override createView(dataDisplayDelegate: DataDisplayDelegate): HeapSnapshotView {\n return new HeapSnapshotView(dataDisplayDelegate, this);\n }\n\n prepareToLoad(): void {\n console.assert(!this.receiver, 'Already loading');\n this.setupWorker();\n this.updateStatus(i18nString(UIStrings.loading), true);\n }\n\n finishLoad(): void {\n if (!this.wasDisposed && this.receiver) {\n void this.receiver.close();\n }\n if (!this.bufferedWriter) {\n return;\n }\n this.didWriteToTempFile(this.bufferedWriter);\n }\n\n didWriteToTempFile(tempFile: Bindings.TempFile.TempFile): void {\n if (this.wasDisposed) {\n if (tempFile) {\n tempFile.remove();\n }\n return;\n }\n this.tempFile = tempFile;\n if (!tempFile) {\n this.failedToCreateTempFile = true;\n }\n if (this.onTempFileReady) {\n this.onTempFileReady();\n this.onTempFileReady = null;\n }\n }\n\n setupWorker(): void {\n console.assert(!this.workerProxy, 'HeapSnapshotWorkerProxy already exists');\n this.workerProxy = new HeapSnapshotWorkerProxy(this.handleWorkerEvent.bind(this));\n this.workerProxy.addEventListener(HeapSnapshotWorkerProxy.Events.Wait, event => {\n this.updateStatus(null, event.data);\n }, this);\n this.receiver = this.workerProxy.createLoader(this.uid, this.snapshotReceived.bind(this));\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleWorkerEvent(eventName: string, data: any): void {\n if (HeapSnapshotModel.HeapSnapshotModel.HeapSnapshotProgressEvent.BrokenSnapshot === eventName) {\n const error = (data as string);\n Common.Console.Console.instance().error(error);\n return;\n }\n\n if (HeapSnapshotModel.HeapSnapshotModel.HeapSnapshotProgressEvent.Update !== eventName) {\n return;\n }\n const serializedMessage = (data as string);\n const messageObject = i18n.i18n.deserializeUIString(serializedMessage);\n // We know all strings from the worker are declared inside a single file so we can\n // use a custom function.\n this.updateStatus(moduleI18nString(messageObject.string, messageObject.values));\n }\n\n override dispose(): void {\n if (this.workerProxy) {\n this.workerProxy.dispose();\n }\n this.removeTempFile();\n this.wasDisposed = true;\n }\n\n didCompleteSnapshotTransfer(): void {\n if (!this.snapshotProxy) {\n return;\n }\n this.updateStatus(Platform.NumberUtilities.bytesToString(this.snapshotProxy.totalSize), false);\n }\n\n transferChunk(chunk: string): void {\n if (!this.bufferedWriter) {\n this.bufferedWriter = new Bindings.TempFile.TempFile();\n }\n this.bufferedWriter.write([chunk]);\n\n ++this.totalNumberOfChunks;\n if (this.receiver) {\n void this.receiver.write(chunk);\n }\n }\n\n snapshotReceived(snapshotProxy: HeapSnapshotProxy): void {\n if (this.wasDisposed) {\n return;\n }\n this.receiver = null;\n this.snapshotProxy = snapshotProxy;\n this.maxJSObjectId = snapshotProxy.maxJSObjectId();\n this.didCompleteSnapshotTransfer();\n if (this.workerProxy) {\n this.workerProxy.startCheckingForLongRunningCalls();\n }\n this.notifySnapshotReceived();\n }\n\n notifySnapshotReceived(): void {\n if (this.snapshotProxy && this.fulfillLoad) {\n this.fulfillLoad(this.snapshotProxy);\n }\n (this.profileType() as HeapSnapshotProfileType).snapshotReceived(this);\n }\n\n override canSaveToFile(): boolean {\n return !this.fromFile();\n }\n\n override async saveToFile(): Promise {\n await this.loadPromise;\n const fileOutputStream = new Bindings.FileUtils.FileOutputStream();\n this.fileName = this.fileName ||\n 'Heap-' + Platform.DateUtilities.toISO8601Compact(new Date()) + this.profileType().fileExtension() as\n Platform.DevToolsPath.RawPathString;\n const onOpen = async(accepted: boolean): Promise => {\n if (!accepted) {\n return;\n }\n if (this.failedToCreateTempFile) {\n Common.Console.Console.instance().error('Failed to open temp file with heap snapshot');\n void fileOutputStream.close();\n return;\n }\n if (this.tempFile) {\n const error = (await this.tempFile.copyToOutputStream(fileOutputStream, this.onChunkTransferred.bind(this)) as {\n message: string,\n } | null);\n if (error) {\n Common.Console.Console.instance().error('Failed to read heap snapshot from temp file: ' + error.message);\n }\n this.didCompleteSnapshotTransfer();\n return;\n }\n this.onTempFileReady = (): void => {\n void onOpen(accepted);\n };\n this.updateSaveProgress(0, 1);\n };\n\n await fileOutputStream.open(this.fileName).then(onOpen.bind(this));\n }\n\n onChunkTransferred(reader: Bindings.FileUtils.ChunkedReader): void {\n this.updateSaveProgress(reader.loadedSize(), reader.fileSize());\n }\n\n updateSaveProgress(value: number, total: number): void {\n const percentValue = ((total && value / total) * 100).toFixed(0);\n this.updateStatus(i18nString(UIStrings.savingD, {PH1: percentValue}));\n }\n\n override async loadFromFile(file: File): Promise {\n this.updateStatus(i18nString(UIStrings.loading), true);\n this.setupWorker();\n const reader = new Bindings.FileUtils.ChunkedFileReader(file, 10000000);\n const success = await reader.read((this.receiver as Common.StringOutputStream.OutputStream));\n if (!success) {\n const error = (reader.error() as {\n message: string,\n } | null);\n if (error) {\n this.updateStatus(error.message);\n }\n }\n return success ? null : reader.error();\n }\n\n override profileType(): HeapSnapshotProfileType {\n return super.profileType() as HeapSnapshotProfileType;\n }\n}\n\nexport class HeapSnapshotStatisticsView extends UI.Widget.VBox {\n pieChart: PerfUI.PieChart.PieChart;\n constructor() {\n super();\n this.element.classList.add('heap-snapshot-statistics-view');\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('profiler.heap-snapshot-statistics-view')}`);\n this.pieChart = new PerfUI.PieChart.PieChart();\n this.setTotalAndRecords(0, []);\n this.pieChart.classList.add('heap-snapshot-stats-pie-chart');\n this.element.appendChild(this.pieChart);\n }\n\n static valueFormatter(value: number): string {\n return i18nString(UIStrings.sKb, {PH1: Platform.NumberUtilities.withThousandsSeparator(Math.round(value / 1000))});\n }\n\n setTotalAndRecords(total: number, records: PerfUI.PieChart.Slice[]): void {\n this.pieChart.data = {\n chartName: i18nString(UIStrings.heapMemoryUsage),\n size: 150,\n formatter: HeapSnapshotStatisticsView.valueFormatter,\n showLegend: true,\n total,\n slices: records,\n };\n }\n}\n\nexport class HeapAllocationStackView extends UI.Widget.Widget {\n readonly heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null;\n readonly linkifier: Components.Linkifier.Linkifier;\n frameElements: HTMLElement[];\n constructor(heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null) {\n super();\n this.heapProfilerModel = heapProfilerModel;\n this.linkifier = new Components.Linkifier.Linkifier();\n this.frameElements = [];\n }\n\n onContextMenu(link: Element, event: Event): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n if (!contextMenu.containsTarget(link)) {\n contextMenu.appendApplicableItems(link);\n }\n void contextMenu.show();\n event.consume(true);\n }\n\n onStackViewKeydown(event: KeyboardEvent): void {\n const target = (event.target as HTMLElement | null);\n if (!target) {\n return;\n }\n if (event.key === 'Enter') {\n const link = stackFrameToURLElement.get(target);\n if (!link) {\n return;\n }\n const linkInfo = Components.Linkifier.Linkifier.linkInfo(link);\n if (!linkInfo) {\n return;\n }\n if (Components.Linkifier.Linkifier.invokeFirstAction(linkInfo)) {\n event.consume(true);\n }\n return;\n }\n\n let navDown;\n const keyboardEvent = (event as KeyboardEvent);\n if (keyboardEvent.key === 'ArrowUp') {\n navDown = false;\n } else if (keyboardEvent.key === 'ArrowDown') {\n navDown = true;\n } else {\n return;\n }\n\n const index = this.frameElements.indexOf(target);\n if (index === -1) {\n return;\n }\n const nextIndex = navDown ? index + 1 : index - 1;\n if (nextIndex < 0 || nextIndex >= this.frameElements.length) {\n return;\n }\n\n const nextFrame = this.frameElements[nextIndex];\n nextFrame.tabIndex = 0;\n target.tabIndex = -1;\n nextFrame.focus();\n event.consume(true);\n }\n\n async setAllocatedObject(snapshot: HeapSnapshotProxy, snapshotNodeIndex: number): Promise {\n this.clear();\n const frames = await snapshot.allocationStack(snapshotNodeIndex);\n\n if (!frames) {\n const stackDiv = this.element.createChild('div', 'no-heap-allocation-stack');\n UI.UIUtils.createTextChild(stackDiv, i18nString(UIStrings.stackWasNotRecordedForThisObject));\n return;\n }\n\n const stackDiv = this.element.createChild('div', 'heap-allocation-stack');\n stackDiv.addEventListener('keydown', this.onStackViewKeydown.bind(this), false);\n for (const frame of frames) {\n const frameDiv = (stackDiv.createChild('div', 'stack-frame') as HTMLElement);\n this.frameElements.push(frameDiv);\n frameDiv.tabIndex = -1;\n const name = frameDiv.createChild('div');\n name.textContent = UI.UIUtils.beautifyFunctionName(frame.functionName);\n if (!frame.scriptId) {\n continue;\n }\n const target = this.heapProfilerModel ? this.heapProfilerModel.target() : null;\n const options = {columnNumber: frame.column - 1, inlineFrameIndex: 0};\n const urlElement = this.linkifier.linkifyScriptLocation(\n target, String(frame.scriptId) as Protocol.Runtime.ScriptId,\n frame.scriptName as Platform.DevToolsPath.UrlString, frame.line - 1, options);\n frameDiv.appendChild(urlElement);\n stackFrameToURLElement.set(frameDiv, urlElement);\n frameDiv.addEventListener('contextmenu', this.onContextMenu.bind(this, urlElement));\n }\n this.frameElements[0].tabIndex = 0;\n }\n\n clear(): void {\n this.element.removeChildren();\n this.frameElements = [];\n this.linkifier.reset();\n }\n}\n\nconst stackFrameToURLElement = new WeakMap();\n"]} \ No newline at end of file +{"version":3,"file":"HeapSnapshotView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/profiler/HeapSnapshotView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uB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EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAC,CAAC;YACtE,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,qBAAqB,CACnD,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAA8B,EAC3D,KAAK,CAAC,UAA6C,EAAE,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;YAClF,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YACjC,sBAAsB,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;YACjD,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;SACrF;QACD,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrC,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAC9B,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;CACF;AAED,MAAM,sBAAsB,GAAG,IAAI,OAAO,EAA4B,CAAC","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as HeapSnapshotModel from '../../models/heap_snapshot_model/heap_snapshot_model.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {\n AllocationDataGrid,\n HeapSnapshotConstructorsDataGrid,\n HeapSnapshotContainmentDataGrid,\n HeapSnapshotDiffDataGrid,\n HeapSnapshotRetainmentDataGrid,\n type HeapSnapshotSortableDataGrid,\n HeapSnapshotSortableDataGridEvents,\n} from './HeapSnapshotDataGrids.js';\nimport {\n type AllocationGridNode,\n HeapSnapshotGenericObjectNode,\n type HeapSnapshotGridNode,\n} from './HeapSnapshotGridNodes.js';\nimport {type HeapSnapshotProxy, HeapSnapshotWorkerProxy} from './HeapSnapshotProxy.js';\nimport {Events, HeapTimelineOverview, type IdsRangeChangedEvent, Samples} from './HeapTimelineOverview.js';\nimport * as ModuleUIStrings from './ModuleUIStrings.js';\nimport {\n type DataDisplayDelegate,\n Events as ProfileHeaderEvents,\n ProfileEvents as ProfileTypeEvents,\n ProfileHeader,\n ProfileType,\n} from './ProfileHeader.js';\nimport {ProfileSidebarTreeElement} from './ProfileSidebarTreeElement.js';\nimport {instance} from './ProfileTypeRegistry.js';\n\nconst UIStrings = {\n /**\n *@description Text to find an item\n */\n find: 'Find',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n containment: 'Containment',\n /**\n *@description Retaining paths title text content in Heap Snapshot View of a profiler tool\n */\n retainers: 'Retainers',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allocationStack: 'Allocation stack',\n /**\n *@description Screen reader label for a select box that chooses the perspective in the Memory panel when vieweing a Heap Snapshot\n */\n perspective: 'Perspective',\n /**\n *@description Screen reader label for a select box that chooses the snapshot to use as a base in the Memory panel when vieweing a Heap Snapshot\n */\n baseSnapshot: 'Base snapshot',\n /**\n *@description Text to filter result items\n */\n filter: 'Filter',\n /**\n * @description Filter label text in the Memory tool to filter by JavaScript class names for a heap\n * snapshot.\n */\n classFilter: 'Class filter',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n code: 'Code',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n strings: 'Strings',\n /**\n *@description Label on a pie chart in the statistics view for the Heap Snapshot tool\n */\n jsArrays: 'JS arrays',\n /**\n *@description Label on a pie chart in the statistics view for the Heap Snapshot tool\n */\n typedArrays: 'Typed arrays',\n /**\n *@description Label on a pie chart in the statistics view for the Heap Snapshot tool\n */\n systemObjects: 'System objects',\n /**\n *@description The reported total size used in the selected time frame of the allocation sampling profile\n *@example {3 MB} PH1\n */\n selectedSizeS: 'Selected size: {PH1}',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allObjects: 'All objects',\n /**\n *@description Title in Heap Snapshot View of a profiler tool\n *@example {Profile 2} PH1\n */\n objectsAllocatedBeforeS: 'Objects allocated before {PH1}',\n /**\n *@description Title in Heap Snapshot View of a profiler tool\n *@example {Profile 1} PH1\n *@example {Profile 2} PH2\n */\n objectsAllocatedBetweenSAndS: 'Objects allocated between {PH1} and {PH2}',\n /**\n *@description Text for the summary view\n */\n summary: 'Summary',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n comparison: 'Comparison',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allocation: 'Allocation',\n /**\n *@description Title text content in Heap Snapshot View of a profiler tool\n */\n liveObjects: 'Live objects',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n statistics: 'Statistics',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n heapSnapshot: 'Heap snapshot',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n takeHeapSnapshot: 'Take heap snapshot',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n heapSnapshots: 'HEAP SNAPSHOTS',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n heapSnapshotProfilesShowMemory:\n 'Heap snapshot profiles show memory distribution among your page\\'s JavaScript objects and related DOM nodes.',\n /**\n *@description Label for a checkbox in the heap snapshot view of the profiler tool. The \"heap snapshot\" contains the\n * current state of JavaScript memory. With this checkbox enabled, the snapshot also includes internal data that is\n * specific to Chrome (hence implementation-specific).\n */\n exposeInternals: 'Expose internals (includes additional implementation-specific details)',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n * This option turns on inclusion of numerical values in the heap snapshot.\n */\n captureNumericValue: 'Include numerical values in capture',\n /**\n *@description Progress update that the profiler is capturing a snapshot of the heap\n */\n snapshotting: 'Snapshotting…',\n /**\n *@description Profile title in Heap Snapshot View of a profiler tool\n *@example {1} PH1\n */\n snapshotD: 'Snapshot {PH1}',\n /**\n *@description Text for a percentage value\n *@example {13.0} PH1\n */\n percentagePlaceholder: '{PH1}%',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allocationInstrumentationOn: 'Allocation instrumentation on timeline',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n stopRecordingHeapProfile: 'Stop recording heap profile',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n startRecordingHeapProfile: 'Start recording heap profile',\n /**\n *@description Text in Heap Snapshot View of a profiler tool.\n * A stack trace is a list of functions that were called.\n * This option turns on recording of a stack trace at each allocation.\n * The recording itself is a somewhat expensive operation, so turning this option on, the website's performance may be affected negatively (e.g. everything becomes slower).\n */\n recordAllocationStacksExtra: 'Record stack traces of allocations (extra performance overhead)',\n /**\n *@description Text in CPUProfile View of a profiler tool\n */\n recording: 'Recording…',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n allocationTimelines: 'ALLOCATION TIMELINES',\n /**\n *@description Description for the 'Allocation timeline' tool in the Memory panel.\n */\n AllocationTimelinesShowInstrumented:\n 'Allocation timelines show instrumented JavaScript memory allocations over time. Once profile is recorded you can select a time interval to see objects that were allocated within it and still alive by the end of recording. Use this profile type to isolate memory leaks.',\n /**\n *@description Text when something is loading\n */\n loading: 'Loading…',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n *@example {30} PH1\n */\n savingD: 'Saving… {PH1}%',\n /**\n *@description Text in Heap Snapshot View of a profiler tool\n */\n heapMemoryUsage: 'Heap memory usage',\n /**\n *@description Text of a DOM element in Heap Snapshot View of a profiler tool\n */\n stackWasNotRecordedForThisObject:\n 'Stack was not recorded for this object because it had been allocated before this profile recording started.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/profiler/HeapSnapshotView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// The way this is handled is to workaround the strings inside the heap_snapshot_worker\n// If strings are removed from inside the worker strings can be declared in this module\n// as any other.\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst moduleUIstr_ = i18n.i18n.registerUIStrings('panels/profiler/ModuleUIStrings.ts', ModuleUIStrings.UIStrings);\nconst moduleI18nString = i18n.i18n.getLocalizedString.bind(undefined, moduleUIstr_);\nexport class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayDelegate, UI.SearchableView.Searchable {\n searchResults: number[];\n profile: HeapProfileHeader;\n readonly linkifier: Components.Linkifier.Linkifier;\n readonly parentDataDisplayDelegate: DataDisplayDelegate;\n readonly searchableViewInternal: UI.SearchableView.SearchableView;\n readonly splitWidget: UI.SplitWidget.SplitWidget;\n readonly containmentDataGrid: HeapSnapshotContainmentDataGrid;\n readonly containmentWidget: DataGrid.DataGrid.DataGridWidget;\n readonly statisticsView: HeapSnapshotStatisticsView;\n readonly constructorsDataGrid: HeapSnapshotConstructorsDataGrid;\n readonly constructorsWidget: DataGrid.DataGrid.DataGridWidget;\n readonly diffDataGrid: HeapSnapshotDiffDataGrid;\n readonly diffWidget: DataGrid.DataGrid.DataGridWidget;\n readonly allocationDataGrid: AllocationDataGrid|null;\n readonly allocationWidget: DataGrid.DataGrid.DataGridWidget|undefined;\n readonly allocationStackView: HeapAllocationStackView|undefined;\n readonly tabbedPane: UI.TabbedPane.TabbedPane|undefined;\n readonly retainmentDataGrid: HeapSnapshotRetainmentDataGrid;\n readonly retainmentWidget: DataGrid.DataGrid.DataGridWidget;\n readonly objectDetailsView: UI.Widget.VBox;\n readonly perspectives: (SummaryPerspective|ComparisonPerspective|ContainmentPerspective|AllocationPerspective|\n StatisticsPerspective)[];\n readonly comparisonPerspective: ComparisonPerspective;\n readonly perspectiveSelect: UI.Toolbar.ToolbarComboBox;\n baseSelect: UI.Toolbar.ToolbarComboBox;\n readonly filterSelect: UI.Toolbar.ToolbarComboBox;\n readonly classNameFilter: UI.Toolbar.ToolbarInput;\n readonly selectedSizeText: UI.Toolbar.ToolbarText;\n readonly popoverHelper: UI.PopoverHelper.PopoverHelper;\n currentPerspectiveIndex: number;\n currentPerspective: SummaryPerspective|ComparisonPerspective|ContainmentPerspective|AllocationPerspective|\n StatisticsPerspective;\n dataGrid: HeapSnapshotSortableDataGrid|null;\n readonly searchThrottler: Common.Throttler.Throttler;\n baseProfile!: HeapProfileHeader|null;\n trackingOverviewGrid?: HeapTimelineOverview;\n currentSearchResultIndex: number = -1;\n currentQuery?: HeapSnapshotModel.HeapSnapshotModel.SearchConfig;\n constructor(dataDisplayDelegate: DataDisplayDelegate, profile: HeapProfileHeader) {\n super(i18nString(UIStrings.heapSnapshot));\n\n this.searchResults = [];\n\n this.element.classList.add('heap-snapshot-view');\n this.profile = profile;\n this.linkifier = new Components.Linkifier.Linkifier();\n const profileType = profile.profileType();\n\n profileType.addEventListener(HeapSnapshotProfileTypeEvents.SnapshotReceived, this.onReceiveSnapshot, this);\n profileType.addEventListener(ProfileTypeEvents.RemoveProfileHeader, this.onProfileHeaderRemoved, this);\n\n const isHeapTimeline = profileType.id === TrackingHeapSnapshotProfileType.TypeId;\n if (isHeapTimeline) {\n this.createOverview();\n }\n const hasAllocationStacks = instance.trackingHeapSnapshotProfileType.recordAllocationStacksSetting().get();\n\n this.parentDataDisplayDelegate = dataDisplayDelegate;\n\n this.searchableViewInternal = new UI.SearchableView.SearchableView(this, null);\n this.searchableViewInternal.setPlaceholder(i18nString(UIStrings.find), i18nString(UIStrings.find));\n this.searchableViewInternal.show(this.element);\n\n this.splitWidget = new UI.SplitWidget.SplitWidget(false, true, 'heapSnapshotSplitViewState', 200, 200);\n this.splitWidget.show(this.searchableViewInternal.element);\n\n const heapProfilerModel = profile.heapProfilerModel();\n this.containmentDataGrid = new HeapSnapshotContainmentDataGrid(\n heapProfilerModel, this, /* displayName */ i18nString(UIStrings.containment));\n this.containmentDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.selectionChanged, this);\n this.containmentWidget = this.containmentDataGrid.asWidget();\n this.containmentWidget.setMinimumSize(50, 25);\n\n this.statisticsView = new HeapSnapshotStatisticsView();\n\n this.constructorsDataGrid = new HeapSnapshotConstructorsDataGrid(heapProfilerModel, this);\n this.constructorsDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.selectionChanged, this);\n this.constructorsWidget = this.constructorsDataGrid.asWidget();\n this.constructorsWidget.setMinimumSize(50, 25);\n this.constructorsWidget.element.setAttribute(\n 'jslog', `${VisualLogging.section().context('heap-snapshot.constructors-view')}`);\n\n this.diffDataGrid = new HeapSnapshotDiffDataGrid(heapProfilerModel, this);\n this.diffDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.selectionChanged, this);\n this.diffWidget = this.diffDataGrid.asWidget();\n this.diffWidget.setMinimumSize(50, 25);\n\n this.allocationDataGrid = null;\n\n if (isHeapTimeline && hasAllocationStacks) {\n this.allocationDataGrid = new AllocationDataGrid(heapProfilerModel, this);\n this.allocationDataGrid.addEventListener(\n DataGrid.DataGrid.Events.SelectedNode, this.onSelectAllocationNode, this);\n this.allocationWidget = this.allocationDataGrid.asWidget();\n this.allocationWidget.setMinimumSize(50, 25);\n\n this.allocationStackView = new HeapAllocationStackView(heapProfilerModel);\n this.allocationStackView.setMinimumSize(50, 25);\n\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n }\n\n this.retainmentDataGrid = new HeapSnapshotRetainmentDataGrid(heapProfilerModel, this);\n this.retainmentWidget = this.retainmentDataGrid.asWidget();\n this.retainmentWidget.setMinimumSize(50, 21);\n this.retainmentWidget.element.classList.add('retaining-paths-view');\n this.retainmentWidget.element.setAttribute(\n 'jslog', `${VisualLogging.section().context('heap-snapshot.retaining-paths-view')}`);\n\n let splitWidgetResizer;\n if (this.allocationStackView) {\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n\n this.tabbedPane.appendTab('retainers', i18nString(UIStrings.retainers), this.retainmentWidget);\n this.tabbedPane.appendTab('allocation-stack', i18nString(UIStrings.allocationStack), this.allocationStackView);\n\n splitWidgetResizer = this.tabbedPane.headerElement();\n this.objectDetailsView = this.tabbedPane;\n } else {\n const retainmentViewHeader = document.createElement('div');\n retainmentViewHeader.classList.add('heap-snapshot-view-resizer');\n const retainingPathsTitleDiv = retainmentViewHeader.createChild('div', 'title');\n retainmentViewHeader.createChild('div', 'verticalResizerIcon');\n const retainingPathsTitle = retainingPathsTitleDiv.createChild('span');\n retainingPathsTitle.textContent = i18nString(UIStrings.retainers);\n\n splitWidgetResizer = retainmentViewHeader;\n this.objectDetailsView = new UI.Widget.VBox();\n this.objectDetailsView.element.appendChild(retainmentViewHeader);\n this.retainmentWidget.show(this.objectDetailsView.element);\n }\n this.splitWidget.hideDefaultResizer();\n this.splitWidget.installResizer(splitWidgetResizer);\n\n this.retainmentDataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.inspectedObjectChanged, this);\n this.retainmentDataGrid.reset();\n\n this.perspectives = [];\n this.comparisonPerspective = new ComparisonPerspective();\n this.perspectives.push(new SummaryPerspective());\n if (profile.profileType() !== instance.trackingHeapSnapshotProfileType) {\n this.perspectives.push(this.comparisonPerspective);\n }\n this.perspectives.push(new ContainmentPerspective());\n if (this.allocationWidget) {\n this.perspectives.push(new AllocationPerspective());\n }\n this.perspectives.push(new StatisticsPerspective());\n\n this.perspectiveSelect = new UI.Toolbar.ToolbarComboBox(\n this.onSelectedPerspectiveChanged.bind(this), i18nString(UIStrings.perspective), undefined,\n 'profiler.heap-snapshot-perspective');\n this.updatePerspectiveOptions();\n\n this.baseSelect = new UI.Toolbar.ToolbarComboBox(\n this.changeBase.bind(this), i18nString(UIStrings.baseSnapshot), undefined, 'profiler.heap-snapshot-base');\n this.baseSelect.setVisible(false);\n this.updateBaseOptions();\n\n this.filterSelect = new UI.Toolbar.ToolbarComboBox(\n this.changeFilter.bind(this), i18nString(UIStrings.filter), undefined, 'profiler.heap-snapshot-filter');\n this.filterSelect.setVisible(false);\n this.updateFilterOptions();\n\n this.classNameFilter = new UI.Toolbar.ToolbarInput(i18nString(UIStrings.classFilter));\n this.classNameFilter.setVisible(false);\n this.constructorsDataGrid.setNameFilter(this.classNameFilter);\n this.diffDataGrid.setNameFilter(this.classNameFilter);\n\n this.selectedSizeText = new UI.Toolbar.ToolbarText();\n\n this.popoverHelper = new UI.PopoverHelper.PopoverHelper(this.element, this.getPopoverRequest.bind(this));\n this.popoverHelper.setDisableOnClick(true);\n this.popoverHelper.setHasPadding(true);\n this.element.addEventListener('scroll', this.popoverHelper.hidePopover.bind(this.popoverHelper), true);\n\n this.currentPerspectiveIndex = 0;\n this.currentPerspective = this.perspectives[0];\n this.currentPerspective.activate(this);\n this.dataGrid = this.currentPerspective.masterGrid(this);\n\n void this.populate();\n this.searchThrottler = new Common.Throttler.Throttler(0);\n\n for (const existingProfile of this.profiles()) {\n existingProfile.addEventListener(ProfileHeaderEvents.ProfileTitleChanged, this.updateControls, this);\n }\n }\n\n createOverview(): void {\n const profileType = this.profile.profileType();\n this.trackingOverviewGrid = new HeapTimelineOverview();\n this.trackingOverviewGrid.addEventListener(Events.IdsRangeChanged, this.onIdsRangeChanged.bind(this));\n if (!this.profile.fromFile() && profileType.profileBeingRecorded() === this.profile) {\n (profileType as TrackingHeapSnapshotProfileType)\n .addEventListener(TrackingHeapSnapshotProfileTypeEvents.HeapStatsUpdate, this.onHeapStatsUpdate, this);\n (profileType as TrackingHeapSnapshotProfileType)\n .addEventListener(TrackingHeapSnapshotProfileTypeEvents.TrackingStopped, this.onStopTracking, this);\n this.trackingOverviewGrid.start();\n }\n }\n\n onStopTracking(): void {\n const profileType = this.profile.profileType() as TrackingHeapSnapshotProfileType;\n profileType.removeEventListener(\n TrackingHeapSnapshotProfileTypeEvents.HeapStatsUpdate, this.onHeapStatsUpdate, this);\n profileType.removeEventListener(TrackingHeapSnapshotProfileTypeEvents.TrackingStopped, this.onStopTracking, this);\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.stop();\n }\n }\n\n onHeapStatsUpdate({data: samples}: Common.EventTarget.EventTargetEvent): void {\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.setSamples(samples);\n }\n }\n\n searchableView(): UI.SearchableView.SearchableView {\n return this.searchableViewInternal;\n }\n\n showProfile(profile: ProfileHeader|null): UI.Widget.Widget|null {\n return this.parentDataDisplayDelegate.showProfile(profile);\n }\n\n showObject(snapshotObjectId: string, perspectiveName: string): void {\n if (Number(snapshotObjectId) <= this.profile.maxJSObjectId) {\n void this.selectLiveObject(perspectiveName, snapshotObjectId);\n } else {\n this.parentDataDisplayDelegate.showObject(snapshotObjectId, perspectiveName);\n }\n }\n\n async linkifyObject(nodeIndex: number): Promise {\n const heapProfilerModel = this.profile.heapProfilerModel();\n // heapProfilerModel is null if snapshot was loaded from file\n if (!heapProfilerModel) {\n return null;\n }\n const location = await this.profile.getLocation(nodeIndex);\n if (!location) {\n return null;\n }\n const debuggerModel = heapProfilerModel.runtimeModel().debuggerModel();\n const rawLocation = debuggerModel.createRawLocationByScriptId(\n String(location.scriptId) as Protocol.Runtime.ScriptId, location.lineNumber, location.columnNumber);\n if (!rawLocation) {\n return null;\n }\n const script = rawLocation.script();\n const sourceURL = script && script.sourceURL;\n return sourceURL && this.linkifier ? this.linkifier.linkifyRawLocation(rawLocation, sourceURL) : null;\n }\n\n async populate(): Promise {\n const heapSnapshotProxy = await this.profile.loadPromise;\n\n void this.retrieveStatistics(heapSnapshotProxy);\n if (this.dataGrid) {\n void this.dataGrid.setDataSource(heapSnapshotProxy, 0);\n }\n\n if (this.profile.profileType().id === TrackingHeapSnapshotProfileType.TypeId && this.profile.fromFile()) {\n const samples = await heapSnapshotProxy.getSamples();\n if (samples) {\n console.assert(Boolean(samples.timestamps.length));\n const profileSamples = new Samples();\n profileSamples.sizes = samples.sizes;\n profileSamples.ids = samples.lastAssignedIds;\n profileSamples.timestamps = samples.timestamps;\n profileSamples.max = samples.sizes;\n profileSamples.totalTime = Math.max(samples.timestamps[samples.timestamps.length - 1] || 0, 10000);\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.setSamples(profileSamples);\n }\n }\n }\n\n const list = this.profiles();\n const profileIndex = list.indexOf(this.profile);\n this.baseSelect.setSelectedIndex(Math.max(0, profileIndex - 1));\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.updateGrid();\n }\n }\n\n async retrieveStatistics(heapSnapshotProxy: HeapSnapshotProxy):\n Promise {\n const statistics = await heapSnapshotProxy.getStatistics();\n\n const records = [\n {value: statistics.code, color: '#f77', title: i18nString(UIStrings.code)},\n {value: statistics.strings, color: '#5e5', title: i18nString(UIStrings.strings)},\n {value: statistics.jsArrays, color: '#7af', title: i18nString(UIStrings.jsArrays)},\n {value: statistics.native, color: '#fc5', title: i18nString(UIStrings.typedArrays)},\n {value: statistics.system, color: '#98f', title: i18nString(UIStrings.systemObjects)},\n ];\n this.statisticsView.setTotalAndRecords(statistics.total, records);\n return statistics;\n }\n\n onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent): void {\n const {minId, maxId} = event.data;\n this.selectedSizeText.setText(\n i18nString(UIStrings.selectedSizeS, {PH1: Platform.NumberUtilities.bytesToString(event.data.size)}));\n if (this.constructorsDataGrid.snapshot) {\n this.constructorsDataGrid.setSelectionRange(minId, maxId);\n }\n }\n\n override async toolbarItems(): Promise {\n const result: UI.Toolbar.ToolbarItem[] = [this.perspectiveSelect, this.classNameFilter];\n if (this.profile.profileType() !== instance.trackingHeapSnapshotProfileType) {\n result.push(this.baseSelect, this.filterSelect);\n }\n result.push(this.selectedSizeText);\n return result;\n }\n\n override willHide(): void {\n this.currentSearchResultIndex = -1;\n this.popoverHelper.hidePopover();\n }\n\n supportsCaseSensitiveSearch(): boolean {\n return true;\n }\n\n supportsRegexSearch(): boolean {\n return false;\n }\n\n onSearchCanceled(): void {\n this.currentSearchResultIndex = -1;\n this.searchResults = [];\n }\n\n selectRevealedNode(node: HeapSnapshotGridNode|null): void {\n if (node) {\n node.select();\n }\n }\n\n performSearch(searchConfig: UI.SearchableView.SearchConfig, shouldJump: boolean, jumpBackwards?: boolean): void {\n const nextQuery = new HeapSnapshotModel.HeapSnapshotModel.SearchConfig(\n searchConfig.query.trim(), searchConfig.caseSensitive, searchConfig.isRegex, shouldJump,\n jumpBackwards || false);\n\n void this.searchThrottler.schedule(this.performSearchInternal.bind(this, nextQuery));\n }\n\n async performSearchInternal(nextQuery: HeapSnapshotModel.HeapSnapshotModel.SearchConfig): Promise {\n // Call onSearchCanceled since it will reset everything we need before doing a new search.\n this.onSearchCanceled();\n\n if (!this.currentPerspective.supportsSearch()) {\n return;\n }\n\n this.currentQuery = nextQuery;\n const query = nextQuery.query.trim();\n\n if (!query) {\n return;\n }\n\n if (query.charAt(0) === '@') {\n const snapshotNodeId = parseInt(query.substring(1), 10);\n if (isNaN(snapshotNodeId)) {\n return;\n }\n if (!this.dataGrid) {\n return;\n }\n const node = await this.dataGrid.revealObjectByHeapSnapshotId(String(snapshotNodeId));\n this.selectRevealedNode(node);\n return;\n }\n\n if (!this.profile.snapshotProxy || !this.dataGrid) {\n return;\n }\n\n const filter = this.dataGrid.nodeFilter();\n this.searchResults = filter ? await this.profile.snapshotProxy.search(this.currentQuery, filter) : [];\n\n this.searchableViewInternal.updateSearchMatchesCount(this.searchResults.length);\n if (this.searchResults.length) {\n this.currentSearchResultIndex = nextQuery.jumpBackward ? this.searchResults.length - 1 : 0;\n }\n await this.jumpToSearchResult(this.currentSearchResultIndex);\n }\n\n jumpToNextSearchResult(): void {\n if (!this.searchResults.length) {\n return;\n }\n this.currentSearchResultIndex = (this.currentSearchResultIndex + 1) % this.searchResults.length;\n void this.searchThrottler.schedule(this.jumpToSearchResult.bind(this, this.currentSearchResultIndex));\n }\n\n jumpToPreviousSearchResult(): void {\n if (!this.searchResults.length) {\n return;\n }\n this.currentSearchResultIndex =\n (this.currentSearchResultIndex + this.searchResults.length - 1) % this.searchResults.length;\n void this.searchThrottler.schedule(this.jumpToSearchResult.bind(this, this.currentSearchResultIndex));\n }\n\n async jumpToSearchResult(searchResultIndex: number): Promise {\n this.searchableViewInternal.updateCurrentMatchIndex(searchResultIndex);\n if (searchResultIndex === -1) {\n return;\n }\n if (!this.dataGrid) {\n return;\n }\n const node = await this.dataGrid.revealObjectByHeapSnapshotId(String(this.searchResults[searchResultIndex]));\n this.selectRevealedNode(node);\n }\n\n refreshVisibleData(): void {\n if (!this.dataGrid) {\n return;\n }\n let child: (HeapSnapshotGridNode|null) = (this.dataGrid.rootNode().children[0] as HeapSnapshotGridNode | null);\n while (child) {\n child.refresh();\n child = (child.traverseNextNode(false, null, true) as HeapSnapshotGridNode | null);\n }\n }\n\n changeBase(): void {\n if (this.baseProfile === this.profiles()[this.baseSelect.selectedIndex()]) {\n return;\n }\n this.baseProfile = (this.profiles()[this.baseSelect.selectedIndex()] as HeapProfileHeader);\n const dataGrid = (this.dataGrid as HeapSnapshotDiffDataGrid);\n // Change set base data source only if main data source is already set.\n if (dataGrid.snapshot) {\n void this.baseProfile.loadPromise.then(dataGrid.setBaseDataSource.bind(dataGrid));\n }\n\n if (!this.currentQuery || !this.searchResults) {\n return;\n }\n\n // The current search needs to be performed again. First negate out previous match\n // count by calling the search finished callback with a negative number of matches.\n // Then perform the search again with the same query and callback.\n this.performSearch(this.currentQuery, false);\n }\n\n changeFilter(): void {\n const profileIndex = this.filterSelect.selectedIndex() - 1;\n if (!this.dataGrid) {\n return;\n }\n (this.dataGrid as HeapSnapshotConstructorsDataGrid)\n .filterSelectIndexChanged((this.profiles() as HeapProfileHeader[]), profileIndex);\n\n if (!this.currentQuery || !this.searchResults) {\n return;\n }\n\n // The current search needs to be performed again. First negate out previous match\n // count by calling the search finished callback with a negative number of matches.\n // Then perform the search again with the same query and callback.\n this.performSearch(this.currentQuery, false);\n }\n\n profiles(): ProfileHeader[] {\n return this.profile.profileType().getProfiles();\n }\n\n selectionChanged(event: Common.EventTarget.EventTargetEvent>):\n void {\n const selectedNode = (event.data as HeapSnapshotGridNode);\n this.setSelectedNodeForDetailsView(selectedNode);\n this.inspectedObjectChanged(event);\n }\n\n onSelectAllocationNode(\n event: Common.EventTarget.EventTargetEvent>): void {\n const selectedNode = (event.data as AllocationGridNode);\n this.constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId());\n this.setSelectedNodeForDetailsView(null);\n }\n\n inspectedObjectChanged(\n event: Common.EventTarget.EventTargetEvent>): void {\n const selectedNode = (event.data as HeapSnapshotGridNode);\n const heapProfilerModel = this.profile.heapProfilerModel();\n if (heapProfilerModel && selectedNode instanceof HeapSnapshotGenericObjectNode) {\n void heapProfilerModel.addInspectedHeapObject(\n String(selectedNode.snapshotNodeId) as Protocol.HeapProfiler.HeapSnapshotObjectId);\n }\n }\n\n setSelectedNodeForDetailsView(nodeItem: HeapSnapshotGridNode|null): void {\n const dataSource = nodeItem && nodeItem.retainersDataSource();\n if (dataSource) {\n void this.retainmentDataGrid.setDataSource(dataSource.snapshot, dataSource.snapshotNodeIndex);\n if (this.allocationStackView) {\n void this.allocationStackView.setAllocatedObject(dataSource.snapshot, dataSource.snapshotNodeIndex);\n }\n } else {\n if (this.allocationStackView) {\n this.allocationStackView.clear();\n }\n this.retainmentDataGrid.reset();\n }\n }\n\n async changePerspectiveAndWait(perspectiveTitle: string): Promise {\n const perspectiveIndex = this.perspectives.findIndex(perspective => perspective.title() === perspectiveTitle);\n if (perspectiveIndex === -1 || this.currentPerspectiveIndex === perspectiveIndex) {\n return;\n }\n const dataGrid = this.perspectives[perspectiveIndex].masterGrid(this);\n\n if (!dataGrid) {\n return;\n }\n\n const promise = dataGrid.once(HeapSnapshotSortableDataGridEvents.ContentShown);\n\n const option = this.perspectiveSelect.options().find(option => option.value === String(perspectiveIndex));\n this.perspectiveSelect.select((option as Element));\n this.changePerspective(perspectiveIndex);\n await promise;\n }\n\n async updateDataSourceAndView(): Promise {\n const dataGrid = this.dataGrid;\n if (!dataGrid || dataGrid.snapshot) {\n return;\n }\n\n const snapshotProxy = await this.profile.loadPromise;\n\n if (this.dataGrid !== dataGrid) {\n return;\n }\n if (dataGrid.snapshot !== snapshotProxy) {\n void dataGrid.setDataSource(snapshotProxy, 0);\n }\n if (dataGrid !== this.diffDataGrid) {\n return;\n }\n if (!this.baseProfile) {\n this.baseProfile = (this.profiles()[this.baseSelect.selectedIndex()] as HeapProfileHeader);\n }\n\n const baseSnapshotProxy = await this.baseProfile.loadPromise;\n\n if (this.diffDataGrid.baseSnapshot !== baseSnapshotProxy) {\n this.diffDataGrid.setBaseDataSource(baseSnapshotProxy);\n }\n }\n\n onSelectedPerspectiveChanged(event: Event): void {\n this.changePerspective(Number((event.target as HTMLSelectElement).selectedOptions[0].value));\n }\n\n changePerspective(selectedIndex: number): void {\n if (selectedIndex === this.currentPerspectiveIndex) {\n return;\n }\n\n this.currentPerspectiveIndex = selectedIndex;\n\n this.currentPerspective.deactivate(this);\n const perspective = this.perspectives[selectedIndex];\n this.currentPerspective = perspective;\n this.dataGrid = (perspective.masterGrid(this) as HeapSnapshotSortableDataGrid);\n perspective.activate(this);\n\n this.refreshVisibleData();\n if (this.dataGrid) {\n this.dataGrid.updateWidths();\n }\n\n void this.updateDataSourceAndView();\n\n if (!this.currentQuery || !this.searchResults) {\n return;\n }\n\n // The current search needs to be performed again. First negate out previous match\n // count by calling the search finished callback with a negative number of matches.\n // Then perform the search again the with same query and callback.\n this.performSearch(this.currentQuery, false);\n }\n\n async selectLiveObject(perspectiveName: string, snapshotObjectId: string): Promise {\n await this.changePerspectiveAndWait(perspectiveName);\n if (!this.dataGrid) {\n return;\n }\n const node = await this.dataGrid.revealObjectByHeapSnapshotId(snapshotObjectId);\n if (node) {\n node.select();\n } else {\n Common.Console.Console.instance().error('Cannot find corresponding heap snapshot node');\n }\n }\n\n getPopoverRequest(event: Event): UI.PopoverHelper.PopoverRequest|null {\n const span = UI.UIUtils.enclosingNodeOrSelfWithNodeName((event.target as Node), 'span');\n const row = UI.UIUtils.enclosingNodeOrSelfWithNodeName((event.target as Node), 'tr');\n if (!row) {\n return null;\n }\n if (!this.dataGrid) {\n return null;\n }\n const node = this.dataGrid.dataGridNodeFromNode(row) || this.containmentDataGrid.dataGridNodeFromNode(row) ||\n this.constructorsDataGrid.dataGridNodeFromNode(row) || this.diffDataGrid.dataGridNodeFromNode(row) ||\n (this.allocationDataGrid && this.allocationDataGrid.dataGridNodeFromNode(row)) ||\n this.retainmentDataGrid.dataGridNodeFromNode(row);\n const heapProfilerModel = this.profile.heapProfilerModel();\n if (!node || !span || !heapProfilerModel) {\n return null;\n }\n let objectPopoverHelper: ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper|null;\n return {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // @ts-expect-error\n box: span.boxInWindow(),\n show: async(popover: UI.GlassPane.GlassPane): Promise => {\n if (!heapProfilerModel) {\n return false;\n }\n const remoteObject = await (node as HeapSnapshotGridNode).queryObjectContent(heapProfilerModel, 'popover');\n if (!remoteObject) {\n return false;\n }\n objectPopoverHelper =\n await ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper.buildObjectPopover(remoteObject, popover);\n if (!objectPopoverHelper) {\n heapProfilerModel.runtimeModel().releaseObjectGroup('popover');\n return false;\n }\n return true;\n },\n hide: (): void => {\n heapProfilerModel.runtimeModel().releaseObjectGroup('popover');\n if (objectPopoverHelper) {\n objectPopoverHelper.dispose();\n }\n },\n };\n }\n\n updatePerspectiveOptions(): void {\n const multipleSnapshots = this.profiles().length > 1;\n this.perspectiveSelect.removeOptions();\n this.perspectives.forEach((perspective, index) => {\n if (multipleSnapshots || perspective !== this.comparisonPerspective) {\n const option = this.perspectiveSelect.createOption(perspective.title(), String(index));\n if (perspective === this.currentPerspective) {\n this.perspectiveSelect.select(option);\n }\n }\n });\n }\n\n updateBaseOptions(): void {\n const list = this.profiles();\n const selectedIndex = this.baseSelect.selectedIndex();\n\n this.baseSelect.removeOptions();\n for (const item of list) {\n this.baseSelect.createOption(item.title);\n }\n\n if (selectedIndex > -1) {\n this.baseSelect.setSelectedIndex(selectedIndex);\n }\n }\n\n updateFilterOptions(): void {\n const list = this.profiles();\n const selectedIndex = this.filterSelect.selectedIndex();\n\n this.filterSelect.removeOptions();\n this.filterSelect.createOption(i18nString(UIStrings.allObjects));\n for (let i = 0; i < list.length; ++i) {\n let title;\n if (!i) {\n title = i18nString(UIStrings.objectsAllocatedBeforeS, {PH1: list[i].title});\n } else {\n title = i18nString(UIStrings.objectsAllocatedBetweenSAndS, {PH1: list[i - 1].title, PH2: list[i].title});\n }\n this.filterSelect.createOption(title);\n }\n\n if (selectedIndex > -1) {\n this.filterSelect.setSelectedIndex(selectedIndex);\n }\n }\n\n updateControls(): void {\n this.updatePerspectiveOptions();\n this.updateBaseOptions();\n this.updateFilterOptions();\n }\n\n onReceiveSnapshot(event: Common.EventTarget.EventTargetEvent): void {\n this.updateControls();\n const profile = event.data;\n profile.addEventListener(ProfileHeaderEvents.ProfileTitleChanged, this.updateControls, this);\n }\n\n onProfileHeaderRemoved(event: Common.EventTarget.EventTargetEvent): void {\n const profile = event.data;\n profile.removeEventListener(ProfileHeaderEvents.ProfileTitleChanged, this.updateControls, this);\n\n if (this.profile === profile) {\n this.detach();\n this.profile.profileType().removeEventListener(\n HeapSnapshotProfileTypeEvents.SnapshotReceived, this.onReceiveSnapshot, this);\n this.profile.profileType().removeEventListener(\n ProfileTypeEvents.RemoveProfileHeader, this.onProfileHeaderRemoved, this);\n this.dispose();\n } else {\n this.updateControls();\n }\n }\n\n dispose(): void {\n this.linkifier.dispose();\n this.popoverHelper.dispose();\n if (this.allocationStackView) {\n this.allocationStackView.clear();\n if (this.allocationDataGrid) {\n this.allocationDataGrid.dispose();\n }\n }\n this.onStopTracking();\n if (this.trackingOverviewGrid) {\n this.trackingOverviewGrid.removeEventListener(Events.IdsRangeChanged, this.onIdsRangeChanged.bind(this));\n }\n }\n}\n\nexport class Perspective {\n readonly titleInternal: string;\n constructor(title: string) {\n this.titleInternal = title;\n }\n\n activate(_heapSnapshotView: HeapSnapshotView): void {\n }\n\n deactivate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.baseSelect.setVisible(false);\n heapSnapshotView.filterSelect.setVisible(false);\n heapSnapshotView.classNameFilter.setVisible(false);\n if (heapSnapshotView.trackingOverviewGrid) {\n heapSnapshotView.trackingOverviewGrid.detach();\n }\n if (heapSnapshotView.allocationWidget) {\n heapSnapshotView.allocationWidget.detach();\n }\n if (heapSnapshotView.statisticsView) {\n heapSnapshotView.statisticsView.detach();\n }\n\n heapSnapshotView.splitWidget.detach();\n heapSnapshotView.splitWidget.detachChildWidgets();\n }\n\n masterGrid(_heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid|null {\n return null;\n }\n\n title(): string {\n return this.titleInternal;\n }\n\n supportsSearch(): boolean {\n return false;\n }\n}\n\nexport class SummaryPerspective extends Perspective {\n constructor() {\n super(i18nString(UIStrings.summary));\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.splitWidget.setMainWidget(heapSnapshotView.constructorsWidget);\n heapSnapshotView.splitWidget.setSidebarWidget(heapSnapshotView.objectDetailsView);\n heapSnapshotView.splitWidget.show(heapSnapshotView.searchableViewInternal.element);\n heapSnapshotView.filterSelect.setVisible(true);\n heapSnapshotView.classNameFilter.setVisible(true);\n if (!heapSnapshotView.trackingOverviewGrid) {\n return;\n }\n heapSnapshotView.trackingOverviewGrid.show(\n heapSnapshotView.searchableViewInternal.element, heapSnapshotView.splitWidget.element);\n heapSnapshotView.trackingOverviewGrid.update();\n heapSnapshotView.trackingOverviewGrid.updateGrid();\n }\n\n override masterGrid(heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid {\n return heapSnapshotView.constructorsDataGrid;\n }\n\n override supportsSearch(): boolean {\n return true;\n }\n}\n\nexport class ComparisonPerspective extends Perspective {\n constructor() {\n super(i18nString(UIStrings.comparison));\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.splitWidget.setMainWidget(heapSnapshotView.diffWidget);\n heapSnapshotView.splitWidget.setSidebarWidget(heapSnapshotView.objectDetailsView);\n heapSnapshotView.splitWidget.show(heapSnapshotView.searchableViewInternal.element);\n heapSnapshotView.baseSelect.setVisible(true);\n heapSnapshotView.classNameFilter.setVisible(true);\n }\n\n override masterGrid(heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid {\n return heapSnapshotView.diffDataGrid;\n }\n\n override supportsSearch(): boolean {\n return true;\n }\n}\n\nexport class ContainmentPerspective extends Perspective {\n constructor() {\n super(i18nString(UIStrings.containment));\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.splitWidget.setMainWidget(heapSnapshotView.containmentWidget);\n heapSnapshotView.splitWidget.setSidebarWidget(heapSnapshotView.objectDetailsView);\n heapSnapshotView.splitWidget.show(heapSnapshotView.searchableViewInternal.element);\n }\n\n override masterGrid(heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid {\n return heapSnapshotView.containmentDataGrid;\n }\n}\n\nexport class AllocationPerspective extends Perspective {\n readonly allocationSplitWidget: UI.SplitWidget.SplitWidget;\n constructor() {\n super(i18nString(UIStrings.allocation));\n this.allocationSplitWidget =\n new UI.SplitWidget.SplitWidget(false, true, 'heapSnapshotAllocationSplitViewState', 200, 200);\n this.allocationSplitWidget.setSidebarWidget(new UI.Widget.VBox());\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n if (heapSnapshotView.allocationWidget) {\n this.allocationSplitWidget.setMainWidget(heapSnapshotView.allocationWidget);\n }\n heapSnapshotView.splitWidget.setMainWidget(heapSnapshotView.constructorsWidget);\n heapSnapshotView.splitWidget.setSidebarWidget(heapSnapshotView.objectDetailsView);\n\n const allocatedObjectsView = new UI.Widget.VBox();\n const resizer = document.createElement('div');\n resizer.classList.add('heap-snapshot-view-resizer');\n const title = resizer.createChild('div', 'title').createChild('span');\n resizer.createChild('div', 'verticalResizerIcon');\n title.textContent = i18nString(UIStrings.liveObjects);\n this.allocationSplitWidget.hideDefaultResizer();\n this.allocationSplitWidget.installResizer(resizer);\n allocatedObjectsView.element.appendChild(resizer);\n heapSnapshotView.splitWidget.show(allocatedObjectsView.element);\n this.allocationSplitWidget.setSidebarWidget(allocatedObjectsView);\n\n this.allocationSplitWidget.show(heapSnapshotView.searchableViewInternal.element);\n\n heapSnapshotView.constructorsDataGrid.clear();\n if (heapSnapshotView.allocationDataGrid) {\n const selectedNode = (heapSnapshotView.allocationDataGrid.selectedNode as AllocationGridNode);\n if (selectedNode) {\n heapSnapshotView.constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId());\n }\n }\n }\n\n override deactivate(heapSnapshotView: HeapSnapshotView): void {\n this.allocationSplitWidget.detach();\n super.deactivate(heapSnapshotView);\n }\n\n override masterGrid(heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid|null {\n return heapSnapshotView.allocationDataGrid;\n }\n}\n\nexport class StatisticsPerspective extends Perspective {\n constructor() {\n super(i18nString(UIStrings.statistics));\n }\n\n override activate(heapSnapshotView: HeapSnapshotView): void {\n heapSnapshotView.statisticsView.show(heapSnapshotView.searchableViewInternal.element);\n }\n\n override masterGrid(_heapSnapshotView: HeapSnapshotView): HeapSnapshotSortableDataGrid|null {\n return null;\n }\n}\n\nexport class HeapSnapshotProfileType extends\n Common.ObjectWrapper.eventMixin(ProfileType)\n implements SDK.TargetManager.SDKModelObserver {\n readonly exposeInternals: Common.Settings.Setting;\n readonly captureNumericValue: Common.Settings.Setting;\n customContentInternal: HTMLElement|null;\n constructor(id?: string, title?: string) {\n super(id || HeapSnapshotProfileType.TypeId, title || i18nString(UIStrings.heapSnapshot));\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.HeapProfilerModel.HeapProfilerModel, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.HeapProfilerModel.HeapProfilerModel, SDK.HeapProfilerModel.Events.ResetProfiles, this.resetProfiles, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.HeapProfilerModel.HeapProfilerModel, SDK.HeapProfilerModel.Events.AddHeapSnapshotChunk,\n this.addHeapSnapshotChunk, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.HeapProfilerModel.HeapProfilerModel, SDK.HeapProfilerModel.Events.ReportHeapSnapshotProgress,\n this.reportHeapSnapshotProgress, this);\n this.exposeInternals = Common.Settings.Settings.instance().createSetting('exposeInternals', false);\n this.captureNumericValue = Common.Settings.Settings.instance().createSetting('captureNumericValue', false);\n this.customContentInternal = null;\n }\n\n modelAdded(heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel): void {\n void heapProfilerModel.enable();\n }\n\n modelRemoved(_heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel): void {\n }\n\n override getProfiles(): HeapProfileHeader[] {\n return super.getProfiles() as HeapProfileHeader[];\n }\n\n override fileExtension(): string {\n return '.heapsnapshot';\n }\n\n override get buttonTooltip(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.takeHeapSnapshot);\n }\n\n override isInstantProfile(): boolean {\n return true;\n }\n\n override buttonClicked(): boolean {\n void this.takeHeapSnapshot();\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ProfilesHeapProfileTaken);\n return false;\n }\n\n override get treeItemTitle(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.heapSnapshots);\n }\n\n override get description(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.heapSnapshotProfilesShowMemory);\n }\n\n override customContent(): Element|null {\n const optionsContainer = document.createElement('div');\n const showOptionToExposeInternalsInHeapSnapshot =\n Root.Runtime.experiments.isEnabled('showOptionToExposeInternalsInHeapSnapshot');\n const omitParagraphElement = !showOptionToExposeInternalsInHeapSnapshot;\n if (showOptionToExposeInternalsInHeapSnapshot) {\n const exposeInternalsInHeapSnapshotCheckbox = UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.exposeInternals), this.exposeInternals, omitParagraphElement);\n optionsContainer.appendChild(exposeInternalsInHeapSnapshotCheckbox);\n }\n const captureNumericValueCheckbox = UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.captureNumericValue), this.captureNumericValue, omitParagraphElement);\n optionsContainer.appendChild(captureNumericValueCheckbox);\n this.customContentInternal = optionsContainer;\n return optionsContainer;\n }\n\n override setCustomContentEnabled(enable: boolean): void {\n if (this.customContentInternal) {\n this.customContentInternal.querySelectorAll('[is=dt-checkbox]').forEach(label => {\n (label as UI.UIUtils.CheckboxLabel).checkboxElement.disabled = !enable;\n });\n }\n }\n\n override createProfileLoadedFromFile(title: string): ProfileHeader {\n return new HeapProfileHeader(null, this, title);\n }\n\n async takeHeapSnapshot(): Promise {\n if (this.profileBeingRecorded()) {\n return;\n }\n const heapProfilerModel = UI.Context.Context.instance().flavor(SDK.HeapProfilerModel.HeapProfilerModel);\n if (!heapProfilerModel) {\n return;\n }\n\n let profile: HeapProfileHeader = new HeapProfileHeader(heapProfilerModel, this);\n this.setProfileBeingRecorded(profile);\n this.addProfile(profile);\n profile.updateStatus(i18nString(UIStrings.snapshotting));\n\n await heapProfilerModel.takeHeapSnapshot({\n reportProgress: true,\n captureNumericValue: this.captureNumericValue.get(),\n exposeInternals: this.exposeInternals.get(),\n });\n profile = this.profileBeingRecorded() as HeapProfileHeader;\n if (!profile) {\n return;\n }\n profile.title = i18nString(UIStrings.snapshotD, {PH1: profile.uid});\n profile.finishLoad();\n this.setProfileBeingRecorded(null);\n this.dispatchEventToListeners(ProfileTypeEvents.ProfileComplete, profile);\n }\n\n addHeapSnapshotChunk(event: Common.EventTarget.EventTargetEvent): void {\n const profile = (this.profileBeingRecorded() as HeapProfileHeader | null);\n if (!profile) {\n return;\n }\n profile.transferChunk(event.data);\n }\n\n reportHeapSnapshotProgress(event: Common.EventTarget.EventTargetEvent):\n void {\n const profile = (this.profileBeingRecorded() as HeapProfileHeader | null);\n if (!profile) {\n return;\n }\n const {done, total, finished} = event.data;\n profile.updateStatus(i18nString(UIStrings.percentagePlaceholder, {PH1: ((done / total) * 100).toFixed(0)}), true);\n if (finished) {\n profile.prepareToLoad();\n }\n }\n\n resetProfiles(event: Common.EventTarget.EventTargetEvent): void {\n const heapProfilerModel = event.data;\n for (const profile of this.getProfiles()) {\n if (profile.heapProfilerModel() === heapProfilerModel) {\n this.removeProfile(profile);\n }\n }\n }\n\n snapshotReceived(profile: ProfileHeader): void {\n if (this.profileBeingRecorded() === profile) {\n this.setProfileBeingRecorded(null);\n }\n this.dispatchEventToListeners(HeapSnapshotProfileTypeEvents.SnapshotReceived, profile);\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly TypeId: string = 'HEAP';\n // TODO(crbug.com/1228674): Remove event string once its no longer used in web tests.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly SnapshotReceived = 'SnapshotReceived';\n}\n\nexport const enum HeapSnapshotProfileTypeEvents {\n SnapshotReceived = 'SnapshotReceived',\n}\n\nexport type HeapSnapshotProfileTypeEventTypes = {\n [HeapSnapshotProfileTypeEvents.SnapshotReceived]: ProfileHeader,\n};\n\nexport class TrackingHeapSnapshotProfileType extends\n Common.ObjectWrapper.eventMixin(\n HeapSnapshotProfileType) {\n readonly recordAllocationStacksSettingInternal: Common.Settings.Setting;\n override customContentInternal: UI.UIUtils.CheckboxLabel|null;\n recording: boolean;\n profileSamples?: Samples|null;\n\n constructor() {\n super(TrackingHeapSnapshotProfileType.TypeId, i18nString(UIStrings.allocationInstrumentationOn));\n this.recordAllocationStacksSettingInternal =\n Common.Settings.Settings.instance().createSetting('recordAllocationStacks', false);\n this.customContentInternal = null;\n this.recording = false;\n }\n\n override modelAdded(heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel): void {\n super.modelAdded(heapProfilerModel);\n heapProfilerModel.addEventListener(SDK.HeapProfilerModel.Events.HeapStatsUpdate, this.heapStatsUpdate, this);\n heapProfilerModel.addEventListener(SDK.HeapProfilerModel.Events.LastSeenObjectId, this.lastSeenObjectId, this);\n }\n\n override modelRemoved(heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel): void {\n super.modelRemoved(heapProfilerModel);\n heapProfilerModel.removeEventListener(SDK.HeapProfilerModel.Events.HeapStatsUpdate, this.heapStatsUpdate, this);\n heapProfilerModel.removeEventListener(SDK.HeapProfilerModel.Events.LastSeenObjectId, this.lastSeenObjectId, this);\n }\n\n heapStatsUpdate(event: Common.EventTarget.EventTargetEvent): void {\n if (!this.profileSamples) {\n return;\n }\n const samples = event.data;\n let index;\n for (let i = 0; i < samples.length; i += 3) {\n index = samples[i];\n const size = samples[i + 2];\n this.profileSamples.sizes[index] = size;\n if (!this.profileSamples.max[index]) {\n this.profileSamples.max[index] = size;\n }\n }\n }\n\n lastSeenObjectId(event: Common.EventTarget.EventTargetEvent): void {\n const profileSamples = this.profileSamples;\n if (!profileSamples) {\n return;\n }\n const {lastSeenObjectId, timestamp} = event.data;\n const currentIndex = Math.max(profileSamples.ids.length, profileSamples.max.length - 1);\n profileSamples.ids[currentIndex] = lastSeenObjectId;\n if (!profileSamples.max[currentIndex]) {\n profileSamples.max[currentIndex] = 0;\n profileSamples.sizes[currentIndex] = 0;\n }\n profileSamples.timestamps[currentIndex] = timestamp;\n if (profileSamples.totalTime < timestamp - profileSamples.timestamps[0]) {\n profileSamples.totalTime *= 2;\n }\n if (this.profileSamples) {\n this.dispatchEventToListeners(TrackingHeapSnapshotProfileTypeEvents.HeapStatsUpdate, this.profileSamples);\n }\n const profile = this.profileBeingRecorded();\n if (profile) {\n profile.updateStatus(null, true);\n }\n }\n\n override hasTemporaryView(): boolean {\n return true;\n }\n\n override get buttonTooltip(): Common.UIString.LocalizedString {\n return this.recording ? i18nString(UIStrings.stopRecordingHeapProfile) :\n i18nString(UIStrings.startRecordingHeapProfile);\n }\n\n override isInstantProfile(): boolean {\n return false;\n }\n\n override buttonClicked(): boolean {\n return this.toggleRecording();\n }\n\n startRecordingProfile(): void {\n if (this.profileBeingRecorded()) {\n return;\n }\n const heapProfilerModel = this.addNewProfile();\n if (!heapProfilerModel) {\n return;\n }\n void heapProfilerModel.startTrackingHeapObjects(this.recordAllocationStacksSettingInternal.get());\n }\n\n override customContent(): Element|null {\n const checkboxSetting = UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.recordAllocationStacksExtra), this.recordAllocationStacksSettingInternal, true);\n this.customContentInternal = (checkboxSetting as UI.UIUtils.CheckboxLabel);\n return checkboxSetting;\n }\n\n override setCustomContentEnabled(enable: boolean): void {\n if (this.customContentInternal) {\n this.customContentInternal.checkboxElement.disabled = !enable;\n }\n }\n\n recordAllocationStacksSetting(): Common.Settings.Setting {\n return this.recordAllocationStacksSettingInternal;\n }\n\n addNewProfile(): SDK.HeapProfilerModel.HeapProfilerModel|null {\n const heapProfilerModel = UI.Context.Context.instance().flavor(SDK.HeapProfilerModel.HeapProfilerModel);\n if (!heapProfilerModel) {\n return null;\n }\n this.setProfileBeingRecorded(new HeapProfileHeader(heapProfilerModel, this, undefined));\n this.profileSamples = new Samples();\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.profileBeingRecorded() as any)._profileSamples = this.profileSamples;\n this.recording = true;\n this.addProfile((this.profileBeingRecorded() as ProfileHeader));\n (this.profileBeingRecorded() as HeapProfileHeader).updateStatus(i18nString(UIStrings.recording));\n this.dispatchEventToListeners(TrackingHeapSnapshotProfileTypeEvents.TrackingStarted);\n return heapProfilerModel;\n }\n\n async stopRecordingProfile(): Promise {\n let profile: HeapProfileHeader = (this.profileBeingRecorded() as HeapProfileHeader);\n profile.updateStatus(i18nString(UIStrings.snapshotting));\n const stopPromise =\n (profile.heapProfilerModel() as SDK.HeapProfilerModel.HeapProfilerModel).stopTrackingHeapObjects(true);\n this.recording = false;\n this.dispatchEventToListeners(TrackingHeapSnapshotProfileTypeEvents.TrackingStopped);\n await stopPromise;\n profile = (this.profileBeingRecorded() as HeapProfileHeader);\n if (!profile) {\n return;\n }\n profile.finishLoad();\n this.profileSamples = null;\n this.setProfileBeingRecorded(null);\n this.dispatchEventToListeners(ProfileTypeEvents.ProfileComplete, profile);\n }\n\n toggleRecording(): boolean {\n if (this.recording) {\n void this.stopRecordingProfile();\n } else {\n this.startRecordingProfile();\n }\n return this.recording;\n }\n\n override fileExtension(): string {\n return '.heaptimeline';\n }\n\n override get treeItemTitle(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.allocationTimelines);\n }\n\n override get description(): Common.UIString.LocalizedString {\n return i18nString(UIStrings.AllocationTimelinesShowInstrumented);\n }\n\n override resetProfiles(event: Common.EventTarget.EventTargetEvent): void {\n const wasRecording = this.recording;\n // Clear current profile to avoid stopping backend.\n this.setProfileBeingRecorded(null);\n super.resetProfiles(event);\n this.profileSamples = null;\n if (wasRecording) {\n this.addNewProfile();\n }\n }\n\n override profileBeingRecordedRemoved(): void {\n void this.stopRecordingProfile();\n this.profileSamples = null;\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static override readonly TypeId = 'HEAP-RECORD';\n // TODO(crbug.com/1228674): Remove event strings once they are no longer used in web tests.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly HeapStatsUpdate = 'HeapStatsUpdate';\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly TrackingStarted = 'TrackingStarted';\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static readonly TrackingStopped = 'TrackingStopped';\n}\n\nexport const enum TrackingHeapSnapshotProfileTypeEvents {\n HeapStatsUpdate = 'HeapStatsUpdate',\n TrackingStarted = 'TrackingStarted',\n TrackingStopped = 'TrackingStopped',\n}\n\nexport type TrackingHeapSnapshotProfileTypeEventTypes = {\n [TrackingHeapSnapshotProfileTypeEvents.HeapStatsUpdate]: Samples,\n [TrackingHeapSnapshotProfileTypeEvents.TrackingStarted]: void,\n [TrackingHeapSnapshotProfileTypeEvents.TrackingStopped]: void,\n};\n\nexport class HeapProfileHeader extends ProfileHeader {\n readonly heapProfilerModelInternal: SDK.HeapProfilerModel.HeapProfilerModel|null;\n maxJSObjectId: number;\n workerProxy: HeapSnapshotWorkerProxy|null;\n receiver: Common.StringOutputStream.OutputStream|null;\n snapshotProxy: HeapSnapshotProxy|null;\n readonly loadPromise: Promise;\n fulfillLoad?: (value: HeapSnapshotProxy|PromiseLike) => void;\n totalNumberOfChunks: number;\n bufferedWriter: Bindings.TempFile.TempFile|null;\n onTempFileReady: (() => void)|null;\n failedToCreateTempFile?: boolean;\n wasDisposed?: boolean;\n fileName?: Platform.DevToolsPath.RawPathString;\n\n constructor(\n heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null, type: HeapSnapshotProfileType, title?: string) {\n super(type, title || i18nString(UIStrings.snapshotD, {PH1: type.nextProfileUid()}));\n this.heapProfilerModelInternal = heapProfilerModel;\n this.maxJSObjectId = -1;\n this.workerProxy = null;\n this.receiver = null;\n this.snapshotProxy = null;\n this.loadPromise = new Promise(resolve => {\n this.fulfillLoad = resolve;\n });\n this.totalNumberOfChunks = 0;\n this.bufferedWriter = null;\n this.onTempFileReady = null;\n }\n\n heapProfilerModel(): SDK.HeapProfilerModel.HeapProfilerModel|null {\n return this.heapProfilerModelInternal;\n }\n\n async getLocation(nodeIndex: number): Promise {\n if (!this.snapshotProxy) {\n return null;\n }\n return this.snapshotProxy.getLocation(nodeIndex);\n }\n\n override createSidebarTreeElement(dataDisplayDelegate: DataDisplayDelegate): ProfileSidebarTreeElement {\n return new ProfileSidebarTreeElement(dataDisplayDelegate, this, 'heap-snapshot-sidebar-tree-item');\n }\n\n override createView(dataDisplayDelegate: DataDisplayDelegate): HeapSnapshotView {\n return new HeapSnapshotView(dataDisplayDelegate, this);\n }\n\n prepareToLoad(): void {\n console.assert(!this.receiver, 'Already loading');\n this.setupWorker();\n this.updateStatus(i18nString(UIStrings.loading), true);\n }\n\n finishLoad(): void {\n if (!this.wasDisposed && this.receiver) {\n void this.receiver.close();\n }\n if (!this.bufferedWriter) {\n return;\n }\n this.didWriteToTempFile(this.bufferedWriter);\n }\n\n didWriteToTempFile(tempFile: Bindings.TempFile.TempFile): void {\n if (this.wasDisposed) {\n if (tempFile) {\n tempFile.remove();\n }\n return;\n }\n this.tempFile = tempFile;\n if (!tempFile) {\n this.failedToCreateTempFile = true;\n }\n if (this.onTempFileReady) {\n this.onTempFileReady();\n this.onTempFileReady = null;\n }\n }\n\n setupWorker(): void {\n console.assert(!this.workerProxy, 'HeapSnapshotWorkerProxy already exists');\n this.workerProxy = new HeapSnapshotWorkerProxy(this.handleWorkerEvent.bind(this));\n this.workerProxy.addEventListener(HeapSnapshotWorkerProxy.Events.Wait, event => {\n this.updateStatus(null, event.data);\n }, this);\n this.receiver = this.workerProxy.createLoader(this.uid, this.snapshotReceived.bind(this));\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleWorkerEvent(eventName: string, data: any): void {\n if (HeapSnapshotModel.HeapSnapshotModel.HeapSnapshotProgressEvent.BrokenSnapshot === eventName) {\n const error = (data as string);\n Common.Console.Console.instance().error(error);\n return;\n }\n\n if (HeapSnapshotModel.HeapSnapshotModel.HeapSnapshotProgressEvent.Update !== eventName) {\n return;\n }\n const serializedMessage = (data as string);\n const messageObject = i18n.i18n.deserializeUIString(serializedMessage);\n // We know all strings from the worker are declared inside a single file so we can\n // use a custom function.\n this.updateStatus(moduleI18nString(messageObject.string, messageObject.values));\n }\n\n override dispose(): void {\n if (this.workerProxy) {\n this.workerProxy.dispose();\n }\n this.removeTempFile();\n this.wasDisposed = true;\n }\n\n didCompleteSnapshotTransfer(): void {\n if (!this.snapshotProxy) {\n return;\n }\n this.updateStatus(Platform.NumberUtilities.bytesToString(this.snapshotProxy.totalSize), false);\n }\n\n transferChunk(chunk: string): void {\n if (!this.bufferedWriter) {\n this.bufferedWriter = new Bindings.TempFile.TempFile();\n }\n this.bufferedWriter.write([chunk]);\n\n ++this.totalNumberOfChunks;\n if (this.receiver) {\n void this.receiver.write(chunk);\n }\n }\n\n snapshotReceived(snapshotProxy: HeapSnapshotProxy): void {\n if (this.wasDisposed) {\n return;\n }\n this.receiver = null;\n this.snapshotProxy = snapshotProxy;\n this.maxJSObjectId = snapshotProxy.maxJSObjectId();\n this.didCompleteSnapshotTransfer();\n if (this.workerProxy) {\n this.workerProxy.startCheckingForLongRunningCalls();\n }\n this.notifySnapshotReceived();\n }\n\n notifySnapshotReceived(): void {\n if (this.snapshotProxy && this.fulfillLoad) {\n this.fulfillLoad(this.snapshotProxy);\n }\n (this.profileType() as HeapSnapshotProfileType).snapshotReceived(this);\n }\n\n override canSaveToFile(): boolean {\n return !this.fromFile();\n }\n\n override async saveToFile(): Promise {\n await this.loadPromise;\n const fileOutputStream = new Bindings.FileUtils.FileOutputStream();\n this.fileName = this.fileName ||\n 'Heap-' + Platform.DateUtilities.toISO8601Compact(new Date()) + this.profileType().fileExtension() as\n Platform.DevToolsPath.RawPathString;\n const onOpen = async(accepted: boolean): Promise => {\n if (!accepted) {\n return;\n }\n if (this.failedToCreateTempFile) {\n Common.Console.Console.instance().error('Failed to open temp file with heap snapshot');\n void fileOutputStream.close();\n return;\n }\n if (this.tempFile) {\n const error = (await this.tempFile.copyToOutputStream(fileOutputStream, this.onChunkTransferred.bind(this)) as {\n message: string,\n } | null);\n if (error) {\n Common.Console.Console.instance().error('Failed to read heap snapshot from temp file: ' + error.message);\n }\n this.didCompleteSnapshotTransfer();\n return;\n }\n this.onTempFileReady = (): void => {\n void onOpen(accepted);\n };\n this.updateSaveProgress(0, 1);\n };\n\n await fileOutputStream.open(this.fileName).then(onOpen.bind(this));\n }\n\n onChunkTransferred(reader: Bindings.FileUtils.ChunkedReader): void {\n this.updateSaveProgress(reader.loadedSize(), reader.fileSize());\n }\n\n updateSaveProgress(value: number, total: number): void {\n const percentValue = ((total && value / total) * 100).toFixed(0);\n this.updateStatus(i18nString(UIStrings.savingD, {PH1: percentValue}));\n }\n\n override async loadFromFile(file: File): Promise {\n this.updateStatus(i18nString(UIStrings.loading), true);\n this.setupWorker();\n const reader = new Bindings.FileUtils.ChunkedFileReader(file, 10000000);\n const success = await reader.read((this.receiver as Common.StringOutputStream.OutputStream));\n if (!success) {\n const error = (reader.error() as {\n message: string,\n } | null);\n if (error) {\n this.updateStatus(error.message);\n }\n }\n return success ? null : reader.error();\n }\n\n override profileType(): HeapSnapshotProfileType {\n return super.profileType() as HeapSnapshotProfileType;\n }\n}\n\nexport class HeapSnapshotStatisticsView extends UI.Widget.VBox {\n pieChart: PerfUI.PieChart.PieChart;\n constructor() {\n super();\n this.element.classList.add('heap-snapshot-statistics-view');\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('profiler.heap-snapshot-statistics-view')}`);\n this.pieChart = new PerfUI.PieChart.PieChart();\n this.setTotalAndRecords(0, []);\n this.pieChart.classList.add('heap-snapshot-stats-pie-chart');\n this.element.appendChild(this.pieChart);\n }\n\n static valueFormatter(value: number): string {\n const formatter = new Intl.NumberFormat(i18n.DevToolsLocale.DevToolsLocale.instance().locale, {\n style: 'unit',\n unit: 'kilobyte',\n });\n return formatter.format(Math.round(value / 1000));\n }\n\n setTotalAndRecords(total: number, records: PerfUI.PieChart.Slice[]): void {\n this.pieChart.data = {\n chartName: i18nString(UIStrings.heapMemoryUsage),\n size: 150,\n formatter: HeapSnapshotStatisticsView.valueFormatter,\n showLegend: true,\n total,\n slices: records,\n };\n }\n}\n\nexport class HeapAllocationStackView extends UI.Widget.Widget {\n readonly heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null;\n readonly linkifier: Components.Linkifier.Linkifier;\n frameElements: HTMLElement[];\n constructor(heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null) {\n super();\n this.heapProfilerModel = heapProfilerModel;\n this.linkifier = new Components.Linkifier.Linkifier();\n this.frameElements = [];\n }\n\n onContextMenu(link: Element, event: Event): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n if (!contextMenu.containsTarget(link)) {\n contextMenu.appendApplicableItems(link);\n }\n void contextMenu.show();\n event.consume(true);\n }\n\n onStackViewKeydown(event: KeyboardEvent): void {\n const target = (event.target as HTMLElement | null);\n if (!target) {\n return;\n }\n if (event.key === 'Enter') {\n const link = stackFrameToURLElement.get(target);\n if (!link) {\n return;\n }\n const linkInfo = Components.Linkifier.Linkifier.linkInfo(link);\n if (!linkInfo) {\n return;\n }\n if (Components.Linkifier.Linkifier.invokeFirstAction(linkInfo)) {\n event.consume(true);\n }\n return;\n }\n\n let navDown;\n const keyboardEvent = (event as KeyboardEvent);\n if (keyboardEvent.key === 'ArrowUp') {\n navDown = false;\n } else if (keyboardEvent.key === 'ArrowDown') {\n navDown = true;\n } else {\n return;\n }\n\n const index = this.frameElements.indexOf(target);\n if (index === -1) {\n return;\n }\n const nextIndex = navDown ? index + 1 : index - 1;\n if (nextIndex < 0 || nextIndex >= this.frameElements.length) {\n return;\n }\n\n const nextFrame = this.frameElements[nextIndex];\n nextFrame.tabIndex = 0;\n target.tabIndex = -1;\n nextFrame.focus();\n event.consume(true);\n }\n\n async setAllocatedObject(snapshot: HeapSnapshotProxy, snapshotNodeIndex: number): Promise {\n this.clear();\n const frames = await snapshot.allocationStack(snapshotNodeIndex);\n\n if (!frames) {\n const stackDiv = this.element.createChild('div', 'no-heap-allocation-stack');\n UI.UIUtils.createTextChild(stackDiv, i18nString(UIStrings.stackWasNotRecordedForThisObject));\n return;\n }\n\n const stackDiv = this.element.createChild('div', 'heap-allocation-stack');\n stackDiv.addEventListener('keydown', this.onStackViewKeydown.bind(this), false);\n for (const frame of frames) {\n const frameDiv = (stackDiv.createChild('div', 'stack-frame') as HTMLElement);\n this.frameElements.push(frameDiv);\n frameDiv.tabIndex = -1;\n const name = frameDiv.createChild('div');\n name.textContent = UI.UIUtils.beautifyFunctionName(frame.functionName);\n if (!frame.scriptId) {\n continue;\n }\n const target = this.heapProfilerModel ? this.heapProfilerModel.target() : null;\n const options = {columnNumber: frame.column - 1, inlineFrameIndex: 0};\n const urlElement = this.linkifier.linkifyScriptLocation(\n target, String(frame.scriptId) as Protocol.Runtime.ScriptId,\n frame.scriptName as Platform.DevToolsPath.UrlString, frame.line - 1, options);\n frameDiv.appendChild(urlElement);\n stackFrameToURLElement.set(frameDiv, urlElement);\n frameDiv.addEventListener('contextmenu', this.onContextMenu.bind(this, urlElement));\n }\n this.frameElements[0].tabIndex = 0;\n }\n\n clear(): void {\n this.element.removeChildren();\n this.frameElements = [];\n this.linkifier.reset();\n }\n}\n\nconst stackFrameToURLElement = new WeakMap();\n"]} \ No newline at end of file diff --git a/public/panels/profiler/ProfilesPanel.js b/public/panels/profiler/ProfilesPanel.js index 8ab6d30b3..f1fa70e9c 100644 --- a/public/panels/profiler/ProfilesPanel.js +++ b/public/panels/profiler/ProfilesPanel.js @@ -29,7 +29,6 @@ import * as Common from '../../core/common/common.js'; import * as Host from '../../core/host/host.js'; import * as i18n from '../../core/i18n/i18n.js'; import * as Platform from '../../core/platform/platform.js'; -import * as Root from '../../core/root/root.js'; import * as SDK from '../../core/sdk/sdk.js'; // eslint-disable-next-line rulesdir/es_modules_import import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js'; @@ -69,10 +68,6 @@ const UIStrings = { *@description Text in the JS Profiler panel to show warning to user that JS profiler will be deprecated. */ deprecationWarnMsg: 'This panel will be deprecated in the upcoming version. Use the Performance panel to record JavaScript CPU profiles.', - /** - *@description Text of a button in the JS Profiler panel to show more information about deprecation. - */ - learnMore: 'Learn more', /** *@description Text of a button in the JS Profiler panel to let user give feedback. */ @@ -81,10 +76,6 @@ const UIStrings = { *@description Text of a button in the JS Profiler panel to let user go to Performance panel. */ goToPerformancePanel: 'Go to Performance Panel', - /** - *@description Text of a button in the JS Profiler panel to let user go to enable the experiment flag to use this panel temporarily. - */ - enableThisPanelTemporarily: 'Enable this panel temporarily', }; const str_ = i18n.i18n.registerUIStrings('panels/profiler/ProfilesPanel.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); @@ -579,12 +570,7 @@ export class JSProfilerPanel extends ProfilesPanel { const registry = instance; super('js_profiler', [registry.cpuProfileType], 'profiler.js-toggle-recording'); this.splitWidget().mainWidget()?.setMinimumSize(350, 0); - if (Root.Runtime.experiments.isEnabled('jsProfilerTemporarilyEnable')) { - this.#showDeprecationInfobar(); - } - else { - this.#showDeprecationWarningAndNoPanel(); - } + this.#showDeprecationInfobar(); } static instance(opts = { forceNew: null }) { const { forceNew } = opts; @@ -594,23 +580,17 @@ export class JSProfilerPanel extends ProfilesPanel { return jsProfilerPanelInstance; } #showDeprecationInfobar() { - function openRFC() { - Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab('https://github.com/ChromeDevTools/rfcs/discussions/2'); + function openFeedbackLink() { + Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab('https://crbug.com/1354548'); } async function openPerformancePanel() { await UI.InspectorView.InspectorView.instance().showPanel('timeline'); } const infobar = new UI.Infobar.Infobar(UI.Infobar.Type.Warning, /* text */ i18nString(UIStrings.deprecationWarnMsg), /* actions? */ [ - { - text: i18nString(UIStrings.learnMore), - highlight: false, - delegate: openRFC, - dismiss: false, - }, { text: i18nString(UIStrings.feedback), highlight: false, - delegate: openRFC, + delegate: openFeedbackLink, dismiss: false, }, { @@ -620,42 +600,11 @@ export class JSProfilerPanel extends ProfilesPanel { dismiss: false, }, ], - /* disableSetting? */ undefined); + /* disableSetting? */ undefined, + /* isCloseable TODO(crbug.com/1354548) Remove the prop from infobar with JS Profiler deprecation */ false); infobar.setParentView(this); this.splitWidget().mainWidget()?.element.prepend(infobar.element); } - #showDeprecationWarningAndNoPanel() { - const mainWidget = this.splitWidget().mainWidget(); - mainWidget?.detachChildWidgets(); - if (mainWidget) { - const emptyPage = new UI.Widget.VBox(); - emptyPage.contentElement.classList.add('empty-landing-page', 'fill'); - const centered = emptyPage.contentElement.createChild('div'); - centered.createChild('p').textContent = - 'This panel is deprecated and will be removed in the next version. Use the Performance panel to record JavaScript CPU profiles.'; - centered.createChild('p').textContent = - 'You can temporarily enable this panel with Settings > Experiments > Enable JavaScript Profiler.'; - centered.appendChild(UI.UIUtils.createTextButton(i18nString(UIStrings.goToPerformancePanel), openPerformancePanel, 'infobar-button primary-button')); - centered.appendChild(UI.UIUtils.createTextButton(i18nString(UIStrings.learnMore), openBlogpost)); - centered.appendChild(UI.UIUtils.createTextButton(i18nString(UIStrings.feedback), openFeedbackLink)); - centered.appendChild(UI.UIUtils.createTextButton(i18nString(UIStrings.enableThisPanelTemporarily), openExperimentsSettings)); - emptyPage.show(mainWidget.element); - } - async function openPerformancePanel() { - await UI.InspectorView.InspectorView.instance().showPanel('timeline'); - } - function openBlogpost() { - Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab('https://developer.chrome.com/blog/js-profiler-deprecation/'); - } - function openFeedbackLink() { - Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab('https://bugs.chromium.org/p/chromium/issues/detail?id=1354548'); - } - async function openExperimentsSettings() { - await UI.ViewManager.ViewManager.instance().showView('experiments'); - const tab = await UI.ViewManager.ViewManager.instance().view('experiments').widget(); - tab.setFilter('Enable JavaScript Profiler temporarily'); - } - } wasShown() { super.wasShown(); UI.Context.Context.instance().setFlavor(JSProfilerPanel, this); diff --git a/public/panels/profiler/ProfilesPanel.js.map b/public/panels/profiler/ProfilesPanel.js.map index b2064363f..5b265aa34 100644 --- a/public/panels/profiler/ProfilesPanel.js.map +++ b/public/panels/profiler/ProfilesPanel.js.map @@ -1 +1 @@ -{"version":3,"file":"ProfilesPanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/profiler/ProfilesPanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,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,CAAC;gBACzB,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBACpD,IAAI,aAAa,KAAK,IAAI,EAAE;oBAC1B,aAAa,CAAC,KAAK,EAAE,CAAC;oBACtB,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,KAAK,CAAC;aACd;YACD,KAAK,yBAAyB,CAAC,CAAC;gBAC9B,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBACpD,IAAI,aAAa,KAAK,IAAI,EAAE;oBAC1B,aAAa,CAAC,sBAAsB,EAAE,CAAC;oBACvC,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,KAAK,CAAC;aACd;YACD,KAAK,uBAAuB,CAAC,CAAC;gBAC5B,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC9C,IAAI,OAAO,KAAK,IAAI,EAAE;oBACpB,OAAO,CAAC,UAAU,EAAE,CAAC;oBACrB,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,KAAK,CAAC;aACd;YACD,KAAK,yBAAyB,CAAC,CAAC;gBAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC9C,IAAI,OAAO,KAAK,IAAI,EAAE;oBACpB,OAAO,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;oBAC7C,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\n// eslint-disable-next-line rulesdir/es_modules_import\nimport objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport {type ExperimentsSettingsTab} from '../settings/SettingsScreen.js';\n\nimport heapProfilerStyles from './heapProfiler.css.js';\nimport {\n type DataDisplayDelegate,\n ProfileEvents as ProfileTypeEvents,\n ProfileHeader,\n type ProfileType,\n} from './ProfileHeader.js';\nimport {Events as ProfileLauncherEvents, ProfileLauncherView} from './ProfileLauncherView.js';\nimport {ProfileSidebarTreeElement} from './ProfileSidebarTreeElement.js';\nimport profilesPanelStyles from './profilesPanel.css.js';\nimport profilesSidebarTreeStyles from './profilesSidebarTree.css.js';\nimport {instance} from './ProfileTypeRegistry.js';\n\nconst UIStrings = {\n /**\n *@description Text in Profiles Panel of a profiler tool\n *@example {'.js', '.json'} PH1\n */\n cantLoadFileSupportedFile: 'Can’t load file. Supported file extensions: \\'\\'{PH1}\\'\\'.',\n /**\n *@description Text in Profiles Panel of a profiler tool\n */\n cantLoadProfileWhileAnother: 'Can’t load profile while another profile is being recorded.',\n /**\n *@description Text in Profiles Panel of a profiler tool\n *@example {cannot open file} PH1\n */\n profileLoadingFailedS: 'Profile loading failed: {PH1}.',\n /**\n *@description Text in Profiles Panel of a profiler tool\n *@example {2} PH1\n */\n runD: 'Run {PH1}',\n /**\n *@description Text in Profiles Panel of a profiler tool\n */\n profiles: 'Profiles',\n /**\n *@description Text in the JS Profiler panel to show warning to user that JS profiler will be deprecated.\n */\n deprecationWarnMsg:\n 'This panel will be deprecated in the upcoming version. Use the Performance panel to record JavaScript CPU profiles.',\n /**\n *@description Text of a button in the JS Profiler panel to show more information about deprecation.\n */\n learnMore: 'Learn more',\n /**\n *@description Text of a button in the JS Profiler panel to let user give feedback.\n */\n feedback: 'Feedback',\n /**\n *@description Text of a button in the JS Profiler panel to let user go to Performance panel.\n */\n goToPerformancePanel: 'Go to Performance Panel',\n /**\n *@description Text of a button in the JS Profiler panel to let user go to enable the experiment flag to use this panel temporarily.\n */\n enableThisPanelTemporarily: 'Enable this panel temporarily',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/profiler/ProfilesPanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisplayDelegate {\n readonly profileTypes: ProfileType[];\n profilesItemTreeElement: ProfilesSidebarTreeElement;\n sidebarTree: UI.TreeOutline.TreeOutlineInShadow;\n profileViews: HTMLDivElement;\n readonly toolbarElement: HTMLDivElement;\n toggleRecordAction: UI.ActionRegistration.Action;\n readonly toggleRecordButton: UI.Toolbar.ToolbarButton;\n readonly #saveToFileAction: UI.ActionRegistration.Action;\n readonly profileViewToolbar: UI.Toolbar.Toolbar;\n profileGroups: {};\n launcherView: ProfileLauncherView;\n visibleView!: UI.Widget.Widget|undefined;\n readonly profileToView: {\n profile: ProfileHeader,\n view: UI.Widget.Widget,\n }[];\n typeIdToSidebarSection: {\n [x: string]: ProfileTypeSidebarSection,\n };\n fileSelectorElement!: HTMLInputElement;\n selectedProfileType?: ProfileType;\n constructor(name: string, profileTypes: ProfileType[], recordingActionId: string) {\n super(name);\n this.profileTypes = profileTypes;\n\n const mainContainer = new UI.Widget.VBox();\n this.splitWidget().setMainWidget(mainContainer);\n\n this.profilesItemTreeElement = new ProfilesSidebarTreeElement(this);\n\n this.sidebarTree = new UI.TreeOutline.TreeOutlineInShadow();\n\n this.sidebarTree.element.classList.add('profiles-sidebar-tree-box');\n this.panelSidebarElement().appendChild(this.sidebarTree.element);\n\n this.sidebarTree.appendChild(this.profilesItemTreeElement);\n\n this.sidebarTree.element.addEventListener('keydown', this.onKeyDown.bind(this), false);\n\n this.profileViews = document.createElement('div');\n this.profileViews.id = 'profile-views';\n this.profileViews.classList.add('vbox');\n mainContainer.element.appendChild(this.profileViews);\n\n this.toolbarElement = document.createElement('div');\n this.toolbarElement.classList.add('profiles-toolbar');\n mainContainer.element.insertBefore(this.toolbarElement, mainContainer.element.firstChild);\n\n this.panelSidebarElement().classList.add('profiles-tree-sidebar');\n const toolbarContainerLeft = document.createElement('div');\n toolbarContainerLeft.classList.add('profiles-toolbar');\n this.panelSidebarElement().insertBefore(toolbarContainerLeft, this.panelSidebarElement().firstChild);\n const toolbar = new UI.Toolbar.Toolbar('', toolbarContainerLeft);\n toolbar.makeWrappable(true);\n this.toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction(recordingActionId);\n this.toggleRecordButton = UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction);\n toolbar.appendToolbarItem(this.toggleRecordButton);\n\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('profiler.clear-all'));\n toolbar.appendSeparator();\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('profiler.load-from-file'));\n this.#saveToFileAction = UI.ActionRegistry.ActionRegistry.instance().getAction('profiler.save-to-file');\n this.#saveToFileAction.setEnabled(false);\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.#saveToFileAction));\n toolbar.appendSeparator();\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('components.collect-garbage'));\n\n this.profileViewToolbar = new UI.Toolbar.Toolbar('', this.toolbarElement);\n this.profileViewToolbar.makeWrappable(true);\n\n this.profileGroups = {};\n this.launcherView = new ProfileLauncherView(this);\n this.launcherView.addEventListener(ProfileLauncherEvents.ProfileTypeSelected, this.onProfileTypeSelected, this);\n\n this.profileToView = [];\n\n this.typeIdToSidebarSection = {};\n\n const types = this.profileTypes;\n for (let i = 0; i < types.length; i++) {\n this.registerProfileType(types[i]);\n }\n this.launcherView.restoreSelectedProfileType();\n this.profilesItemTreeElement.select();\n this.showLauncherView();\n this.createFileSelectorElement();\n\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.SuspendStateChanged, this.onSuspendStateChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(\n SDK.CPUProfilerModel.CPUProfilerModel, this.updateProfileTypeSpecificUI, this);\n UI.Context.Context.instance().addFlavorChangeListener(\n SDK.HeapProfilerModel.HeapProfilerModel, this.updateProfileTypeSpecificUI, this);\n }\n\n onKeyDown(ev: Event): void {\n const event = (ev as KeyboardEvent);\n let handled = false;\n if (event.key === 'ArrowDown' && !event.altKey) {\n handled = this.sidebarTree.selectNext();\n } else if (event.key === 'ArrowUp' && !event.altKey) {\n handled = this.sidebarTree.selectPrevious();\n }\n if (handled) {\n event.consume(true);\n }\n }\n\n override searchableView(): UI.SearchableView.SearchableView|null {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const visibleView = (this.visibleView as any);\n return visibleView && visibleView.searchableView ? visibleView.searchableView() : null;\n }\n\n createFileSelectorElement(): void {\n if (this.fileSelectorElement) {\n this.element.removeChild(this.fileSelectorElement);\n }\n this.fileSelectorElement = UI.UIUtils.createFileSelectorElement(this.loadFromFile.bind(this));\n this.element.appendChild(this.fileSelectorElement);\n }\n\n findProfileTypeByExtension(fileName: string): ProfileType|null {\n return this.profileTypes.find(\n type => Boolean(type.fileExtension()) && fileName.endsWith(type.fileExtension() || '')) ||\n null;\n }\n\n async loadFromFile(file: File): Promise {\n this.createFileSelectorElement();\n\n const profileType = this.findProfileTypeByExtension(file.name);\n if (!profileType) {\n const extensions = new Set(this.profileTypes.map(type => type.fileExtension()).filter(ext => ext));\n Common.Console.Console.instance().error(\n i18nString(UIStrings.cantLoadFileSupportedFile, {PH1: Array.from(extensions).join('\\', \\'')}));\n return;\n }\n\n if (Boolean(profileType.profileBeingRecorded())) {\n Common.Console.Console.instance().error(i18nString(UIStrings.cantLoadProfileWhileAnother));\n return;\n }\n\n const error = await profileType.loadFromFile(file);\n if (error && 'message' in error) {\n void UI.UIUtils.MessageDialog.show(i18nString(UIStrings.profileLoadingFailedS, {PH1: error.message}));\n }\n }\n\n toggleRecord(): boolean {\n if (!this.toggleRecordAction.enabled()) {\n return true;\n }\n const toggleButton = Platform.DOMUtilities.deepActiveElement(this.element.ownerDocument);\n const type = this.selectedProfileType;\n if (!type) {\n return true;\n }\n const isProfiling = type.buttonClicked();\n this.updateToggleRecordAction(isProfiling);\n if (isProfiling) {\n this.launcherView.profileStarted();\n if (type.hasTemporaryView()) {\n this.showProfile(type.profileBeingRecorded());\n }\n } else {\n this.launcherView.profileFinished();\n }\n if (toggleButton) {\n (toggleButton as HTMLElement).focus();\n }\n return true;\n }\n\n onSuspendStateChanged(): void {\n this.updateToggleRecordAction(this.toggleRecordAction.toggled());\n }\n\n updateToggleRecordAction(toggled: boolean): void {\n const hasSelectedTarget = Boolean(\n UI.Context.Context.instance().flavor(SDK.CPUProfilerModel.CPUProfilerModel) ||\n UI.Context.Context.instance().flavor(SDK.HeapProfilerModel.HeapProfilerModel));\n const enable = toggled || (!SDK.TargetManager.TargetManager.instance().allTargetsSuspended() && hasSelectedTarget);\n this.toggleRecordAction.setEnabled(enable);\n this.toggleRecordAction.setToggled(toggled);\n if (enable) {\n this.toggleRecordButton.setTitle(this.selectedProfileType ? this.selectedProfileType.buttonTooltip : '');\n } else {\n this.toggleRecordButton.setTitle(UI.UIUtils.anotherProfilerActiveLabel());\n }\n if (this.selectedProfileType) {\n this.launcherView.updateProfileType(this.selectedProfileType, enable);\n }\n }\n\n profileBeingRecordedRemoved(): void {\n this.updateToggleRecordAction(false);\n this.launcherView.profileFinished();\n }\n\n onProfileTypeSelected(event: Common.EventTarget.EventTargetEvent): void {\n this.selectedProfileType = event.data;\n this.updateProfileTypeSpecificUI();\n }\n\n updateProfileTypeSpecificUI(): void {\n this.updateToggleRecordAction(this.toggleRecordAction.toggled());\n }\n\n reset(): void {\n this.profileTypes.forEach(type => type.reset());\n\n delete this.visibleView;\n\n this.profileGroups = {};\n this.updateToggleRecordAction(false);\n this.launcherView.profileFinished();\n\n this.sidebarTree.element.classList.remove('some-expandable');\n\n this.launcherView.detach();\n this.profileViews.removeChildren();\n this.profileViewToolbar.removeToolbarItems();\n\n this.profilesItemTreeElement.select();\n this.showLauncherView();\n }\n\n showLauncherView(): void {\n this.closeVisibleView();\n this.profileViewToolbar.removeToolbarItems();\n this.launcherView.show(this.profileViews);\n this.visibleView = this.launcherView;\n this.toolbarElement.classList.add('hidden');\n this.#saveToFileAction.setEnabled(false);\n }\n\n registerProfileType(profileType: ProfileType): void {\n this.launcherView.addProfileType(profileType);\n const profileTypeSection = new ProfileTypeSidebarSection(this, profileType);\n this.typeIdToSidebarSection[profileType.id] = profileTypeSection;\n this.sidebarTree.appendChild(profileTypeSection);\n\n function onAddProfileHeader(this: ProfilesPanel, event: Common.EventTarget.EventTargetEvent): void {\n this.addProfileHeader(event.data);\n }\n\n function onRemoveProfileHeader(\n this: ProfilesPanel, event: Common.EventTarget.EventTargetEvent): void {\n this.removeProfileHeader(event.data);\n }\n\n function profileComplete(this: ProfilesPanel, event: Common.EventTarget.EventTargetEvent): void {\n this.showProfile(event.data);\n }\n\n profileType.addEventListener(ProfileTypeEvents.ViewUpdated, this.updateProfileTypeSpecificUI, this);\n profileType.addEventListener(ProfileTypeEvents.AddProfileHeader, onAddProfileHeader, this);\n profileType.addEventListener(ProfileTypeEvents.RemoveProfileHeader, onRemoveProfileHeader, this);\n profileType.addEventListener(ProfileTypeEvents.ProfileComplete, profileComplete, this);\n\n const profiles = profileType.getProfiles();\n for (let i = 0; i < profiles.length; i++) {\n this.addProfileHeader(profiles[i]);\n }\n }\n\n showLoadFromFileDialog(): void {\n this.fileSelectorElement.click();\n }\n\n addProfileHeader(profile: ProfileHeader): void {\n const profileType = profile.profileType();\n const typeId = profileType.id;\n this.typeIdToSidebarSection[typeId].addProfileHeader(profile);\n if (!this.visibleView || this.visibleView === this.launcherView) {\n this.showProfile(profile);\n }\n }\n\n removeProfileHeader(profile: ProfileHeader): void {\n if (profile.profileType().profileBeingRecorded() === profile) {\n this.profileBeingRecordedRemoved();\n }\n\n const i = this.indexOfViewForProfile(profile);\n if (i !== -1) {\n this.profileToView.splice(i, 1);\n }\n\n const typeId = profile.profileType().id;\n const sectionIsEmpty = this.typeIdToSidebarSection[typeId].removeProfileHeader(profile);\n\n // No other item will be selected if there aren't any other profiles, so\n // make sure that view gets cleared when the last profile is removed.\n if (sectionIsEmpty) {\n this.profilesItemTreeElement.select();\n this.showLauncherView();\n }\n }\n\n showProfile(profile: ProfileHeader|null): UI.Widget.Widget|null {\n if (!profile ||\n (profile.profileType().profileBeingRecorded() === profile) && !profile.profileType().hasTemporaryView()) {\n return null;\n }\n\n const view = this.viewForProfile(profile);\n if (view === this.visibleView) {\n return view;\n }\n\n this.closeVisibleView();\n UI.Context.Context.instance().setFlavor(ProfileHeader, profile);\n this.#saveToFileAction.setEnabled(profile.canSaveToFile());\n\n view.show(this.profileViews);\n this.toolbarElement.classList.remove('hidden');\n this.visibleView = view;\n\n const profileTypeSection = this.typeIdToSidebarSection[profile.profileType().id];\n const sidebarElement = profileTypeSection.sidebarElementForProfile(profile);\n if (sidebarElement) {\n sidebarElement.revealAndSelect();\n }\n\n this.profileViewToolbar.removeToolbarItems();\n\n void (view as unknown as UI.View.View).toolbarItems().then(items => {\n items.map(item => this.profileViewToolbar.appendToolbarItem(item));\n });\n\n return view;\n }\n\n showObject(_snapshotObjectId: string, _perspectiveName: string): void {\n }\n\n async linkifyObject(_nodeIndex: number): Promise {\n return null;\n }\n\n viewForProfile(profile: ProfileHeader): UI.Widget.Widget {\n const index = this.indexOfViewForProfile(profile);\n if (index !== -1) {\n return this.profileToView[index].view;\n }\n const view = profile.createView(this);\n view.element.classList.add('profile-view');\n this.profileToView.push({profile: profile, view: view});\n return view;\n }\n\n indexOfViewForProfile(profile: ProfileHeader): number {\n return this.profileToView.findIndex(item => item.profile === profile);\n }\n\n closeVisibleView(): void {\n UI.Context.Context.instance().setFlavor(ProfileHeader, null);\n this.#saveToFileAction.setEnabled(false);\n if (this.visibleView) {\n this.visibleView.detach();\n }\n delete this.visibleView;\n }\n\n override focus(): void {\n this.sidebarTree.focus();\n }\n\n override wasShown(): void {\n super.wasShown();\n UI.Context.Context.instance().setFlavor(ProfilesPanel, this);\n this.registerCSSFiles([objectValueStyles, profilesPanelStyles, heapProfilerStyles]);\n this.sidebarTree.registerCSSFiles([profilesSidebarTreeStyles]);\n }\n\n override willHide(): void {\n UI.Context.Context.instance().setFlavor(ProfilesPanel, null);\n super.willHide();\n }\n}\n\nexport class ProfileTypeSidebarSection extends UI.TreeOutline.TreeElement {\n dataDisplayDelegate: DataDisplayDelegate;\n readonly profileTreeElements: ProfileSidebarTreeElement[];\n profileGroups: {\n [x: string]: ProfileGroup,\n };\n\n constructor(dataDisplayDelegate: DataDisplayDelegate, profileType: ProfileType) {\n super(profileType.treeItemTitle, true);\n this.selectable = false;\n this.dataDisplayDelegate = dataDisplayDelegate;\n this.profileTreeElements = [];\n this.profileGroups = {};\n this.expand();\n this.hidden = true;\n this.setCollapsible(false);\n }\n\n addProfileHeader(profile: ProfileHeader): void {\n this.hidden = false;\n const profileType = profile.profileType();\n let sidebarParent: (ProfileGroupSidebarTreeElement|null)|this = this;\n const profileTreeElement =\n (profile.createSidebarTreeElement(this.dataDisplayDelegate) as ProfileSidebarTreeElement);\n this.profileTreeElements.push(profileTreeElement);\n\n if (!profile.fromFile() && profileType.profileBeingRecorded() !== profile) {\n const profileTitle = profile.title;\n let group: ProfileGroup = this.profileGroups[profileTitle];\n if (!group) {\n group = new ProfileGroup();\n this.profileGroups[profileTitle] = group;\n }\n group.profileSidebarTreeElements.push(profileTreeElement);\n\n const groupSize = group.profileSidebarTreeElements.length;\n if (groupSize === 2) {\n // Make a group UI.TreeOutline.TreeElement now that there are 2 profiles.\n group.sidebarTreeElement = new ProfileGroupSidebarTreeElement(this.dataDisplayDelegate, profile.title);\n\n const firstProfileTreeElement = group.profileSidebarTreeElements[0];\n // Insert at the same index for the first profile of the group.\n const index = this.children().indexOf(firstProfileTreeElement);\n this.insertChild(group.sidebarTreeElement, index);\n\n // Move the first profile to the group.\n const selected = firstProfileTreeElement.selected;\n this.removeChild(firstProfileTreeElement);\n group.sidebarTreeElement.appendChild(firstProfileTreeElement);\n if (selected) {\n firstProfileTreeElement.revealAndSelect();\n }\n\n firstProfileTreeElement.setSmall(true);\n firstProfileTreeElement.setMainTitle(i18nString(UIStrings.runD, {PH1: 1}));\n\n if (this.treeOutline) {\n this.treeOutline.element.classList.add('some-expandable');\n }\n }\n\n if (groupSize >= 2) {\n sidebarParent = group.sidebarTreeElement;\n profileTreeElement.setSmall(true);\n profileTreeElement.setMainTitle(i18nString(UIStrings.runD, {PH1: groupSize}));\n }\n }\n\n if (sidebarParent) {\n sidebarParent.appendChild(profileTreeElement);\n }\n }\n\n removeProfileHeader(profile: ProfileHeader): boolean {\n const index = this.sidebarElementIndex(profile);\n if (index === -1) {\n return false;\n }\n const profileTreeElement = this.profileTreeElements[index];\n this.profileTreeElements.splice(index, 1);\n\n let sidebarParent: (ProfileGroupSidebarTreeElement|null)|this = this;\n const group = this.profileGroups[profile.title];\n if (group) {\n const groupElements = group.profileSidebarTreeElements;\n groupElements.splice(groupElements.indexOf(profileTreeElement), 1);\n if (groupElements.length === 1) {\n // Move the last profile out of its group and remove the group.\n const pos = sidebarParent.children().indexOf((group.sidebarTreeElement as ProfileGroupSidebarTreeElement));\n if (group.sidebarTreeElement) {\n group.sidebarTreeElement.removeChild(groupElements[0]);\n }\n this.insertChild(groupElements[0], pos);\n groupElements[0].setSmall(false);\n groupElements[0].setMainTitle(profile.title);\n if (group.sidebarTreeElement) {\n this.removeChild(group.sidebarTreeElement);\n }\n }\n if (groupElements.length !== 0) {\n sidebarParent = group.sidebarTreeElement;\n }\n }\n if (sidebarParent) {\n sidebarParent.removeChild(profileTreeElement);\n }\n profileTreeElement.dispose();\n\n if (this.childCount()) {\n return false;\n }\n this.hidden = true;\n return true;\n }\n\n sidebarElementForProfile(profile: ProfileHeader): ProfileSidebarTreeElement|null {\n const index = this.sidebarElementIndex(profile);\n return index === -1 ? null : this.profileTreeElements[index];\n }\n\n sidebarElementIndex(profile: ProfileHeader): number {\n const elements = this.profileTreeElements;\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].profile === profile) {\n return i;\n }\n }\n return -1;\n }\n\n override onattach(): void {\n this.listItemElement.classList.add('profiles-tree-section');\n }\n}\n\nexport class ProfileGroup {\n profileSidebarTreeElements: ProfileSidebarTreeElement[];\n sidebarTreeElement: ProfileGroupSidebarTreeElement|null;\n constructor() {\n this.profileSidebarTreeElements = [];\n this.sidebarTreeElement = null;\n }\n}\n\nexport class ProfileGroupSidebarTreeElement extends UI.TreeOutline.TreeElement {\n readonly dataDisplayDelegate: DataDisplayDelegate;\n profileTitle: string;\n override toggleOnClick: boolean;\n\n constructor(dataDisplayDelegate: DataDisplayDelegate, title: string) {\n super('', true);\n this.selectable = false;\n this.dataDisplayDelegate = dataDisplayDelegate;\n this.profileTitle = title;\n this.expand();\n this.toggleOnClick = true;\n }\n\n override onselect(): boolean {\n const hasChildren = this.childCount() > 0;\n if (hasChildren) {\n const lastChild = this.lastChild();\n if (lastChild instanceof ProfileSidebarTreeElement) {\n this.dataDisplayDelegate.showProfile(lastChild.profile);\n }\n }\n return hasChildren;\n }\n\n override onattach(): void {\n this.listItemElement.classList.add('profile-group-sidebar-tree-item');\n this.listItemElement.createChild('div', 'icon');\n this.listItemElement.createChild('div', 'titles no-subtitle')\n .createChild('span', 'title-container')\n .createChild('span', 'title')\n .textContent = this.profileTitle;\n }\n}\n\nexport class ProfilesSidebarTreeElement extends UI.TreeOutline.TreeElement {\n readonly panel: ProfilesPanel;\n\n constructor(panel: ProfilesPanel) {\n super('', false);\n this.selectable = true;\n this.panel = panel;\n }\n\n override onselect(): boolean {\n this.panel.showLauncherView();\n return true;\n }\n\n override onattach(): void {\n this.listItemElement.classList.add('profile-launcher-view-tree-item');\n this.listItemElement.createChild('div', 'icon');\n this.listItemElement.createChild('div', 'titles no-subtitle')\n .createChild('span', 'title-container')\n .createChild('span', 'title')\n .textContent = i18nString(UIStrings.profiles);\n }\n}\n\nlet jsProfilerPanelInstance: JSProfilerPanel;\n\nexport class JSProfilerPanel extends ProfilesPanel implements UI.ActionRegistration.ActionDelegate {\n constructor() {\n const registry = instance;\n super('js_profiler', [registry.cpuProfileType], 'profiler.js-toggle-recording');\n this.splitWidget().mainWidget()?.setMinimumSize(350, 0);\n if (Root.Runtime.experiments.isEnabled('jsProfilerTemporarilyEnable')) {\n this.#showDeprecationInfobar();\n } else {\n this.#showDeprecationWarningAndNoPanel();\n }\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): JSProfilerPanel {\n const {forceNew} = opts;\n if (!jsProfilerPanelInstance || forceNew) {\n jsProfilerPanelInstance = new JSProfilerPanel();\n }\n return jsProfilerPanelInstance;\n }\n\n #showDeprecationInfobar(): void {\n function openRFC(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n 'https://github.com/ChromeDevTools/rfcs/discussions/2' as Platform.DevToolsPath.UrlString);\n }\n\n async function openPerformancePanel(): Promise {\n await UI.InspectorView.InspectorView.instance().showPanel('timeline');\n }\n\n const infobar = new UI.Infobar.Infobar(\n UI.Infobar.Type.Warning, /* text */ i18nString(UIStrings.deprecationWarnMsg), /* actions? */\n [\n {\n text: i18nString(UIStrings.learnMore),\n highlight: false,\n delegate: openRFC,\n dismiss: false,\n },\n {\n text: i18nString(UIStrings.feedback),\n highlight: false,\n delegate: openRFC,\n dismiss: false,\n },\n {\n text: i18nString(UIStrings.goToPerformancePanel),\n highlight: true,\n delegate: openPerformancePanel,\n dismiss: false,\n },\n ],\n /* disableSetting? */ undefined);\n infobar.setParentView(this);\n this.splitWidget().mainWidget()?.element.prepend(infobar.element);\n }\n\n #showDeprecationWarningAndNoPanel(): void {\n const mainWidget = this.splitWidget().mainWidget();\n mainWidget?.detachChildWidgets();\n if (mainWidget) {\n const emptyPage = new UI.Widget.VBox();\n emptyPage.contentElement.classList.add('empty-landing-page', 'fill');\n\n const centered = emptyPage.contentElement.createChild('div');\n\n centered.createChild('p').textContent =\n 'This panel is deprecated and will be removed in the next version. Use the Performance panel to record JavaScript CPU profiles.';\n centered.createChild('p').textContent =\n 'You can temporarily enable this panel with Settings > Experiments > Enable JavaScript Profiler.';\n\n centered.appendChild(UI.UIUtils.createTextButton(\n i18nString(UIStrings.goToPerformancePanel), openPerformancePanel, 'infobar-button primary-button'));\n centered.appendChild(UI.UIUtils.createTextButton(i18nString(UIStrings.learnMore), openBlogpost));\n centered.appendChild(UI.UIUtils.createTextButton(i18nString(UIStrings.feedback), openFeedbackLink));\n centered.appendChild(\n UI.UIUtils.createTextButton(i18nString(UIStrings.enableThisPanelTemporarily), openExperimentsSettings));\n\n emptyPage.show(mainWidget.element);\n }\n\n async function openPerformancePanel(): Promise {\n await UI.InspectorView.InspectorView.instance().showPanel('timeline');\n }\n\n function openBlogpost(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n 'https://developer.chrome.com/blog/js-profiler-deprecation/' as Platform.DevToolsPath.UrlString);\n }\n\n function openFeedbackLink(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n 'https://bugs.chromium.org/p/chromium/issues/detail?id=1354548' as Platform.DevToolsPath.UrlString);\n }\n\n async function openExperimentsSettings(): Promise {\n await UI.ViewManager.ViewManager.instance().showView('experiments');\n\n const tab = await UI.ViewManager.ViewManager.instance().view('experiments').widget();\n (tab as ExperimentsSettingsTab).setFilter('Enable JavaScript Profiler temporarily');\n }\n }\n\n override wasShown(): void {\n super.wasShown();\n UI.Context.Context.instance().setFlavor(JSProfilerPanel, this);\n }\n\n override willHide(): void {\n UI.Context.Context.instance().setFlavor(JSProfilerPanel, null);\n super.willHide();\n }\n\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n const panel = UI.Context.Context.instance().flavor(JSProfilerPanel);\n if (panel instanceof JSProfilerPanel) {\n panel.toggleRecord();\n } else {\n throw new Error('non-null JSProfilerPanel expected!');\n }\n return true;\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n switch (actionId) {\n case 'profiler.clear-all': {\n const profilesPanel = context.flavor(ProfilesPanel);\n if (profilesPanel !== null) {\n profilesPanel.reset();\n return true;\n }\n return false;\n }\n case 'profiler.load-from-file': {\n const profilesPanel = context.flavor(ProfilesPanel);\n if (profilesPanel !== null) {\n profilesPanel.showLoadFromFileDialog();\n return true;\n }\n return false;\n }\n case 'profiler.save-to-file': {\n const profile = context.flavor(ProfileHeader);\n if (profile !== null) {\n profile.saveToFile();\n return true;\n }\n return false;\n }\n case 'profiler.delete-profile': {\n const profile = context.flavor(ProfileHeader);\n if (profile !== null) {\n profile.profileType().removeProfile(profile);\n return true;\n }\n return false;\n }\n }\n return false;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"ProfilesPanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/profiler/ProfilesPanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,sDAAsD;AACtD,OAAO,iBAAiB,MAAM,yDAAyD,CAAC;AACxF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAEL,aAAa,IAAI,iBAAiB,EAClC,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,MAAM,IAAI,qBAAqB,EAAE,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,yBAAyB,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,yBAAyB,EAAE,4DAA4D;IACvF;;OAEG;IACH,2BAA2B,EAAE,6DAA6D;IAC1F;;;OAGG;IACH,qBAAqB,EAAE,gCAAgC;IACvD;;;OAGG;I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M,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC9C,IAAI,OAAO,KAAK,IAAI,EAAE;oBACpB,OAAO,CAAC,UAAU,EAAE,CAAC;oBACrB,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,KAAK,CAAC;aACd;YACD,KAAK,yBAAyB,CAAC,CAAC;gBAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC9C,IAAI,OAAO,KAAK,IAAI,EAAE;oBACpB,OAAO,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;oBAC7C,OAAO,IAAI,CAAC;iBACb;gBACD,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\n// eslint-disable-next-line rulesdir/es_modules_import\nimport objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport heapProfilerStyles from './heapProfiler.css.js';\nimport {\n type DataDisplayDelegate,\n ProfileEvents as ProfileTypeEvents,\n ProfileHeader,\n type ProfileType,\n} from './ProfileHeader.js';\nimport {Events as ProfileLauncherEvents, ProfileLauncherView} from './ProfileLauncherView.js';\nimport {ProfileSidebarTreeElement} from './ProfileSidebarTreeElement.js';\nimport profilesPanelStyles from './profilesPanel.css.js';\nimport profilesSidebarTreeStyles from './profilesSidebarTree.css.js';\nimport {instance} from './ProfileTypeRegistry.js';\n\nconst UIStrings = {\n /**\n *@description Text in Profiles Panel of a profiler tool\n *@example {'.js', '.json'} PH1\n */\n cantLoadFileSupportedFile: 'Can’t load file. Supported file extensions: \\'\\'{PH1}\\'\\'.',\n /**\n *@description Text in Profiles Panel of a profiler tool\n */\n cantLoadProfileWhileAnother: 'Can’t load profile while another profile is being recorded.',\n /**\n *@description Text in Profiles Panel of a profiler tool\n *@example {cannot open file} PH1\n */\n profileLoadingFailedS: 'Profile loading failed: {PH1}.',\n /**\n *@description Text in Profiles Panel of a profiler tool\n *@example {2} PH1\n */\n runD: 'Run {PH1}',\n /**\n *@description Text in Profiles Panel of a profiler tool\n */\n profiles: 'Profiles',\n /**\n *@description Text in the JS Profiler panel to show warning to user that JS profiler will be deprecated.\n */\n deprecationWarnMsg:\n 'This panel will be deprecated in the upcoming version. Use the Performance panel to record JavaScript CPU profiles.',\n /**\n *@description Text of a button in the JS Profiler panel to let user give feedback.\n */\n feedback: 'Feedback',\n /**\n *@description Text of a button in the JS Profiler panel to let user go to Performance panel.\n */\n goToPerformancePanel: 'Go to Performance Panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/profiler/ProfilesPanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisplayDelegate {\n readonly profileTypes: ProfileType[];\n profilesItemTreeElement: ProfilesSidebarTreeElement;\n sidebarTree: UI.TreeOutline.TreeOutlineInShadow;\n profileViews: HTMLDivElement;\n readonly toolbarElement: HTMLDivElement;\n toggleRecordAction: UI.ActionRegistration.Action;\n readonly toggleRecordButton: UI.Toolbar.ToolbarButton;\n readonly #saveToFileAction: UI.ActionRegistration.Action;\n readonly profileViewToolbar: UI.Toolbar.Toolbar;\n profileGroups: {};\n launcherView: ProfileLauncherView;\n visibleView!: UI.Widget.Widget|undefined;\n readonly profileToView: {\n profile: ProfileHeader,\n view: UI.Widget.Widget,\n }[];\n typeIdToSidebarSection: {\n [x: string]: ProfileTypeSidebarSection,\n };\n fileSelectorElement!: HTMLInputElement;\n selectedProfileType?: ProfileType;\n constructor(name: string, profileTypes: ProfileType[], recordingActionId: string) {\n super(name);\n this.profileTypes = profileTypes;\n\n const mainContainer = new UI.Widget.VBox();\n this.splitWidget().setMainWidget(mainContainer);\n\n this.profilesItemTreeElement = new ProfilesSidebarTreeElement(this);\n\n this.sidebarTree = new UI.TreeOutline.TreeOutlineInShadow();\n\n this.sidebarTree.element.classList.add('profiles-sidebar-tree-box');\n this.panelSidebarElement().appendChild(this.sidebarTree.element);\n\n this.sidebarTree.appendChild(this.profilesItemTreeElement);\n\n this.sidebarTree.element.addEventListener('keydown', this.onKeyDown.bind(this), false);\n\n this.profileViews = document.createElement('div');\n this.profileViews.id = 'profile-views';\n this.profileViews.classList.add('vbox');\n mainContainer.element.appendChild(this.profileViews);\n\n this.toolbarElement = document.createElement('div');\n this.toolbarElement.classList.add('profiles-toolbar');\n mainContainer.element.insertBefore(this.toolbarElement, mainContainer.element.firstChild);\n\n this.panelSidebarElement().classList.add('profiles-tree-sidebar');\n const toolbarContainerLeft = document.createElement('div');\n toolbarContainerLeft.classList.add('profiles-toolbar');\n this.panelSidebarElement().insertBefore(toolbarContainerLeft, this.panelSidebarElement().firstChild);\n const toolbar = new UI.Toolbar.Toolbar('', toolbarContainerLeft);\n toolbar.makeWrappable(true);\n this.toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction(recordingActionId);\n this.toggleRecordButton = UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction);\n toolbar.appendToolbarItem(this.toggleRecordButton);\n\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('profiler.clear-all'));\n toolbar.appendSeparator();\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('profiler.load-from-file'));\n this.#saveToFileAction = UI.ActionRegistry.ActionRegistry.instance().getAction('profiler.save-to-file');\n this.#saveToFileAction.setEnabled(false);\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.#saveToFileAction));\n toolbar.appendSeparator();\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('components.collect-garbage'));\n\n this.profileViewToolbar = new UI.Toolbar.Toolbar('', this.toolbarElement);\n this.profileViewToolbar.makeWrappable(true);\n\n this.profileGroups = {};\n this.launcherView = new ProfileLauncherView(this);\n this.launcherView.addEventListener(ProfileLauncherEvents.ProfileTypeSelected, this.onProfileTypeSelected, this);\n\n this.profileToView = [];\n\n this.typeIdToSidebarSection = {};\n\n const types = this.profileTypes;\n for (let i = 0; i < types.length; i++) {\n this.registerProfileType(types[i]);\n }\n this.launcherView.restoreSelectedProfileType();\n this.profilesItemTreeElement.select();\n this.showLauncherView();\n this.createFileSelectorElement();\n\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.SuspendStateChanged, this.onSuspendStateChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(\n SDK.CPUProfilerModel.CPUProfilerModel, this.updateProfileTypeSpecificUI, this);\n UI.Context.Context.instance().addFlavorChangeListener(\n SDK.HeapProfilerModel.HeapProfilerModel, this.updateProfileTypeSpecificUI, this);\n }\n\n onKeyDown(ev: Event): void {\n const event = (ev as KeyboardEvent);\n let handled = false;\n if (event.key === 'ArrowDown' && !event.altKey) {\n handled = this.sidebarTree.selectNext();\n } else if (event.key === 'ArrowUp' && !event.altKey) {\n handled = this.sidebarTree.selectPrevious();\n }\n if (handled) {\n event.consume(true);\n }\n }\n\n override searchableView(): UI.SearchableView.SearchableView|null {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const visibleView = (this.visibleView as any);\n return visibleView && visibleView.searchableView ? visibleView.searchableView() : null;\n }\n\n createFileSelectorElement(): void {\n if (this.fileSelectorElement) {\n this.element.removeChild(this.fileSelectorElement);\n }\n this.fileSelectorElement = UI.UIUtils.createFileSelectorElement(this.loadFromFile.bind(this));\n this.element.appendChild(this.fileSelectorElement);\n }\n\n findProfileTypeByExtension(fileName: string): ProfileType|null {\n return this.profileTypes.find(\n type => Boolean(type.fileExtension()) && fileName.endsWith(type.fileExtension() || '')) ||\n null;\n }\n\n async loadFromFile(file: File): Promise {\n this.createFileSelectorElement();\n\n const profileType = this.findProfileTypeByExtension(file.name);\n if (!profileType) {\n const extensions = new Set(this.profileTypes.map(type => type.fileExtension()).filter(ext => ext));\n Common.Console.Console.instance().error(\n i18nString(UIStrings.cantLoadFileSupportedFile, {PH1: Array.from(extensions).join('\\', \\'')}));\n return;\n }\n\n if (Boolean(profileType.profileBeingRecorded())) {\n Common.Console.Console.instance().error(i18nString(UIStrings.cantLoadProfileWhileAnother));\n return;\n }\n\n const error = await profileType.loadFromFile(file);\n if (error && 'message' in error) {\n void UI.UIUtils.MessageDialog.show(i18nString(UIStrings.profileLoadingFailedS, {PH1: error.message}));\n }\n }\n\n toggleRecord(): boolean {\n if (!this.toggleRecordAction.enabled()) {\n return true;\n }\n const toggleButton = Platform.DOMUtilities.deepActiveElement(this.element.ownerDocument);\n const type = this.selectedProfileType;\n if (!type) {\n return true;\n }\n const isProfiling = type.buttonClicked();\n this.updateToggleRecordAction(isProfiling);\n if (isProfiling) {\n this.launcherView.profileStarted();\n if (type.hasTemporaryView()) {\n this.showProfile(type.profileBeingRecorded());\n }\n } else {\n this.launcherView.profileFinished();\n }\n if (toggleButton) {\n (toggleButton as HTMLElement).focus();\n }\n return true;\n }\n\n onSuspendStateChanged(): void {\n this.updateToggleRecordAction(this.toggleRecordAction.toggled());\n }\n\n updateToggleRecordAction(toggled: boolean): void {\n const hasSelectedTarget = Boolean(\n UI.Context.Context.instance().flavor(SDK.CPUProfilerModel.CPUProfilerModel) ||\n UI.Context.Context.instance().flavor(SDK.HeapProfilerModel.HeapProfilerModel));\n const enable = toggled || (!SDK.TargetManager.TargetManager.instance().allTargetsSuspended() && hasSelectedTarget);\n this.toggleRecordAction.setEnabled(enable);\n this.toggleRecordAction.setToggled(toggled);\n if (enable) {\n this.toggleRecordButton.setTitle(this.selectedProfileType ? this.selectedProfileType.buttonTooltip : '');\n } else {\n this.toggleRecordButton.setTitle(UI.UIUtils.anotherProfilerActiveLabel());\n }\n if (this.selectedProfileType) {\n this.launcherView.updateProfileType(this.selectedProfileType, enable);\n }\n }\n\n profileBeingRecordedRemoved(): void {\n this.updateToggleRecordAction(false);\n this.launcherView.profileFinished();\n }\n\n onProfileTypeSelected(event: Common.EventTarget.EventTargetEvent): void {\n this.selectedProfileType = event.data;\n this.updateProfileTypeSpecificUI();\n }\n\n updateProfileTypeSpecificUI(): void {\n this.updateToggleRecordAction(this.toggleRecordAction.toggled());\n }\n\n reset(): void {\n this.profileTypes.forEach(type => type.reset());\n\n delete this.visibleView;\n\n this.profileGroups = {};\n this.updateToggleRecordAction(false);\n this.launcherView.profileFinished();\n\n this.sidebarTree.element.classList.remove('some-expandable');\n\n this.launcherView.detach();\n this.profileViews.removeChildren();\n this.profileViewToolbar.removeToolbarItems();\n\n this.profilesItemTreeElement.select();\n this.showLauncherView();\n }\n\n showLauncherView(): void {\n this.closeVisibleView();\n this.profileViewToolbar.removeToolbarItems();\n this.launcherView.show(this.profileViews);\n this.visibleView = this.launcherView;\n this.toolbarElement.classList.add('hidden');\n this.#saveToFileAction.setEnabled(false);\n }\n\n registerProfileType(profileType: ProfileType): void {\n this.launcherView.addProfileType(profileType);\n const profileTypeSection = new ProfileTypeSidebarSection(this, profileType);\n this.typeIdToSidebarSection[profileType.id] = profileTypeSection;\n this.sidebarTree.appendChild(profileTypeSection);\n\n function onAddProfileHeader(this: ProfilesPanel, event: Common.EventTarget.EventTargetEvent): void {\n this.addProfileHeader(event.data);\n }\n\n function onRemoveProfileHeader(\n this: ProfilesPanel, event: Common.EventTarget.EventTargetEvent): void {\n this.removeProfileHeader(event.data);\n }\n\n function profileComplete(this: ProfilesPanel, event: Common.EventTarget.EventTargetEvent): void {\n this.showProfile(event.data);\n }\n\n profileType.addEventListener(ProfileTypeEvents.ViewUpdated, this.updateProfileTypeSpecificUI, this);\n profileType.addEventListener(ProfileTypeEvents.AddProfileHeader, onAddProfileHeader, this);\n profileType.addEventListener(ProfileTypeEvents.RemoveProfileHeader, onRemoveProfileHeader, this);\n profileType.addEventListener(ProfileTypeEvents.ProfileComplete, profileComplete, this);\n\n const profiles = profileType.getProfiles();\n for (let i = 0; i < profiles.length; i++) {\n this.addProfileHeader(profiles[i]);\n }\n }\n\n showLoadFromFileDialog(): void {\n this.fileSelectorElement.click();\n }\n\n addProfileHeader(profile: ProfileHeader): void {\n const profileType = profile.profileType();\n const typeId = profileType.id;\n this.typeIdToSidebarSection[typeId].addProfileHeader(profile);\n if (!this.visibleView || this.visibleView === this.launcherView) {\n this.showProfile(profile);\n }\n }\n\n removeProfileHeader(profile: ProfileHeader): void {\n if (profile.profileType().profileBeingRecorded() === profile) {\n this.profileBeingRecordedRemoved();\n }\n\n const i = this.indexOfViewForProfile(profile);\n if (i !== -1) {\n this.profileToView.splice(i, 1);\n }\n\n const typeId = profile.profileType().id;\n const sectionIsEmpty = this.typeIdToSidebarSection[typeId].removeProfileHeader(profile);\n\n // No other item will be selected if there aren't any other profiles, so\n // make sure that view gets cleared when the last profile is removed.\n if (sectionIsEmpty) {\n this.profilesItemTreeElement.select();\n this.showLauncherView();\n }\n }\n\n showProfile(profile: ProfileHeader|null): UI.Widget.Widget|null {\n if (!profile ||\n (profile.profileType().profileBeingRecorded() === profile) && !profile.profileType().hasTemporaryView()) {\n return null;\n }\n\n const view = this.viewForProfile(profile);\n if (view === this.visibleView) {\n return view;\n }\n\n this.closeVisibleView();\n UI.Context.Context.instance().setFlavor(ProfileHeader, profile);\n this.#saveToFileAction.setEnabled(profile.canSaveToFile());\n\n view.show(this.profileViews);\n this.toolbarElement.classList.remove('hidden');\n this.visibleView = view;\n\n const profileTypeSection = this.typeIdToSidebarSection[profile.profileType().id];\n const sidebarElement = profileTypeSection.sidebarElementForProfile(profile);\n if (sidebarElement) {\n sidebarElement.revealAndSelect();\n }\n\n this.profileViewToolbar.removeToolbarItems();\n\n void (view as unknown as UI.View.View).toolbarItems().then(items => {\n items.map(item => this.profileViewToolbar.appendToolbarItem(item));\n });\n\n return view;\n }\n\n showObject(_snapshotObjectId: string, _perspectiveName: string): void {\n }\n\n async linkifyObject(_nodeIndex: number): Promise {\n return null;\n }\n\n viewForProfile(profile: ProfileHeader): UI.Widget.Widget {\n const index = this.indexOfViewForProfile(profile);\n if (index !== -1) {\n return this.profileToView[index].view;\n }\n const view = profile.createView(this);\n view.element.classList.add('profile-view');\n this.profileToView.push({profile: profile, view: view});\n return view;\n }\n\n indexOfViewForProfile(profile: ProfileHeader): number {\n return this.profileToView.findIndex(item => item.profile === profile);\n }\n\n closeVisibleView(): void {\n UI.Context.Context.instance().setFlavor(ProfileHeader, null);\n this.#saveToFileAction.setEnabled(false);\n if (this.visibleView) {\n this.visibleView.detach();\n }\n delete this.visibleView;\n }\n\n override focus(): void {\n this.sidebarTree.focus();\n }\n\n override wasShown(): void {\n super.wasShown();\n UI.Context.Context.instance().setFlavor(ProfilesPanel, this);\n this.registerCSSFiles([objectValueStyles, profilesPanelStyles, heapProfilerStyles]);\n this.sidebarTree.registerCSSFiles([profilesSidebarTreeStyles]);\n }\n\n override willHide(): void {\n UI.Context.Context.instance().setFlavor(ProfilesPanel, null);\n super.willHide();\n }\n}\n\nexport class ProfileTypeSidebarSection extends UI.TreeOutline.TreeElement {\n dataDisplayDelegate: DataDisplayDelegate;\n readonly profileTreeElements: ProfileSidebarTreeElement[];\n profileGroups: {\n [x: string]: ProfileGroup,\n };\n\n constructor(dataDisplayDelegate: DataDisplayDelegate, profileType: ProfileType) {\n super(profileType.treeItemTitle, true);\n this.selectable = false;\n this.dataDisplayDelegate = dataDisplayDelegate;\n this.profileTreeElements = [];\n this.profileGroups = {};\n this.expand();\n this.hidden = true;\n this.setCollapsible(false);\n }\n\n addProfileHeader(profile: ProfileHeader): void {\n this.hidden = false;\n const profileType = profile.profileType();\n let sidebarParent: (ProfileGroupSidebarTreeElement|null)|this = this;\n const profileTreeElement =\n (profile.createSidebarTreeElement(this.dataDisplayDelegate) as ProfileSidebarTreeElement);\n this.profileTreeElements.push(profileTreeElement);\n\n if (!profile.fromFile() && profileType.profileBeingRecorded() !== profile) {\n const profileTitle = profile.title;\n let group: ProfileGroup = this.profileGroups[profileTitle];\n if (!group) {\n group = new ProfileGroup();\n this.profileGroups[profileTitle] = group;\n }\n group.profileSidebarTreeElements.push(profileTreeElement);\n\n const groupSize = group.profileSidebarTreeElements.length;\n if (groupSize === 2) {\n // Make a group UI.TreeOutline.TreeElement now that there are 2 profiles.\n group.sidebarTreeElement = new ProfileGroupSidebarTreeElement(this.dataDisplayDelegate, profile.title);\n\n const firstProfileTreeElement = group.profileSidebarTreeElements[0];\n // Insert at the same index for the first profile of the group.\n const index = this.children().indexOf(firstProfileTreeElement);\n this.insertChild(group.sidebarTreeElement, index);\n\n // Move the first profile to the group.\n const selected = firstProfileTreeElement.selected;\n this.removeChild(firstProfileTreeElement);\n group.sidebarTreeElement.appendChild(firstProfileTreeElement);\n if (selected) {\n firstProfileTreeElement.revealAndSelect();\n }\n\n firstProfileTreeElement.setSmall(true);\n firstProfileTreeElement.setMainTitle(i18nString(UIStrings.runD, {PH1: 1}));\n\n if (this.treeOutline) {\n this.treeOutline.element.classList.add('some-expandable');\n }\n }\n\n if (groupSize >= 2) {\n sidebarParent = group.sidebarTreeElement;\n profileTreeElement.setSmall(true);\n profileTreeElement.setMainTitle(i18nString(UIStrings.runD, {PH1: groupSize}));\n }\n }\n\n if (sidebarParent) {\n sidebarParent.appendChild(profileTreeElement);\n }\n }\n\n removeProfileHeader(profile: ProfileHeader): boolean {\n const index = this.sidebarElementIndex(profile);\n if (index === -1) {\n return false;\n }\n const profileTreeElement = this.profileTreeElements[index];\n this.profileTreeElements.splice(index, 1);\n\n let sidebarParent: (ProfileGroupSidebarTreeElement|null)|this = this;\n const group = this.profileGroups[profile.title];\n if (group) {\n const groupElements = group.profileSidebarTreeElements;\n groupElements.splice(groupElements.indexOf(profileTreeElement), 1);\n if (groupElements.length === 1) {\n // Move the last profile out of its group and remove the group.\n const pos = sidebarParent.children().indexOf((group.sidebarTreeElement as ProfileGroupSidebarTreeElement));\n if (group.sidebarTreeElement) {\n group.sidebarTreeElement.removeChild(groupElements[0]);\n }\n this.insertChild(groupElements[0], pos);\n groupElements[0].setSmall(false);\n groupElements[0].setMainTitle(profile.title);\n if (group.sidebarTreeElement) {\n this.removeChild(group.sidebarTreeElement);\n }\n }\n if (groupElements.length !== 0) {\n sidebarParent = group.sidebarTreeElement;\n }\n }\n if (sidebarParent) {\n sidebarParent.removeChild(profileTreeElement);\n }\n profileTreeElement.dispose();\n\n if (this.childCount()) {\n return false;\n }\n this.hidden = true;\n return true;\n }\n\n sidebarElementForProfile(profile: ProfileHeader): ProfileSidebarTreeElement|null {\n const index = this.sidebarElementIndex(profile);\n return index === -1 ? null : this.profileTreeElements[index];\n }\n\n sidebarElementIndex(profile: ProfileHeader): number {\n const elements = this.profileTreeElements;\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].profile === profile) {\n return i;\n }\n }\n return -1;\n }\n\n override onattach(): void {\n this.listItemElement.classList.add('profiles-tree-section');\n }\n}\n\nexport class ProfileGroup {\n profileSidebarTreeElements: ProfileSidebarTreeElement[];\n sidebarTreeElement: ProfileGroupSidebarTreeElement|null;\n constructor() {\n this.profileSidebarTreeElements = [];\n this.sidebarTreeElement = null;\n }\n}\n\nexport class ProfileGroupSidebarTreeElement extends UI.TreeOutline.TreeElement {\n readonly dataDisplayDelegate: DataDisplayDelegate;\n profileTitle: string;\n override toggleOnClick: boolean;\n\n constructor(dataDisplayDelegate: DataDisplayDelegate, title: string) {\n super('', true);\n this.selectable = false;\n this.dataDisplayDelegate = dataDisplayDelegate;\n this.profileTitle = title;\n this.expand();\n this.toggleOnClick = true;\n }\n\n override onselect(): boolean {\n const hasChildren = this.childCount() > 0;\n if (hasChildren) {\n const lastChild = this.lastChild();\n if (lastChild instanceof ProfileSidebarTreeElement) {\n this.dataDisplayDelegate.showProfile(lastChild.profile);\n }\n }\n return hasChildren;\n }\n\n override onattach(): void {\n this.listItemElement.classList.add('profile-group-sidebar-tree-item');\n this.listItemElement.createChild('div', 'icon');\n this.listItemElement.createChild('div', 'titles no-subtitle')\n .createChild('span', 'title-container')\n .createChild('span', 'title')\n .textContent = this.profileTitle;\n }\n}\n\nexport class ProfilesSidebarTreeElement extends UI.TreeOutline.TreeElement {\n readonly panel: ProfilesPanel;\n\n constructor(panel: ProfilesPanel) {\n super('', false);\n this.selectable = true;\n this.panel = panel;\n }\n\n override onselect(): boolean {\n this.panel.showLauncherView();\n return true;\n }\n\n override onattach(): void {\n this.listItemElement.classList.add('profile-launcher-view-tree-item');\n this.listItemElement.createChild('div', 'icon');\n this.listItemElement.createChild('div', 'titles no-subtitle')\n .createChild('span', 'title-container')\n .createChild('span', 'title')\n .textContent = i18nString(UIStrings.profiles);\n }\n}\n\nlet jsProfilerPanelInstance: JSProfilerPanel;\n\nexport class JSProfilerPanel extends ProfilesPanel implements UI.ActionRegistration.ActionDelegate {\n constructor() {\n const registry = instance;\n super('js_profiler', [registry.cpuProfileType], 'profiler.js-toggle-recording');\n this.splitWidget().mainWidget()?.setMinimumSize(350, 0);\n this.#showDeprecationInfobar();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): JSProfilerPanel {\n const {forceNew} = opts;\n if (!jsProfilerPanelInstance || forceNew) {\n jsProfilerPanelInstance = new JSProfilerPanel();\n }\n return jsProfilerPanelInstance;\n }\n\n #showDeprecationInfobar(): void {\n function openFeedbackLink(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n 'https://crbug.com/1354548' as Platform.DevToolsPath.UrlString);\n }\n\n async function openPerformancePanel(): Promise {\n await UI.InspectorView.InspectorView.instance().showPanel('timeline');\n }\n\n const infobar = new UI.Infobar.Infobar(\n UI.Infobar.Type.Warning, /* text */ i18nString(UIStrings.deprecationWarnMsg), /* actions? */\n [\n {\n text: i18nString(UIStrings.feedback),\n highlight: false,\n delegate: openFeedbackLink,\n dismiss: false,\n },\n {\n text: i18nString(UIStrings.goToPerformancePanel),\n highlight: true,\n delegate: openPerformancePanel,\n dismiss: false,\n },\n ],\n /* disableSetting? */ undefined,\n /* isCloseable TODO(crbug.com/1354548) Remove the prop from infobar with JS Profiler deprecation */ false);\n infobar.setParentView(this);\n this.splitWidget().mainWidget()?.element.prepend(infobar.element);\n }\n\n override wasShown(): void {\n super.wasShown();\n UI.Context.Context.instance().setFlavor(JSProfilerPanel, this);\n }\n\n override willHide(): void {\n UI.Context.Context.instance().setFlavor(JSProfilerPanel, null);\n super.willHide();\n }\n\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n const panel = UI.Context.Context.instance().flavor(JSProfilerPanel);\n if (panel instanceof JSProfilerPanel) {\n panel.toggleRecord();\n } else {\n throw new Error('non-null JSProfilerPanel expected!');\n }\n return true;\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n switch (actionId) {\n case 'profiler.clear-all': {\n const profilesPanel = context.flavor(ProfilesPanel);\n if (profilesPanel !== null) {\n profilesPanel.reset();\n return true;\n }\n return false;\n }\n case 'profiler.load-from-file': {\n const profilesPanel = context.flavor(ProfilesPanel);\n if (profilesPanel !== null) {\n profilesPanel.showLoadFromFileDialog();\n return true;\n }\n return false;\n }\n case 'profiler.save-to-file': {\n const profile = context.flavor(ProfileHeader);\n if (profile !== null) {\n profile.saveToFile();\n return true;\n }\n return false;\n }\n case 'profiler.delete-profile': {\n const profile = context.flavor(ProfileHeader);\n if (profile !== null) {\n profile.profileType().removeProfile(profile);\n return true;\n }\n return false;\n }\n }\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/protocol_monitor/ProtocolMonitor.d.ts b/public/panels/protocol_monitor/ProtocolMonitor.d.ts index 57772bce4..afb0323e7 100644 --- a/public/panels/protocol_monitor/ProtocolMonitor.d.ts +++ b/public/panels/protocol_monitor/ProtocolMonitor.d.ts @@ -55,9 +55,6 @@ export declare class ProtocolMonitorDataGrid extends ProtocolMonitorDataGrid_bas readonly selector: UI.Toolbar.ToolbarComboBox; constructor(splitWidget: UI.SplitWidget.SplitWidget); onCommandSend(command: string, parameters: object, target?: string): void; - static instance(opts?: { - forceNew: null | boolean; - }): ProtocolMonitorImpl; wasShown(): void; private setRecording; private targetToString; @@ -68,9 +65,6 @@ export declare class ProtocolMonitorDataGrid extends ProtocolMonitorDataGrid_bas export declare class ProtocolMonitorImpl extends UI.Widget.VBox { #private; constructor(); - static instance(opts?: { - forceNew: null | boolean; - }): ProtocolMonitorImpl; } export declare class CommandAutocompleteSuggestionProvider { #private; diff --git a/public/panels/protocol_monitor/ProtocolMonitor.js b/public/panels/protocol_monitor/ProtocolMonitor.js index ff8159169..5dfdd4659 100644 --- a/public/panels/protocol_monitor/ProtocolMonitor.js +++ b/public/panels/protocol_monitor/ProtocolMonitor.js @@ -405,13 +405,6 @@ export class ProtocolMonitorDataGrid extends Common.ObjectWrapper.eventMixin(UI. // @ts-ignore test.sendRawMessage(command, parameters, () => { }, sessionId); } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!protocolMonitorImplInstance || forceNew) { - protocolMonitorImplInstance = new ProtocolMonitorImpl(); - } - return protocolMonitorImplInstance; - } wasShown() { if (this.started) { return; @@ -571,7 +564,6 @@ export class ProtocolMonitorDataGrid extends Common.ObjectWrapper.eventMixin(UI. void stream.close(); } } -let protocolMonitorImplInstance; export class ProtocolMonitorImpl extends UI.Widget.VBox { #split; #editorWidget = new EditorWidget(); @@ -596,13 +588,6 @@ export class ProtocolMonitorImpl extends UI.Widget.VBox { this.#protocolMonitorDataGrid.onCommandSend(event.data.command, event.data.parameters, event.data.targetId); }); } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!protocolMonitorImplInstance || forceNew) { - protocolMonitorImplInstance = new ProtocolMonitorImpl(); - } - return protocolMonitorImplInstance; - } } export class CommandAutocompleteSuggestionProvider { #maxHistorySize = 200; diff --git a/public/panels/protocol_monitor/ProtocolMonitor.js.map b/public/panels/protocol_monitor/ProtocolMonitor.js.map index 3a3d5ed51..600e40aea 100644 --- a/public/panels/protocol_monitor/ProtocolMonitor.js.map +++ b/public/panels/protocol_monitor/ProtocolMonitor.js.map @@ -1 +1 @@ -{"version":3,"file":"ProtocolMonitor.js","sourceRoot":"","sources":["../../../../../../front_end/panels/protocol_monitor/ProtocolMonitor.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAC7B,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;QACzD,IAAI,CAAC,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QACtD,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,WAA6D,CAAC;QAC5F,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC,KAAY,EAAE,EAAE;YACnG,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,WAAW,EAAG,KAAiD,CAAC,IAAI,CAAC,CAAC;QAC7G,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,qEAAqE;IACrE,mEAAmE;IACnE,yFAAyF;IACzF,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI;QACF,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC1B;IAAC,OAAO,GAAG,EAAE;KACb;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7E,MAAM,UAAU,GAAG,IAAI,EAAE,UAAU,IAAI,IAAI,EAAE,MAAM,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;IAE3F,OAAO,EAAC,OAAO,EAAE,UAAU,EAAC,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright 2018 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as ProtocolClient from '../../core/protocol_client/protocol_client.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as DataGrid from '../../ui/components/data_grid/data_grid.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as LitHtml from '../../ui/lit-html/lit-html.js';\n\nimport * as Components from './components/components.js';\nimport protocolMonitorStyles from './protocolMonitor.css.js';\n\nconst UIStrings = {\n /**\n *@description Text for one or a group of functions\n */\n method: 'Method',\n /**\n * @description Text in Protocol Monitor. Title for a table column which shows in which direction\n * the particular protocol message was travelling. Values in this column will either be 'sent' or\n * 'received'.\n */\n type: 'Type',\n /**\n * @description Text in Protocol Monitor of the Protocol Monitor tab. Noun relating to a network request.\n */\n request: 'Request',\n /**\n *@description Title of a cell content in protocol monitor. A Network response refers to the act of acknowledging a\n network request. Should not be confused with answer.\n */\n response: 'Response',\n /**\n *@description Text for timestamps of items\n */\n timestamp: 'Timestamp',\n /**\n *@description Title of a cell content in protocol monitor. It describes the time between sending a request and receiving a response.\n */\n elapsedTime: 'Elapsed time',\n /**\n *@description Text in Protocol Monitor of the Protocol Monitor tab\n */\n target: 'Target',\n /**\n *@description Text to record a series of actions for analysis\n */\n record: 'Record',\n /**\n *@description Text to clear everything\n */\n clearAll: 'Clear all',\n /**\n *@description Text to filter result items\n */\n filter: 'Filter',\n /**\n *@description Text for the documentation of something\n */\n documentation: 'Documentation',\n /**\n *@description Text to open the CDP editor with the selected command\n */\n editAndResend: 'Edit and resend',\n /**\n *@description Cell text content in Protocol Monitor of the Protocol Monitor tab\n *@example {30} PH1\n */\n sMs: '{PH1} ms',\n /**\n *@description Text in Protocol Monitor of the Protocol Monitor tab\n */\n noMessageSelected: 'No message selected',\n /**\n *@description Text in Protocol Monitor for the save button\n */\n save: 'Save',\n /**\n *@description Text in Protocol Monitor to describe the sessions column\n */\n session: 'Session',\n /**\n *@description A placeholder for an input in Protocol Monitor. The input accepts commands that are sent to the backend on Enter. CDP stands for Chrome DevTools Protocol.\n */\n sendRawCDPCommand: 'Send a raw `CDP` command',\n /**\n * @description A tooltip text for the input in the Protocol Monitor panel. The tooltip describes what format is expected.\n */\n sendRawCDPCommandExplanation:\n 'Format: `\\'Domain.commandName\\'` for a command without parameters, or `\\'{\"command\":\"Domain.commandName\", \"parameters\": {...}}\\'` as a JSON object for a command with parameters. `\\'cmd\\'`/`\\'method\\'` and `\\'args\\'`/`\\'params\\'`/`\\'arguments\\'` are also supported as alternative keys for the `JSON` object.',\n\n /**\n * @description A label for a select input that allows selecting a CDP target to send the commands to.\n */\n selectTarget: 'Select a target',\n /**\n * @description Tooltip for the the console sidebar toggle in the Console panel. Command to\n * open/show the sidebar.\n */\n showCDPCommandEditor: 'Show CDP command editor',\n /**\n * @description Tooltip for the the console sidebar toggle in the Console panel. Command to\n * open/show the sidebar.\n */\n hideCDPCommandEditor: 'Hide CDP command editor',\n /**\n * @description Screen reader announcement when the sidebar is shown in the Console panel.\n */\n CDPCommandEditorShown: 'CDP command editor shown',\n /**\n * @description Screen reader announcement when the sidebar is hidden in the Console panel.\n */\n CDPCommandEditorHidden: 'CDP command editor hidden',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/protocol_monitor/ProtocolMonitor.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst timeRenderer = (value: DataGrid.DataGridUtils.CellValue): LitHtml.TemplateResult => {\n return LitHtml.html`${i18nString(UIStrings.sMs, {PH1: String(value)})}`;\n};\n\nexport const buildProtocolMetadata = (domains: Iterable):\n Map => {\n const metadataByCommand:\n Map =\n new Map();\n for (const domain of domains) {\n for (const command of Object.keys(domain.metadata)) {\n metadataByCommand.set(command, domain.metadata[command]);\n }\n }\n return metadataByCommand;\n };\n\nconst metadataByCommand = buildProtocolMetadata(\n ProtocolClient.InspectorBackend.inspectorBackend.agentPrototypes.values() as Iterable);\nconst typesByName = ProtocolClient.InspectorBackend.inspectorBackend.typeMap;\nconst enumsByName = ProtocolClient.InspectorBackend.inspectorBackend.enumMap;\nexport interface Message {\n id?: number;\n method: string;\n error: Object;\n result: Object;\n params: Object;\n sessionId?: string;\n}\nexport interface LogMessage {\n id?: number;\n domain: string;\n method: string;\n params: Object;\n type: 'send'|'recv';\n}\n\nexport interface ProtocolDomain {\n readonly domain: string;\n readonly metadata: {\n [commandName: string]: {parameters: Components.JSONEditor.Parameter[], description: string, replyArgs: string[]},\n };\n}\n\nexport class ProtocolMonitorDataGrid extends Common.ObjectWrapper.eventMixin(\n UI.Widget.VBox) {\n private started: boolean;\n private startTime: number;\n private readonly requestTimeForId: Map;\n private readonly dataGridRowForId: Map;\n private readonly infoWidget: InfoWidget;\n private readonly dataGridIntegrator: DataGrid.DataGridControllerIntegrator.DataGridControllerIntegrator;\n private readonly filterParser: TextUtils.TextUtils.FilterParser;\n private readonly suggestionBuilder: UI.FilterSuggestionBuilder.FilterSuggestionBuilder;\n private readonly textFilterUI: UI.Toolbar.ToolbarInput;\n readonly selector: UI.Toolbar.ToolbarComboBox;\n #commandAutocompleteSuggestionProvider = new CommandAutocompleteSuggestionProvider();\n #selectedTargetId?: string;\n #commandInput: UI.Toolbar.ToolbarInput;\n constructor(splitWidget: UI.SplitWidget.SplitWidget) {\n super(true);\n this.started = false;\n this.startTime = 0;\n this.dataGridRowForId = new Map();\n this.requestTimeForId = new Map();\n const topToolbar = new UI.Toolbar.Toolbar('protocol-monitor-toolbar', this.contentElement);\n this.contentElement.classList.add('protocol-monitor');\n const recordButton = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.record), 'record-start', 'record-stop');\n recordButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n recordButton.setToggled(!recordButton.toggled());\n this.setRecording(recordButton.toggled());\n });\n recordButton.setToggleWithRedColor(true);\n topToolbar.appendToolbarItem(recordButton);\n recordButton.setToggled(true);\n\n const clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clearAll), 'clear');\n clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.dataGridIntegrator.update({...this.dataGridIntegrator.data(), rows: []});\n this.infoWidget.render(null);\n });\n topToolbar.appendToolbarItem(clearButton);\n\n const saveButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.save), 'download');\n saveButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n void this.saveAsFile();\n });\n topToolbar.appendToolbarItem(saveButton);\n this.selector = this.#createTargetSelector();\n this.infoWidget = new InfoWidget();\n const dataGridInitialData: DataGrid.DataGridController.DataGridControllerData = {\n paddingRowsCount: 100,\n showScrollbar: true,\n columns: [\n {\n id: 'type',\n title: i18nString(UIStrings.type),\n sortable: true,\n widthWeighting: 1,\n visible: true,\n hideable: true,\n styles: {\n 'text-align': 'center',\n },\n },\n {\n id: 'method',\n title: i18nString(UIStrings.method),\n sortable: false,\n widthWeighting: 5,\n visible: true,\n hideable: false,\n },\n {\n id: 'request',\n title: i18nString(UIStrings.request),\n sortable: false,\n widthWeighting: 5,\n visible: true,\n hideable: true,\n },\n {\n id: 'response',\n title: i18nString(UIStrings.response),\n sortable: false,\n widthWeighting: 5,\n visible: true,\n hideable: true,\n },\n {\n id: 'elapsedTime',\n title: i18nString(UIStrings.elapsedTime),\n sortable: true,\n widthWeighting: 2,\n visible: false,\n hideable: true,\n },\n {\n id: 'timestamp',\n title: i18nString(UIStrings.timestamp),\n sortable: true,\n widthWeighting: 5,\n visible: false,\n hideable: true,\n },\n {\n id: 'target',\n title: i18nString(UIStrings.target),\n sortable: true,\n widthWeighting: 5,\n visible: false,\n hideable: true,\n },\n {\n id: 'session',\n title: i18nString(UIStrings.session),\n sortable: true,\n widthWeighting: 5,\n visible: false,\n hideable: true,\n },\n ],\n rows: [],\n contextMenus: {\n bodyRow:\n (menu: UI.ContextMenu.ContextMenu, columns: readonly DataGrid.DataGridUtils.Column[],\n row: Readonly): void => {\n const methodColumn = DataGrid.DataGridUtils.getRowEntryForColumnId(row, 'method');\n const typeColumn = DataGrid.DataGridUtils.getRowEntryForColumnId(row, 'type');\n /**\n * You can click the \"Edit and resend\" item in the context menu to be\n * taken to the CDP editor with the filled with the selected command.\n */\n menu.editSection().appendItem(i18nString(UIStrings.editAndResend), () => {\n if (!methodColumn.value) {\n return;\n }\n const parameters = this.infoWidget.request;\n const targetId = this.infoWidget.targetId;\n const command = String(methodColumn.value);\n if (splitWidget.showMode() === UI.SplitWidget.ShowMode.OnlyMain) {\n splitWidget.toggleSidebar();\n }\n this.dispatchEventToListeners(Events.CommandChange, {command, parameters, targetId});\n });\n\n /**\n * You can click the \"Filter\" item in the context menu to filter the\n * protocol monitor entries to those that match the method of the\n * current row.\n */\n menu.editSection().appendItem(i18nString(UIStrings.filter), () => {\n const methodColumn = DataGrid.DataGridUtils.getRowEntryForColumnId(row, 'method');\n this.textFilterUI.setValue(`method:${methodColumn.value}`, true);\n });\n\n /**\n * You can click the \"Documentation\" item in the context menu to be\n * taken to the CDP Documentation site entry for the given method.\n */\n menu.footerSection().appendItem(i18nString(UIStrings.documentation), () => {\n if (!methodColumn.value) {\n return;\n }\n const [domain, method] = String(methodColumn.value).split('.');\n const type = typeColumn.value === 'sent' ? 'method' : 'event';\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n `https://chromedevtools.github.io/devtools-protocol/tot/${domain}#${type}-${method}` as\n Platform.DevToolsPath.UrlString);\n });\n },\n },\n };\n\n this.dataGridIntegrator =\n new DataGrid.DataGridControllerIntegrator.DataGridControllerIntegrator(dataGridInitialData);\n\n this.dataGridIntegrator.dataGrid.addEventListener('cellfocused', event => {\n const focusedRow = event.data.row;\n const infoWidgetData = {\n request: DataGrid.DataGridUtils.getRowEntryForColumnId(focusedRow, 'request'),\n response: DataGrid.DataGridUtils.getRowEntryForColumnId(focusedRow, 'response'),\n target: DataGrid.DataGridUtils.getRowEntryForColumnId(focusedRow, 'target'),\n type:\n DataGrid.DataGridUtils.getRowEntryForColumnId(focusedRow, 'type').title as 'sent' | 'received' | undefined,\n selectedTab: event.data.cell.columnId === 'request' ? 'request' as const:\n event.data.cell.columnId === 'response' ? 'response' as const:\n undefined,\n };\n this.infoWidget.render(infoWidgetData);\n });\n\n this.dataGridIntegrator.dataGrid.addEventListener('newuserfiltertext', event => {\n this.textFilterUI.setValue(event.data.filterText, /* notify listeners */ true);\n });\n const split = new UI.SplitWidget.SplitWidget(true, true, 'protocol-monitor-panel-split', 250);\n split.show(this.contentElement);\n split.setMainWidget(this.dataGridIntegrator);\n split.setSidebarWidget(this.infoWidget);\n const keys = ['method', 'request', 'response', 'type', 'target', 'session'];\n this.filterParser = new TextUtils.TextUtils.FilterParser(keys);\n this.suggestionBuilder = new UI.FilterSuggestionBuilder.FilterSuggestionBuilder(keys);\n\n this.textFilterUI = new UI.Toolbar.ToolbarInput(\n i18nString(UIStrings.filter), '', 1, .2, '', this.suggestionBuilder.completions.bind(this.suggestionBuilder),\n true);\n this.textFilterUI.addEventListener(UI.Toolbar.ToolbarInput.Event.TextChanged, event => {\n const query = event.data as string;\n const filters = this.filterParser.parse(query);\n this.dataGridIntegrator.update({...this.dataGridIntegrator.data(), filters});\n });\n const bottomToolbar = new UI.Toolbar.Toolbar('protocol-monitor-bottom-toolbar', this.contentElement);\n bottomToolbar.appendToolbarItem(splitWidget.createShowHideSidebarButton(\n i18nString(UIStrings.showCDPCommandEditor), i18nString(UIStrings.hideCDPCommandEditor),\n i18nString(UIStrings.CDPCommandEditorShown), i18nString(UIStrings.CDPCommandEditorHidden)));\n this.#commandInput = this.#createCommandInput();\n bottomToolbar.appendToolbarItem(this.#commandInput);\n bottomToolbar.appendToolbarItem(this.selector);\n const shadowRoot = bottomToolbar.element?.shadowRoot;\n const inputBar = shadowRoot?.querySelector('.toolbar-input');\n const tabSelector = shadowRoot?.querySelector('.toolbar-select-container');\n\n const populateToolbarInput = (): void => {\n const editorWidget = splitWidget.sidebarWidget();\n if (!(editorWidget instanceof EditorWidget)) {\n return;\n }\n const commandJson = editorWidget.jsonEditor.getCommandJson();\n const targetId = editorWidget.jsonEditor.targetId;\n if (targetId) {\n const selectedIndex = this.selector.options().findIndex(option => option.value === targetId);\n if (selectedIndex !== -1) {\n this.selector.setSelectedIndex(selectedIndex);\n this.#selectedTargetId = targetId;\n }\n }\n if (commandJson) {\n this.#commandInput.setValue(commandJson);\n }\n };\n\n splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, (event => {\n if (event.data === 'OnlyMain') {\n populateToolbarInput();\n\n inputBar?.setAttribute('style', 'display:flex; flex-grow: 1');\n tabSelector?.setAttribute('style', 'display:flex');\n } else {\n const {command, parameters} = parseCommandInput(this.#commandInput.value());\n this.dispatchEventToListeners(\n Events.CommandChange, {command, parameters, targetId: this.#selectedTargetId});\n inputBar?.setAttribute('style', 'display:none');\n tabSelector?.setAttribute('style', 'display:none');\n }\n }));\n topToolbar.appendToolbarItem(this.textFilterUI);\n }\n\n #createCommandInput(): UI.Toolbar.ToolbarInput {\n const placeholder = i18nString(UIStrings.sendRawCDPCommand);\n const accessiblePlaceholder = placeholder;\n const growFactor = 1;\n const shrinkFactor = 0.2;\n const tooltip = i18nString(UIStrings.sendRawCDPCommandExplanation);\n const input = new UI.Toolbar.ToolbarInput(\n placeholder, accessiblePlaceholder, growFactor, shrinkFactor, tooltip,\n this.#commandAutocompleteSuggestionProvider.buildTextPromptCompletions, false);\n input.addEventListener(UI.Toolbar.ToolbarInput.Event.EnterPressed, () => {\n this.#commandAutocompleteSuggestionProvider.addEntry(input.value());\n const {command, parameters} = parseCommandInput(input.value());\n this.onCommandSend(command, parameters, this.#selectedTargetId);\n });\n return input;\n }\n\n #createTargetSelector(): UI.Toolbar.ToolbarComboBox {\n const selector = new UI.Toolbar.ToolbarComboBox(() => {\n this.#selectedTargetId = selector.selectedOption()?.value;\n }, i18nString(UIStrings.selectTarget));\n selector.setMaxWidth(120);\n const targetManager = SDK.TargetManager.TargetManager.instance();\n const syncTargets = (): void => {\n selector.removeOptions();\n for (const target of targetManager.targets()) {\n selector.createOption(`${target.name()} (${target.inspectedURL()})`, target.id());\n }\n };\n targetManager.addEventListener(SDK.TargetManager.Events.AvailableTargetsChanged, syncTargets);\n syncTargets();\n return selector;\n }\n\n onCommandSend(command: string, parameters: object, target?: string): void {\n const test = ProtocolClient.InspectorBackend.test;\n const targetManager = SDK.TargetManager.TargetManager.instance();\n const selectedTarget = target ? targetManager.targetById(target) : null;\n const sessionId = selectedTarget ? selectedTarget.sessionId : '';\n // TS thinks that properties are read-only because\n // in TS test is defined as a namespace.\n // @ts-ignore\n test.sendRawMessage(command, parameters, () => {}, sessionId);\n }\n\n static instance(opts: {forceNew: null|boolean} = {forceNew: null}): ProtocolMonitorImpl {\n const {forceNew} = opts;\n if (!protocolMonitorImplInstance || forceNew) {\n protocolMonitorImplInstance = new ProtocolMonitorImpl();\n }\n\n return protocolMonitorImplInstance;\n }\n\n override wasShown(): void {\n if (this.started) {\n return;\n }\n this.registerCSSFiles([protocolMonitorStyles]);\n this.started = true;\n this.startTime = Date.now();\n this.setRecording(true);\n }\n\n private setRecording(recording: boolean): void {\n const test = ProtocolClient.InspectorBackend.test;\n if (recording) {\n // TODO: TS thinks that properties are read-only because\n // in TS test is defined as a namespace.\n // @ts-ignore\n test.onMessageSent = this.messageSent.bind(this);\n // @ts-ignore\n test.onMessageReceived = this.messageReceived.bind(this);\n } else {\n // @ts-ignore\n test.onMessageSent = null;\n // @ts-ignore\n test.onMessageReceived = null;\n }\n }\n\n private targetToString(target: SDK.Target.Target|null): string {\n if (!target) {\n return '';\n }\n return target.decorateLabel(\n `${target.name()} ${target === SDK.TargetManager.TargetManager.instance().rootTarget() ? '' : target.id()}`);\n }\n\n private messageReceived(message: Message, target: ProtocolClient.InspectorBackend.TargetBase|null): void {\n if ('id' in message && message.id) {\n const existingRow = this.dataGridRowForId.get(message.id);\n if (!existingRow) {\n return;\n }\n const allExistingRows = this.dataGridIntegrator.data().rows;\n const matchingExistingRowIndex = allExistingRows.findIndex(r => existingRow === r);\n const newRowWithUpdate = {\n ...existingRow,\n cells: existingRow.cells.map(cell => {\n if (cell.columnId === 'response') {\n return {\n ...cell,\n value: JSON.stringify(message.result || message.error),\n\n };\n }\n\n if (cell.columnId === 'elapsedTime') {\n const requestTime = this.requestTimeForId.get(message.id as number);\n if (requestTime) {\n return {\n ...cell,\n value: Date.now() - requestTime,\n renderer: timeRenderer,\n };\n }\n }\n\n return cell;\n }),\n };\n\n const newRowsArray = [...this.dataGridIntegrator.data().rows];\n newRowsArray[matchingExistingRowIndex] = newRowWithUpdate;\n\n // Now we've updated the message, it won't be updated again, so we can delete it from the tracking map.\n this.dataGridRowForId.delete(message.id);\n this.dataGridIntegrator.update({\n ...this.dataGridIntegrator.data(),\n rows: newRowsArray,\n });\n return;\n }\n\n const sdkTarget = target as SDK.Target.Target | null;\n const responseIcon = new IconButton.Icon.Icon();\n responseIcon.data = {iconName: 'arrow-down', color: 'var(--icon-request)', width: '16px', height: '16px'};\n const newRow: DataGrid.DataGridUtils.Row = {\n cells: [\n {columnId: 'method', value: message.method, title: message.method},\n {columnId: 'request', value: '', renderer: DataGrid.DataGridRenderers.codeBlockRenderer},\n {\n columnId: 'response',\n value: JSON.stringify(message.params),\n renderer: DataGrid.DataGridRenderers.codeBlockRenderer,\n },\n {\n columnId: 'timestamp',\n value: Date.now() - this.startTime,\n renderer: timeRenderer,\n },\n {columnId: 'elapsedTime', value: ''},\n {columnId: 'type', value: responseIcon, title: 'received', renderer: DataGrid.DataGridRenderers.iconRenderer},\n {columnId: 'target', value: this.targetToString(sdkTarget)},\n {columnId: 'session', value: message.sessionId || ''},\n ],\n hidden: false,\n };\n\n this.dataGridIntegrator.update({\n ...this.dataGridIntegrator.data(),\n rows: this.dataGridIntegrator.data().rows.concat([newRow]),\n });\n }\n\n private messageSent(\n message: {domain: string, method: string, params: Object, id: number, sessionId?: string},\n target: ProtocolClient.InspectorBackend.TargetBase|null): void {\n const sdkTarget = target as SDK.Target.Target | null;\n const requestResponseIcon = new IconButton.Icon.Icon();\n requestResponseIcon\n .data = {iconName: 'arrow-up-down', color: 'var(--icon-request-response)', width: '16px', height: '16px'};\n const newRow: DataGrid.DataGridUtils.Row = {\n styles: {\n '--override-data-grid-row-background-color': 'var(--sys-color-surface3)',\n },\n cells: [\n {columnId: 'method', value: message.method, title: message.method},\n {\n columnId: 'request',\n value: JSON.stringify(message.params),\n renderer: DataGrid.DataGridRenderers.codeBlockRenderer,\n },\n {columnId: 'response', value: '(pending)', renderer: DataGrid.DataGridRenderers.codeBlockRenderer},\n {\n columnId: 'timestamp',\n value: Date.now() - this.startTime,\n renderer: timeRenderer,\n },\n {columnId: 'elapsedTime', value: '(pending)'},\n {\n columnId: 'type',\n value: requestResponseIcon,\n title: 'sent',\n renderer: DataGrid.DataGridRenderers.iconRenderer,\n },\n {columnId: 'target', value: String(sdkTarget?.id())},\n {columnId: 'session', value: message.sessionId || ''},\n ],\n hidden: false,\n };\n this.requestTimeForId.set(message.id, Date.now());\n this.dataGridRowForId.set(message.id, newRow);\n this.dataGridIntegrator.update({\n ...this.dataGridIntegrator.data(),\n rows: this.dataGridIntegrator.data().rows.concat([newRow]),\n });\n }\n\n private async saveAsFile(): Promise {\n const now = new Date();\n const fileName = 'ProtocolMonitor-' + Platform.DateUtilities.toISO8601Compact(now) + '.json' as\n Platform.DevToolsPath.RawPathString;\n const stream = new Bindings.FileUtils.FileOutputStream();\n\n const accepted = await stream.open(fileName);\n if (!accepted) {\n return;\n }\n\n const rowEntries = [];\n for (const row of this.dataGridIntegrator.data().rows) {\n const rowEntry = Object.fromEntries(row.cells.map(cell => ([cell.columnId, cell.value])));\n rowEntries.push(rowEntry);\n }\n\n void stream.write(JSON.stringify(rowEntries, null, ' '));\n void stream.close();\n }\n}\n\nlet protocolMonitorImplInstance: ProtocolMonitorImpl;\nexport class ProtocolMonitorImpl extends UI.Widget.VBox {\n #split: UI.SplitWidget.SplitWidget;\n #editorWidget = new EditorWidget();\n #protocolMonitorDataGrid: ProtocolMonitorDataGrid;\n // This width corresponds to the optimal width to use the editor properly\n // It is randomly chosen\n #sideBarMinWidth = 400;\n constructor() {\n super(true);\n this.#split =\n new UI.SplitWidget.SplitWidget(true, false, 'protocol-monitor-split-container', this.#sideBarMinWidth);\n this.#split.show(this.contentElement);\n this.#protocolMonitorDataGrid = new ProtocolMonitorDataGrid(this.#split);\n this.#protocolMonitorDataGrid.addEventListener(Events.CommandChange, event => {\n this.#editorWidget.jsonEditor.displayCommand(event.data.command, event.data.parameters, event.data.targetId);\n });\n\n this.#editorWidget.element.style.overflow = 'hidden';\n this.#split.setMainWidget(this.#protocolMonitorDataGrid);\n this.#split.setSidebarWidget(this.#editorWidget);\n this.#split.hideSidebar(true);\n this.#editorWidget.addEventListener(Events.CommandSent, event => {\n this.#protocolMonitorDataGrid.onCommandSend(event.data.command, event.data.parameters, event.data.targetId);\n });\n }\n\n static instance(opts: {forceNew: null|boolean} = {forceNew: null}): ProtocolMonitorImpl {\n const {forceNew} = opts;\n if (!protocolMonitorImplInstance || forceNew) {\n protocolMonitorImplInstance = new ProtocolMonitorImpl();\n }\n return protocolMonitorImplInstance;\n }\n}\n\nexport class CommandAutocompleteSuggestionProvider {\n #maxHistorySize = 200;\n #commandHistory = new Set();\n\n constructor(maxHistorySize?: number) {\n if (maxHistorySize !== undefined) {\n this.#maxHistorySize = maxHistorySize;\n }\n }\n\n buildTextPromptCompletions =\n async(expression: string, prefix: string, force?: boolean): Promise => {\n if (!prefix && !force && expression) {\n return [];\n }\n\n const newestToOldest = [...this.#commandHistory].reverse();\n newestToOldest.push(...metadataByCommand.keys());\n return newestToOldest.filter(cmd => cmd.startsWith(prefix)).map(text => ({\n text,\n }));\n };\n\n addEntry(value: string): void {\n if (this.#commandHistory.has(value)) {\n this.#commandHistory.delete(value);\n }\n this.#commandHistory.add(value);\n if (this.#commandHistory.size > this.#maxHistorySize) {\n const earliestEntry = this.#commandHistory.values().next().value;\n this.#commandHistory.delete(earliestEntry);\n }\n }\n}\n\nexport class InfoWidget extends UI.Widget.VBox {\n private readonly tabbedPane: UI.TabbedPane.TabbedPane;\n request: {[x: string]: unknown};\n targetId = '';\n constructor() {\n super();\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n this.tabbedPane.appendTab('request', i18nString(UIStrings.request), new UI.Widget.Widget());\n this.tabbedPane.appendTab('response', i18nString(UIStrings.response), new UI.Widget.Widget());\n this.tabbedPane.show(this.contentElement);\n this.tabbedPane.selectTab('response');\n this.request = {};\n this.render(null);\n }\n\n render(data: {\n request: DataGrid.DataGridUtils.Cell|undefined,\n response: DataGrid.DataGridUtils.Cell|undefined,\n target: DataGrid.DataGridUtils.Cell|undefined,\n type: 'sent'|'received'|undefined,\n selectedTab: 'request'|'response'|undefined,\n }|null): void {\n if (!data || !data.request || !data.response || !data.target) {\n this.tabbedPane.changeTabView('request', new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noMessageSelected)));\n this.tabbedPane.changeTabView(\n 'response', new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noMessageSelected)));\n return;\n }\n\n const requestEnabled = data && data.type && data.type === 'sent';\n this.tabbedPane.setTabEnabled('request', Boolean(requestEnabled));\n if (!requestEnabled) {\n this.tabbedPane.selectTab('response');\n }\n\n const requestParsed = JSON.parse(String(data.request.value) || 'null');\n this.request = requestParsed;\n this.targetId = String(data.target.value);\n this.tabbedPane.changeTabView('request', SourceFrame.JSONView.JSONView.createViewSync(requestParsed));\n const responseParsed =\n data.response.value === '(pending)' ? null : JSON.parse(String(data.response.value) || 'null');\n this.tabbedPane.changeTabView('response', SourceFrame.JSONView.JSONView.createViewSync(responseParsed));\n if (data.selectedTab) {\n this.tabbedPane.selectTab(data.selectedTab);\n }\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Events {\n CommandSent = 'CommandSent',\n CommandChange = 'CommandChange',\n}\n\nexport type EventTypes = {\n [Events.CommandSent]: Components.JSONEditor.Command,\n [Events.CommandChange]: Components.JSONEditor.Command,\n};\n\nexport class EditorWidget extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox) {\n readonly jsonEditor: Components.JSONEditor.JSONEditor;\n constructor() {\n super();\n this.jsonEditor = new Components.JSONEditor.JSONEditor();\n this.jsonEditor.metadataByCommand = metadataByCommand;\n this.jsonEditor.typesByName = typesByName as Map;\n this.jsonEditor.enumsByName = enumsByName;\n this.element.append(this.jsonEditor);\n this.jsonEditor.addEventListener(Components.JSONEditor.SubmitEditorEvent.eventName, (event: Event) => {\n this.dispatchEventToListeners(Events.CommandSent, (event as Components.JSONEditor.SubmitEditorEvent).data);\n });\n }\n}\n\nexport function parseCommandInput(input: string): {command: string, parameters: {[paramName: string]: unknown}} {\n // If input cannot be parsed as json, we assume it's the command name\n // for a command without parameters. Otherwise, we expect an object\n // with \"command\"/\"method\"/\"cmd\" and \"parameters\"/\"params\"/\"args\"/\"arguments\" attributes.\n let json = null;\n try {\n json = JSON.parse(input);\n } catch (err) {\n }\n\n const command = json ? json.command || json.method || json.cmd || '' : input;\n const parameters = json?.parameters || json?.params || json?.args || json?.arguments || {};\n\n return {command, parameters};\n}\n"]} \ No newline at end of file +{"version":3,"file":"ProtocolMonitor.js","sourceRoot":"","sources":["../../../../../../front_end/panels/protocol_monitor/ProtocolMonitor.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAC7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,cAAc,MAAM,+CAA+C,CAAC;AAChF,OAAO,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CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7E,MAAM,UAAU,GAAG,IAAI,EAAE,UAAU,IAAI,IAAI,EAAE,MAAM,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;IAE3F,OAAO,EAAC,OAAO,EAAE,UAAU,EAAC,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright 2018 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as ProtocolClient from '../../core/protocol_client/protocol_client.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as DataGrid from '../../ui/components/data_grid/data_grid.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as LitHtml from '../../ui/lit-html/lit-html.js';\n\nimport * as Components from './components/components.js';\nimport protocolMonitorStyles from './protocolMonitor.css.js';\n\nconst UIStrings = {\n /**\n *@description Text for one or a group of functions\n */\n method: 'Method',\n /**\n * @description Text in Protocol Monitor. Title for a table column which shows in which direction\n * the particular protocol message was travelling. Values in this column will either be 'sent' or\n * 'received'.\n */\n type: 'Type',\n /**\n * @description Text in Protocol Monitor of the Protocol Monitor tab. Noun relating to a network request.\n */\n request: 'Request',\n /**\n *@description Title of a cell content in protocol monitor. A Network response refers to the act of acknowledging a\n network request. Should not be confused with answer.\n */\n response: 'Response',\n /**\n *@description Text for timestamps of items\n */\n timestamp: 'Timestamp',\n /**\n *@description Title of a cell content in protocol monitor. It describes the time between sending a request and receiving a response.\n */\n elapsedTime: 'Elapsed time',\n /**\n *@description Text in Protocol Monitor of the Protocol Monitor tab\n */\n target: 'Target',\n /**\n *@description Text to record a series of actions for analysis\n */\n record: 'Record',\n /**\n *@description Text to clear everything\n */\n clearAll: 'Clear all',\n /**\n *@description Text to filter result items\n */\n filter: 'Filter',\n /**\n *@description Text for the documentation of something\n */\n documentation: 'Documentation',\n /**\n *@description Text to open the CDP editor with the selected command\n */\n editAndResend: 'Edit and resend',\n /**\n *@description Cell text content in Protocol Monitor of the Protocol Monitor tab\n *@example {30} PH1\n */\n sMs: '{PH1} ms',\n /**\n *@description Text in Protocol Monitor of the Protocol Monitor tab\n */\n noMessageSelected: 'No message selected',\n /**\n *@description Text in Protocol Monitor for the save button\n */\n save: 'Save',\n /**\n *@description Text in Protocol Monitor to describe the sessions column\n */\n session: 'Session',\n /**\n *@description A placeholder for an input in Protocol Monitor. The input accepts commands that are sent to the backend on Enter. CDP stands for Chrome DevTools Protocol.\n */\n sendRawCDPCommand: 'Send a raw `CDP` command',\n /**\n * @description A tooltip text for the input in the Protocol Monitor panel. The tooltip describes what format is expected.\n */\n sendRawCDPCommandExplanation:\n 'Format: `\\'Domain.commandName\\'` for a command without parameters, or `\\'{\"command\":\"Domain.commandName\", \"parameters\": {...}}\\'` as a JSON object for a command with parameters. `\\'cmd\\'`/`\\'method\\'` and `\\'args\\'`/`\\'params\\'`/`\\'arguments\\'` are also supported as alternative keys for the `JSON` object.',\n\n /**\n * @description A label for a select input that allows selecting a CDP target to send the commands to.\n */\n selectTarget: 'Select a target',\n /**\n * @description Tooltip for the the console sidebar toggle in the Console panel. Command to\n * open/show the sidebar.\n */\n showCDPCommandEditor: 'Show CDP command editor',\n /**\n * @description Tooltip for the the console sidebar toggle in the Console panel. Command to\n * open/show the sidebar.\n */\n hideCDPCommandEditor: 'Hide CDP command editor',\n /**\n * @description Screen reader announcement when the sidebar is shown in the Console panel.\n */\n CDPCommandEditorShown: 'CDP command editor shown',\n /**\n * @description Screen reader announcement when the sidebar is hidden in the Console panel.\n */\n CDPCommandEditorHidden: 'CDP command editor hidden',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/protocol_monitor/ProtocolMonitor.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst timeRenderer = (value: DataGrid.DataGridUtils.CellValue): LitHtml.TemplateResult => {\n return LitHtml.html`${i18nString(UIStrings.sMs, {PH1: String(value)})}`;\n};\n\nexport const buildProtocolMetadata = (domains: Iterable):\n Map => {\n const metadataByCommand:\n Map =\n new Map();\n for (const domain of domains) {\n for (const command of Object.keys(domain.metadata)) {\n metadataByCommand.set(command, domain.metadata[command]);\n }\n }\n return metadataByCommand;\n };\n\nconst metadataByCommand = buildProtocolMetadata(\n ProtocolClient.InspectorBackend.inspectorBackend.agentPrototypes.values() as Iterable);\nconst typesByName = ProtocolClient.InspectorBackend.inspectorBackend.typeMap;\nconst enumsByName = ProtocolClient.InspectorBackend.inspectorBackend.enumMap;\nexport interface Message {\n id?: number;\n method: string;\n error: Object;\n result: Object;\n params: Object;\n sessionId?: string;\n}\nexport interface LogMessage {\n id?: number;\n domain: string;\n method: string;\n params: Object;\n type: 'send'|'recv';\n}\n\nexport interface ProtocolDomain {\n readonly domain: string;\n readonly metadata: {\n [commandName: string]: {parameters: Components.JSONEditor.Parameter[], description: string, replyArgs: string[]},\n };\n}\n\nexport class ProtocolMonitorDataGrid extends Common.ObjectWrapper.eventMixin(\n UI.Widget.VBox) {\n private started: boolean;\n private startTime: number;\n private readonly requestTimeForId: Map;\n private readonly dataGridRowForId: Map;\n private readonly infoWidget: InfoWidget;\n private readonly dataGridIntegrator: DataGrid.DataGridControllerIntegrator.DataGridControllerIntegrator;\n private readonly filterParser: TextUtils.TextUtils.FilterParser;\n private readonly suggestionBuilder: UI.FilterSuggestionBuilder.FilterSuggestionBuilder;\n private readonly textFilterUI: UI.Toolbar.ToolbarInput;\n readonly selector: UI.Toolbar.ToolbarComboBox;\n #commandAutocompleteSuggestionProvider = new CommandAutocompleteSuggestionProvider();\n #selectedTargetId?: string;\n #commandInput: UI.Toolbar.ToolbarInput;\n constructor(splitWidget: UI.SplitWidget.SplitWidget) {\n super(true);\n this.started = false;\n this.startTime = 0;\n this.dataGridRowForId = new Map();\n this.requestTimeForId = new Map();\n const topToolbar = new UI.Toolbar.Toolbar('protocol-monitor-toolbar', this.contentElement);\n this.contentElement.classList.add('protocol-monitor');\n const recordButton = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.record), 'record-start', 'record-stop');\n recordButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n recordButton.setToggled(!recordButton.toggled());\n this.setRecording(recordButton.toggled());\n });\n recordButton.setToggleWithRedColor(true);\n topToolbar.appendToolbarItem(recordButton);\n recordButton.setToggled(true);\n\n const clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clearAll), 'clear');\n clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.dataGridIntegrator.update({...this.dataGridIntegrator.data(), rows: []});\n this.infoWidget.render(null);\n });\n topToolbar.appendToolbarItem(clearButton);\n\n const saveButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.save), 'download');\n saveButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n void this.saveAsFile();\n });\n topToolbar.appendToolbarItem(saveButton);\n this.selector = this.#createTargetSelector();\n this.infoWidget = new InfoWidget();\n const dataGridInitialData: DataGrid.DataGridController.DataGridControllerData = {\n paddingRowsCount: 100,\n showScrollbar: true,\n columns: [\n {\n id: 'type',\n title: i18nString(UIStrings.type),\n sortable: true,\n widthWeighting: 1,\n visible: true,\n hideable: true,\n styles: {\n 'text-align': 'center',\n },\n },\n {\n id: 'method',\n title: i18nString(UIStrings.method),\n sortable: false,\n widthWeighting: 5,\n visible: true,\n hideable: false,\n },\n {\n id: 'request',\n title: i18nString(UIStrings.request),\n sortable: false,\n widthWeighting: 5,\n visible: true,\n hideable: true,\n },\n {\n id: 'response',\n title: i18nString(UIStrings.response),\n sortable: false,\n widthWeighting: 5,\n visible: true,\n hideable: true,\n },\n {\n id: 'elapsedTime',\n title: i18nString(UIStrings.elapsedTime),\n sortable: true,\n widthWeighting: 2,\n visible: false,\n hideable: true,\n },\n {\n id: 'timestamp',\n title: i18nString(UIStrings.timestamp),\n sortable: true,\n widthWeighting: 5,\n visible: false,\n hideable: true,\n },\n {\n id: 'target',\n title: i18nString(UIStrings.target),\n sortable: true,\n widthWeighting: 5,\n visible: false,\n hideable: true,\n },\n {\n id: 'session',\n title: i18nString(UIStrings.session),\n sortable: true,\n widthWeighting: 5,\n visible: false,\n hideable: true,\n },\n ],\n rows: [],\n contextMenus: {\n bodyRow:\n (menu: UI.ContextMenu.ContextMenu, columns: readonly DataGrid.DataGridUtils.Column[],\n row: Readonly): void => {\n const methodColumn = DataGrid.DataGridUtils.getRowEntryForColumnId(row, 'method');\n const typeColumn = DataGrid.DataGridUtils.getRowEntryForColumnId(row, 'type');\n /**\n * You can click the \"Edit and resend\" item in the context menu to be\n * taken to the CDP editor with the filled with the selected command.\n */\n menu.editSection().appendItem(i18nString(UIStrings.editAndResend), () => {\n if (!methodColumn.value) {\n return;\n }\n const parameters = this.infoWidget.request;\n const targetId = this.infoWidget.targetId;\n const command = String(methodColumn.value);\n if (splitWidget.showMode() === UI.SplitWidget.ShowMode.OnlyMain) {\n splitWidget.toggleSidebar();\n }\n this.dispatchEventToListeners(Events.CommandChange, {command, parameters, targetId});\n });\n\n /**\n * You can click the \"Filter\" item in the context menu to filter the\n * protocol monitor entries to those that match the method of the\n * current row.\n */\n menu.editSection().appendItem(i18nString(UIStrings.filter), () => {\n const methodColumn = DataGrid.DataGridUtils.getRowEntryForColumnId(row, 'method');\n this.textFilterUI.setValue(`method:${methodColumn.value}`, true);\n });\n\n /**\n * You can click the \"Documentation\" item in the context menu to be\n * taken to the CDP Documentation site entry for the given method.\n */\n menu.footerSection().appendItem(i18nString(UIStrings.documentation), () => {\n if (!methodColumn.value) {\n return;\n }\n const [domain, method] = String(methodColumn.value).split('.');\n const type = typeColumn.value === 'sent' ? 'method' : 'event';\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n `https://chromedevtools.github.io/devtools-protocol/tot/${domain}#${type}-${method}` as\n Platform.DevToolsPath.UrlString);\n });\n },\n },\n };\n\n this.dataGridIntegrator =\n new DataGrid.DataGridControllerIntegrator.DataGridControllerIntegrator(dataGridInitialData);\n\n this.dataGridIntegrator.dataGrid.addEventListener('cellfocused', event => {\n const focusedRow = event.data.row;\n const infoWidgetData = {\n request: DataGrid.DataGridUtils.getRowEntryForColumnId(focusedRow, 'request'),\n response: DataGrid.DataGridUtils.getRowEntryForColumnId(focusedRow, 'response'),\n target: DataGrid.DataGridUtils.getRowEntryForColumnId(focusedRow, 'target'),\n type:\n DataGrid.DataGridUtils.getRowEntryForColumnId(focusedRow, 'type').title as 'sent' | 'received' | undefined,\n selectedTab: event.data.cell.columnId === 'request' ? 'request' as const:\n event.data.cell.columnId === 'response' ? 'response' as const:\n undefined,\n };\n this.infoWidget.render(infoWidgetData);\n });\n\n this.dataGridIntegrator.dataGrid.addEventListener('newuserfiltertext', event => {\n this.textFilterUI.setValue(event.data.filterText, /* notify listeners */ true);\n });\n const split = new UI.SplitWidget.SplitWidget(true, true, 'protocol-monitor-panel-split', 250);\n split.show(this.contentElement);\n split.setMainWidget(this.dataGridIntegrator);\n split.setSidebarWidget(this.infoWidget);\n const keys = ['method', 'request', 'response', 'type', 'target', 'session'];\n this.filterParser = new TextUtils.TextUtils.FilterParser(keys);\n this.suggestionBuilder = new UI.FilterSuggestionBuilder.FilterSuggestionBuilder(keys);\n\n this.textFilterUI = new UI.Toolbar.ToolbarInput(\n i18nString(UIStrings.filter), '', 1, .2, '', this.suggestionBuilder.completions.bind(this.suggestionBuilder),\n true);\n this.textFilterUI.addEventListener(UI.Toolbar.ToolbarInput.Event.TextChanged, event => {\n const query = event.data as string;\n const filters = this.filterParser.parse(query);\n this.dataGridIntegrator.update({...this.dataGridIntegrator.data(), filters});\n });\n const bottomToolbar = new UI.Toolbar.Toolbar('protocol-monitor-bottom-toolbar', this.contentElement);\n bottomToolbar.appendToolbarItem(splitWidget.createShowHideSidebarButton(\n i18nString(UIStrings.showCDPCommandEditor), i18nString(UIStrings.hideCDPCommandEditor),\n i18nString(UIStrings.CDPCommandEditorShown), i18nString(UIStrings.CDPCommandEditorHidden)));\n this.#commandInput = this.#createCommandInput();\n bottomToolbar.appendToolbarItem(this.#commandInput);\n bottomToolbar.appendToolbarItem(this.selector);\n const shadowRoot = bottomToolbar.element?.shadowRoot;\n const inputBar = shadowRoot?.querySelector('.toolbar-input');\n const tabSelector = shadowRoot?.querySelector('.toolbar-select-container');\n\n const populateToolbarInput = (): void => {\n const editorWidget = splitWidget.sidebarWidget();\n if (!(editorWidget instanceof EditorWidget)) {\n return;\n }\n const commandJson = editorWidget.jsonEditor.getCommandJson();\n const targetId = editorWidget.jsonEditor.targetId;\n if (targetId) {\n const selectedIndex = this.selector.options().findIndex(option => option.value === targetId);\n if (selectedIndex !== -1) {\n this.selector.setSelectedIndex(selectedIndex);\n this.#selectedTargetId = targetId;\n }\n }\n if (commandJson) {\n this.#commandInput.setValue(commandJson);\n }\n };\n\n splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, (event => {\n if (event.data === 'OnlyMain') {\n populateToolbarInput();\n\n inputBar?.setAttribute('style', 'display:flex; flex-grow: 1');\n tabSelector?.setAttribute('style', 'display:flex');\n } else {\n const {command, parameters} = parseCommandInput(this.#commandInput.value());\n this.dispatchEventToListeners(\n Events.CommandChange, {command, parameters, targetId: this.#selectedTargetId});\n inputBar?.setAttribute('style', 'display:none');\n tabSelector?.setAttribute('style', 'display:none');\n }\n }));\n topToolbar.appendToolbarItem(this.textFilterUI);\n }\n\n #createCommandInput(): UI.Toolbar.ToolbarInput {\n const placeholder = i18nString(UIStrings.sendRawCDPCommand);\n const accessiblePlaceholder = placeholder;\n const growFactor = 1;\n const shrinkFactor = 0.2;\n const tooltip = i18nString(UIStrings.sendRawCDPCommandExplanation);\n const input = new UI.Toolbar.ToolbarInput(\n placeholder, accessiblePlaceholder, growFactor, shrinkFactor, tooltip,\n this.#commandAutocompleteSuggestionProvider.buildTextPromptCompletions, false);\n input.addEventListener(UI.Toolbar.ToolbarInput.Event.EnterPressed, () => {\n this.#commandAutocompleteSuggestionProvider.addEntry(input.value());\n const {command, parameters} = parseCommandInput(input.value());\n this.onCommandSend(command, parameters, this.#selectedTargetId);\n });\n return input;\n }\n\n #createTargetSelector(): UI.Toolbar.ToolbarComboBox {\n const selector = new UI.Toolbar.ToolbarComboBox(() => {\n this.#selectedTargetId = selector.selectedOption()?.value;\n }, i18nString(UIStrings.selectTarget));\n selector.setMaxWidth(120);\n const targetManager = SDK.TargetManager.TargetManager.instance();\n const syncTargets = (): void => {\n selector.removeOptions();\n for (const target of targetManager.targets()) {\n selector.createOption(`${target.name()} (${target.inspectedURL()})`, target.id());\n }\n };\n targetManager.addEventListener(SDK.TargetManager.Events.AvailableTargetsChanged, syncTargets);\n syncTargets();\n return selector;\n }\n\n onCommandSend(command: string, parameters: object, target?: string): void {\n const test = ProtocolClient.InspectorBackend.test;\n const targetManager = SDK.TargetManager.TargetManager.instance();\n const selectedTarget = target ? targetManager.targetById(target) : null;\n const sessionId = selectedTarget ? selectedTarget.sessionId : '';\n // TS thinks that properties are read-only because\n // in TS test is defined as a namespace.\n // @ts-ignore\n test.sendRawMessage(command, parameters, () => {}, sessionId);\n }\n\n override wasShown(): void {\n if (this.started) {\n return;\n }\n this.registerCSSFiles([protocolMonitorStyles]);\n this.started = true;\n this.startTime = Date.now();\n this.setRecording(true);\n }\n\n private setRecording(recording: boolean): void {\n const test = ProtocolClient.InspectorBackend.test;\n if (recording) {\n // TODO: TS thinks that properties are read-only because\n // in TS test is defined as a namespace.\n // @ts-ignore\n test.onMessageSent = this.messageSent.bind(this);\n // @ts-ignore\n test.onMessageReceived = this.messageReceived.bind(this);\n } else {\n // @ts-ignore\n test.onMessageSent = null;\n // @ts-ignore\n test.onMessageReceived = null;\n }\n }\n\n private targetToString(target: SDK.Target.Target|null): string {\n if (!target) {\n return '';\n }\n return target.decorateLabel(\n `${target.name()} ${target === SDK.TargetManager.TargetManager.instance().rootTarget() ? '' : target.id()}`);\n }\n\n private messageReceived(message: Message, target: ProtocolClient.InspectorBackend.TargetBase|null): void {\n if ('id' in message && message.id) {\n const existingRow = this.dataGridRowForId.get(message.id);\n if (!existingRow) {\n return;\n }\n const allExistingRows = this.dataGridIntegrator.data().rows;\n const matchingExistingRowIndex = allExistingRows.findIndex(r => existingRow === r);\n const newRowWithUpdate = {\n ...existingRow,\n cells: existingRow.cells.map(cell => {\n if (cell.columnId === 'response') {\n return {\n ...cell,\n value: JSON.stringify(message.result || message.error),\n\n };\n }\n\n if (cell.columnId === 'elapsedTime') {\n const requestTime = this.requestTimeForId.get(message.id as number);\n if (requestTime) {\n return {\n ...cell,\n value: Date.now() - requestTime,\n renderer: timeRenderer,\n };\n }\n }\n\n return cell;\n }),\n };\n\n const newRowsArray = [...this.dataGridIntegrator.data().rows];\n newRowsArray[matchingExistingRowIndex] = newRowWithUpdate;\n\n // Now we've updated the message, it won't be updated again, so we can delete it from the tracking map.\n this.dataGridRowForId.delete(message.id);\n this.dataGridIntegrator.update({\n ...this.dataGridIntegrator.data(),\n rows: newRowsArray,\n });\n return;\n }\n\n const sdkTarget = target as SDK.Target.Target | null;\n const responseIcon = new IconButton.Icon.Icon();\n responseIcon.data = {iconName: 'arrow-down', color: 'var(--icon-request)', width: '16px', height: '16px'};\n const newRow: DataGrid.DataGridUtils.Row = {\n cells: [\n {columnId: 'method', value: message.method, title: message.method},\n {columnId: 'request', value: '', renderer: DataGrid.DataGridRenderers.codeBlockRenderer},\n {\n columnId: 'response',\n value: JSON.stringify(message.params),\n renderer: DataGrid.DataGridRenderers.codeBlockRenderer,\n },\n {\n columnId: 'timestamp',\n value: Date.now() - this.startTime,\n renderer: timeRenderer,\n },\n {columnId: 'elapsedTime', value: ''},\n {columnId: 'type', value: responseIcon, title: 'received', renderer: DataGrid.DataGridRenderers.iconRenderer},\n {columnId: 'target', value: this.targetToString(sdkTarget)},\n {columnId: 'session', value: message.sessionId || ''},\n ],\n hidden: false,\n };\n\n this.dataGridIntegrator.update({\n ...this.dataGridIntegrator.data(),\n rows: this.dataGridIntegrator.data().rows.concat([newRow]),\n });\n }\n\n private messageSent(\n message: {domain: string, method: string, params: Object, id: number, sessionId?: string},\n target: ProtocolClient.InspectorBackend.TargetBase|null): void {\n const sdkTarget = target as SDK.Target.Target | null;\n const requestResponseIcon = new IconButton.Icon.Icon();\n requestResponseIcon\n .data = {iconName: 'arrow-up-down', color: 'var(--icon-request-response)', width: '16px', height: '16px'};\n const newRow: DataGrid.DataGridUtils.Row = {\n styles: {\n '--override-data-grid-row-background-color': 'var(--sys-color-surface3)',\n },\n cells: [\n {columnId: 'method', value: message.method, title: message.method},\n {\n columnId: 'request',\n value: JSON.stringify(message.params),\n renderer: DataGrid.DataGridRenderers.codeBlockRenderer,\n },\n {columnId: 'response', value: '(pending)', renderer: DataGrid.DataGridRenderers.codeBlockRenderer},\n {\n columnId: 'timestamp',\n value: Date.now() - this.startTime,\n renderer: timeRenderer,\n },\n {columnId: 'elapsedTime', value: '(pending)'},\n {\n columnId: 'type',\n value: requestResponseIcon,\n title: 'sent',\n renderer: DataGrid.DataGridRenderers.iconRenderer,\n },\n {columnId: 'target', value: String(sdkTarget?.id())},\n {columnId: 'session', value: message.sessionId || ''},\n ],\n hidden: false,\n };\n this.requestTimeForId.set(message.id, Date.now());\n this.dataGridRowForId.set(message.id, newRow);\n this.dataGridIntegrator.update({\n ...this.dataGridIntegrator.data(),\n rows: this.dataGridIntegrator.data().rows.concat([newRow]),\n });\n }\n\n private async saveAsFile(): Promise {\n const now = new Date();\n const fileName = 'ProtocolMonitor-' + Platform.DateUtilities.toISO8601Compact(now) + '.json' as\n Platform.DevToolsPath.RawPathString;\n const stream = new Bindings.FileUtils.FileOutputStream();\n\n const accepted = await stream.open(fileName);\n if (!accepted) {\n return;\n }\n\n const rowEntries = [];\n for (const row of this.dataGridIntegrator.data().rows) {\n const rowEntry = Object.fromEntries(row.cells.map(cell => ([cell.columnId, cell.value])));\n rowEntries.push(rowEntry);\n }\n\n void stream.write(JSON.stringify(rowEntries, null, ' '));\n void stream.close();\n }\n}\n\nexport class ProtocolMonitorImpl extends UI.Widget.VBox {\n #split: UI.SplitWidget.SplitWidget;\n #editorWidget = new EditorWidget();\n #protocolMonitorDataGrid: ProtocolMonitorDataGrid;\n // This width corresponds to the optimal width to use the editor properly\n // It is randomly chosen\n #sideBarMinWidth = 400;\n constructor() {\n super(true);\n this.#split =\n new UI.SplitWidget.SplitWidget(true, false, 'protocol-monitor-split-container', this.#sideBarMinWidth);\n this.#split.show(this.contentElement);\n this.#protocolMonitorDataGrid = new ProtocolMonitorDataGrid(this.#split);\n this.#protocolMonitorDataGrid.addEventListener(Events.CommandChange, event => {\n this.#editorWidget.jsonEditor.displayCommand(event.data.command, event.data.parameters, event.data.targetId);\n });\n\n this.#editorWidget.element.style.overflow = 'hidden';\n this.#split.setMainWidget(this.#protocolMonitorDataGrid);\n this.#split.setSidebarWidget(this.#editorWidget);\n this.#split.hideSidebar(true);\n this.#editorWidget.addEventListener(Events.CommandSent, event => {\n this.#protocolMonitorDataGrid.onCommandSend(event.data.command, event.data.parameters, event.data.targetId);\n });\n }\n}\n\nexport class CommandAutocompleteSuggestionProvider {\n #maxHistorySize = 200;\n #commandHistory = new Set();\n\n constructor(maxHistorySize?: number) {\n if (maxHistorySize !== undefined) {\n this.#maxHistorySize = maxHistorySize;\n }\n }\n\n buildTextPromptCompletions =\n async(expression: string, prefix: string, force?: boolean): Promise => {\n if (!prefix && !force && expression) {\n return [];\n }\n\n const newestToOldest = [...this.#commandHistory].reverse();\n newestToOldest.push(...metadataByCommand.keys());\n return newestToOldest.filter(cmd => cmd.startsWith(prefix)).map(text => ({\n text,\n }));\n };\n\n addEntry(value: string): void {\n if (this.#commandHistory.has(value)) {\n this.#commandHistory.delete(value);\n }\n this.#commandHistory.add(value);\n if (this.#commandHistory.size > this.#maxHistorySize) {\n const earliestEntry = this.#commandHistory.values().next().value;\n this.#commandHistory.delete(earliestEntry);\n }\n }\n}\n\nexport class InfoWidget extends UI.Widget.VBox {\n private readonly tabbedPane: UI.TabbedPane.TabbedPane;\n request: {[x: string]: unknown};\n targetId = '';\n constructor() {\n super();\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n this.tabbedPane.appendTab('request', i18nString(UIStrings.request), new UI.Widget.Widget());\n this.tabbedPane.appendTab('response', i18nString(UIStrings.response), new UI.Widget.Widget());\n this.tabbedPane.show(this.contentElement);\n this.tabbedPane.selectTab('response');\n this.request = {};\n this.render(null);\n }\n\n render(data: {\n request: DataGrid.DataGridUtils.Cell|undefined,\n response: DataGrid.DataGridUtils.Cell|undefined,\n target: DataGrid.DataGridUtils.Cell|undefined,\n type: 'sent'|'received'|undefined,\n selectedTab: 'request'|'response'|undefined,\n }|null): void {\n if (!data || !data.request || !data.response || !data.target) {\n this.tabbedPane.changeTabView('request', new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noMessageSelected)));\n this.tabbedPane.changeTabView(\n 'response', new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noMessageSelected)));\n return;\n }\n\n const requestEnabled = data && data.type && data.type === 'sent';\n this.tabbedPane.setTabEnabled('request', Boolean(requestEnabled));\n if (!requestEnabled) {\n this.tabbedPane.selectTab('response');\n }\n\n const requestParsed = JSON.parse(String(data.request.value) || 'null');\n this.request = requestParsed;\n this.targetId = String(data.target.value);\n this.tabbedPane.changeTabView('request', SourceFrame.JSONView.JSONView.createViewSync(requestParsed));\n const responseParsed =\n data.response.value === '(pending)' ? null : JSON.parse(String(data.response.value) || 'null');\n this.tabbedPane.changeTabView('response', SourceFrame.JSONView.JSONView.createViewSync(responseParsed));\n if (data.selectedTab) {\n this.tabbedPane.selectTab(data.selectedTab);\n }\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Events {\n CommandSent = 'CommandSent',\n CommandChange = 'CommandChange',\n}\n\nexport type EventTypes = {\n [Events.CommandSent]: Components.JSONEditor.Command,\n [Events.CommandChange]: Components.JSONEditor.Command,\n};\n\nexport class EditorWidget extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox) {\n readonly jsonEditor: Components.JSONEditor.JSONEditor;\n constructor() {\n super();\n this.jsonEditor = new Components.JSONEditor.JSONEditor();\n this.jsonEditor.metadataByCommand = metadataByCommand;\n this.jsonEditor.typesByName = typesByName as Map;\n this.jsonEditor.enumsByName = enumsByName;\n this.element.append(this.jsonEditor);\n this.jsonEditor.addEventListener(Components.JSONEditor.SubmitEditorEvent.eventName, (event: Event) => {\n this.dispatchEventToListeners(Events.CommandSent, (event as Components.JSONEditor.SubmitEditorEvent).data);\n });\n }\n}\n\nexport function parseCommandInput(input: string): {command: string, parameters: {[paramName: string]: unknown}} {\n // If input cannot be parsed as json, we assume it's the command name\n // for a command without parameters. Otherwise, we expect an object\n // with \"command\"/\"method\"/\"cmd\" and \"parameters\"/\"params\"/\"args\"/\"arguments\" attributes.\n let json = null;\n try {\n json = JSON.parse(input);\n } catch (err) {\n }\n\n const command = json ? json.command || json.method || json.cmd || '' : input;\n const parameters = json?.parameters || json?.params || json?.args || json?.arguments || {};\n\n return {command, parameters};\n}\n"]} \ No newline at end of file diff --git a/public/panels/protocol_monitor/protocol_monitor-meta.js b/public/panels/protocol_monitor/protocol_monitor-meta.js index 2a3c2e920..c7041bef8 100644 --- a/public/panels/protocol_monitor/protocol_monitor-meta.js +++ b/public/panels/protocol_monitor/protocol_monitor-meta.js @@ -35,7 +35,7 @@ UI.ViewManager.registerViewExtension({ persistence: "closeable" /* UI.ViewManager.ViewPersistence.CLOSEABLE */, async loadView() { const ProtocolMonitor = await loadProtocolMonitorModule(); - return ProtocolMonitor.ProtocolMonitor.ProtocolMonitorImpl.instance(); + return new ProtocolMonitor.ProtocolMonitor.ProtocolMonitorImpl(); }, experiment: Root.Runtime.ExperimentName.PROTOCOL_MONITOR, }); diff --git a/public/panels/protocol_monitor/protocol_monitor-meta.js.map b/public/panels/protocol_monitor/protocol_monitor-meta.js.map index c25ae8def..049c72542 100644 --- a/public/panels/protocol_monitor/protocol_monitor-meta.js.map +++ b/public/panels/protocol_monitor/protocol_monitor-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"protocol_monitor-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/protocol_monitor/protocol_monitor-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;;;;OAKG;IACH,eAAe,EAAE,kBAAkB;IACnC;;OAEG;IACH,mBAAmB,EAAE,uBAAuB;CAC7C,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kDAAkD,EAAE,SAAS,CAAC,CAAC;AACxG,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,2BAA+D,CAAC;AAEpE,KAAK,UAAU,yBAAyB;IACtC,IAAI,CAAC,2BAA2B,EAAE;QAChC,2BAA2B,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;KACrE;IACD,OAAO,2BAA2B,CAAC;AACrC,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,mEAA+C;IACvD,EAAE,EAAE,kBAAkB;IACtB,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,eAAe,CAAC;IAChD,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,mBAAmB,CAAC;IAC5D,KAAK,EAAE,GAAG;IACV,WAAW,4DAA0C;IACrD,KAAK,CAAC,QAAQ;QACZ,MAAM,eAAe,GAAG,MAAM,yBAAyB,EAAE,CAAC;QAC1D,OAAO,eAAe,CAAC,eAAe,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC;IACxE,CAAC;IACD,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,gBAAgB;CACzD,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Root from '../../core/root/root.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as ProtocolMonitor from './protocol_monitor.js';\n\nconst UIStrings = {\n /**\n * @description Title of the 'Protocol monitor' tool in the bottom drawer. This is a tool for\n * viewing and inspecting 'protocol' messages which are sent/received by DevTools. 'protocol' here\n * could be left untranslated as this refers to the Chrome DevTools Protocol (CDP) which is a\n * specific API name.\n */\n protocolMonitor: 'Protocol monitor',\n /**\n *@description Command for showing the 'Protocol monitor' tool in the bottom drawer\n */\n showProtocolMonitor: 'Show Protocol monitor',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/protocol_monitor/protocol_monitor-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedProtocolMonitorModule: (typeof ProtocolMonitor|undefined);\n\nasync function loadProtocolMonitorModule(): Promise {\n if (!loadedProtocolMonitorModule) {\n loadedProtocolMonitorModule = await import('./protocol_monitor.js');\n }\n return loadedProtocolMonitorModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'protocol-monitor',\n title: i18nLazyString(UIStrings.protocolMonitor),\n commandPrompt: i18nLazyString(UIStrings.showProtocolMonitor),\n order: 100,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const ProtocolMonitor = await loadProtocolMonitorModule();\n return ProtocolMonitor.ProtocolMonitor.ProtocolMonitorImpl.instance();\n },\n experiment: Root.Runtime.ExperimentName.PROTOCOL_MONITOR,\n});\n"]} \ No newline at end of file +{"version":3,"file":"protocol_monitor-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/protocol_monitor/protocol_monitor-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;;;;OAKG;IACH,eAAe,EAAE,kBAAkB;IACnC;;OAEG;IACH,mBAAmB,EAAE,uBAAuB;CAC7C,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kDAAkD,EAAE,SAAS,CAAC,CAAC;AACxG,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,2BAA+D,CAAC;AAEpE,KAAK,UAAU,yBAAyB;IACtC,IAAI,CAAC,2BAA2B,EAAE;QAChC,2BAA2B,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;KACrE;IACD,OAAO,2BAA2B,CAAC;AACrC,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,mEAA+C;IACvD,EAAE,EAAE,kBAAkB;IACtB,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,eAAe,CAAC;IAChD,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,mBAAmB,CAAC;IAC5D,KAAK,EAAE,GAAG;IACV,WAAW,4DAA0C;IACrD,KAAK,CAAC,QAAQ;QACZ,MAAM,eAAe,GAAG,MAAM,yBAAyB,EAAE,CAAC;QAC1D,OAAO,IAAI,eAAe,CAAC,eAAe,CAAC,mBAAmB,EAAE,CAAC;IACnE,CAAC;IACD,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,gBAAgB;CACzD,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Root from '../../core/root/root.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as ProtocolMonitor from './protocol_monitor.js';\n\nconst UIStrings = {\n /**\n * @description Title of the 'Protocol monitor' tool in the bottom drawer. This is a tool for\n * viewing and inspecting 'protocol' messages which are sent/received by DevTools. 'protocol' here\n * could be left untranslated as this refers to the Chrome DevTools Protocol (CDP) which is a\n * specific API name.\n */\n protocolMonitor: 'Protocol monitor',\n /**\n *@description Command for showing the 'Protocol monitor' tool in the bottom drawer\n */\n showProtocolMonitor: 'Show Protocol monitor',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/protocol_monitor/protocol_monitor-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedProtocolMonitorModule: (typeof ProtocolMonitor|undefined);\n\nasync function loadProtocolMonitorModule(): Promise {\n if (!loadedProtocolMonitorModule) {\n loadedProtocolMonitorModule = await import('./protocol_monitor.js');\n }\n return loadedProtocolMonitorModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'protocol-monitor',\n title: i18nLazyString(UIStrings.protocolMonitor),\n commandPrompt: i18nLazyString(UIStrings.showProtocolMonitor),\n order: 100,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const ProtocolMonitor = await loadProtocolMonitorModule();\n return new ProtocolMonitor.ProtocolMonitor.ProtocolMonitorImpl();\n },\n experiment: Root.Runtime.ExperimentName.PROTOCOL_MONITOR,\n});\n"]} \ No newline at end of file diff --git a/public/panels/recorder/components/recordingView.css.js b/public/panels/recorder/components/recordingView.css.js index 13112472e..b91886876 100644 --- a/public/panels/recorder/components/recordingView.css.js +++ b/public/panels/recorder/components/recordingView.css.js @@ -263,7 +263,7 @@ styles.replaceSync( } .is-recording .header-title::before { - background: var(--sys-color-error); + background: var(--sys-color-error-bright); } .footer { diff --git a/public/panels/search/SearchView.js b/public/panels/search/SearchView.js index 7e18419d8..308d0c3ba 100644 --- a/public/panels/search/SearchView.js +++ b/public/panels/search/SearchView.js @@ -180,9 +180,7 @@ export class SearchView extends UI.Widget.VBox { return new Workspace.SearchConfig.SearchConfig(this.search.value, !this.matchCaseButton.toggled(), this.regexButton.toggled()); } toggle(queryCandidate, searchImmediately) { - if (queryCandidate) { - this.search.value = queryCandidate; - } + this.search.value = queryCandidate; if (this.isShowing()) { this.focus(); } diff --git a/public/panels/search/SearchView.js.map b/public/panels/search/SearchView.js.map index 50c576fd4..a5e1d28a9 100644 --- a/public/panels/search/SearchView.js.map +++ b/public/panels/search/SearchView.js.map @@ -1 +1 @@ -{"version":3,"file":"SearchView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/search/SearchView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,E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AAY,CAAC,UAAU,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC;IACtD,CAAC;IAEO,QAAQ;QACd,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC9C,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE;YACzD,OAAO;SACR;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,EAAE,IAAI,CAAC,QAAQ,CAAC;QAChB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB;QACD,IAAI,CAAC,mBAAmB,GAAG,YAAY,CAAC;IAC1C,CAAC;IAED,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CACF","sourcesContent":["// Copyright 2014 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {SearchResultsPane} from './SearchResultsPane.js';\nimport {type SearchResult, type SearchScope} from './SearchScope.js';\nimport searchViewStyles from './searchView.css.js';\n\nconst UIStrings = {\n /**\n *@description Title of a search bar or tool\n */\n search: 'Search',\n /**\n *@description Accessibility label for search query text box\n */\n searchQuery: 'Search Query',\n /**\n *@description Text to search by matching case of the input\n */\n matchCase: 'Match Case',\n /**\n *@description Text for searching with regular expressinn\n */\n useRegularExpression: 'Use Regular Expression',\n /**\n *@description Text to refresh the page\n */\n refresh: 'Refresh',\n /**\n *@description Text to clear content\n */\n clear: 'Clear',\n /**\n *@description Search message element text content in Search View of the Search tab\n */\n indexing: 'Indexing…',\n /**\n *@description Text to indicate the searching is in progress\n */\n searching: 'Searching…',\n /**\n *@description Text in Search View of the Search tab\n */\n indexingInterrupted: 'Indexing interrupted.',\n /**\n *@description Search results message element text content in Search View of the Search tab\n */\n foundMatchingLineInFile: 'Found 1 matching line in 1 file.',\n /**\n *@description Search results message element text content in Search View of the Search tab\n *@example {2} PH1\n */\n foundDMatchingLinesInFile: 'Found {PH1} matching lines in 1 file.',\n /**\n *@description Search results message element text content in Search View of the Search tab\n *@example {2} PH1\n *@example {2} PH2\n */\n foundDMatchingLinesInDFiles: 'Found {PH1} matching lines in {PH2} files.',\n /**\n *@description Search results message element text content in Search View of the Search tab\n */\n noMatchesFound: 'No matches found.',\n /**\n *@description Text in Search View of the Search tab\n */\n searchFinished: 'Search finished.',\n /**\n *@description Text in Search View of the Search tab\n */\n searchInterrupted: 'Search interrupted.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/search/SearchView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class SearchView extends UI.Widget.VBox {\n private focusOnShow: boolean;\n private isIndexing: boolean;\n private searchId: number;\n private searchMatchesCount: number;\n private searchResultsCount: number;\n private nonEmptySearchResultsCount: number;\n private searchingView: UI.Widget.Widget|null;\n private notFoundView: UI.Widget.Widget|null;\n private searchConfig: Workspace.SearchConfig.SearchConfig|null;\n private pendingSearchConfig: Workspace.SearchConfig.SearchConfig|null;\n private searchResultsPane: SearchResultsPane|null;\n private progressIndicator: UI.ProgressIndicator.ProgressIndicator|null;\n private visiblePane: UI.Widget.Widget|null;\n private readonly searchPanelElement: HTMLElement;\n private readonly searchResultsElement: HTMLElement;\n protected readonly search: UI.HistoryInput.HistoryInput;\n protected readonly matchCaseButton: UI.Toolbar.ToolbarToggle;\n protected readonly regexButton: UI.Toolbar.ToolbarToggle;\n private searchMessageElement: HTMLElement;\n private readonly searchProgressPlaceholderElement: HTMLElement;\n private searchResultsMessageElement: HTMLElement;\n private readonly advancedSearchConfig: Common.Settings.Setting<{\n query: string,\n ignoreCase: boolean,\n isRegex: boolean,\n }>;\n private searchScope: SearchScope|null;\n\n // We throttle adding search results, otherwise we trigger DOM layout for each\n // result added.\n #throttler: Common.Throttler.Throttler;\n #pendingSearchResults: SearchResult[] = [];\n\n constructor(settingKey: string, throttler: Common.Throttler.Throttler) {\n super(true);\n this.setMinimumSize(0, 40);\n\n this.focusOnShow = false;\n this.isIndexing = false;\n this.searchId = 1;\n this.searchMatchesCount = 0;\n this.searchResultsCount = 0;\n this.nonEmptySearchResultsCount = 0;\n this.searchingView = null;\n this.notFoundView = null;\n this.searchConfig = null;\n this.pendingSearchConfig = null;\n this.searchResultsPane = null;\n this.progressIndicator = null;\n this.visiblePane = null;\n this.#throttler = throttler;\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('search')}`);\n\n this.contentElement.classList.add('search-view');\n this.contentElement.addEventListener('keydown', event => {\n this.onKeyDownOnPanel((event as KeyboardEvent));\n });\n\n this.searchPanelElement = this.contentElement.createChild('div', 'search-drawer-header');\n this.searchResultsElement = this.contentElement.createChild('div');\n this.searchResultsElement.className = 'search-results';\n\n const searchContainer = document.createElement('div');\n searchContainer.style.flex = 'auto';\n searchContainer.style.justifyContent = 'start';\n searchContainer.style.maxWidth = '300px';\n searchContainer.style.overflow = 'revert';\n this.search = UI.HistoryInput.HistoryInput.create();\n this.search.addEventListener('keydown', event => {\n this.onKeyDown((event as KeyboardEvent));\n });\n this.search.setAttribute('jslog', `${VisualLogging.textField().track({keydown: true})}`);\n searchContainer.appendChild(this.search);\n this.search.placeholder = i18nString(UIStrings.search);\n this.search.setAttribute('type', 'search');\n this.search.setAttribute('results', '0');\n this.search.setAttribute('size', '100');\n this.search.classList.add('custom-search-input');\n UI.ARIAUtils.setLabel(this.search, i18nString(UIStrings.searchQuery));\n const searchItem = new UI.Toolbar.ToolbarItem(searchContainer);\n\n const toolbar = new UI.Toolbar.Toolbar('search-toolbar', this.searchPanelElement);\n this.matchCaseButton = SearchView.appendToolbarToggle(toolbar, 'Aa', i18nString(UIStrings.matchCase), 'match-case');\n this.regexButton =\n SearchView.appendToolbarToggle(toolbar, '.*', i18nString(UIStrings.useRegularExpression), 'use-regex');\n toolbar.appendToolbarItem(searchItem);\n const refreshButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.refresh), 'refresh', undefined, 'search.refresh');\n const clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clear), 'clear', undefined, 'search.clear');\n toolbar.appendToolbarItem(refreshButton);\n toolbar.appendToolbarItem(clearButton);\n refreshButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => this.onAction());\n clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.resetSearch();\n this.onSearchInputClear();\n });\n\n const searchStatusBarElement = this.contentElement.createChild('div', 'search-toolbar-summary');\n this.searchMessageElement = searchStatusBarElement.createChild('div', 'search-message');\n this.searchProgressPlaceholderElement = searchStatusBarElement.createChild('div', 'flex-centered');\n this.searchResultsMessageElement = searchStatusBarElement.createChild('div', 'search-message');\n\n this.advancedSearchConfig = Common.Settings.Settings.instance().createLocalSetting(\n settingKey + 'SearchConfig', new Workspace.SearchConfig.SearchConfig('', true, false).toPlainObject());\n\n this.load();\n this.searchScope = null;\n }\n\n private static appendToolbarToggle(toolbar: UI.Toolbar.Toolbar, text: string, tooltip: string, jslogContext: string):\n UI.Toolbar.ToolbarToggle {\n const toggle = new UI.Toolbar.ToolbarToggle(tooltip, undefined, undefined, jslogContext);\n toggle.setText(text);\n toggle.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => toggle.setToggled(!toggle.toggled()));\n toolbar.appendToolbarItem(toggle);\n return toggle;\n }\n\n private buildSearchConfig(): Workspace.SearchConfig.SearchConfig {\n return new Workspace.SearchConfig.SearchConfig(\n this.search.value, !this.matchCaseButton.toggled(), this.regexButton.toggled());\n }\n\n toggle(queryCandidate: string, searchImmediately?: boolean): void {\n if (queryCandidate) {\n this.search.value = queryCandidate;\n }\n if (this.isShowing()) {\n this.focus();\n } else {\n this.focusOnShow = true;\n }\n\n this.initScope();\n if (searchImmediately) {\n this.onAction();\n } else {\n this.startIndexing();\n }\n }\n\n createScope(): SearchScope {\n throw new Error('Not implemented');\n }\n\n private initScope(): void {\n this.searchScope = this.createScope();\n }\n\n override wasShown(): void {\n if (this.focusOnShow) {\n this.focus();\n this.focusOnShow = false;\n }\n this.registerCSSFiles([searchViewStyles]);\n }\n\n private onIndexingFinished(): void {\n if (!this.progressIndicator) {\n return;\n }\n\n const finished = !this.progressIndicator.isCanceled();\n this.progressIndicator.done();\n this.progressIndicator = null;\n this.isIndexing = false;\n this.searchMessageElement.textContent = finished ? '' : i18nString(UIStrings.indexingInterrupted);\n if (!finished) {\n this.pendingSearchConfig = null;\n }\n if (!this.pendingSearchConfig) {\n return;\n }\n const searchConfig = this.pendingSearchConfig;\n this.pendingSearchConfig = null;\n this.innerStartSearch(searchConfig);\n }\n\n private startIndexing(): void {\n this.isIndexing = true;\n if (this.progressIndicator) {\n this.progressIndicator.done();\n }\n this.progressIndicator = new UI.ProgressIndicator.ProgressIndicator();\n this.searchMessageElement.textContent = i18nString(UIStrings.indexing);\n this.progressIndicator.show(this.searchProgressPlaceholderElement);\n if (this.searchScope) {\n this.searchScope.performIndexing(\n new Common.Progress.ProgressProxy(this.progressIndicator, this.onIndexingFinished.bind(this)));\n }\n }\n\n private onSearchInputClear(): void {\n this.search.value = '';\n this.save();\n this.focus();\n }\n\n private onSearchResult(searchId: number, searchResult: SearchResult): void {\n if (searchId !== this.searchId || !this.progressIndicator) {\n return;\n }\n if (this.progressIndicator && this.progressIndicator.isCanceled()) {\n this.onIndexingFinished();\n return;\n }\n if (!this.searchResultsPane) {\n this.searchResultsPane = new SearchResultsPane((this.searchConfig as Workspace.SearchConfig.SearchConfig));\n this.showPane(this.searchResultsPane);\n }\n this.#pendingSearchResults.push(searchResult);\n void this.#throttler.schedule(async () => this.#addPendingSearchResults());\n }\n\n #addPendingSearchResults(): void {\n for (const searchResult of this.#pendingSearchResults) {\n this.addSearchResult(searchResult);\n if (searchResult.matchesCount()) {\n this.searchResultsPane?.addSearchResult(searchResult);\n }\n }\n this.#pendingSearchResults = [];\n }\n\n private onSearchFinished(searchId: number, finished: boolean): void {\n if (searchId !== this.searchId || !this.progressIndicator) {\n return;\n }\n if (!this.searchResultsPane) {\n this.nothingFound();\n }\n this.searchFinished(finished);\n this.searchConfig = null;\n UI.ARIAUtils.alert(this.searchMessageElement.textContent + ' ' + this.searchResultsMessageElement.textContent);\n }\n\n private innerStartSearch(searchConfig: Workspace.SearchConfig.SearchConfig): void {\n this.searchConfig = searchConfig;\n if (this.progressIndicator) {\n this.progressIndicator.done();\n }\n this.progressIndicator = new UI.ProgressIndicator.ProgressIndicator();\n this.searchStarted(this.progressIndicator);\n if (this.searchScope) {\n void this.searchScope.performSearch(\n searchConfig, this.progressIndicator, this.onSearchResult.bind(this, this.searchId),\n this.onSearchFinished.bind(this, this.searchId));\n }\n }\n\n private resetSearch(): void {\n this.stopSearch();\n this.showPane(null);\n this.searchResultsPane = null;\n this.searchMessageElement.textContent = '';\n this.searchResultsMessageElement.textContent = '';\n }\n\n private stopSearch(): void {\n if (this.progressIndicator && !this.isIndexing) {\n this.progressIndicator.cancel();\n }\n if (this.searchScope) {\n this.searchScope.stopSearch();\n }\n this.searchConfig = null;\n }\n\n private searchStarted(progressIndicator: UI.ProgressIndicator.ProgressIndicator): void {\n this.searchMatchesCount = 0;\n this.searchResultsCount = 0;\n this.nonEmptySearchResultsCount = 0;\n if (!this.searchingView) {\n this.searchingView = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.searching));\n }\n this.showPane(this.searchingView);\n this.searchMessageElement.textContent = i18nString(UIStrings.searching);\n progressIndicator.show(this.searchProgressPlaceholderElement);\n this.updateSearchResultsMessage();\n }\n\n private updateSearchResultsMessage(): void {\n if (this.searchMatchesCount && this.searchResultsCount) {\n if (this.searchMatchesCount === 1 && this.nonEmptySearchResultsCount === 1) {\n this.searchResultsMessageElement.textContent = i18nString(UIStrings.foundMatchingLineInFile);\n } else if (this.searchMatchesCount > 1 && this.nonEmptySearchResultsCount === 1) {\n this.searchResultsMessageElement.textContent =\n i18nString(UIStrings.foundDMatchingLinesInFile, {PH1: this.searchMatchesCount});\n } else {\n this.searchResultsMessageElement.textContent = i18nString(\n UIStrings.foundDMatchingLinesInDFiles,\n {PH1: this.searchMatchesCount, PH2: this.nonEmptySearchResultsCount});\n }\n } else {\n this.searchResultsMessageElement.textContent = '';\n }\n }\n\n private showPane(panel: UI.Widget.Widget|null): void {\n if (this.visiblePane) {\n this.visiblePane.detach();\n }\n if (panel) {\n panel.show(this.searchResultsElement);\n }\n this.visiblePane = panel;\n }\n\n private nothingFound(): void {\n if (!this.notFoundView) {\n this.notFoundView = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noMatchesFound));\n }\n this.showPane(this.notFoundView);\n this.searchResultsMessageElement.textContent = i18nString(UIStrings.noMatchesFound);\n }\n\n private addSearchResult(searchResult: SearchResult): void {\n const matchesCount = searchResult.matchesCount();\n this.searchMatchesCount += matchesCount;\n this.searchResultsCount++;\n if (matchesCount) {\n this.nonEmptySearchResultsCount++;\n }\n this.updateSearchResultsMessage();\n }\n\n private searchFinished(finished: boolean): void {\n this.searchMessageElement.textContent =\n finished ? i18nString(UIStrings.searchFinished) : i18nString(UIStrings.searchInterrupted);\n }\n\n override focus(): void {\n this.search.focus();\n this.search.select();\n }\n\n override willHide(): void {\n this.stopSearch();\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n this.save();\n switch (event.keyCode) {\n case UI.KeyboardShortcut.Keys.Enter.code:\n this.onAction();\n break;\n }\n }\n\n /**\n * Handles keydown event on panel itself for handling expand/collapse all shortcut\n *\n * We use `event.code` instead of `event.key` here to check whether the shortcut is triggered.\n * The reason is, `event.key` is dependent on the modification keys, locale and keyboard layout.\n * Usually it is useful when we care about the character that needs to be printed.\n *\n * However, our aim in here is to assign a shortcut to the physical key combination on the keyboard\n * not on the character that the key combination prints.\n *\n * For example, `Cmd + [` shortcut in global shortcuts map to focusing on previous panel.\n * In Turkish - Q keyboard layout, the key combination that triggers the shortcut prints `ğ`\n * character. Whereas in Turkish - Q Legacy keyboard layout, the shortcut that triggers focusing\n * on previous panel prints `[` character. So, if we use `event.key` and check\n * whether it is `[`, we break the shortcut in Turkish - Q keyboard layout.\n *\n * @param event KeyboardEvent\n */\n private onKeyDownOnPanel(event: KeyboardEvent): void {\n const isMac = Host.Platform.isMac();\n // \"Command + Alt + ]\" for Mac\n const shouldShowAllForMac =\n isMac && event.metaKey && !event.ctrlKey && event.altKey && event.code === 'BracketRight';\n // \"Ctrl + Shift + }\" for other platforms\n const shouldShowAllForOtherPlatforms =\n !isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.code === 'BracketRight';\n // \"Command + Alt + [\" for Mac\n const shouldCollapseAllForMac =\n isMac && event.metaKey && !event.ctrlKey && event.altKey && event.code === 'BracketLeft';\n // \"Command + Alt + {\" for other platforms\n const shouldCollapseAllForOtherPlatforms =\n !isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.code === 'BracketLeft';\n\n if (shouldShowAllForMac || shouldShowAllForOtherPlatforms) {\n this.searchResultsPane?.showAllMatches();\n } else if (shouldCollapseAllForMac || shouldCollapseAllForOtherPlatforms) {\n this.searchResultsPane?.collapseAllResults();\n }\n }\n\n private save(): void {\n this.advancedSearchConfig.set(this.buildSearchConfig().toPlainObject());\n }\n\n private load(): void {\n const searchConfig = Workspace.SearchConfig.SearchConfig.fromPlainObject(this.advancedSearchConfig.get());\n this.search.value = searchConfig.query();\n this.matchCaseButton.setToggled(!searchConfig.ignoreCase());\n this.regexButton.setToggled(searchConfig.isRegex());\n }\n\n private onAction(): void {\n const searchConfig = this.buildSearchConfig();\n if (!searchConfig.query() || !searchConfig.query().length) {\n return;\n }\n this.resetSearch();\n ++this.searchId;\n this.initScope();\n if (!this.isIndexing) {\n this.startIndexing();\n }\n this.pendingSearchConfig = searchConfig;\n }\n\n get throttlerForTest(): Common.Throttler.Throttler {\n return this.#throttler;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"SearchView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/search/SearchView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAEzD,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAEnD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,WAAW,EAAE,cAAc;IAC3B;;OAEG;IACH,SAAS,EAAE,YAAY;IACvB;;OAEG;IACH,oBAAoB,EAAE,wBAAwB;IAC9C;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,QAAQ,EAAE,WAAW;IACrB;;OAEG;IACH,SAAS,EAAE,YAAY;IACvB;;OAEG;IACH,mBAAmB,EAAE,uBAAuB;IAC5C;;OAEG;IACH,uBAAuB,EAAE,kCAAkC;IAC3D;;;OAGG;IACH,yBAAyB,EAAE,uCAAuC;IAClE;;;;OAIG;IACH,2BAA2B,EAAE,4CAA4C;IACzE;;OAEG;IACH,cAAc,EAAE,mBAAmB;IACnC;;OAEG;IACH,cAAc,EAAE,kBAAkB;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code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {SearchResultsPane} from './SearchResultsPane.js';\nimport {type SearchResult, type SearchScope} from './SearchScope.js';\nimport searchViewStyles from './searchView.css.js';\n\nconst UIStrings = {\n /**\n *@description Title of a search bar or tool\n */\n search: 'Search',\n /**\n *@description Accessibility label for search query text box\n */\n searchQuery: 'Search Query',\n /**\n *@description Text to search by matching case of the input\n */\n matchCase: 'Match Case',\n /**\n *@description Text for searching with regular expressinn\n */\n useRegularExpression: 'Use Regular Expression',\n /**\n *@description Text to refresh the page\n */\n refresh: 'Refresh',\n /**\n *@description Text to clear content\n */\n clear: 'Clear',\n /**\n *@description Search message element text content in Search View of the Search tab\n */\n indexing: 'Indexing…',\n /**\n *@description Text to indicate the searching is in progress\n */\n searching: 'Searching…',\n /**\n *@description Text in Search View of the Search tab\n */\n indexingInterrupted: 'Indexing interrupted.',\n /**\n *@description Search results message element text content in Search View of the Search tab\n */\n foundMatchingLineInFile: 'Found 1 matching line in 1 file.',\n /**\n *@description Search results message element text content in Search View of the Search tab\n *@example {2} PH1\n */\n foundDMatchingLinesInFile: 'Found {PH1} matching lines in 1 file.',\n /**\n *@description Search results message element text content in Search View of the Search tab\n *@example {2} PH1\n *@example {2} PH2\n */\n foundDMatchingLinesInDFiles: 'Found {PH1} matching lines in {PH2} files.',\n /**\n *@description Search results message element text content in Search View of the Search tab\n */\n noMatchesFound: 'No matches found.',\n /**\n *@description Text in Search View of the Search tab\n */\n searchFinished: 'Search finished.',\n /**\n *@description Text in Search View of the Search tab\n */\n searchInterrupted: 'Search interrupted.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/search/SearchView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class SearchView extends UI.Widget.VBox {\n private focusOnShow: boolean;\n private isIndexing: boolean;\n private searchId: number;\n private searchMatchesCount: number;\n private searchResultsCount: number;\n private nonEmptySearchResultsCount: number;\n private searchingView: UI.Widget.Widget|null;\n private notFoundView: UI.Widget.Widget|null;\n private searchConfig: Workspace.SearchConfig.SearchConfig|null;\n private pendingSearchConfig: Workspace.SearchConfig.SearchConfig|null;\n private searchResultsPane: SearchResultsPane|null;\n private progressIndicator: UI.ProgressIndicator.ProgressIndicator|null;\n private visiblePane: UI.Widget.Widget|null;\n private readonly searchPanelElement: HTMLElement;\n private readonly searchResultsElement: HTMLElement;\n protected readonly search: UI.HistoryInput.HistoryInput;\n protected readonly matchCaseButton: UI.Toolbar.ToolbarToggle;\n protected readonly regexButton: UI.Toolbar.ToolbarToggle;\n private searchMessageElement: HTMLElement;\n private readonly searchProgressPlaceholderElement: HTMLElement;\n private searchResultsMessageElement: HTMLElement;\n private readonly advancedSearchConfig: Common.Settings.Setting<{\n query: string,\n ignoreCase: boolean,\n isRegex: boolean,\n }>;\n private searchScope: SearchScope|null;\n\n // We throttle adding search results, otherwise we trigger DOM layout for each\n // result added.\n #throttler: Common.Throttler.Throttler;\n #pendingSearchResults: SearchResult[] = [];\n\n constructor(settingKey: string, throttler: Common.Throttler.Throttler) {\n super(true);\n this.setMinimumSize(0, 40);\n\n this.focusOnShow = false;\n this.isIndexing = false;\n this.searchId = 1;\n this.searchMatchesCount = 0;\n this.searchResultsCount = 0;\n this.nonEmptySearchResultsCount = 0;\n this.searchingView = null;\n this.notFoundView = null;\n this.searchConfig = null;\n this.pendingSearchConfig = null;\n this.searchResultsPane = null;\n this.progressIndicator = null;\n this.visiblePane = null;\n this.#throttler = throttler;\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('search')}`);\n\n this.contentElement.classList.add('search-view');\n this.contentElement.addEventListener('keydown', event => {\n this.onKeyDownOnPanel((event as KeyboardEvent));\n });\n\n this.searchPanelElement = this.contentElement.createChild('div', 'search-drawer-header');\n this.searchResultsElement = this.contentElement.createChild('div');\n this.searchResultsElement.className = 'search-results';\n\n const searchContainer = document.createElement('div');\n searchContainer.style.flex = 'auto';\n searchContainer.style.justifyContent = 'start';\n searchContainer.style.maxWidth = '300px';\n searchContainer.style.overflow = 'revert';\n this.search = UI.HistoryInput.HistoryInput.create();\n this.search.addEventListener('keydown', event => {\n this.onKeyDown((event as KeyboardEvent));\n });\n this.search.setAttribute('jslog', `${VisualLogging.textField().track({keydown: true})}`);\n searchContainer.appendChild(this.search);\n this.search.placeholder = i18nString(UIStrings.search);\n this.search.setAttribute('type', 'search');\n this.search.setAttribute('results', '0');\n this.search.setAttribute('size', '100');\n this.search.classList.add('custom-search-input');\n UI.ARIAUtils.setLabel(this.search, i18nString(UIStrings.searchQuery));\n const searchItem = new UI.Toolbar.ToolbarItem(searchContainer);\n\n const toolbar = new UI.Toolbar.Toolbar('search-toolbar', this.searchPanelElement);\n this.matchCaseButton = SearchView.appendToolbarToggle(toolbar, 'Aa', i18nString(UIStrings.matchCase), 'match-case');\n this.regexButton =\n SearchView.appendToolbarToggle(toolbar, '.*', i18nString(UIStrings.useRegularExpression), 'use-regex');\n toolbar.appendToolbarItem(searchItem);\n const refreshButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.refresh), 'refresh', undefined, 'search.refresh');\n const clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clear), 'clear', undefined, 'search.clear');\n toolbar.appendToolbarItem(refreshButton);\n toolbar.appendToolbarItem(clearButton);\n refreshButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => this.onAction());\n clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.resetSearch();\n this.onSearchInputClear();\n });\n\n const searchStatusBarElement = this.contentElement.createChild('div', 'search-toolbar-summary');\n this.searchMessageElement = searchStatusBarElement.createChild('div', 'search-message');\n this.searchProgressPlaceholderElement = searchStatusBarElement.createChild('div', 'flex-centered');\n this.searchResultsMessageElement = searchStatusBarElement.createChild('div', 'search-message');\n\n this.advancedSearchConfig = Common.Settings.Settings.instance().createLocalSetting(\n settingKey + 'SearchConfig', new Workspace.SearchConfig.SearchConfig('', true, false).toPlainObject());\n\n this.load();\n this.searchScope = null;\n }\n\n private static appendToolbarToggle(toolbar: UI.Toolbar.Toolbar, text: string, tooltip: string, jslogContext: string):\n UI.Toolbar.ToolbarToggle {\n const toggle = new UI.Toolbar.ToolbarToggle(tooltip, undefined, undefined, jslogContext);\n toggle.setText(text);\n toggle.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => toggle.setToggled(!toggle.toggled()));\n toolbar.appendToolbarItem(toggle);\n return toggle;\n }\n\n private buildSearchConfig(): Workspace.SearchConfig.SearchConfig {\n return new Workspace.SearchConfig.SearchConfig(\n this.search.value, !this.matchCaseButton.toggled(), this.regexButton.toggled());\n }\n\n toggle(queryCandidate: string, searchImmediately?: boolean): void {\n this.search.value = queryCandidate;\n if (this.isShowing()) {\n this.focus();\n } else {\n this.focusOnShow = true;\n }\n\n this.initScope();\n if (searchImmediately) {\n this.onAction();\n } else {\n this.startIndexing();\n }\n }\n\n createScope(): SearchScope {\n throw new Error('Not implemented');\n }\n\n private initScope(): void {\n this.searchScope = this.createScope();\n }\n\n override wasShown(): void {\n if (this.focusOnShow) {\n this.focus();\n this.focusOnShow = false;\n }\n this.registerCSSFiles([searchViewStyles]);\n }\n\n private onIndexingFinished(): void {\n if (!this.progressIndicator) {\n return;\n }\n\n const finished = !this.progressIndicator.isCanceled();\n this.progressIndicator.done();\n this.progressIndicator = null;\n this.isIndexing = false;\n this.searchMessageElement.textContent = finished ? '' : i18nString(UIStrings.indexingInterrupted);\n if (!finished) {\n this.pendingSearchConfig = null;\n }\n if (!this.pendingSearchConfig) {\n return;\n }\n const searchConfig = this.pendingSearchConfig;\n this.pendingSearchConfig = null;\n this.innerStartSearch(searchConfig);\n }\n\n private startIndexing(): void {\n this.isIndexing = true;\n if (this.progressIndicator) {\n this.progressIndicator.done();\n }\n this.progressIndicator = new UI.ProgressIndicator.ProgressIndicator();\n this.searchMessageElement.textContent = i18nString(UIStrings.indexing);\n this.progressIndicator.show(this.searchProgressPlaceholderElement);\n if (this.searchScope) {\n this.searchScope.performIndexing(\n new Common.Progress.ProgressProxy(this.progressIndicator, this.onIndexingFinished.bind(this)));\n }\n }\n\n private onSearchInputClear(): void {\n this.search.value = '';\n this.save();\n this.focus();\n }\n\n private onSearchResult(searchId: number, searchResult: SearchResult): void {\n if (searchId !== this.searchId || !this.progressIndicator) {\n return;\n }\n if (this.progressIndicator && this.progressIndicator.isCanceled()) {\n this.onIndexingFinished();\n return;\n }\n if (!this.searchResultsPane) {\n this.searchResultsPane = new SearchResultsPane((this.searchConfig as Workspace.SearchConfig.SearchConfig));\n this.showPane(this.searchResultsPane);\n }\n this.#pendingSearchResults.push(searchResult);\n void this.#throttler.schedule(async () => this.#addPendingSearchResults());\n }\n\n #addPendingSearchResults(): void {\n for (const searchResult of this.#pendingSearchResults) {\n this.addSearchResult(searchResult);\n if (searchResult.matchesCount()) {\n this.searchResultsPane?.addSearchResult(searchResult);\n }\n }\n this.#pendingSearchResults = [];\n }\n\n private onSearchFinished(searchId: number, finished: boolean): void {\n if (searchId !== this.searchId || !this.progressIndicator) {\n return;\n }\n if (!this.searchResultsPane) {\n this.nothingFound();\n }\n this.searchFinished(finished);\n this.searchConfig = null;\n UI.ARIAUtils.alert(this.searchMessageElement.textContent + ' ' + this.searchResultsMessageElement.textContent);\n }\n\n private innerStartSearch(searchConfig: Workspace.SearchConfig.SearchConfig): void {\n this.searchConfig = searchConfig;\n if (this.progressIndicator) {\n this.progressIndicator.done();\n }\n this.progressIndicator = new UI.ProgressIndicator.ProgressIndicator();\n this.searchStarted(this.progressIndicator);\n if (this.searchScope) {\n void this.searchScope.performSearch(\n searchConfig, this.progressIndicator, this.onSearchResult.bind(this, this.searchId),\n this.onSearchFinished.bind(this, this.searchId));\n }\n }\n\n private resetSearch(): void {\n this.stopSearch();\n this.showPane(null);\n this.searchResultsPane = null;\n this.searchMessageElement.textContent = '';\n this.searchResultsMessageElement.textContent = '';\n }\n\n private stopSearch(): void {\n if (this.progressIndicator && !this.isIndexing) {\n this.progressIndicator.cancel();\n }\n if (this.searchScope) {\n this.searchScope.stopSearch();\n }\n this.searchConfig = null;\n }\n\n private searchStarted(progressIndicator: UI.ProgressIndicator.ProgressIndicator): void {\n this.searchMatchesCount = 0;\n this.searchResultsCount = 0;\n this.nonEmptySearchResultsCount = 0;\n if (!this.searchingView) {\n this.searchingView = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.searching));\n }\n this.showPane(this.searchingView);\n this.searchMessageElement.textContent = i18nString(UIStrings.searching);\n progressIndicator.show(this.searchProgressPlaceholderElement);\n this.updateSearchResultsMessage();\n }\n\n private updateSearchResultsMessage(): void {\n if (this.searchMatchesCount && this.searchResultsCount) {\n if (this.searchMatchesCount === 1 && this.nonEmptySearchResultsCount === 1) {\n this.searchResultsMessageElement.textContent = i18nString(UIStrings.foundMatchingLineInFile);\n } else if (this.searchMatchesCount > 1 && this.nonEmptySearchResultsCount === 1) {\n this.searchResultsMessageElement.textContent =\n i18nString(UIStrings.foundDMatchingLinesInFile, {PH1: this.searchMatchesCount});\n } else {\n this.searchResultsMessageElement.textContent = i18nString(\n UIStrings.foundDMatchingLinesInDFiles,\n {PH1: this.searchMatchesCount, PH2: this.nonEmptySearchResultsCount});\n }\n } else {\n this.searchResultsMessageElement.textContent = '';\n }\n }\n\n private showPane(panel: UI.Widget.Widget|null): void {\n if (this.visiblePane) {\n this.visiblePane.detach();\n }\n if (panel) {\n panel.show(this.searchResultsElement);\n }\n this.visiblePane = panel;\n }\n\n private nothingFound(): void {\n if (!this.notFoundView) {\n this.notFoundView = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.noMatchesFound));\n }\n this.showPane(this.notFoundView);\n this.searchResultsMessageElement.textContent = i18nString(UIStrings.noMatchesFound);\n }\n\n private addSearchResult(searchResult: SearchResult): void {\n const matchesCount = searchResult.matchesCount();\n this.searchMatchesCount += matchesCount;\n this.searchResultsCount++;\n if (matchesCount) {\n this.nonEmptySearchResultsCount++;\n }\n this.updateSearchResultsMessage();\n }\n\n private searchFinished(finished: boolean): void {\n this.searchMessageElement.textContent =\n finished ? i18nString(UIStrings.searchFinished) : i18nString(UIStrings.searchInterrupted);\n }\n\n override focus(): void {\n this.search.focus();\n this.search.select();\n }\n\n override willHide(): void {\n this.stopSearch();\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n this.save();\n switch (event.keyCode) {\n case UI.KeyboardShortcut.Keys.Enter.code:\n this.onAction();\n break;\n }\n }\n\n /**\n * Handles keydown event on panel itself for handling expand/collapse all shortcut\n *\n * We use `event.code` instead of `event.key` here to check whether the shortcut is triggered.\n * The reason is, `event.key` is dependent on the modification keys, locale and keyboard layout.\n * Usually it is useful when we care about the character that needs to be printed.\n *\n * However, our aim in here is to assign a shortcut to the physical key combination on the keyboard\n * not on the character that the key combination prints.\n *\n * For example, `Cmd + [` shortcut in global shortcuts map to focusing on previous panel.\n * In Turkish - Q keyboard layout, the key combination that triggers the shortcut prints `ğ`\n * character. Whereas in Turkish - Q Legacy keyboard layout, the shortcut that triggers focusing\n * on previous panel prints `[` character. So, if we use `event.key` and check\n * whether it is `[`, we break the shortcut in Turkish - Q keyboard layout.\n *\n * @param event KeyboardEvent\n */\n private onKeyDownOnPanel(event: KeyboardEvent): void {\n const isMac = Host.Platform.isMac();\n // \"Command + Alt + ]\" for Mac\n const shouldShowAllForMac =\n isMac && event.metaKey && !event.ctrlKey && event.altKey && event.code === 'BracketRight';\n // \"Ctrl + Shift + }\" for other platforms\n const shouldShowAllForOtherPlatforms =\n !isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.code === 'BracketRight';\n // \"Command + Alt + [\" for Mac\n const shouldCollapseAllForMac =\n isMac && event.metaKey && !event.ctrlKey && event.altKey && event.code === 'BracketLeft';\n // \"Command + Alt + {\" for other platforms\n const shouldCollapseAllForOtherPlatforms =\n !isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.code === 'BracketLeft';\n\n if (shouldShowAllForMac || shouldShowAllForOtherPlatforms) {\n this.searchResultsPane?.showAllMatches();\n } else if (shouldCollapseAllForMac || shouldCollapseAllForOtherPlatforms) {\n this.searchResultsPane?.collapseAllResults();\n }\n }\n\n private save(): void {\n this.advancedSearchConfig.set(this.buildSearchConfig().toPlainObject());\n }\n\n private load(): void {\n const searchConfig = Workspace.SearchConfig.SearchConfig.fromPlainObject(this.advancedSearchConfig.get());\n this.search.value = searchConfig.query();\n this.matchCaseButton.setToggled(!searchConfig.ignoreCase());\n this.regexButton.setToggled(searchConfig.isRegex());\n }\n\n private onAction(): void {\n const searchConfig = this.buildSearchConfig();\n if (!searchConfig.query() || !searchConfig.query().length) {\n return;\n }\n this.resetSearch();\n ++this.searchId;\n this.initScope();\n if (!this.isIndexing) {\n this.startIndexing();\n }\n this.pendingSearchConfig = searchConfig;\n }\n\n get throttlerForTest(): Common.Throttler.Throttler {\n return this.#throttler;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sensors/LocationsSettingsTab.d.ts b/public/panels/sensors/LocationsSettingsTab.d.ts index 1531b40bd..b52bf55fc 100644 --- a/public/panels/sensors/LocationsSettingsTab.d.ts +++ b/public/panels/sensors/LocationsSettingsTab.d.ts @@ -3,8 +3,7 @@ export declare class LocationsSettingsTab extends UI.Widget.VBox implements UI.L private readonly list; private readonly customSetting; private editor?; - private constructor(); - static instance(): LocationsSettingsTab; + constructor(); wasShown(): void; private locationsUpdated; private addButtonClicked; diff --git a/public/panels/sensors/LocationsSettingsTab.js b/public/panels/sensors/LocationsSettingsTab.js index 0873106a9..f3ef81c7f 100644 --- a/public/panels/sensors/LocationsSettingsTab.js +++ b/public/panels/sensors/LocationsSettingsTab.js @@ -6,7 +6,6 @@ import * as i18n from '../../core/i18n/i18n.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as VisualLogging from '../../ui/visual_logging/visual_logging.js'; import locationsSettingsTabStyles from './locationsSettingsTab.css.js'; -let locationsSettingsTabInstance; const UIStrings = { /** *@description Title in the Locations Settings Tab, where custom geographic locations that the user @@ -99,7 +98,7 @@ export class LocationsSettingsTab extends UI.Widget.VBox { editor; constructor() { super(true); - this.element.setAttribute('jslog', `${VisualLogging.section().context('emulation-locations')}`); + this.element.setAttribute('jslog', `${VisualLogging.pane().context('emulation-locations')}`); this.contentElement.createChild('div', 'header').textContent = i18nString(UIStrings.customLocations); const addButton = UI.UIUtils.createTextButton(i18nString(UIStrings.addLocation), this.addButtonClicked.bind(this), 'add-locations-button'); addButton.setAttribute('jslog', `${VisualLogging.action().track({ click: true }).context('add-location')}`); @@ -133,12 +132,6 @@ export class LocationsSettingsTab extends UI.Widget.VBox { this.customSetting.addChangeListener(this.locationsUpdated, this); this.setDefaultFocusedElement(addButton); } - static instance() { - if (!locationsSettingsTabInstance) { - locationsSettingsTabInstance = new LocationsSettingsTab(); - } - return locationsSettingsTabInstance; - } wasShown() { super.wasShown(); this.registerCSSFiles([locationsSettingsTabStyles]); diff --git a/public/panels/sensors/LocationsSettingsTab.js.map b/public/panels/sensors/LocationsSettingsTab.js.map index 9e4912a54..8eb72b443 100644 --- a/public/panels/sensors/LocationsSettingsTab.js.map +++ b/public/panels/sensors/LocationsSettingsTab.js.map @@ -1 +1 @@ -{"version":3,"file":"LocationsSettingsTab.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sensors/LocationsSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,0BAA0B,MAAM,+BAA+B,CAAC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,EAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright 2018 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport locationsSettingsTabStyles from './locationsSettingsTab.css.js';\n\nlet locationsSettingsTabInstance: LocationsSettingsTab;\n\nconst UIStrings = {\n /**\n *@description Title in the Locations Settings Tab, where custom geographic locations that the user\n *has entered are stored.\n */\n customLocations: 'Custom locations',\n /**\n *@description Label for the name of a geographic location that the user has entered.\n */\n locationName: 'Location name',\n /**\n *@description Abbreviation of latitude in Locations Settings Tab of the Device Toolbar\n */\n lat: 'Lat',\n /**\n *@description Abbreviation of longitude in Locations Settings Tab of the Device Toolbar\n */\n long: 'Long',\n /**\n *@description Text in Sensors View of the Device Toolbar\n */\n timezoneId: 'Timezone ID',\n /**\n *@description Label for text input for the locale of a particular location.\n */\n locale: 'Locale',\n /**\n *@description Label for text input for the latitude of a GPS position.\n */\n latitude: 'Latitude',\n /**\n *@description Label for text input for the longitude of a GPS position.\n */\n longitude: 'Longitude',\n /**\n *@description Error message in the Locations settings pane that declares the location name input must not be empty\n */\n locationNameCannotBeEmpty: 'Location name cannot be empty',\n /**\n *@description Error message in the Locations settings pane that declares the maximum length of the location name\n *@example {50} PH1\n */\n locationNameMustBeLessThanS: 'Location name must be less than {PH1} characters',\n /**\n *@description Error message in the Locations settings pane that declares that the value for the latitude input must be a number\n */\n latitudeMustBeANumber: 'Latitude must be a number',\n /**\n *@description Error message in the Locations settings pane that declares the minimum value for the latitude input\n *@example {-90} PH1\n */\n latitudeMustBeGreaterThanOrEqual: 'Latitude must be greater than or equal to {PH1}',\n /**\n *@description Error message in the Locations settings pane that declares the maximum value for the latitude input\n *@example {90} PH1\n */\n latitudeMustBeLessThanOrEqualToS: 'Latitude must be less than or equal to {PH1}',\n /**\n *@description Error message in the Locations settings pane that declares that the value for the longitude input must be a number\n */\n longitudeMustBeANumber: 'Longitude must be a number',\n /**\n *@description Error message in the Locations settings pane that declares the minimum value for the longitude input\n *@example {-180} PH1\n */\n longitudeMustBeGreaterThanOr: 'Longitude must be greater than or equal to {PH1}',\n /**\n *@description Error message in the Locations settings pane that declares the maximum value for the longitude input\n *@example {180} PH1\n */\n longitudeMustBeLessThanOrEqualTo: 'Longitude must be less than or equal to {PH1}',\n /**\n *@description Error message in the Locations settings pane that declares timezone ID input invalid\n */\n timezoneIdMustContainAlphabetic: 'Timezone ID must contain alphabetic characters',\n /**\n *@description Error message in the Locations settings pane that declares locale input invalid\n */\n localeMustContainAlphabetic: 'Locale must contain alphabetic characters',\n /**\n *@description Text of add locations button in Locations Settings Tab of the Device Toolbar\n */\n addLocation: 'Add location...',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sensors/LocationsSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class LocationsSettingsTab extends UI.Widget.VBox implements UI.ListWidget.Delegate {\n private readonly list: UI.ListWidget.ListWidget;\n private readonly customSetting: Common.Settings.Setting;\n private editor?: UI.ListWidget.Editor;\n\n private constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.section().context('emulation-locations')}`);\n\n this.contentElement.createChild('div', 'header').textContent = i18nString(UIStrings.customLocations);\n\n const addButton = UI.UIUtils.createTextButton(\n i18nString(UIStrings.addLocation), this.addButtonClicked.bind(this), 'add-locations-button');\n addButton.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context('add-location')}`);\n this.contentElement.appendChild(addButton);\n\n this.list = new UI.ListWidget.ListWidget(this);\n this.list.element.classList.add('locations-list');\n this.list.show(this.contentElement);\n this.customSetting =\n Common.Settings.Settings.instance().moduleSetting('emulation.locations');\n const list =\n this.customSetting.get().map(location => replaceLocationTitles(location, this.customSetting.defaultValue));\n\n function replaceLocationTitles(\n location: LocationDescription, defaultValues: LocationDescription[]): LocationDescription {\n // This check is done for locations that might had been cached wrongly due to crbug.com/1171670.\n // Each of the default values would have been stored without a title if the user had added a new location\n // while the bug was present in the application. This means that getting the setting's default value with the `get`\n // method would return the default locations without a title. To cope with this, the setting values are\n // preemptively checked and corrected so that any default value mistakenly stored without a title is replaced\n // with the corresponding declared value in the pre-registered setting.\n if (!location.title) {\n const replacement = defaultValues.find(\n defaultLocation => defaultLocation.lat === location.lat && defaultLocation.long === location.long &&\n defaultLocation.timezoneId === location.timezoneId && defaultLocation.locale === location.locale);\n if (!replacement) {\n console.error('Could not determine a location setting title');\n } else {\n return replacement;\n }\n }\n return location;\n }\n\n this.customSetting.set(list);\n this.customSetting.addChangeListener(this.locationsUpdated, this);\n\n this.setDefaultFocusedElement(addButton);\n }\n\n static instance(): LocationsSettingsTab {\n if (!locationsSettingsTabInstance) {\n locationsSettingsTabInstance = new LocationsSettingsTab();\n }\n\n return locationsSettingsTabInstance;\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([locationsSettingsTabStyles]);\n this.list.registerCSSFiles([locationsSettingsTabStyles]);\n this.locationsUpdated();\n }\n\n private locationsUpdated(): void {\n this.list.clear();\n\n const conditions = this.customSetting.get();\n for (const condition of conditions) {\n this.list.appendItem(condition, true);\n }\n\n this.list.appendSeparator();\n }\n\n private addButtonClicked(): void {\n this.list.addNewItem(this.customSetting.get().length, {title: '', lat: 0, long: 0, timezoneId: '', locale: ''});\n }\n\n renderItem(location: LocationDescription, _editable: boolean): Element {\n const element = document.createElement('div');\n element.classList.add('locations-list-item');\n const title = element.createChild('div', 'locations-list-text locations-list-title');\n const titleText = title.createChild('div', 'locations-list-title-text');\n titleText.textContent = location.title;\n UI.Tooltip.Tooltip.install(titleText, location.title);\n element.createChild('div', 'locations-list-separator');\n element.createChild('div', 'locations-list-text').textContent = String(location.lat);\n element.createChild('div', 'locations-list-separator');\n element.createChild('div', 'locations-list-text').textContent = String(location.long);\n element.createChild('div', 'locations-list-separator');\n element.createChild('div', 'locations-list-text').textContent = location.timezoneId;\n element.createChild('div', 'locations-list-separator');\n element.createChild('div', 'locations-list-text').textContent = location.locale;\n return element;\n }\n\n removeItemRequested(item: LocationDescription, index: number): void {\n const list = this.customSetting.get();\n list.splice(index, 1);\n this.customSetting.set(list);\n }\n\n commitEdit(location: LocationDescription, editor: UI.ListWidget.Editor, isNew: boolean): void {\n location.title = editor.control('title').value.trim();\n const lat = editor.control('lat').value.trim();\n location.lat = lat ? parseFloat(lat) : 0;\n const long = editor.control('long').value.trim();\n location.long = long ? parseFloat(long) : 0;\n const timezoneId = editor.control('timezoneId').value.trim();\n location.timezoneId = timezoneId;\n const locale = editor.control('locale').value.trim();\n location.locale = locale;\n\n const list = this.customSetting.get();\n if (isNew) {\n list.push(location);\n }\n this.customSetting.set(list);\n }\n\n beginEdit(location: LocationDescription): UI.ListWidget.Editor {\n const editor = this.createEditor();\n editor.control('title').value = location.title;\n editor.control('lat').value = String(location.lat);\n editor.control('long').value = String(location.long);\n editor.control('timezoneId').value = location.timezoneId;\n editor.control('locale').value = location.locale;\n return editor;\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n this.editor = editor;\n const content = editor.contentElement();\n\n const titles = content.createChild('div', 'locations-edit-row');\n titles.createChild('div', 'locations-list-text locations-list-title').textContent =\n i18nString(UIStrings.locationName);\n titles.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n titles.createChild('div', 'locations-list-text').textContent = i18nString(UIStrings.lat);\n titles.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n titles.createChild('div', 'locations-list-text').textContent = i18nString(UIStrings.long);\n titles.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n titles.createChild('div', 'locations-list-text').textContent = i18nString(UIStrings.timezoneId);\n titles.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n titles.createChild('div', 'locations-list-text').textContent = i18nString(UIStrings.locale);\n\n const fields = content.createChild('div', 'locations-edit-row');\n fields.createChild('div', 'locations-list-text locations-list-title locations-input-container')\n .appendChild(editor.createInput('title', 'text', i18nString(UIStrings.locationName), titleValidator));\n fields.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n\n let cell = fields.createChild('div', 'locations-list-text locations-input-container');\n cell.appendChild(editor.createInput('lat', 'text', i18nString(UIStrings.latitude), latValidator));\n fields.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n\n cell = fields.createChild('div', 'locations-list-text locations-list-text-longitude locations-input-container');\n cell.appendChild(editor.createInput('long', 'text', i18nString(UIStrings.longitude), longValidator));\n fields.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n\n cell = fields.createChild('div', 'locations-list-text locations-input-container');\n cell.appendChild(editor.createInput('timezoneId', 'text', i18nString(UIStrings.timezoneId), timezoneIdValidator));\n fields.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n\n cell = fields.createChild('div', 'locations-list-text locations-input-container');\n cell.appendChild(editor.createInput('locale', 'text', i18nString(UIStrings.locale), localeValidator));\n\n return editor;\n\n function titleValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const maxLength = 50;\n const value = input.value.trim();\n\n let errorMessage;\n if (!value.length) {\n errorMessage = i18nString(UIStrings.locationNameCannotBeEmpty);\n } else if (value.length > maxLength) {\n errorMessage = i18nString(UIStrings.locationNameMustBeLessThanS, {PH1: maxLength});\n }\n\n if (errorMessage) {\n return {valid: false, errorMessage};\n }\n return {valid: true, errorMessage: undefined};\n }\n\n function latValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const minLat = -90;\n const maxLat = 90;\n const value = input.value.trim();\n const parsedValue = Number(value);\n\n if (!value) {\n return {valid: true, errorMessage: undefined};\n }\n\n let errorMessage;\n if (Number.isNaN(parsedValue)) {\n errorMessage = i18nString(UIStrings.latitudeMustBeANumber);\n } else if (parseFloat(value) < minLat) {\n errorMessage = i18nString(UIStrings.latitudeMustBeGreaterThanOrEqual, {PH1: minLat});\n } else if (parseFloat(value) > maxLat) {\n errorMessage = i18nString(UIStrings.latitudeMustBeLessThanOrEqualToS, {PH1: maxLat});\n }\n\n if (errorMessage) {\n return {valid: false, errorMessage};\n }\n return {valid: true, errorMessage: undefined};\n }\n\n function longValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const minLong = -180;\n const maxLong = 180;\n const value = input.value.trim();\n const parsedValue = Number(value);\n\n if (!value) {\n return {valid: true, errorMessage: undefined};\n }\n\n let errorMessage;\n if (Number.isNaN(parsedValue)) {\n errorMessage = i18nString(UIStrings.longitudeMustBeANumber);\n } else if (parseFloat(value) < minLong) {\n errorMessage = i18nString(UIStrings.longitudeMustBeGreaterThanOr, {PH1: minLong});\n } else if (parseFloat(value) > maxLong) {\n errorMessage = i18nString(UIStrings.longitudeMustBeLessThanOrEqualTo, {PH1: maxLong});\n }\n\n if (errorMessage) {\n return {valid: false, errorMessage};\n }\n return {valid: true, errorMessage: undefined};\n }\n\n function timezoneIdValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const value = input.value.trim();\n // Chromium uses ICU's timezone implementation, which is very\n // liberal in what it accepts. ICU does not simply use an allowlist\n // but instead tries to make sense of the input, even for\n // weird-looking timezone IDs. There's not much point in validating\n // the input other than checking if it contains at least one\n // alphabetic character. The empty string resets the override,\n // and is accepted as well.\n if (value === '' || /[a-zA-Z]/.test(value)) {\n return {valid: true, errorMessage: undefined};\n }\n const errorMessage = i18nString(UIStrings.timezoneIdMustContainAlphabetic);\n return {valid: false, errorMessage};\n }\n\n function localeValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const value = input.value.trim();\n // Similarly to timezone IDs, there's not much point in validating\n // input locales other than checking if it contains at least two\n // alphabetic characters.\n // https://unicode.org/reports/tr35/#Unicode_language_identifier\n // The empty string resets the override, and is accepted as\n // well.\n if (value === '' || /[a-zA-Z]{2}/.test(value)) {\n return {valid: true, errorMessage: undefined};\n }\n const errorMessage = i18nString(UIStrings.localeMustContainAlphabetic);\n return {valid: false, errorMessage};\n }\n }\n}\nexport interface LocationDescription {\n title: string;\n lat: number;\n long: number;\n timezoneId: string;\n locale: string;\n}\n"]} \ No newline at end of file +{"version":3,"file":"LocationsSettingsTab.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sensors/LocationsSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AAEvE,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,eAAe,EAAE,kBAAkB;IACnC;;OAEG;IACH,YAAY,EAAE,eAAe;IAC7B;;OAEG;IACH,GAAG,EAAE,KAAK;IACV;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,yBAAyB,EAAE,+BAA+B;IAC1D;;;OAGG;IACH,2BAA2B,EAAE,kDAAkD;IAC/E;;OAEG;IACH,qBAAqB,EAAE,2BAA2B;IAClD;;;OAGG;IACH,gCAAgC,EAAE,iDAAiD;IACnF;;;OAGG;IACH,gCAAgC,EAAE,8CAA8C;IAChF;;OAEG;IACH,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,EAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAC,CAAC;QACtC,CAAC;QAED,SAAS,eAAe,CACpB,IAAyB,EAAE,KAAa,EAAE,KAAkC;YAC9E,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACjC,kEAAkE;YAClE,gEAAgE;YAChE,yBAAyB;YACzB,gEAAgE;YAChE,2DAA2D;YAC3D,QAAQ;YACR,IAAI,KAAK,KAAK,EAAE,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBAC7C,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAC,CAAC;aAC/C;YACD,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAC;YACvE,OAAO,EAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright 2018 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport locationsSettingsTabStyles from './locationsSettingsTab.css.js';\n\nconst UIStrings = {\n /**\n *@description Title in the Locations Settings Tab, where custom geographic locations that the user\n *has entered are stored.\n */\n customLocations: 'Custom locations',\n /**\n *@description Label for the name of a geographic location that the user has entered.\n */\n locationName: 'Location name',\n /**\n *@description Abbreviation of latitude in Locations Settings Tab of the Device Toolbar\n */\n lat: 'Lat',\n /**\n *@description Abbreviation of longitude in Locations Settings Tab of the Device Toolbar\n */\n long: 'Long',\n /**\n *@description Text in Sensors View of the Device Toolbar\n */\n timezoneId: 'Timezone ID',\n /**\n *@description Label for text input for the locale of a particular location.\n */\n locale: 'Locale',\n /**\n *@description Label for text input for the latitude of a GPS position.\n */\n latitude: 'Latitude',\n /**\n *@description Label for text input for the longitude of a GPS position.\n */\n longitude: 'Longitude',\n /**\n *@description Error message in the Locations settings pane that declares the location name input must not be empty\n */\n locationNameCannotBeEmpty: 'Location name cannot be empty',\n /**\n *@description Error message in the Locations settings pane that declares the maximum length of the location name\n *@example {50} PH1\n */\n locationNameMustBeLessThanS: 'Location name must be less than {PH1} characters',\n /**\n *@description Error message in the Locations settings pane that declares that the value for the latitude input must be a number\n */\n latitudeMustBeANumber: 'Latitude must be a number',\n /**\n *@description Error message in the Locations settings pane that declares the minimum value for the latitude input\n *@example {-90} PH1\n */\n latitudeMustBeGreaterThanOrEqual: 'Latitude must be greater than or equal to {PH1}',\n /**\n *@description Error message in the Locations settings pane that declares the maximum value for the latitude input\n *@example {90} PH1\n */\n latitudeMustBeLessThanOrEqualToS: 'Latitude must be less than or equal to {PH1}',\n /**\n *@description Error message in the Locations settings pane that declares that the value for the longitude input must be a number\n */\n longitudeMustBeANumber: 'Longitude must be a number',\n /**\n *@description Error message in the Locations settings pane that declares the minimum value for the longitude input\n *@example {-180} PH1\n */\n longitudeMustBeGreaterThanOr: 'Longitude must be greater than or equal to {PH1}',\n /**\n *@description Error message in the Locations settings pane that declares the maximum value for the longitude input\n *@example {180} PH1\n */\n longitudeMustBeLessThanOrEqualTo: 'Longitude must be less than or equal to {PH1}',\n /**\n *@description Error message in the Locations settings pane that declares timezone ID input invalid\n */\n timezoneIdMustContainAlphabetic: 'Timezone ID must contain alphabetic characters',\n /**\n *@description Error message in the Locations settings pane that declares locale input invalid\n */\n localeMustContainAlphabetic: 'Locale must contain alphabetic characters',\n /**\n *@description Text of add locations button in Locations Settings Tab of the Device Toolbar\n */\n addLocation: 'Add location...',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sensors/LocationsSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class LocationsSettingsTab extends UI.Widget.VBox implements UI.ListWidget.Delegate {\n private readonly list: UI.ListWidget.ListWidget;\n private readonly customSetting: Common.Settings.Setting;\n private editor?: UI.ListWidget.Editor;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('emulation-locations')}`);\n\n this.contentElement.createChild('div', 'header').textContent = i18nString(UIStrings.customLocations);\n\n const addButton = UI.UIUtils.createTextButton(\n i18nString(UIStrings.addLocation), this.addButtonClicked.bind(this), 'add-locations-button');\n addButton.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context('add-location')}`);\n this.contentElement.appendChild(addButton);\n\n this.list = new UI.ListWidget.ListWidget(this);\n this.list.element.classList.add('locations-list');\n this.list.show(this.contentElement);\n this.customSetting =\n Common.Settings.Settings.instance().moduleSetting('emulation.locations');\n const list =\n this.customSetting.get().map(location => replaceLocationTitles(location, this.customSetting.defaultValue));\n\n function replaceLocationTitles(\n location: LocationDescription, defaultValues: LocationDescription[]): LocationDescription {\n // This check is done for locations that might had been cached wrongly due to crbug.com/1171670.\n // Each of the default values would have been stored without a title if the user had added a new location\n // while the bug was present in the application. This means that getting the setting's default value with the `get`\n // method would return the default locations without a title. To cope with this, the setting values are\n // preemptively checked and corrected so that any default value mistakenly stored without a title is replaced\n // with the corresponding declared value in the pre-registered setting.\n if (!location.title) {\n const replacement = defaultValues.find(\n defaultLocation => defaultLocation.lat === location.lat && defaultLocation.long === location.long &&\n defaultLocation.timezoneId === location.timezoneId && defaultLocation.locale === location.locale);\n if (!replacement) {\n console.error('Could not determine a location setting title');\n } else {\n return replacement;\n }\n }\n return location;\n }\n\n this.customSetting.set(list);\n this.customSetting.addChangeListener(this.locationsUpdated, this);\n\n this.setDefaultFocusedElement(addButton);\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([locationsSettingsTabStyles]);\n this.list.registerCSSFiles([locationsSettingsTabStyles]);\n this.locationsUpdated();\n }\n\n private locationsUpdated(): void {\n this.list.clear();\n\n const conditions = this.customSetting.get();\n for (const condition of conditions) {\n this.list.appendItem(condition, true);\n }\n\n this.list.appendSeparator();\n }\n\n private addButtonClicked(): void {\n this.list.addNewItem(this.customSetting.get().length, {title: '', lat: 0, long: 0, timezoneId: '', locale: ''});\n }\n\n renderItem(location: LocationDescription, _editable: boolean): Element {\n const element = document.createElement('div');\n element.classList.add('locations-list-item');\n const title = element.createChild('div', 'locations-list-text locations-list-title');\n const titleText = title.createChild('div', 'locations-list-title-text');\n titleText.textContent = location.title;\n UI.Tooltip.Tooltip.install(titleText, location.title);\n element.createChild('div', 'locations-list-separator');\n element.createChild('div', 'locations-list-text').textContent = String(location.lat);\n element.createChild('div', 'locations-list-separator');\n element.createChild('div', 'locations-list-text').textContent = String(location.long);\n element.createChild('div', 'locations-list-separator');\n element.createChild('div', 'locations-list-text').textContent = location.timezoneId;\n element.createChild('div', 'locations-list-separator');\n element.createChild('div', 'locations-list-text').textContent = location.locale;\n return element;\n }\n\n removeItemRequested(item: LocationDescription, index: number): void {\n const list = this.customSetting.get();\n list.splice(index, 1);\n this.customSetting.set(list);\n }\n\n commitEdit(location: LocationDescription, editor: UI.ListWidget.Editor, isNew: boolean): void {\n location.title = editor.control('title').value.trim();\n const lat = editor.control('lat').value.trim();\n location.lat = lat ? parseFloat(lat) : 0;\n const long = editor.control('long').value.trim();\n location.long = long ? parseFloat(long) : 0;\n const timezoneId = editor.control('timezoneId').value.trim();\n location.timezoneId = timezoneId;\n const locale = editor.control('locale').value.trim();\n location.locale = locale;\n\n const list = this.customSetting.get();\n if (isNew) {\n list.push(location);\n }\n this.customSetting.set(list);\n }\n\n beginEdit(location: LocationDescription): UI.ListWidget.Editor {\n const editor = this.createEditor();\n editor.control('title').value = location.title;\n editor.control('lat').value = String(location.lat);\n editor.control('long').value = String(location.long);\n editor.control('timezoneId').value = location.timezoneId;\n editor.control('locale').value = location.locale;\n return editor;\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n this.editor = editor;\n const content = editor.contentElement();\n\n const titles = content.createChild('div', 'locations-edit-row');\n titles.createChild('div', 'locations-list-text locations-list-title').textContent =\n i18nString(UIStrings.locationName);\n titles.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n titles.createChild('div', 'locations-list-text').textContent = i18nString(UIStrings.lat);\n titles.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n titles.createChild('div', 'locations-list-text').textContent = i18nString(UIStrings.long);\n titles.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n titles.createChild('div', 'locations-list-text').textContent = i18nString(UIStrings.timezoneId);\n titles.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n titles.createChild('div', 'locations-list-text').textContent = i18nString(UIStrings.locale);\n\n const fields = content.createChild('div', 'locations-edit-row');\n fields.createChild('div', 'locations-list-text locations-list-title locations-input-container')\n .appendChild(editor.createInput('title', 'text', i18nString(UIStrings.locationName), titleValidator));\n fields.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n\n let cell = fields.createChild('div', 'locations-list-text locations-input-container');\n cell.appendChild(editor.createInput('lat', 'text', i18nString(UIStrings.latitude), latValidator));\n fields.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n\n cell = fields.createChild('div', 'locations-list-text locations-list-text-longitude locations-input-container');\n cell.appendChild(editor.createInput('long', 'text', i18nString(UIStrings.longitude), longValidator));\n fields.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n\n cell = fields.createChild('div', 'locations-list-text locations-input-container');\n cell.appendChild(editor.createInput('timezoneId', 'text', i18nString(UIStrings.timezoneId), timezoneIdValidator));\n fields.createChild('div', 'locations-list-separator locations-list-separator-invisible');\n\n cell = fields.createChild('div', 'locations-list-text locations-input-container');\n cell.appendChild(editor.createInput('locale', 'text', i18nString(UIStrings.locale), localeValidator));\n\n return editor;\n\n function titleValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const maxLength = 50;\n const value = input.value.trim();\n\n let errorMessage;\n if (!value.length) {\n errorMessage = i18nString(UIStrings.locationNameCannotBeEmpty);\n } else if (value.length > maxLength) {\n errorMessage = i18nString(UIStrings.locationNameMustBeLessThanS, {PH1: maxLength});\n }\n\n if (errorMessage) {\n return {valid: false, errorMessage};\n }\n return {valid: true, errorMessage: undefined};\n }\n\n function latValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const minLat = -90;\n const maxLat = 90;\n const value = input.value.trim();\n const parsedValue = Number(value);\n\n if (!value) {\n return {valid: true, errorMessage: undefined};\n }\n\n let errorMessage;\n if (Number.isNaN(parsedValue)) {\n errorMessage = i18nString(UIStrings.latitudeMustBeANumber);\n } else if (parseFloat(value) < minLat) {\n errorMessage = i18nString(UIStrings.latitudeMustBeGreaterThanOrEqual, {PH1: minLat});\n } else if (parseFloat(value) > maxLat) {\n errorMessage = i18nString(UIStrings.latitudeMustBeLessThanOrEqualToS, {PH1: maxLat});\n }\n\n if (errorMessage) {\n return {valid: false, errorMessage};\n }\n return {valid: true, errorMessage: undefined};\n }\n\n function longValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const minLong = -180;\n const maxLong = 180;\n const value = input.value.trim();\n const parsedValue = Number(value);\n\n if (!value) {\n return {valid: true, errorMessage: undefined};\n }\n\n let errorMessage;\n if (Number.isNaN(parsedValue)) {\n errorMessage = i18nString(UIStrings.longitudeMustBeANumber);\n } else if (parseFloat(value) < minLong) {\n errorMessage = i18nString(UIStrings.longitudeMustBeGreaterThanOr, {PH1: minLong});\n } else if (parseFloat(value) > maxLong) {\n errorMessage = i18nString(UIStrings.longitudeMustBeLessThanOrEqualTo, {PH1: maxLong});\n }\n\n if (errorMessage) {\n return {valid: false, errorMessage};\n }\n return {valid: true, errorMessage: undefined};\n }\n\n function timezoneIdValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const value = input.value.trim();\n // Chromium uses ICU's timezone implementation, which is very\n // liberal in what it accepts. ICU does not simply use an allowlist\n // but instead tries to make sense of the input, even for\n // weird-looking timezone IDs. There's not much point in validating\n // the input other than checking if it contains at least one\n // alphabetic character. The empty string resets the override,\n // and is accepted as well.\n if (value === '' || /[a-zA-Z]/.test(value)) {\n return {valid: true, errorMessage: undefined};\n }\n const errorMessage = i18nString(UIStrings.timezoneIdMustContainAlphabetic);\n return {valid: false, errorMessage};\n }\n\n function localeValidator(\n item: LocationDescription, index: number, input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const value = input.value.trim();\n // Similarly to timezone IDs, there's not much point in validating\n // input locales other than checking if it contains at least two\n // alphabetic characters.\n // https://unicode.org/reports/tr35/#Unicode_language_identifier\n // The empty string resets the override, and is accepted as\n // well.\n if (value === '' || /[a-zA-Z]{2}/.test(value)) {\n return {valid: true, errorMessage: undefined};\n }\n const errorMessage = i18nString(UIStrings.localeMustContainAlphabetic);\n return {valid: false, errorMessage};\n }\n }\n}\nexport interface LocationDescription {\n title: string;\n lat: number;\n long: number;\n timezoneId: string;\n locale: string;\n}\n"]} \ No newline at end of file diff --git a/public/panels/sensors/SensorsView.d.ts b/public/panels/sensors/SensorsView.d.ts index 4bdc3b61e..1c8b73f6d 100644 --- a/public/panels/sensors/SensorsView.d.ts +++ b/public/panels/sensors/SensorsView.d.ts @@ -34,7 +34,6 @@ export declare class SensorsView extends UI.Widget.VBox { private mouseDownVector?; private originalBoxMatrix?; constructor(); - static instance(): SensorsView; wasShown(): void; private createPanelSeparator; private createLocationSection; diff --git a/public/panels/sensors/SensorsView.js b/public/panels/sensors/SensorsView.js index 58cabf8d2..bb8be8821 100644 --- a/public/panels/sensors/SensorsView.js +++ b/public/panels/sensors/SensorsView.js @@ -159,9 +159,6 @@ const UIStrings = { }; const str_ = i18n.i18n.registerUIStrings('panels/sensors/SensorsView.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration -// eslint-disable-next-line @typescript-eslint/naming-convention -let _instanceObject = null; export class SensorsView extends UI.Widget.VBox { // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration // eslint-disable-next-line @typescript-eslint/naming-convention @@ -222,12 +219,6 @@ export class SensorsView extends UI.Widget.VBox { this.appendIdleEmulator(); this.createPanelSeparator(); } - static instance() { - if (!_instanceObject) { - _instanceObject = new SensorsView(); - } - return _instanceObject; - } wasShown() { super.wasShown(); this.registerCSSFiles([sensorsStyles]); diff --git a/public/panels/sensors/SensorsView.js.map b/public/panels/sensors/SensorsView.js.map index 0f5a60b33..e8b19881d 100644 --- a/public/panels/sensors/SensorsView.js.map +++ b/public/panels/sensors/SensorsView.js.map @@ -1 +1 @@ -{"version":3,"file":"SensorsView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sensors/SensorsView.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;;OAGG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,wBAAwB,EAAE,8BAA8B;IACxD;;;;OAIG;IACH,KAAK,EAAE,QAAQ;IACf;;;OAGG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,mBAAmB,EAAE,sBAAsB;IAC3C;;;;;OA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,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,cAAc,EAAC;oBACzE,EAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAC;oBAC7E,EAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,WAAW,EAAC;oBAClE,EAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,cAAc,EAAC;iBACxE;aACF,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,kBAAkB;IAC7B,YAAY,CAAC,QAA4B,EAAE,SAAiB;QAC1D,KAAK,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC","sourcesContent":["// Copyright (c) 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport sensorsStyles from './sensors.css.js';\n\nconst UIStrings = {\n /**\n *@description Title for a group of cities\n */\n location: 'Location',\n /**\n *@description An option that appears in a drop-down to prevent the GPS location of the user from being overridden.\n */\n noOverride: 'No override',\n /**\n *@description Title of a section that contains overrides for the user's GPS location.\n */\n overrides: 'Overrides',\n /**\n *@description Text of button in Sensors View, takes the user to the custom location setting screen\n *where they can enter/edit custom locations.\n */\n manage: 'Manage',\n /**\n *@description Aria-label for location manage button in Sensors View\n */\n manageTheListOfLocations: 'Manage the list of locations',\n /**\n *@description Option in a drop-down input for selecting the GPS location of the user. As an\n *alternative to selecting a location from the list, the user can select this option and they are\n *prompted to enter the details for a new custom location.\n */\n other: 'Other…',\n /**\n *@description Title of a section in a drop-down input that contains error locations, e.g. to select\n *a location override that says 'the location is not available'. A noun.\n */\n error: 'Error',\n /**\n *@description A type of override where the geographic location of the user is not available.\n */\n locationUnavailable: 'Location unavailable',\n /**\n *@description Tooltip text telling the user how to change the value of a latitude/longitude input\n *text box. several shortcuts are provided for convenience. The placeholder can be different\n *keyboard keys, depending on the user's settings.\n *@example {Ctrl} PH1\n */\n adjustWithMousewheelOrUpdownKeys: 'Adjust with mousewheel or up/down keys. {PH1}: ±10, Shift: ±1, Alt: ±0.01',\n /**\n *@description Label for latitude of a GPS location.\n */\n latitude: 'Latitude',\n /**\n *@description Label for Longitude of a GPS location.\n */\n longitude: 'Longitude',\n /**\n *@description Label for the ID of a timezone for a particular location.\n */\n timezoneId: 'Timezone ID',\n /**\n *@description Label for the locale relevant to a custom location.\n */\n locale: 'Locale',\n /**\n *@description Label the orientation of a user's device e.g. tilt in 3D-space.\n */\n orientation: 'Orientation',\n /**\n *@description Option that when chosen, turns off device orientation override.\n */\n off: 'Off',\n /**\n *@description Option that when chosen, allows the user to enter a custom orientation for the device e.g. tilt in 3D-space.\n */\n customOrientation: 'Custom orientation',\n /**\n *@description Warning to the user they should enable the device orientation override, in order to\n *enable this input which allows them to interactively select orientation by dragging a 3D phone\n *model.\n */\n enableOrientationToRotate: 'Enable orientation to rotate',\n /**\n *@description Text telling the user how to use an input which allows them to interactively select\n *orientation by dragging a 3D phone model.\n */\n shiftdragHorizontallyToRotate: 'Shift+drag horizontally to rotate around the y-axis',\n /**\n *@description Message in the Sensors tool that is alerted (for screen readers) when the device orientation setting is changed\n *@example {180} PH1\n *@example {-90} PH2\n *@example {0} PH3\n */\n deviceOrientationSetToAlphaSBeta: 'Device orientation set to alpha: {PH1}, beta: {PH2}, gamma: {PH3}',\n /**\n *@description Text of orientation reset button in Sensors View of the Device Toolbar\n */\n reset: 'Reset',\n /**\n *@description Aria-label for orientation reset button in Sensors View. Command.\n */\n resetDeviceOrientation: 'Reset device orientation',\n /**\n *@description Description of the Touch select in Sensors tab\n */\n forcesTouchInsteadOfClick: 'Forces touch instead of click',\n /**\n *@description Description of the Emulate Idle State select in Sensors tab\n */\n forcesSelectedIdleStateEmulation: 'Forces selected idle state emulation',\n /**\n *@description Title for a group of configuration options in a drop-down input.\n */\n presets: 'Presets',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space.\n */\n portrait: 'Portrait',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space.\n */\n portraitUpsideDown: 'Portrait upside down',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space.\n */\n landscapeLeft: 'Landscape left',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space.\n */\n landscapeRight: 'Landscape right',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space. Noun indicating\n *the display of the device is pointing up.\n */\n displayUp: 'Display up',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space. Noun indicating\n *the display of the device is pointing down.\n */\n displayDown: 'Display down',\n /**\n *@description Label for one dimension of device orientation that the user can override.\n */\n alpha: '\\u03B1 (alpha)',\n /**\n *@description Label for one dimension of device orientation that the user can override.\n */\n beta: '\\u03B2 (beta)',\n /**\n *@description Label for one dimension of device orientation that the user can override.\n */\n gamma: '\\u03B3 (gamma)',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sensors/SensorsView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n// eslint-disable-next-line @typescript-eslint/naming-convention\nlet _instanceObject: SensorsView|null = null;\n\nexport class SensorsView extends UI.Widget.VBox {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private readonly LocationSetting: Common.Settings.Setting;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private Location: SDK.EmulationModel.Location;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private LocationOverrideEnabled: boolean;\n private fieldsetElement!: HTMLFieldSetElement;\n private timezoneError!: HTMLElement;\n private locationSelectElement!: HTMLSelectElement;\n private latitudeInput!: HTMLInputElement;\n private longitudeInput!: HTMLInputElement;\n private timezoneInput!: HTMLInputElement;\n private localeInput!: HTMLInputElement;\n private latitudeSetter!: (arg0: string) => void;\n private longitudeSetter!: (arg0: string) => void;\n private timezoneSetter!: (arg0: string) => void;\n private localeSetter!: (arg0: string) => void;\n private localeError!: HTMLElement;\n private customLocationsGroup!: HTMLOptGroupElement;\n private readonly deviceOrientationSetting: Common.Settings.Setting;\n private deviceOrientation: SDK.EmulationModel.DeviceOrientation;\n private deviceOrientationOverrideEnabled: boolean;\n private deviceOrientationFieldset!: HTMLFieldSetElement;\n private stageElement!: HTMLElement;\n private orientationSelectElement!: HTMLSelectElement;\n private alphaElement!: HTMLInputElement;\n private betaElement!: HTMLInputElement;\n private gammaElement!: HTMLInputElement;\n private alphaSetter!: (arg0: string) => void;\n private betaSetter!: (arg0: string) => void;\n private gammaSetter!: (arg0: string) => void;\n private orientationLayer!: HTMLDivElement;\n private boxElement?: HTMLElement;\n private boxMatrix?: DOMMatrix;\n private mouseDownVector?: UI.Geometry.Vector|null;\n private originalBoxMatrix?: DOMMatrix;\n\n constructor() {\n super(true);\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('sensors')}`);\n this.contentElement.classList.add('sensors-view');\n\n this.LocationSetting = Common.Settings.Settings.instance().createSetting('emulation.locationOverride', '');\n this.Location = SDK.EmulationModel.Location.parseSetting(this.LocationSetting.get());\n this.LocationOverrideEnabled = false;\n\n this.createLocationSection(this.Location);\n\n this.createPanelSeparator();\n\n this.deviceOrientationSetting =\n Common.Settings.Settings.instance().createSetting('emulation.deviceOrientationOverride', '');\n this.deviceOrientation = SDK.EmulationModel.DeviceOrientation.parseSetting(this.deviceOrientationSetting.get());\n this.deviceOrientationOverrideEnabled = false;\n\n this.createDeviceOrientationSection();\n\n this.createPanelSeparator();\n\n this.appendTouchControl();\n\n this.createPanelSeparator();\n\n this.appendIdleEmulator();\n\n this.createPanelSeparator();\n }\n\n static instance(): SensorsView {\n if (!_instanceObject) {\n _instanceObject = new SensorsView();\n }\n return _instanceObject;\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([sensorsStyles]);\n }\n\n private createPanelSeparator(): void {\n this.contentElement.createChild('div').classList.add('panel-section-separator');\n }\n\n private createLocationSection(location: SDK.EmulationModel.Location): void {\n const geogroup = this.contentElement.createChild('section', 'sensors-group');\n geogroup.setAttribute('jslog', `${VisualLogging.section().context('location')}`);\n const geogroupTitle = UI.UIUtils.createLabel(i18nString(UIStrings.location), 'sensors-group-title');\n geogroup.appendChild(geogroupTitle);\n const fields = geogroup.createChild('div', 'geo-fields');\n let selectedIndex = 0;\n\n const noOverrideOption = {title: i18nString(UIStrings.noOverride), location: NonPresetOptions.NoOverride};\n this.locationSelectElement = (fields.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.locationSelectElement.setAttribute('jslog', `${VisualLogging.dropDown().track({change: true})}`);\n UI.ARIAUtils.bindLabelToControl(geogroupTitle, this.locationSelectElement);\n\n // No override\n this.locationSelectElement.appendChild(new Option(noOverrideOption.title, noOverrideOption.location));\n this.customLocationsGroup = (this.locationSelectElement.createChild('optgroup') as HTMLOptGroupElement);\n this.customLocationsGroup.label = i18nString(UIStrings.overrides);\n const customLocations = Common.Settings.Settings.instance().moduleSetting('emulation.locations');\n const manageButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.manage), () => Common.Revealer.reveal(customLocations));\n manageButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('sensors.manage-locations')}`);\n UI.ARIAUtils.setLabel(manageButton, i18nString(UIStrings.manageTheListOfLocations));\n fields.appendChild(manageButton);\n const fillCustomSettings = (): void => {\n if (!this.customLocationsGroup) {\n return;\n }\n this.customLocationsGroup.removeChildren();\n for (const [i, customLocation] of customLocations.get().entries()) {\n this.customLocationsGroup.appendChild(new Option(customLocation.title, JSON.stringify(customLocation)));\n if (location.latitude === customLocation.lat && location.longitude === customLocation.long) {\n // If the location coming from settings matches the custom location, use its index to select the option\n selectedIndex = i + 1;\n }\n }\n };\n customLocations.addChangeListener(fillCustomSettings);\n fillCustomSettings();\n\n // Other location\n const customLocationOption = {title: i18nString(UIStrings.other), location: NonPresetOptions.Custom};\n this.locationSelectElement.appendChild(new Option(customLocationOption.title, customLocationOption.location));\n\n // Error location.\n const group = (this.locationSelectElement.createChild('optgroup') as HTMLOptGroupElement);\n group.label = i18nString(UIStrings.error);\n group.appendChild(new Option(i18nString(UIStrings.locationUnavailable), NonPresetOptions.Unavailable));\n\n this.locationSelectElement.selectedIndex = selectedIndex;\n this.locationSelectElement.addEventListener('change', this.LocationSelectChanged.bind(this));\n this.fieldsetElement = (fields.createChild('fieldset') as HTMLFieldSetElement);\n this.fieldsetElement.disabled = !this.LocationOverrideEnabled;\n this.fieldsetElement.id = 'location-override-section';\n\n const latitudeGroup = this.fieldsetElement.createChild('div', 'latlong-group');\n const longitudeGroup = this.fieldsetElement.createChild('div', 'latlong-group');\n const timezoneGroup = this.fieldsetElement.createChild('div', 'latlong-group');\n const localeGroup = this.fieldsetElement.createChild('div', 'latlong-group');\n\n const cmdOrCtrl = Host.Platform.isMac() ? '\\u2318' : 'Ctrl';\n const modifierKeyMessage = i18nString(UIStrings.adjustWithMousewheelOrUpdownKeys, {PH1: cmdOrCtrl});\n\n this.latitudeInput = UI.UIUtils.createInput('', 'number', 'latitude');\n latitudeGroup.appendChild(this.latitudeInput);\n this.latitudeInput.setAttribute('step', 'any');\n this.latitudeInput.value = '0';\n this.latitudeSetter = UI.UIUtils.bindInput(\n this.latitudeInput, this.applyLocationUserInput.bind(this), SDK.EmulationModel.Location.latitudeValidator, true,\n 0.1);\n this.latitudeSetter(String(location.latitude));\n UI.Tooltip.Tooltip.install(this.latitudeInput, modifierKeyMessage);\n latitudeGroup.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.latitude), 'latlong-title', this.latitudeInput));\n\n this.longitudeInput = UI.UIUtils.createInput('', 'number', 'longitude');\n longitudeGroup.appendChild(this.longitudeInput);\n this.longitudeInput.setAttribute('step', 'any');\n this.longitudeInput.value = '0';\n this.longitudeSetter = UI.UIUtils.bindInput(\n this.longitudeInput, this.applyLocationUserInput.bind(this), SDK.EmulationModel.Location.longitudeValidator,\n true, 0.1);\n this.longitudeSetter(String(location.longitude));\n UI.Tooltip.Tooltip.install(this.longitudeInput, modifierKeyMessage);\n longitudeGroup.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.longitude), 'latlong-title', this.longitudeInput));\n\n this.timezoneInput = UI.UIUtils.createInput('', 'text', 'timezone');\n timezoneGroup.appendChild(this.timezoneInput);\n this.timezoneInput.value = 'Europe/Berlin';\n this.timezoneSetter = UI.UIUtils.bindInput(\n this.timezoneInput, this.applyLocationUserInput.bind(this), SDK.EmulationModel.Location.timezoneIdValidator,\n false);\n this.timezoneSetter(location.timezoneId);\n timezoneGroup.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.timezoneId), 'timezone-title', this.timezoneInput));\n this.timezoneError = (timezoneGroup.createChild('div', 'timezone-error') as HTMLElement);\n\n this.localeInput = UI.UIUtils.createInput('', 'text', 'locale');\n localeGroup.appendChild(this.localeInput);\n this.localeInput.value = 'en-US';\n this.localeSetter = UI.UIUtils.bindInput(\n this.localeInput, this.applyLocationUserInput.bind(this), SDK.EmulationModel.Location.localeValidator, false);\n this.localeSetter(location.locale);\n localeGroup.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.locale), 'locale-title', this.localeInput));\n this.localeError = (localeGroup.createChild('div', 'locale-error') as HTMLElement);\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private LocationSelectChanged(): void {\n this.fieldsetElement.disabled = false;\n this.timezoneError.textContent = '';\n const value = this.locationSelectElement.options[this.locationSelectElement.selectedIndex].value;\n if (value === NonPresetOptions.NoOverride) {\n this.LocationOverrideEnabled = false;\n this.clearFieldsetElementInputs();\n this.fieldsetElement.disabled = true;\n } else if (value === NonPresetOptions.Custom) {\n this.LocationOverrideEnabled = true;\n const location = SDK.EmulationModel.Location.parseUserInput(\n this.latitudeInput.value.trim(), this.longitudeInput.value.trim(), this.timezoneInput.value.trim(),\n this.localeInput.value.trim());\n if (!location) {\n return;\n }\n this.Location = location;\n } else if (value === NonPresetOptions.Unavailable) {\n this.LocationOverrideEnabled = true;\n this.Location = new SDK.EmulationModel.Location(0, 0, '', '', true);\n } else {\n this.LocationOverrideEnabled = true;\n const coordinates = JSON.parse(value);\n this.Location = new SDK.EmulationModel.Location(\n coordinates.lat, coordinates.long, coordinates.timezoneId, coordinates.locale, false);\n this.latitudeSetter(coordinates.lat);\n this.longitudeSetter(coordinates.long);\n this.timezoneSetter(coordinates.timezoneId);\n this.localeSetter(coordinates.locale);\n }\n\n this.applyLocation();\n if (value === NonPresetOptions.Custom) {\n this.latitudeInput.focus();\n }\n }\n\n private applyLocationUserInput(): void {\n const location = SDK.EmulationModel.Location.parseUserInput(\n this.latitudeInput.value.trim(), this.longitudeInput.value.trim(), this.timezoneInput.value.trim(),\n this.localeInput.value.trim());\n if (!location) {\n return;\n }\n\n this.timezoneError.textContent = '';\n\n this.setSelectElementLabel(this.locationSelectElement, NonPresetOptions.Custom);\n this.Location = location;\n this.applyLocation();\n }\n\n private applyLocation(): void {\n if (this.LocationOverrideEnabled) {\n this.LocationSetting.set(this.Location.toSetting());\n } else {\n this.LocationSetting.set('');\n }\n for (const emulationModel of SDK.TargetManager.TargetManager.instance().models(SDK.EmulationModel.EmulationModel)) {\n emulationModel.emulateLocation(this.LocationOverrideEnabled ? this.Location : null).catch(err => {\n switch (err.type) {\n case 'emulation-set-timezone': {\n this.timezoneError.textContent = err.message;\n break;\n }\n case 'emulation-set-locale': {\n this.localeError.textContent = err.message;\n break;\n }\n }\n });\n }\n }\n\n private clearFieldsetElementInputs(): void {\n this.latitudeSetter('0');\n this.longitudeSetter('0');\n this.timezoneSetter('');\n this.localeSetter('');\n }\n\n private createDeviceOrientationSection(): void {\n const orientationGroup = this.contentElement.createChild('section', 'sensors-group');\n orientationGroup.setAttribute('jslog', `${VisualLogging.section().context('device-orientation')}`);\n const orientationTitle = UI.UIUtils.createLabel(i18nString(UIStrings.orientation), 'sensors-group-title');\n orientationGroup.appendChild(orientationTitle);\n const orientationContent = orientationGroup.createChild('div', 'orientation-content');\n const fields = orientationContent.createChild('div', 'orientation-fields');\n\n const orientationOffOption = {title: i18nString(UIStrings.off), orientation: NonPresetOptions.NoOverride};\n const customOrientationOption = {\n title: i18nString(UIStrings.customOrientation),\n orientation: NonPresetOptions.Custom,\n };\n const orientationGroups = [{\n title: i18nString(UIStrings.presets),\n value: [\n {title: i18nString(UIStrings.portrait), orientation: '[0, 90, 0]'},\n {title: i18nString(UIStrings.portraitUpsideDown), orientation: '[-180, -90, 0]'},\n {title: i18nString(UIStrings.landscapeLeft), orientation: '[90, 0, -90]'},\n {title: i18nString(UIStrings.landscapeRight), orientation: '[90, -180, -90]'},\n {title: i18nString(UIStrings.displayUp), orientation: '[0, 0, 0]'},\n {title: i18nString(UIStrings.displayDown), orientation: '[0, -180, 0]'},\n ],\n }];\n this.orientationSelectElement = (this.contentElement.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.orientationSelectElement.setAttribute('jslog', `${VisualLogging.dropDown().track({change: true})}`);\n UI.ARIAUtils.bindLabelToControl(orientationTitle, this.orientationSelectElement);\n this.orientationSelectElement.appendChild(new Option(orientationOffOption.title, orientationOffOption.orientation));\n this.orientationSelectElement.appendChild(\n new Option(customOrientationOption.title, customOrientationOption.orientation));\n\n for (let i = 0; i < orientationGroups.length; ++i) {\n const groupElement = (this.orientationSelectElement.createChild('optgroup') as HTMLOptGroupElement);\n groupElement.label = orientationGroups[i].title;\n const group = orientationGroups[i].value;\n for (let j = 0; j < group.length; ++j) {\n groupElement.appendChild(new Option(group[j].title, group[j].orientation));\n }\n }\n this.orientationSelectElement.selectedIndex = 0;\n fields.appendChild(this.orientationSelectElement);\n this.orientationSelectElement.addEventListener('change', this.orientationSelectChanged.bind(this));\n\n this.deviceOrientationFieldset = this.createDeviceOrientationOverrideElement(this.deviceOrientation);\n this.stageElement = (orientationContent.createChild('div', 'orientation-stage') as HTMLElement);\n this.stageElement.setAttribute('jslog', `${VisualLogging.preview().track({drag: true})}`);\n this.orientationLayer = (this.stageElement.createChild('div', 'orientation-layer') as HTMLDivElement);\n this.boxElement = this.orientationLayer.createChild('section', 'orientation-box orientation-element');\n\n this.boxElement.createChild('section', 'orientation-front orientation-element');\n this.boxElement.createChild('section', 'orientation-top orientation-element');\n this.boxElement.createChild('section', 'orientation-back orientation-element');\n this.boxElement.createChild('section', 'orientation-left orientation-element');\n this.boxElement.createChild('section', 'orientation-right orientation-element');\n this.boxElement.createChild('section', 'orientation-bottom orientation-element');\n\n UI.UIUtils.installDragHandle(this.stageElement, this.onBoxDragStart.bind(this), event => {\n this.onBoxDrag(event);\n }, null, '-webkit-grabbing', '-webkit-grab');\n\n fields.appendChild(this.deviceOrientationFieldset);\n this.enableOrientationFields(true);\n this.setBoxOrientation(this.deviceOrientation, false);\n }\n\n private enableOrientationFields(disable: boolean|null): void {\n if (disable) {\n this.deviceOrientationFieldset.disabled = true;\n this.stageElement.classList.add('disabled');\n UI.Tooltip.Tooltip.install(this.stageElement, i18nString(UIStrings.enableOrientationToRotate));\n } else {\n this.deviceOrientationFieldset.disabled = false;\n this.stageElement.classList.remove('disabled');\n UI.Tooltip.Tooltip.install(this.stageElement, i18nString(UIStrings.shiftdragHorizontallyToRotate));\n }\n }\n\n private orientationSelectChanged(): void {\n const value = this.orientationSelectElement.options[this.orientationSelectElement.selectedIndex].value;\n this.enableOrientationFields(false);\n\n if (value === NonPresetOptions.NoOverride) {\n this.deviceOrientationOverrideEnabled = false;\n this.enableOrientationFields(true);\n this.applyDeviceOrientation();\n } else if (value === NonPresetOptions.Custom) {\n this.deviceOrientationOverrideEnabled = true;\n this.resetDeviceOrientation();\n this.alphaElement.focus();\n } else {\n const parsedValue = JSON.parse(value);\n this.deviceOrientationOverrideEnabled = true;\n this.deviceOrientation = new SDK.EmulationModel.DeviceOrientation(parsedValue[0], parsedValue[1], parsedValue[2]);\n this.setDeviceOrientation(this.deviceOrientation, DeviceOrientationModificationSource.SelectPreset);\n }\n }\n\n private applyDeviceOrientation(): void {\n if (this.deviceOrientationOverrideEnabled) {\n this.deviceOrientationSetting.set(this.deviceOrientation.toSetting());\n }\n for (const emulationModel of SDK.TargetManager.TargetManager.instance().models(SDK.EmulationModel.EmulationModel)) {\n void emulationModel.emulateDeviceOrientation(\n this.deviceOrientationOverrideEnabled ? this.deviceOrientation : null);\n }\n }\n\n private setSelectElementLabel(selectElement: HTMLSelectElement, labelValue: string): void {\n const optionValues = Array.prototype.map.call(selectElement.options, x => x.value);\n selectElement.selectedIndex = optionValues.indexOf(labelValue);\n }\n\n private applyDeviceOrientationUserInput(): void {\n this.setDeviceOrientation(\n SDK.EmulationModel.DeviceOrientation.parseUserInput(\n this.alphaElement.value.trim(), this.betaElement.value.trim(), this.gammaElement.value.trim()),\n DeviceOrientationModificationSource.UserInput);\n this.setSelectElementLabel(this.orientationSelectElement, NonPresetOptions.Custom);\n }\n\n private resetDeviceOrientation(): void {\n this.setDeviceOrientation(\n new SDK.EmulationModel.DeviceOrientation(0, 90, 0), DeviceOrientationModificationSource.ResetButton);\n this.setSelectElementLabel(this.orientationSelectElement, '[0, 90, 0]');\n }\n\n private setDeviceOrientation(\n deviceOrientation: SDK.EmulationModel.DeviceOrientation|null,\n modificationSource: DeviceOrientationModificationSource): void {\n if (!deviceOrientation) {\n return;\n }\n\n function roundAngle(angle: number): number {\n return Math.round(angle * 10000) / 10000;\n }\n\n if (modificationSource !== DeviceOrientationModificationSource.UserInput) {\n // Even though the angles in |deviceOrientation| will not be rounded\n // here, their precision will be rounded by CSS when we change\n // |this.orientationLayer.style| in setBoxOrientation().\n this.alphaSetter(String(roundAngle(deviceOrientation.alpha)));\n this.betaSetter(String(roundAngle(deviceOrientation.beta)));\n this.gammaSetter(String(roundAngle(deviceOrientation.gamma)));\n }\n\n const animate = modificationSource !== DeviceOrientationModificationSource.UserDrag;\n this.setBoxOrientation(deviceOrientation, animate);\n\n this.deviceOrientation = deviceOrientation;\n this.applyDeviceOrientation();\n\n UI.ARIAUtils.alert(i18nString(\n UIStrings.deviceOrientationSetToAlphaSBeta,\n {PH1: deviceOrientation.alpha, PH2: deviceOrientation.beta, PH3: deviceOrientation.gamma}));\n }\n\n private createAxisInput(parentElement: Element, input: HTMLInputElement, label: string, validator: (arg0: string) => {\n valid: boolean,\n errorMessage: (string|undefined),\n }): (arg0: string) => void {\n const div = parentElement.createChild('div', 'orientation-axis-input-container');\n div.appendChild(input);\n div.appendChild(UI.UIUtils.createLabel(label, /* className */ '', input));\n return UI.UIUtils.bindInput(input, this.applyDeviceOrientationUserInput.bind(this), validator, true);\n }\n\n private createDeviceOrientationOverrideElement(deviceOrientation: SDK.EmulationModel.DeviceOrientation):\n HTMLFieldSetElement {\n const fieldsetElement = document.createElement('fieldset');\n fieldsetElement.classList.add('device-orientation-override-section');\n const cellElement = fieldsetElement.createChild('td', 'orientation-inputs-cell');\n\n this.alphaElement = UI.UIUtils.createInput('', 'number', 'alpha');\n this.alphaElement.setAttribute('step', 'any');\n this.alphaSetter = this.createAxisInput(\n cellElement, this.alphaElement, i18nString(UIStrings.alpha),\n SDK.EmulationModel.DeviceOrientation.alphaAngleValidator);\n this.alphaSetter(String(deviceOrientation.alpha));\n\n this.betaElement = UI.UIUtils.createInput('', 'number', 'beta');\n this.betaElement.setAttribute('step', 'any');\n this.betaSetter = this.createAxisInput(\n cellElement, this.betaElement, i18nString(UIStrings.beta),\n SDK.EmulationModel.DeviceOrientation.betaAngleValidator);\n this.betaSetter(String(deviceOrientation.beta));\n\n this.gammaElement = UI.UIUtils.createInput('', 'number', 'gamma');\n this.gammaElement.setAttribute('step', 'any');\n this.gammaSetter = this.createAxisInput(\n cellElement, this.gammaElement, i18nString(UIStrings.gamma),\n SDK.EmulationModel.DeviceOrientation.gammaAngleValidator);\n this.gammaSetter(String(deviceOrientation.gamma));\n\n const resetButton = UI.UIUtils.createTextButton(\n i18nString(UIStrings.reset), this.resetDeviceOrientation.bind(this), 'orientation-reset-button');\n resetButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('sensors.reset-device-orientiation')}`);\n UI.ARIAUtils.setLabel(resetButton, i18nString(UIStrings.resetDeviceOrientation));\n resetButton.setAttribute('type', 'reset');\n cellElement.appendChild(resetButton);\n return fieldsetElement;\n }\n\n private setBoxOrientation(deviceOrientation: SDK.EmulationModel.DeviceOrientation, animate: boolean): void {\n if (animate) {\n this.stageElement.classList.add('is-animating');\n } else {\n this.stageElement.classList.remove('is-animating');\n }\n\n // It is important to explain the multiple conversions happening here. A\n // few notes on coordinate spaces first:\n // 1. The CSS coordinate space is left-handed. X and Y are parallel to the\n // screen, and Z is perpendicular to the screen. X is positive to the\n // right, Y is positive downwards and Z increases towards the viewer.\n // See https://drafts.csswg.org/css-transforms-2/#transform-rendering\n // for more information.\n // 2. The Device Orientation coordinate space is right-handed. X and Y are\n // parallel to the screen, and Z is perpenticular to the screen. X is\n // positive to the right, Y is positive upwards and Z increases towards\n // the viewer. See\n // https://w3c.github.io/deviceorientation/#deviceorientation for more\n // information.\n // 3. Additionally, the phone model we display is rotated +90 degrees in\n // the X axis in the CSS coordinate space (i.e. when all angles are 0 we\n // cannot see its screen in DevTools).\n //\n // |this.boxMatrix| is set in the Device Orientation coordinate space\n // because it represents the phone model we show users and also because the\n // calculations in UI.Geometry.EulerAngles assume this coordinate space (so\n // we apply the rotations in the Z-X'-Y'' order).\n // The CSS transforms, on the other hand, are done in the CSS coordinate\n // space, so we need to convert 2) to 1) while keeping 3) in mind. We can\n // cover 3) by swapping the Y and Z axes, and 2) by inverting the X axis.\n const {alpha, beta, gamma} = deviceOrientation;\n this.boxMatrix = new DOMMatrixReadOnly().rotate(0, 0, alpha).rotate(beta, 0, 0).rotate(0, gamma, 0);\n this.orientationLayer.style.transform = `rotateY(${alpha}deg) rotateX(${- beta}deg) rotateZ(${gamma}deg)`;\n }\n\n private onBoxDrag(event: MouseEvent): boolean {\n const mouseMoveVector = this.calculateRadiusVector(event.x, event.y);\n if (!mouseMoveVector) {\n return true;\n }\n\n if (!this.mouseDownVector) {\n return true;\n }\n\n event.consume(true);\n let axis, angle;\n if (event.shiftKey) {\n axis = new UI.Geometry.Vector(0, 0, 1);\n angle = (mouseMoveVector.x - this.mouseDownVector.x) * ShiftDragOrientationSpeed;\n } else {\n axis = UI.Geometry.crossProduct(this.mouseDownVector, mouseMoveVector);\n angle = UI.Geometry.calculateAngle(this.mouseDownVector, mouseMoveVector);\n }\n\n // See the comment in setBoxOrientation() for a longer explanation about\n // the CSS coordinate space, the Device Orientation coordinate space and\n // the conversions we make. |axis| and |angle| are in the CSS coordinate\n // space, while |this.originalBoxMatrix| is rotated and in the Device\n // Orientation coordinate space, which is why we swap Y and Z and invert X.\n const currentMatrix =\n new DOMMatrixReadOnly().rotateAxisAngle(-axis.x, axis.z, axis.y, angle).multiply(this.originalBoxMatrix);\n\n const eulerAngles = UI.Geometry.EulerAngles.fromDeviceOrientationRotationMatrix(currentMatrix);\n const newOrientation =\n new SDK.EmulationModel.DeviceOrientation(eulerAngles.alpha, eulerAngles.beta, eulerAngles.gamma);\n this.setDeviceOrientation(newOrientation, DeviceOrientationModificationSource.UserDrag);\n this.setSelectElementLabel(this.orientationSelectElement, NonPresetOptions.Custom);\n return false;\n }\n\n private onBoxDragStart(event: MouseEvent): boolean {\n if (!this.deviceOrientationOverrideEnabled) {\n return false;\n }\n\n this.mouseDownVector = this.calculateRadiusVector(event.x, event.y);\n this.originalBoxMatrix = this.boxMatrix;\n\n if (!this.mouseDownVector) {\n return false;\n }\n\n event.consume(true);\n return true;\n }\n\n private calculateRadiusVector(x: number, y: number): UI.Geometry.Vector|null {\n const rect = this.stageElement.getBoundingClientRect();\n const radius = Math.max(rect.width, rect.height) / 2;\n const sphereX = (x - rect.left - rect.width / 2) / radius;\n const sphereY = (y - rect.top - rect.height / 2) / radius;\n const sqrSum = sphereX * sphereX + sphereY * sphereY;\n if (sqrSum > 0.5) {\n return new UI.Geometry.Vector(sphereX, sphereY, 0.5 / Math.sqrt(sqrSum));\n }\n\n return new UI.Geometry.Vector(sphereX, sphereY, Math.sqrt(1 - sqrSum));\n }\n\n private appendTouchControl(): void {\n const container = this.contentElement.createChild('div', 'touch-section');\n const control = UI.SettingsUI.createControlForSetting(\n Common.Settings.Settings.instance().moduleSetting('emulation.touch'),\n i18nString(UIStrings.forcesTouchInsteadOfClick));\n\n if (control) {\n container.appendChild(control);\n }\n }\n\n private appendIdleEmulator(): void {\n const container = this.contentElement.createChild('div', 'idle-section');\n const control = UI.SettingsUI.createControlForSetting(\n Common.Settings.Settings.instance().moduleSetting('emulation.idleDetection'),\n i18nString(UIStrings.forcesSelectedIdleStateEmulation));\n\n if (control) {\n container.appendChild(control);\n }\n }\n}\n\nexport const enum DeviceOrientationModificationSource {\n UserInput = 'userInput',\n UserDrag = 'userDrag',\n ResetButton = 'resetButton',\n SelectPreset = 'selectPreset',\n}\n\n/** {string} */\nexport const NonPresetOptions = {\n NoOverride: 'noOverride',\n Custom: 'custom',\n Unavailable: 'unavailable',\n};\n\nexport class PresetOrientations {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static get Orientations(): {title: string, value: {title: string, orientation: string}[]}[] {\n return [{\n title: i18nString(UIStrings.presets),\n value: [\n {title: i18nString(UIStrings.portrait), orientation: '[0, 90, 0]'},\n {title: i18nString(UIStrings.portraitUpsideDown), orientation: '[-180, -90, 0]'},\n {title: i18nString(UIStrings.landscapeLeft), orientation: '[90, 0, -90]'},\n {title: i18nString(UIStrings.landscapeRight), orientation: '[90, -180, -90]'},\n {title: i18nString(UIStrings.displayUp), orientation: '[0, 0, 0]'},\n {title: i18nString(UIStrings.displayDown), orientation: '[0, -180, 0]'},\n ],\n }];\n }\n}\n\nexport class ShowActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n void UI.ViewManager.ViewManager.instance().showView('sensors');\n return true;\n }\n}\n\nexport const ShiftDragOrientationSpeed = 16;\n"]} \ No newline at end of file +{"version":3,"file":"SensorsView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sensors/SensorsView.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;;OAGG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,wBAAwB,EAAE,8BAA8B;IACxD;;;;OAIG;IACH,KAAK,EAAE,QAAQ;IACf;;;OAGG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,mBAAmB,EAAE,sBAAsB;IAC3C;;;;;OAKG;IACH,gCAAgC,EAAE,2EAA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EAAE,WAAW,EAAC;oBAClE,EAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,cAAc,EAAC;iBACxE;aACF,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,kBAAkB;IAC7B,YAAY,CAAC,QAA4B,EAAE,SAAiB;QAC1D,KAAK,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC","sourcesContent":["// Copyright (c) 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport sensorsStyles from './sensors.css.js';\n\nconst UIStrings = {\n /**\n *@description Title for a group of cities\n */\n location: 'Location',\n /**\n *@description An option that appears in a drop-down to prevent the GPS location of the user from being overridden.\n */\n noOverride: 'No override',\n /**\n *@description Title of a section that contains overrides for the user's GPS location.\n */\n overrides: 'Overrides',\n /**\n *@description Text of button in Sensors View, takes the user to the custom location setting screen\n *where they can enter/edit custom locations.\n */\n manage: 'Manage',\n /**\n *@description Aria-label for location manage button in Sensors View\n */\n manageTheListOfLocations: 'Manage the list of locations',\n /**\n *@description Option in a drop-down input for selecting the GPS location of the user. As an\n *alternative to selecting a location from the list, the user can select this option and they are\n *prompted to enter the details for a new custom location.\n */\n other: 'Other…',\n /**\n *@description Title of a section in a drop-down input that contains error locations, e.g. to select\n *a location override that says 'the location is not available'. A noun.\n */\n error: 'Error',\n /**\n *@description A type of override where the geographic location of the user is not available.\n */\n locationUnavailable: 'Location unavailable',\n /**\n *@description Tooltip text telling the user how to change the value of a latitude/longitude input\n *text box. several shortcuts are provided for convenience. The placeholder can be different\n *keyboard keys, depending on the user's settings.\n *@example {Ctrl} PH1\n */\n adjustWithMousewheelOrUpdownKeys: 'Adjust with mousewheel or up/down keys. {PH1}: ±10, Shift: ±1, Alt: ±0.01',\n /**\n *@description Label for latitude of a GPS location.\n */\n latitude: 'Latitude',\n /**\n *@description Label for Longitude of a GPS location.\n */\n longitude: 'Longitude',\n /**\n *@description Label for the ID of a timezone for a particular location.\n */\n timezoneId: 'Timezone ID',\n /**\n *@description Label for the locale relevant to a custom location.\n */\n locale: 'Locale',\n /**\n *@description Label the orientation of a user's device e.g. tilt in 3D-space.\n */\n orientation: 'Orientation',\n /**\n *@description Option that when chosen, turns off device orientation override.\n */\n off: 'Off',\n /**\n *@description Option that when chosen, allows the user to enter a custom orientation for the device e.g. tilt in 3D-space.\n */\n customOrientation: 'Custom orientation',\n /**\n *@description Warning to the user they should enable the device orientation override, in order to\n *enable this input which allows them to interactively select orientation by dragging a 3D phone\n *model.\n */\n enableOrientationToRotate: 'Enable orientation to rotate',\n /**\n *@description Text telling the user how to use an input which allows them to interactively select\n *orientation by dragging a 3D phone model.\n */\n shiftdragHorizontallyToRotate: 'Shift+drag horizontally to rotate around the y-axis',\n /**\n *@description Message in the Sensors tool that is alerted (for screen readers) when the device orientation setting is changed\n *@example {180} PH1\n *@example {-90} PH2\n *@example {0} PH3\n */\n deviceOrientationSetToAlphaSBeta: 'Device orientation set to alpha: {PH1}, beta: {PH2}, gamma: {PH3}',\n /**\n *@description Text of orientation reset button in Sensors View of the Device Toolbar\n */\n reset: 'Reset',\n /**\n *@description Aria-label for orientation reset button in Sensors View. Command.\n */\n resetDeviceOrientation: 'Reset device orientation',\n /**\n *@description Description of the Touch select in Sensors tab\n */\n forcesTouchInsteadOfClick: 'Forces touch instead of click',\n /**\n *@description Description of the Emulate Idle State select in Sensors tab\n */\n forcesSelectedIdleStateEmulation: 'Forces selected idle state emulation',\n /**\n *@description Title for a group of configuration options in a drop-down input.\n */\n presets: 'Presets',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space.\n */\n portrait: 'Portrait',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space.\n */\n portraitUpsideDown: 'Portrait upside down',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space.\n */\n landscapeLeft: 'Landscape left',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space.\n */\n landscapeRight: 'Landscape right',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space. Noun indicating\n *the display of the device is pointing up.\n */\n displayUp: 'Display up',\n /**\n *@description Drop-down input option for the orientation of a device in 3D space. Noun indicating\n *the display of the device is pointing down.\n */\n displayDown: 'Display down',\n /**\n *@description Label for one dimension of device orientation that the user can override.\n */\n alpha: '\\u03B1 (alpha)',\n /**\n *@description Label for one dimension of device orientation that the user can override.\n */\n beta: '\\u03B2 (beta)',\n /**\n *@description Label for one dimension of device orientation that the user can override.\n */\n gamma: '\\u03B3 (gamma)',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sensors/SensorsView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class SensorsView extends UI.Widget.VBox {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private readonly LocationSetting: Common.Settings.Setting;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private Location: SDK.EmulationModel.Location;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private LocationOverrideEnabled: boolean;\n private fieldsetElement!: HTMLFieldSetElement;\n private timezoneError!: HTMLElement;\n private locationSelectElement!: HTMLSelectElement;\n private latitudeInput!: HTMLInputElement;\n private longitudeInput!: HTMLInputElement;\n private timezoneInput!: HTMLInputElement;\n private localeInput!: HTMLInputElement;\n private latitudeSetter!: (arg0: string) => void;\n private longitudeSetter!: (arg0: string) => void;\n private timezoneSetter!: (arg0: string) => void;\n private localeSetter!: (arg0: string) => void;\n private localeError!: HTMLElement;\n private customLocationsGroup!: HTMLOptGroupElement;\n private readonly deviceOrientationSetting: Common.Settings.Setting;\n private deviceOrientation: SDK.EmulationModel.DeviceOrientation;\n private deviceOrientationOverrideEnabled: boolean;\n private deviceOrientationFieldset!: HTMLFieldSetElement;\n private stageElement!: HTMLElement;\n private orientationSelectElement!: HTMLSelectElement;\n private alphaElement!: HTMLInputElement;\n private betaElement!: HTMLInputElement;\n private gammaElement!: HTMLInputElement;\n private alphaSetter!: (arg0: string) => void;\n private betaSetter!: (arg0: string) => void;\n private gammaSetter!: (arg0: string) => void;\n private orientationLayer!: HTMLDivElement;\n private boxElement?: HTMLElement;\n private boxMatrix?: DOMMatrix;\n private mouseDownVector?: UI.Geometry.Vector|null;\n private originalBoxMatrix?: DOMMatrix;\n\n constructor() {\n super(true);\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('sensors')}`);\n this.contentElement.classList.add('sensors-view');\n\n this.LocationSetting = Common.Settings.Settings.instance().createSetting('emulation.locationOverride', '');\n this.Location = SDK.EmulationModel.Location.parseSetting(this.LocationSetting.get());\n this.LocationOverrideEnabled = false;\n\n this.createLocationSection(this.Location);\n\n this.createPanelSeparator();\n\n this.deviceOrientationSetting =\n Common.Settings.Settings.instance().createSetting('emulation.deviceOrientationOverride', '');\n this.deviceOrientation = SDK.EmulationModel.DeviceOrientation.parseSetting(this.deviceOrientationSetting.get());\n this.deviceOrientationOverrideEnabled = false;\n\n this.createDeviceOrientationSection();\n\n this.createPanelSeparator();\n\n this.appendTouchControl();\n\n this.createPanelSeparator();\n\n this.appendIdleEmulator();\n\n this.createPanelSeparator();\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([sensorsStyles]);\n }\n\n private createPanelSeparator(): void {\n this.contentElement.createChild('div').classList.add('panel-section-separator');\n }\n\n private createLocationSection(location: SDK.EmulationModel.Location): void {\n const geogroup = this.contentElement.createChild('section', 'sensors-group');\n geogroup.setAttribute('jslog', `${VisualLogging.section().context('location')}`);\n const geogroupTitle = UI.UIUtils.createLabel(i18nString(UIStrings.location), 'sensors-group-title');\n geogroup.appendChild(geogroupTitle);\n const fields = geogroup.createChild('div', 'geo-fields');\n let selectedIndex = 0;\n\n const noOverrideOption = {title: i18nString(UIStrings.noOverride), location: NonPresetOptions.NoOverride};\n this.locationSelectElement = (fields.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.locationSelectElement.setAttribute('jslog', `${VisualLogging.dropDown().track({change: true})}`);\n UI.ARIAUtils.bindLabelToControl(geogroupTitle, this.locationSelectElement);\n\n // No override\n this.locationSelectElement.appendChild(new Option(noOverrideOption.title, noOverrideOption.location));\n this.customLocationsGroup = (this.locationSelectElement.createChild('optgroup') as HTMLOptGroupElement);\n this.customLocationsGroup.label = i18nString(UIStrings.overrides);\n const customLocations = Common.Settings.Settings.instance().moduleSetting('emulation.locations');\n const manageButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.manage), () => Common.Revealer.reveal(customLocations));\n manageButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('sensors.manage-locations')}`);\n UI.ARIAUtils.setLabel(manageButton, i18nString(UIStrings.manageTheListOfLocations));\n fields.appendChild(manageButton);\n const fillCustomSettings = (): void => {\n if (!this.customLocationsGroup) {\n return;\n }\n this.customLocationsGroup.removeChildren();\n for (const [i, customLocation] of customLocations.get().entries()) {\n this.customLocationsGroup.appendChild(new Option(customLocation.title, JSON.stringify(customLocation)));\n if (location.latitude === customLocation.lat && location.longitude === customLocation.long) {\n // If the location coming from settings matches the custom location, use its index to select the option\n selectedIndex = i + 1;\n }\n }\n };\n customLocations.addChangeListener(fillCustomSettings);\n fillCustomSettings();\n\n // Other location\n const customLocationOption = {title: i18nString(UIStrings.other), location: NonPresetOptions.Custom};\n this.locationSelectElement.appendChild(new Option(customLocationOption.title, customLocationOption.location));\n\n // Error location.\n const group = (this.locationSelectElement.createChild('optgroup') as HTMLOptGroupElement);\n group.label = i18nString(UIStrings.error);\n group.appendChild(new Option(i18nString(UIStrings.locationUnavailable), NonPresetOptions.Unavailable));\n\n this.locationSelectElement.selectedIndex = selectedIndex;\n this.locationSelectElement.addEventListener('change', this.LocationSelectChanged.bind(this));\n this.fieldsetElement = (fields.createChild('fieldset') as HTMLFieldSetElement);\n this.fieldsetElement.disabled = !this.LocationOverrideEnabled;\n this.fieldsetElement.id = 'location-override-section';\n\n const latitudeGroup = this.fieldsetElement.createChild('div', 'latlong-group');\n const longitudeGroup = this.fieldsetElement.createChild('div', 'latlong-group');\n const timezoneGroup = this.fieldsetElement.createChild('div', 'latlong-group');\n const localeGroup = this.fieldsetElement.createChild('div', 'latlong-group');\n\n const cmdOrCtrl = Host.Platform.isMac() ? '\\u2318' : 'Ctrl';\n const modifierKeyMessage = i18nString(UIStrings.adjustWithMousewheelOrUpdownKeys, {PH1: cmdOrCtrl});\n\n this.latitudeInput = UI.UIUtils.createInput('', 'number', 'latitude');\n latitudeGroup.appendChild(this.latitudeInput);\n this.latitudeInput.setAttribute('step', 'any');\n this.latitudeInput.value = '0';\n this.latitudeSetter = UI.UIUtils.bindInput(\n this.latitudeInput, this.applyLocationUserInput.bind(this), SDK.EmulationModel.Location.latitudeValidator, true,\n 0.1);\n this.latitudeSetter(String(location.latitude));\n UI.Tooltip.Tooltip.install(this.latitudeInput, modifierKeyMessage);\n latitudeGroup.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.latitude), 'latlong-title', this.latitudeInput));\n\n this.longitudeInput = UI.UIUtils.createInput('', 'number', 'longitude');\n longitudeGroup.appendChild(this.longitudeInput);\n this.longitudeInput.setAttribute('step', 'any');\n this.longitudeInput.value = '0';\n this.longitudeSetter = UI.UIUtils.bindInput(\n this.longitudeInput, this.applyLocationUserInput.bind(this), SDK.EmulationModel.Location.longitudeValidator,\n true, 0.1);\n this.longitudeSetter(String(location.longitude));\n UI.Tooltip.Tooltip.install(this.longitudeInput, modifierKeyMessage);\n longitudeGroup.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.longitude), 'latlong-title', this.longitudeInput));\n\n this.timezoneInput = UI.UIUtils.createInput('', 'text', 'timezone');\n timezoneGroup.appendChild(this.timezoneInput);\n this.timezoneInput.value = 'Europe/Berlin';\n this.timezoneSetter = UI.UIUtils.bindInput(\n this.timezoneInput, this.applyLocationUserInput.bind(this), SDK.EmulationModel.Location.timezoneIdValidator,\n false);\n this.timezoneSetter(location.timezoneId);\n timezoneGroup.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.timezoneId), 'timezone-title', this.timezoneInput));\n this.timezoneError = (timezoneGroup.createChild('div', 'timezone-error') as HTMLElement);\n\n this.localeInput = UI.UIUtils.createInput('', 'text', 'locale');\n localeGroup.appendChild(this.localeInput);\n this.localeInput.value = 'en-US';\n this.localeSetter = UI.UIUtils.bindInput(\n this.localeInput, this.applyLocationUserInput.bind(this), SDK.EmulationModel.Location.localeValidator, false);\n this.localeSetter(location.locale);\n localeGroup.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.locale), 'locale-title', this.localeInput));\n this.localeError = (localeGroup.createChild('div', 'locale-error') as HTMLElement);\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private LocationSelectChanged(): void {\n this.fieldsetElement.disabled = false;\n this.timezoneError.textContent = '';\n const value = this.locationSelectElement.options[this.locationSelectElement.selectedIndex].value;\n if (value === NonPresetOptions.NoOverride) {\n this.LocationOverrideEnabled = false;\n this.clearFieldsetElementInputs();\n this.fieldsetElement.disabled = true;\n } else if (value === NonPresetOptions.Custom) {\n this.LocationOverrideEnabled = true;\n const location = SDK.EmulationModel.Location.parseUserInput(\n this.latitudeInput.value.trim(), this.longitudeInput.value.trim(), this.timezoneInput.value.trim(),\n this.localeInput.value.trim());\n if (!location) {\n return;\n }\n this.Location = location;\n } else if (value === NonPresetOptions.Unavailable) {\n this.LocationOverrideEnabled = true;\n this.Location = new SDK.EmulationModel.Location(0, 0, '', '', true);\n } else {\n this.LocationOverrideEnabled = true;\n const coordinates = JSON.parse(value);\n this.Location = new SDK.EmulationModel.Location(\n coordinates.lat, coordinates.long, coordinates.timezoneId, coordinates.locale, false);\n this.latitudeSetter(coordinates.lat);\n this.longitudeSetter(coordinates.long);\n this.timezoneSetter(coordinates.timezoneId);\n this.localeSetter(coordinates.locale);\n }\n\n this.applyLocation();\n if (value === NonPresetOptions.Custom) {\n this.latitudeInput.focus();\n }\n }\n\n private applyLocationUserInput(): void {\n const location = SDK.EmulationModel.Location.parseUserInput(\n this.latitudeInput.value.trim(), this.longitudeInput.value.trim(), this.timezoneInput.value.trim(),\n this.localeInput.value.trim());\n if (!location) {\n return;\n }\n\n this.timezoneError.textContent = '';\n\n this.setSelectElementLabel(this.locationSelectElement, NonPresetOptions.Custom);\n this.Location = location;\n this.applyLocation();\n }\n\n private applyLocation(): void {\n if (this.LocationOverrideEnabled) {\n this.LocationSetting.set(this.Location.toSetting());\n } else {\n this.LocationSetting.set('');\n }\n for (const emulationModel of SDK.TargetManager.TargetManager.instance().models(SDK.EmulationModel.EmulationModel)) {\n emulationModel.emulateLocation(this.LocationOverrideEnabled ? this.Location : null).catch(err => {\n switch (err.type) {\n case 'emulation-set-timezone': {\n this.timezoneError.textContent = err.message;\n break;\n }\n case 'emulation-set-locale': {\n this.localeError.textContent = err.message;\n break;\n }\n }\n });\n }\n }\n\n private clearFieldsetElementInputs(): void {\n this.latitudeSetter('0');\n this.longitudeSetter('0');\n this.timezoneSetter('');\n this.localeSetter('');\n }\n\n private createDeviceOrientationSection(): void {\n const orientationGroup = this.contentElement.createChild('section', 'sensors-group');\n orientationGroup.setAttribute('jslog', `${VisualLogging.section().context('device-orientation')}`);\n const orientationTitle = UI.UIUtils.createLabel(i18nString(UIStrings.orientation), 'sensors-group-title');\n orientationGroup.appendChild(orientationTitle);\n const orientationContent = orientationGroup.createChild('div', 'orientation-content');\n const fields = orientationContent.createChild('div', 'orientation-fields');\n\n const orientationOffOption = {title: i18nString(UIStrings.off), orientation: NonPresetOptions.NoOverride};\n const customOrientationOption = {\n title: i18nString(UIStrings.customOrientation),\n orientation: NonPresetOptions.Custom,\n };\n const orientationGroups = [{\n title: i18nString(UIStrings.presets),\n value: [\n {title: i18nString(UIStrings.portrait), orientation: '[0, 90, 0]'},\n {title: i18nString(UIStrings.portraitUpsideDown), orientation: '[-180, -90, 0]'},\n {title: i18nString(UIStrings.landscapeLeft), orientation: '[90, 0, -90]'},\n {title: i18nString(UIStrings.landscapeRight), orientation: '[90, -180, -90]'},\n {title: i18nString(UIStrings.displayUp), orientation: '[0, 0, 0]'},\n {title: i18nString(UIStrings.displayDown), orientation: '[0, -180, 0]'},\n ],\n }];\n this.orientationSelectElement = (this.contentElement.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.orientationSelectElement.setAttribute('jslog', `${VisualLogging.dropDown().track({change: true})}`);\n UI.ARIAUtils.bindLabelToControl(orientationTitle, this.orientationSelectElement);\n this.orientationSelectElement.appendChild(new Option(orientationOffOption.title, orientationOffOption.orientation));\n this.orientationSelectElement.appendChild(\n new Option(customOrientationOption.title, customOrientationOption.orientation));\n\n for (let i = 0; i < orientationGroups.length; ++i) {\n const groupElement = (this.orientationSelectElement.createChild('optgroup') as HTMLOptGroupElement);\n groupElement.label = orientationGroups[i].title;\n const group = orientationGroups[i].value;\n for (let j = 0; j < group.length; ++j) {\n groupElement.appendChild(new Option(group[j].title, group[j].orientation));\n }\n }\n this.orientationSelectElement.selectedIndex = 0;\n fields.appendChild(this.orientationSelectElement);\n this.orientationSelectElement.addEventListener('change', this.orientationSelectChanged.bind(this));\n\n this.deviceOrientationFieldset = this.createDeviceOrientationOverrideElement(this.deviceOrientation);\n this.stageElement = (orientationContent.createChild('div', 'orientation-stage') as HTMLElement);\n this.stageElement.setAttribute('jslog', `${VisualLogging.preview().track({drag: true})}`);\n this.orientationLayer = (this.stageElement.createChild('div', 'orientation-layer') as HTMLDivElement);\n this.boxElement = this.orientationLayer.createChild('section', 'orientation-box orientation-element');\n\n this.boxElement.createChild('section', 'orientation-front orientation-element');\n this.boxElement.createChild('section', 'orientation-top orientation-element');\n this.boxElement.createChild('section', 'orientation-back orientation-element');\n this.boxElement.createChild('section', 'orientation-left orientation-element');\n this.boxElement.createChild('section', 'orientation-right orientation-element');\n this.boxElement.createChild('section', 'orientation-bottom orientation-element');\n\n UI.UIUtils.installDragHandle(this.stageElement, this.onBoxDragStart.bind(this), event => {\n this.onBoxDrag(event);\n }, null, '-webkit-grabbing', '-webkit-grab');\n\n fields.appendChild(this.deviceOrientationFieldset);\n this.enableOrientationFields(true);\n this.setBoxOrientation(this.deviceOrientation, false);\n }\n\n private enableOrientationFields(disable: boolean|null): void {\n if (disable) {\n this.deviceOrientationFieldset.disabled = true;\n this.stageElement.classList.add('disabled');\n UI.Tooltip.Tooltip.install(this.stageElement, i18nString(UIStrings.enableOrientationToRotate));\n } else {\n this.deviceOrientationFieldset.disabled = false;\n this.stageElement.classList.remove('disabled');\n UI.Tooltip.Tooltip.install(this.stageElement, i18nString(UIStrings.shiftdragHorizontallyToRotate));\n }\n }\n\n private orientationSelectChanged(): void {\n const value = this.orientationSelectElement.options[this.orientationSelectElement.selectedIndex].value;\n this.enableOrientationFields(false);\n\n if (value === NonPresetOptions.NoOverride) {\n this.deviceOrientationOverrideEnabled = false;\n this.enableOrientationFields(true);\n this.applyDeviceOrientation();\n } else if (value === NonPresetOptions.Custom) {\n this.deviceOrientationOverrideEnabled = true;\n this.resetDeviceOrientation();\n this.alphaElement.focus();\n } else {\n const parsedValue = JSON.parse(value);\n this.deviceOrientationOverrideEnabled = true;\n this.deviceOrientation = new SDK.EmulationModel.DeviceOrientation(parsedValue[0], parsedValue[1], parsedValue[2]);\n this.setDeviceOrientation(this.deviceOrientation, DeviceOrientationModificationSource.SelectPreset);\n }\n }\n\n private applyDeviceOrientation(): void {\n if (this.deviceOrientationOverrideEnabled) {\n this.deviceOrientationSetting.set(this.deviceOrientation.toSetting());\n }\n for (const emulationModel of SDK.TargetManager.TargetManager.instance().models(SDK.EmulationModel.EmulationModel)) {\n void emulationModel.emulateDeviceOrientation(\n this.deviceOrientationOverrideEnabled ? this.deviceOrientation : null);\n }\n }\n\n private setSelectElementLabel(selectElement: HTMLSelectElement, labelValue: string): void {\n const optionValues = Array.prototype.map.call(selectElement.options, x => x.value);\n selectElement.selectedIndex = optionValues.indexOf(labelValue);\n }\n\n private applyDeviceOrientationUserInput(): void {\n this.setDeviceOrientation(\n SDK.EmulationModel.DeviceOrientation.parseUserInput(\n this.alphaElement.value.trim(), this.betaElement.value.trim(), this.gammaElement.value.trim()),\n DeviceOrientationModificationSource.UserInput);\n this.setSelectElementLabel(this.orientationSelectElement, NonPresetOptions.Custom);\n }\n\n private resetDeviceOrientation(): void {\n this.setDeviceOrientation(\n new SDK.EmulationModel.DeviceOrientation(0, 90, 0), DeviceOrientationModificationSource.ResetButton);\n this.setSelectElementLabel(this.orientationSelectElement, '[0, 90, 0]');\n }\n\n private setDeviceOrientation(\n deviceOrientation: SDK.EmulationModel.DeviceOrientation|null,\n modificationSource: DeviceOrientationModificationSource): void {\n if (!deviceOrientation) {\n return;\n }\n\n function roundAngle(angle: number): number {\n return Math.round(angle * 10000) / 10000;\n }\n\n if (modificationSource !== DeviceOrientationModificationSource.UserInput) {\n // Even though the angles in |deviceOrientation| will not be rounded\n // here, their precision will be rounded by CSS when we change\n // |this.orientationLayer.style| in setBoxOrientation().\n this.alphaSetter(String(roundAngle(deviceOrientation.alpha)));\n this.betaSetter(String(roundAngle(deviceOrientation.beta)));\n this.gammaSetter(String(roundAngle(deviceOrientation.gamma)));\n }\n\n const animate = modificationSource !== DeviceOrientationModificationSource.UserDrag;\n this.setBoxOrientation(deviceOrientation, animate);\n\n this.deviceOrientation = deviceOrientation;\n this.applyDeviceOrientation();\n\n UI.ARIAUtils.alert(i18nString(\n UIStrings.deviceOrientationSetToAlphaSBeta,\n {PH1: deviceOrientation.alpha, PH2: deviceOrientation.beta, PH3: deviceOrientation.gamma}));\n }\n\n private createAxisInput(parentElement: Element, input: HTMLInputElement, label: string, validator: (arg0: string) => {\n valid: boolean,\n errorMessage: (string|undefined),\n }): (arg0: string) => void {\n const div = parentElement.createChild('div', 'orientation-axis-input-container');\n div.appendChild(input);\n div.appendChild(UI.UIUtils.createLabel(label, /* className */ '', input));\n return UI.UIUtils.bindInput(input, this.applyDeviceOrientationUserInput.bind(this), validator, true);\n }\n\n private createDeviceOrientationOverrideElement(deviceOrientation: SDK.EmulationModel.DeviceOrientation):\n HTMLFieldSetElement {\n const fieldsetElement = document.createElement('fieldset');\n fieldsetElement.classList.add('device-orientation-override-section');\n const cellElement = fieldsetElement.createChild('td', 'orientation-inputs-cell');\n\n this.alphaElement = UI.UIUtils.createInput('', 'number', 'alpha');\n this.alphaElement.setAttribute('step', 'any');\n this.alphaSetter = this.createAxisInput(\n cellElement, this.alphaElement, i18nString(UIStrings.alpha),\n SDK.EmulationModel.DeviceOrientation.alphaAngleValidator);\n this.alphaSetter(String(deviceOrientation.alpha));\n\n this.betaElement = UI.UIUtils.createInput('', 'number', 'beta');\n this.betaElement.setAttribute('step', 'any');\n this.betaSetter = this.createAxisInput(\n cellElement, this.betaElement, i18nString(UIStrings.beta),\n SDK.EmulationModel.DeviceOrientation.betaAngleValidator);\n this.betaSetter(String(deviceOrientation.beta));\n\n this.gammaElement = UI.UIUtils.createInput('', 'number', 'gamma');\n this.gammaElement.setAttribute('step', 'any');\n this.gammaSetter = this.createAxisInput(\n cellElement, this.gammaElement, i18nString(UIStrings.gamma),\n SDK.EmulationModel.DeviceOrientation.gammaAngleValidator);\n this.gammaSetter(String(deviceOrientation.gamma));\n\n const resetButton = UI.UIUtils.createTextButton(\n i18nString(UIStrings.reset), this.resetDeviceOrientation.bind(this), 'orientation-reset-button');\n resetButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('sensors.reset-device-orientiation')}`);\n UI.ARIAUtils.setLabel(resetButton, i18nString(UIStrings.resetDeviceOrientation));\n resetButton.setAttribute('type', 'reset');\n cellElement.appendChild(resetButton);\n return fieldsetElement;\n }\n\n private setBoxOrientation(deviceOrientation: SDK.EmulationModel.DeviceOrientation, animate: boolean): void {\n if (animate) {\n this.stageElement.classList.add('is-animating');\n } else {\n this.stageElement.classList.remove('is-animating');\n }\n\n // It is important to explain the multiple conversions happening here. A\n // few notes on coordinate spaces first:\n // 1. The CSS coordinate space is left-handed. X and Y are parallel to the\n // screen, and Z is perpendicular to the screen. X is positive to the\n // right, Y is positive downwards and Z increases towards the viewer.\n // See https://drafts.csswg.org/css-transforms-2/#transform-rendering\n // for more information.\n // 2. The Device Orientation coordinate space is right-handed. X and Y are\n // parallel to the screen, and Z is perpenticular to the screen. X is\n // positive to the right, Y is positive upwards and Z increases towards\n // the viewer. See\n // https://w3c.github.io/deviceorientation/#deviceorientation for more\n // information.\n // 3. Additionally, the phone model we display is rotated +90 degrees in\n // the X axis in the CSS coordinate space (i.e. when all angles are 0 we\n // cannot see its screen in DevTools).\n //\n // |this.boxMatrix| is set in the Device Orientation coordinate space\n // because it represents the phone model we show users and also because the\n // calculations in UI.Geometry.EulerAngles assume this coordinate space (so\n // we apply the rotations in the Z-X'-Y'' order).\n // The CSS transforms, on the other hand, are done in the CSS coordinate\n // space, so we need to convert 2) to 1) while keeping 3) in mind. We can\n // cover 3) by swapping the Y and Z axes, and 2) by inverting the X axis.\n const {alpha, beta, gamma} = deviceOrientation;\n this.boxMatrix = new DOMMatrixReadOnly().rotate(0, 0, alpha).rotate(beta, 0, 0).rotate(0, gamma, 0);\n this.orientationLayer.style.transform = `rotateY(${alpha}deg) rotateX(${- beta}deg) rotateZ(${gamma}deg)`;\n }\n\n private onBoxDrag(event: MouseEvent): boolean {\n const mouseMoveVector = this.calculateRadiusVector(event.x, event.y);\n if (!mouseMoveVector) {\n return true;\n }\n\n if (!this.mouseDownVector) {\n return true;\n }\n\n event.consume(true);\n let axis, angle;\n if (event.shiftKey) {\n axis = new UI.Geometry.Vector(0, 0, 1);\n angle = (mouseMoveVector.x - this.mouseDownVector.x) * ShiftDragOrientationSpeed;\n } else {\n axis = UI.Geometry.crossProduct(this.mouseDownVector, mouseMoveVector);\n angle = UI.Geometry.calculateAngle(this.mouseDownVector, mouseMoveVector);\n }\n\n // See the comment in setBoxOrientation() for a longer explanation about\n // the CSS coordinate space, the Device Orientation coordinate space and\n // the conversions we make. |axis| and |angle| are in the CSS coordinate\n // space, while |this.originalBoxMatrix| is rotated and in the Device\n // Orientation coordinate space, which is why we swap Y and Z and invert X.\n const currentMatrix =\n new DOMMatrixReadOnly().rotateAxisAngle(-axis.x, axis.z, axis.y, angle).multiply(this.originalBoxMatrix);\n\n const eulerAngles = UI.Geometry.EulerAngles.fromDeviceOrientationRotationMatrix(currentMatrix);\n const newOrientation =\n new SDK.EmulationModel.DeviceOrientation(eulerAngles.alpha, eulerAngles.beta, eulerAngles.gamma);\n this.setDeviceOrientation(newOrientation, DeviceOrientationModificationSource.UserDrag);\n this.setSelectElementLabel(this.orientationSelectElement, NonPresetOptions.Custom);\n return false;\n }\n\n private onBoxDragStart(event: MouseEvent): boolean {\n if (!this.deviceOrientationOverrideEnabled) {\n return false;\n }\n\n this.mouseDownVector = this.calculateRadiusVector(event.x, event.y);\n this.originalBoxMatrix = this.boxMatrix;\n\n if (!this.mouseDownVector) {\n return false;\n }\n\n event.consume(true);\n return true;\n }\n\n private calculateRadiusVector(x: number, y: number): UI.Geometry.Vector|null {\n const rect = this.stageElement.getBoundingClientRect();\n const radius = Math.max(rect.width, rect.height) / 2;\n const sphereX = (x - rect.left - rect.width / 2) / radius;\n const sphereY = (y - rect.top - rect.height / 2) / radius;\n const sqrSum = sphereX * sphereX + sphereY * sphereY;\n if (sqrSum > 0.5) {\n return new UI.Geometry.Vector(sphereX, sphereY, 0.5 / Math.sqrt(sqrSum));\n }\n\n return new UI.Geometry.Vector(sphereX, sphereY, Math.sqrt(1 - sqrSum));\n }\n\n private appendTouchControl(): void {\n const container = this.contentElement.createChild('div', 'touch-section');\n const control = UI.SettingsUI.createControlForSetting(\n Common.Settings.Settings.instance().moduleSetting('emulation.touch'),\n i18nString(UIStrings.forcesTouchInsteadOfClick));\n\n if (control) {\n container.appendChild(control);\n }\n }\n\n private appendIdleEmulator(): void {\n const container = this.contentElement.createChild('div', 'idle-section');\n const control = UI.SettingsUI.createControlForSetting(\n Common.Settings.Settings.instance().moduleSetting('emulation.idleDetection'),\n i18nString(UIStrings.forcesSelectedIdleStateEmulation));\n\n if (control) {\n container.appendChild(control);\n }\n }\n}\n\nexport const enum DeviceOrientationModificationSource {\n UserInput = 'userInput',\n UserDrag = 'userDrag',\n ResetButton = 'resetButton',\n SelectPreset = 'selectPreset',\n}\n\n/** {string} */\nexport const NonPresetOptions = {\n NoOverride: 'noOverride',\n Custom: 'custom',\n Unavailable: 'unavailable',\n};\n\nexport class PresetOrientations {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static get Orientations(): {title: string, value: {title: string, orientation: string}[]}[] {\n return [{\n title: i18nString(UIStrings.presets),\n value: [\n {title: i18nString(UIStrings.portrait), orientation: '[0, 90, 0]'},\n {title: i18nString(UIStrings.portraitUpsideDown), orientation: '[-180, -90, 0]'},\n {title: i18nString(UIStrings.landscapeLeft), orientation: '[90, 0, -90]'},\n {title: i18nString(UIStrings.landscapeRight), orientation: '[90, -180, -90]'},\n {title: i18nString(UIStrings.displayUp), orientation: '[0, 0, 0]'},\n {title: i18nString(UIStrings.displayDown), orientation: '[0, -180, 0]'},\n ],\n }];\n }\n}\n\nexport class ShowActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n void UI.ViewManager.ViewManager.instance().showView('sensors');\n return true;\n }\n}\n\nexport const ShiftDragOrientationSpeed = 16;\n"]} \ No newline at end of file diff --git a/public/panels/sensors/sensors-meta.js b/public/panels/sensors/sensors-meta.js index 5be6f748f..2d898e479 100644 --- a/public/panels/sensors/sensors-meta.js +++ b/public/panels/sensors/sensors-meta.js @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import * as Common from '../../core/common/common.js'; -import * as UI from '../../ui/legacy/legacy.js'; import * as i18n from '../../core/i18n/i18n.js'; +import * as UI from '../../ui/legacy/legacy.js'; const UIStrings = { /** * @description Title of the Sensors tool. The sensors tool contains GPS, orientation sensors, touch @@ -108,7 +108,7 @@ UI.ViewManager.registerViewExtension({ order: 100, async loadView() { const Sensors = await loadEmulationModule(); - return Sensors.SensorsView.SensorsView.instance(); + return new Sensors.SensorsView.SensorsView(); }, tags: [ i18nLazyString(UIStrings.geolocation), @@ -127,7 +127,7 @@ UI.ViewManager.registerViewExtension({ order: 40, async loadView() { const Sensors = await loadEmulationModule(); - return Sensors.LocationsSettingsTab.LocationsSettingsTab.instance(); + return new Sensors.LocationsSettingsTab.LocationsSettingsTab(); }, settings: [ 'emulation.locations', diff --git a/public/panels/sensors/sensors-meta.js.map b/public/panels/sensors/sensors-meta.js.map index 4fc131366..4c26350d4 100644 --- a/public/panels/sensors/sensors-meta.js.map +++ b/public/panels/sensors/sensors-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"sensors-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sensors/sensors-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,SAA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AAc,CAAC,SAAS,CAAC,sBAAsB,CAAC;YACvD,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,sBAAsB,CAAC;SACvD;QACD;YACE,KAAK,EAAE,qDAAqD;YAC5D,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC;YACrD,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC;SACrD;KACF;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Sensors from './sensors.js';\n\nimport * as i18n from '../../core/i18n/i18n.js';\nconst UIStrings = {\n /**\n * @description Title of the Sensors tool. The sensors tool contains GPS, orientation sensors, touch\n * settings, etc.\n */\n sensors: 'Sensors',\n /**\n *@description A tag of Sensors tool that can be searched in the command menu\n */\n geolocation: 'geolocation',\n /**\n *@description A tag of Sensors tool that can be searched in the command menu\n */\n timezones: 'timezones',\n /**\n *@description Text in Sensors View of the Device Toolbar\n */\n locale: 'locale',\n /**\n *@description A tag of Sensors tool that can be searched in the command menu\n */\n locales: 'locales',\n /**\n *@description A tag of Sensors tool that can be searched in the command menu\n */\n accelerometer: 'accelerometer',\n /**\n * @description A tag of Sensors tool that can be searched in the command menu. Refers to the\n * orientation of a device (e.g. phone) in 3D space, e.g. tilted right/left.\n */\n deviceOrientation: 'device orientation',\n /**\n *@description Title of Locations settings. Refers to geographic locations for GPS.\n */\n locations: 'Locations',\n /**\n * @description Text for the touch type to simulate on a device. Refers to touch input as opposed to\n * mouse input.\n */\n touch: 'Touch',\n /**\n *@description Text in Sensors View of the Device Toolbar. Refers to device-based touch input,\n *which means the input type will be 'touch' only if the device normally has touch input e.g. a\n *phone or tablet.\n */\n devicebased: 'Device-based',\n /**\n *@description Text in Sensors View of the Device Toolbar. Means that touch input will be forced\n *on, even if the device type e.g. desktop computer does not normally have touch input.\n */\n forceEnabled: 'Force enabled',\n /**\n *@description Title of a section option in Sensors tab for idle emulation. This is a command, to\n *emulate the state of the 'Idle Detector'.\n */\n emulateIdleDetectorState: 'Emulate Idle Detector state',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down. Turns off emulation of idle state.\n */\n noIdleEmulation: 'No idle emulation',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down.\n */\n userActiveScreenUnlocked: 'User active, screen unlocked',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down.\n */\n userActiveScreenLocked: 'User active, screen locked',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down.\n */\n userIdleScreenUnlocked: 'User idle, screen unlocked',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down.\n */\n userIdleScreenLocked: 'User idle, screen locked',\n /**\n * @description Command that opens the Sensors view/tool. The sensors tool contains GPS,\n * orientation sensors, touch settings, etc.\n */\n showSensors: 'Show Sensors',\n /**\n *@description Command that shows geographic locations.\n */\n showLocations: 'Show Locations',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sensors/sensors-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedSensorsModule: (typeof Sensors|undefined);\n\nasync function loadEmulationModule(): Promise {\n if (!loadedSensorsModule) {\n loadedSensorsModule = await import('./sensors.js');\n }\n return loadedSensorsModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n commandPrompt: i18nLazyString(UIStrings.showSensors),\n title: i18nLazyString(UIStrings.sensors),\n id: 'sensors',\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 100,\n async loadView() {\n const Sensors = await loadEmulationModule();\n return Sensors.SensorsView.SensorsView.instance();\n },\n tags: [\n i18nLazyString(UIStrings.geolocation),\n i18nLazyString(UIStrings.timezones),\n i18nLazyString(UIStrings.locale),\n i18nLazyString(UIStrings.locales),\n i18nLazyString(UIStrings.accelerometer),\n i18nLazyString(UIStrings.deviceOrientation),\n ],\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'emulation-locations',\n commandPrompt: i18nLazyString(UIStrings.showLocations),\n title: i18nLazyString(UIStrings.locations),\n order: 40,\n async loadView() {\n const Sensors = await loadEmulationModule();\n return Sensors.LocationsSettingsTab.LocationsSettingsTab.instance();\n },\n settings: [\n 'emulation.locations',\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n storageType: Common.Settings.SettingStorageType.Synced,\n settingName: 'emulation.locations',\n settingType: Common.Settings.SettingType.ARRAY,\n // TODO(crbug.com/1136655): http://crrev.com/c/2666426 regressed localization of city titles.\n // These titles should be localized since they are displayed to users.\n defaultValue: [\n {\n title: 'Berlin',\n lat: 52.520007,\n long: 13.404954,\n timezoneId: 'Europe/Berlin',\n locale: 'de-DE',\n },\n {\n title: 'London',\n lat: 51.507351,\n long: -0.127758,\n timezoneId: 'Europe/London',\n locale: 'en-GB',\n },\n {\n title: 'Moscow',\n lat: 55.755826,\n long: 37.6173,\n timezoneId: 'Europe/Moscow',\n locale: 'ru-RU',\n },\n {\n title: 'Mountain View',\n lat: 37.386052,\n long: -122.083851,\n timezoneId: 'America/Los_Angeles',\n locale: 'en-US',\n },\n {\n title: 'Mumbai',\n lat: 19.075984,\n long: 72.877656,\n timezoneId: 'Asia/Kolkata',\n locale: 'mr-IN',\n },\n {\n title: 'San Francisco',\n lat: 37.774929,\n long: -122.419416,\n timezoneId: 'America/Los_Angeles',\n locale: 'en-US',\n },\n {\n title: 'Shanghai',\n lat: 31.230416,\n long: 121.473701,\n timezoneId: 'Asia/Shanghai',\n locale: 'zh-Hans-CN',\n },\n {\n title: 'São Paulo',\n lat: -23.55052,\n long: -46.633309,\n timezoneId: 'America/Sao_Paulo',\n locale: 'pt-BR',\n },\n {\n title: 'Tokyo',\n lat: 35.689487,\n long: 139.691706,\n timezoneId: 'Asia/Tokyo',\n locale: 'ja-JP',\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n title: i18nLazyString(UIStrings.touch),\n reloadRequired: true,\n settingName: 'emulation.touch',\n settingType: Common.Settings.SettingType.ENUM,\n defaultValue: 'none',\n options: [\n {\n value: 'none',\n title: i18nLazyString(UIStrings.devicebased),\n text: i18nLazyString(UIStrings.devicebased),\n },\n {\n value: 'force',\n title: i18nLazyString(UIStrings.forceEnabled),\n text: i18nLazyString(UIStrings.forceEnabled),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n title: i18nLazyString(UIStrings.emulateIdleDetectorState),\n settingName: 'emulation.idleDetection',\n settingType: Common.Settings.SettingType.ENUM,\n defaultValue: 'none',\n options: [\n {\n value: 'none',\n title: i18nLazyString(UIStrings.noIdleEmulation),\n text: i18nLazyString(UIStrings.noIdleEmulation),\n },\n {\n value: '{\\\"isUserActive\\\":true,\\\"isScreenUnlocked\\\":true}',\n title: i18nLazyString(UIStrings.userActiveScreenUnlocked),\n text: i18nLazyString(UIStrings.userActiveScreenUnlocked),\n },\n {\n value: '{\\\"isUserActive\\\":true,\\\"isScreenUnlocked\\\":false}',\n title: i18nLazyString(UIStrings.userActiveScreenLocked),\n text: i18nLazyString(UIStrings.userActiveScreenLocked),\n },\n {\n value: '{\\\"isUserActive\\\":false,\\\"isScreenUnlocked\\\":true}',\n title: i18nLazyString(UIStrings.userIdleScreenUnlocked),\n text: i18nLazyString(UIStrings.userIdleScreenUnlocked),\n },\n {\n value: '{\\\"isUserActive\\\":false,\\\"isScreenUnlocked\\\":false}',\n title: i18nLazyString(UIStrings.userIdleScreenLocked),\n text: i18nLazyString(UIStrings.userIdleScreenLocked),\n },\n ],\n});\n"]} \ No newline at end of file +{"version":3,"file":"sensors-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sensors/sensors-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,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S,CAAC,wBAAwB,CAAC;SACzD;QACD;YACE,KAAK,EAAE,oDAAoD;YAC3D,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,sBAAsB,CAAC;YACvD,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,sBAAsB,CAAC;SACvD;QACD;YACE,KAAK,EAAE,oDAAoD;YAC3D,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,sBAAsB,CAAC;YACvD,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,sBAAsB,CAAC;SACvD;QACD;YACE,KAAK,EAAE,qDAAqD;YAC5D,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC;YACrD,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,oBAAoB,CAAC;SACrD;KACF;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Sensors from './sensors.js';\n\nconst UIStrings = {\n /**\n * @description Title of the Sensors tool. The sensors tool contains GPS, orientation sensors, touch\n * settings, etc.\n */\n sensors: 'Sensors',\n /**\n *@description A tag of Sensors tool that can be searched in the command menu\n */\n geolocation: 'geolocation',\n /**\n *@description A tag of Sensors tool that can be searched in the command menu\n */\n timezones: 'timezones',\n /**\n *@description Text in Sensors View of the Device Toolbar\n */\n locale: 'locale',\n /**\n *@description A tag of Sensors tool that can be searched in the command menu\n */\n locales: 'locales',\n /**\n *@description A tag of Sensors tool that can be searched in the command menu\n */\n accelerometer: 'accelerometer',\n /**\n * @description A tag of Sensors tool that can be searched in the command menu. Refers to the\n * orientation of a device (e.g. phone) in 3D space, e.g. tilted right/left.\n */\n deviceOrientation: 'device orientation',\n /**\n *@description Title of Locations settings. Refers to geographic locations for GPS.\n */\n locations: 'Locations',\n /**\n * @description Text for the touch type to simulate on a device. Refers to touch input as opposed to\n * mouse input.\n */\n touch: 'Touch',\n /**\n *@description Text in Sensors View of the Device Toolbar. Refers to device-based touch input,\n *which means the input type will be 'touch' only if the device normally has touch input e.g. a\n *phone or tablet.\n */\n devicebased: 'Device-based',\n /**\n *@description Text in Sensors View of the Device Toolbar. Means that touch input will be forced\n *on, even if the device type e.g. desktop computer does not normally have touch input.\n */\n forceEnabled: 'Force enabled',\n /**\n *@description Title of a section option in Sensors tab for idle emulation. This is a command, to\n *emulate the state of the 'Idle Detector'.\n */\n emulateIdleDetectorState: 'Emulate Idle Detector state',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down. Turns off emulation of idle state.\n */\n noIdleEmulation: 'No idle emulation',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down.\n */\n userActiveScreenUnlocked: 'User active, screen unlocked',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down.\n */\n userActiveScreenLocked: 'User active, screen locked',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down.\n */\n userIdleScreenUnlocked: 'User idle, screen unlocked',\n /**\n *@description Title of an option in Sensors tab idle emulation drop-down.\n */\n userIdleScreenLocked: 'User idle, screen locked',\n /**\n * @description Command that opens the Sensors view/tool. The sensors tool contains GPS,\n * orientation sensors, touch settings, etc.\n */\n showSensors: 'Show Sensors',\n /**\n *@description Command that shows geographic locations.\n */\n showLocations: 'Show Locations',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sensors/sensors-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedSensorsModule: (typeof Sensors|undefined);\n\nasync function loadEmulationModule(): Promise {\n if (!loadedSensorsModule) {\n loadedSensorsModule = await import('./sensors.js');\n }\n return loadedSensorsModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n commandPrompt: i18nLazyString(UIStrings.showSensors),\n title: i18nLazyString(UIStrings.sensors),\n id: 'sensors',\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 100,\n async loadView() {\n const Sensors = await loadEmulationModule();\n return new Sensors.SensorsView.SensorsView();\n },\n tags: [\n i18nLazyString(UIStrings.geolocation),\n i18nLazyString(UIStrings.timezones),\n i18nLazyString(UIStrings.locale),\n i18nLazyString(UIStrings.locales),\n i18nLazyString(UIStrings.accelerometer),\n i18nLazyString(UIStrings.deviceOrientation),\n ],\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'emulation-locations',\n commandPrompt: i18nLazyString(UIStrings.showLocations),\n title: i18nLazyString(UIStrings.locations),\n order: 40,\n async loadView() {\n const Sensors = await loadEmulationModule();\n return new Sensors.LocationsSettingsTab.LocationsSettingsTab();\n },\n settings: [\n 'emulation.locations',\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n storageType: Common.Settings.SettingStorageType.Synced,\n settingName: 'emulation.locations',\n settingType: Common.Settings.SettingType.ARRAY,\n // TODO(crbug.com/1136655): http://crrev.com/c/2666426 regressed localization of city titles.\n // These titles should be localized since they are displayed to users.\n defaultValue: [\n {\n title: 'Berlin',\n lat: 52.520007,\n long: 13.404954,\n timezoneId: 'Europe/Berlin',\n locale: 'de-DE',\n },\n {\n title: 'London',\n lat: 51.507351,\n long: -0.127758,\n timezoneId: 'Europe/London',\n locale: 'en-GB',\n },\n {\n title: 'Moscow',\n lat: 55.755826,\n long: 37.6173,\n timezoneId: 'Europe/Moscow',\n locale: 'ru-RU',\n },\n {\n title: 'Mountain View',\n lat: 37.386052,\n long: -122.083851,\n timezoneId: 'America/Los_Angeles',\n locale: 'en-US',\n },\n {\n title: 'Mumbai',\n lat: 19.075984,\n long: 72.877656,\n timezoneId: 'Asia/Kolkata',\n locale: 'mr-IN',\n },\n {\n title: 'San Francisco',\n lat: 37.774929,\n long: -122.419416,\n timezoneId: 'America/Los_Angeles',\n locale: 'en-US',\n },\n {\n title: 'Shanghai',\n lat: 31.230416,\n long: 121.473701,\n timezoneId: 'Asia/Shanghai',\n locale: 'zh-Hans-CN',\n },\n {\n title: 'São Paulo',\n lat: -23.55052,\n long: -46.633309,\n timezoneId: 'America/Sao_Paulo',\n locale: 'pt-BR',\n },\n {\n title: 'Tokyo',\n lat: 35.689487,\n long: 139.691706,\n timezoneId: 'Asia/Tokyo',\n locale: 'ja-JP',\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n title: i18nLazyString(UIStrings.touch),\n reloadRequired: true,\n settingName: 'emulation.touch',\n settingType: Common.Settings.SettingType.ENUM,\n defaultValue: 'none',\n options: [\n {\n value: 'none',\n title: i18nLazyString(UIStrings.devicebased),\n text: i18nLazyString(UIStrings.devicebased),\n },\n {\n value: 'force',\n title: i18nLazyString(UIStrings.forceEnabled),\n text: i18nLazyString(UIStrings.forceEnabled),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n title: i18nLazyString(UIStrings.emulateIdleDetectorState),\n settingName: 'emulation.idleDetection',\n settingType: Common.Settings.SettingType.ENUM,\n defaultValue: 'none',\n options: [\n {\n value: 'none',\n title: i18nLazyString(UIStrings.noIdleEmulation),\n text: i18nLazyString(UIStrings.noIdleEmulation),\n },\n {\n value: '{\\\"isUserActive\\\":true,\\\"isScreenUnlocked\\\":true}',\n title: i18nLazyString(UIStrings.userActiveScreenUnlocked),\n text: i18nLazyString(UIStrings.userActiveScreenUnlocked),\n },\n {\n value: '{\\\"isUserActive\\\":true,\\\"isScreenUnlocked\\\":false}',\n title: i18nLazyString(UIStrings.userActiveScreenLocked),\n text: i18nLazyString(UIStrings.userActiveScreenLocked),\n },\n {\n value: '{\\\"isUserActive\\\":false,\\\"isScreenUnlocked\\\":true}',\n title: i18nLazyString(UIStrings.userIdleScreenUnlocked),\n text: i18nLazyString(UIStrings.userIdleScreenUnlocked),\n },\n {\n value: '{\\\"isUserActive\\\":false,\\\"isScreenUnlocked\\\":false}',\n title: i18nLazyString(UIStrings.userIdleScreenLocked),\n text: i18nLazyString(UIStrings.userIdleScreenLocked),\n },\n ],\n});\n"]} \ No newline at end of file diff --git a/public/panels/settings/FrameworkIgnoreListSettingsTab.d.ts b/public/panels/settings/FrameworkIgnoreListSettingsTab.d.ts index 917afa289..8c47643f8 100644 --- a/public/panels/settings/FrameworkIgnoreListSettingsTab.d.ts +++ b/public/panels/settings/FrameworkIgnoreListSettingsTab.d.ts @@ -5,9 +5,6 @@ export declare class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox imple private readonly setting; private editor?; constructor(); - static instance(opts?: { - forceNew: null; - }): FrameworkIgnoreListSettingsTab; wasShown(): void; private settingUpdated; private addButtonClicked; diff --git a/public/panels/settings/FrameworkIgnoreListSettingsTab.js b/public/panels/settings/FrameworkIgnoreListSettingsTab.js index 3165981cc..26059d798 100644 --- a/public/panels/settings/FrameworkIgnoreListSettingsTab.js +++ b/public/panels/settings/FrameworkIgnoreListSettingsTab.js @@ -77,14 +77,13 @@ const UIStrings = { }; const str_ = i18n.i18n.registerUIStrings('panels/settings/FrameworkIgnoreListSettingsTab.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -let frameworkIgnoreListSettingsTabInstance; export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox { list; setting; editor; constructor() { super(true); - this.element.setAttribute('jslog', `${VisualLogging.section().context('blackbox')}`); + this.element.setAttribute('jslog', `${VisualLogging.pane().context('blackbox')}`); const header = this.contentElement.createChild('div', 'header'); header.textContent = i18nString(UIStrings.frameworkIgnoreList); UI.ARIAUtils.markAsHeading(header, 1); @@ -136,13 +135,6 @@ export class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox { } } } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!frameworkIgnoreListSettingsTabInstance || forceNew) { - frameworkIgnoreListSettingsTabInstance = new FrameworkIgnoreListSettingsTab(); - } - return frameworkIgnoreListSettingsTabInstance; - } wasShown() { super.wasShown(); this.list.registerCSSFiles([frameworkIgnoreListSettingsTabStyles]); diff --git a/public/panels/settings/FrameworkIgnoreListSettingsTab.js.map b/public/panels/settings/FrameworkIgnoreListSettingsTab.js.map index 710227bde..8e277542d 100644 --- a/public/panels/settings/FrameworkIgnoreListSettingsTab.js.map +++ b/public/panels/settings/FrameworkIgnoreListSettingsTab.js.map @@ -1 +1 @@ -{"version":3,"file":"FrameworkIgnoreListSettingsTab.js","sourceRoot":"","sources":["../../../../../../front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,oCAAoC,MAAM,yCAAyC,CAAC;AAE3F,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,mBAAmB,EAAE,uBAAuB;IAC5C;;OAEG;IACH,0BAA0B,EAAE,wFAAwF;IACpH;;OAEG;IACH,wBAAwB,EAAE,wCAAwC;IAClE;;OAEG;IACH,6CAA6C,EAAE,4CAA4C;IAC3F;;OAEG;IACH,mBAAmB,EAAE,uBAAuB;IAC5C;;OAEG;IACH,0BAA0B,EAAE,uCAAuC;IACnE;;OAEG;IACH,qBAAqB,EAAE,0BAA0B;IACjD;;OAEG;IACH,oBAAoB,EAAE,yBAAyB;IAC/C;;OAEG;IACH,UAAU,EAAE,gBAAgB;IAC5B;;OAEG;IACH,kBAAkB,EAAE,sBAAsB;IAC1C;;;OAGG;IACH,6BAA6B,EAAE,gDAAgD;IAC/E;;;OAGG;IACH,OAAO,EAAE,aAAa;IACtB;;OAEG;IACH,oBAAoB,EAAE,yBAAyB;IAC/C;;OAEG;IACH,oBAAo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AEtE,OAAO,MAAM,CAAC;QAEd,SAAS,gBAAgB,CACiB,IAAuC,EAAE,KAAa,EAC5F,KAAkC;YACpC,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YAE3C,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;gBACnB,OAAO,EAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAC,CAAC;aACjF;YAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;gBACxC,IAAI,CAAC,KAAK,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,EAAE;oBAClD,OAAO,EAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAC,CAAC;iBACjF;aACF;YAED,IAAI,KAAK,CAAC;YACV,IAAI;gBACF,KAAK,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;aAC7B;YAAC,OAAO,CAAC,EAAE;aACX;YACD,IAAI,CAAC,KAAK,EAAE;gBACV,OAAO,EAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,SAAS,CAAC,0BAA0B,CAAC,EAAC,CAAC;aACvF;YACD,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAC,CAAC;QAChD,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright 2014 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport frameworkIgnoreListSettingsTabStyles from './frameworkIgnoreListSettingsTab.css.js';\n\nconst UIStrings = {\n /**\n *@description Header text content in Framework Ignore List Settings Tab of the Settings\n */\n frameworkIgnoreList: 'Framework Ignore List',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n debuggerWillSkipThroughThe: 'Debugger will skip through the scripts and will not stop on exceptions thrown by them.',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n ignoreListContentScripts: 'Content scripts injected by extensions',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n automaticallyIgnoreListKnownThirdPartyScripts: 'Known third-party scripts from source maps',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n enableIgnoreListing: 'Enable Ignore Listing',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n enableIgnoreListingTooltip: 'Uncheck to disable all ignore listing',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n generalExclusionRules: 'General exclusion rules:',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n customExclusionRules: 'Custom exclusion rules:',\n /**\n *@description Text of the add pattern button in Framework Ignore List Settings Tab of the Settings\n */\n addPattern: 'Add pattern...',\n /**\n *@description Aria accessible name in Framework Ignore List Settings Tab of the Settings\n */\n addFilenamePattern: 'Add filename pattern',\n /**\n *@description Pattern title in Framework Ignore List Settings Tab of the Settings\n *@example {ad.*?} PH1\n */\n ignoreScriptsWhoseNamesMatchS: 'Ignore scripts whose names match \\'\\'{PH1}\\'\\'',\n /**\n *@description Aria accessible name in Framework Ignore List Settings Tab of the Settings. It labels the input\n * field used to add new or edit existing regular expressions that match file names to ignore in the debugger.\n */\n pattern: 'Add Pattern',\n /**\n *@description Error message in Framework Ignore List settings pane that declares pattern must not be empty\n */\n patternCannotBeEmpty: 'Pattern cannot be empty',\n /**\n *@description Error message in Framework Ignore List settings pane that declares pattern already exits\n */\n patternAlreadyExists: 'Pattern already exists',\n /**\n *@description Error message in Framework Ignore List settings pane that declares pattern must be a valid regular expression\n */\n patternMustBeAValidRegular: 'Pattern must be a valid regular expression',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/FrameworkIgnoreListSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet frameworkIgnoreListSettingsTabInstance: FrameworkIgnoreListSettingsTab;\nexport class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox implements\n UI.ListWidget.Delegate {\n private readonly list: UI.ListWidget.ListWidget;\n private readonly setting: Common.Settings.RegExpSetting;\n private editor?: UI.ListWidget.Editor;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.section().context('blackbox')}`);\n\n const header = this.contentElement.createChild('div', 'header');\n header.textContent = i18nString(UIStrings.frameworkIgnoreList);\n UI.ARIAUtils.markAsHeading(header, 1);\n\n this.contentElement.createChild('div', 'intro').textContent = i18nString(UIStrings.debuggerWillSkipThroughThe);\n\n const enabledSetting =\n Common.Settings.Settings.instance().moduleSetting('enableIgnoreListing') as Common.Settings.Setting;\n const enableIgnoreListing = this.contentElement.createChild('div', 'ignore-list-global-enable');\n enableIgnoreListing.appendChild(\n UI.SettingsUI.createSettingCheckbox(i18nString(UIStrings.enableIgnoreListing), enabledSetting, true));\n UI.Tooltip.Tooltip.install(enableIgnoreListing, i18nString(UIStrings.enableIgnoreListingTooltip));\n\n const ignoreListOptions = this.contentElement.createChild('div', 'ignore-list-options');\n\n ignoreListOptions.createChild('div', 'ignore-list-option-group').textContent =\n i18nString(UIStrings.generalExclusionRules);\n\n const ignoreListContentScripts = ignoreListOptions.createChild('div', 'ignore-list-option');\n ignoreListContentScripts.appendChild(UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.ignoreListContentScripts),\n Common.Settings.Settings.instance().moduleSetting('skipContentScripts'), true));\n\n const automaticallyIgnoreList = ignoreListOptions.createChild('div', 'ignore-list-option');\n automaticallyIgnoreList.appendChild(UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.automaticallyIgnoreListKnownThirdPartyScripts),\n Common.Settings.Settings.instance().moduleSetting('automaticallyIgnoreListKnownThirdPartyScripts'), true));\n\n const automaticallyIgnoreLink = UI.XLink.XLink.create('http://goo.gle/skip-third-party');\n automaticallyIgnoreLink.textContent = '';\n automaticallyIgnoreLink.setAttribute('aria-label', i18nString(UIStrings.learnMore));\n automaticallyIgnoreLink.setAttribute('jslog', `${VisualLogging.link().track({click: true}).context('learn-more')}`);\n\n const automaticallyIgnoreLinkIcon = new IconButton.Icon.Icon();\n automaticallyIgnoreLinkIcon.data = {iconName: 'help', color: 'var(--icon-default)', width: '16px', height: '16px'};\n automaticallyIgnoreLink.prepend(automaticallyIgnoreLinkIcon);\n automaticallyIgnoreList.appendChild(automaticallyIgnoreLink);\n\n ignoreListOptions.createChild('div', 'ignore-list-option-group').textContent =\n i18nString(UIStrings.customExclusionRules);\n\n this.list = new UI.ListWidget.ListWidget(this);\n this.list.element.classList.add('ignore-list');\n\n const placeholder = document.createElement('div');\n placeholder.classList.add('ignore-list-empty');\n this.list.setEmptyPlaceholder(placeholder);\n this.list.show(ignoreListOptions);\n const addPatternButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.addPattern), this.addButtonClicked.bind(this), 'add-button');\n addPatternButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('settings.add-ignore-list-pattern')}`);\n UI.ARIAUtils.setLabel(addPatternButton, i18nString(UIStrings.addFilenamePattern));\n ignoreListOptions.appendChild(addPatternButton);\n this.setting =\n Common.Settings.Settings.instance().moduleSetting('skipStackFramesPattern') as Common.Settings.RegExpSetting;\n this.setting.addChangeListener(this.settingUpdated, this);\n\n this.setDefaultFocusedElement(addPatternButton);\n\n enabledSetting.addChangeListener(enabledChanged);\n enabledChanged();\n\n function enabledChanged(): void {\n const enabled = enabledSetting.get();\n if (enabled) {\n ignoreListOptions.classList.remove('ignore-listing-disabled');\n } else {\n ignoreListOptions.classList.add('ignore-listing-disabled');\n }\n }\n }\n\n static instance(opts = {forceNew: null}): FrameworkIgnoreListSettingsTab {\n const {forceNew} = opts;\n if (!frameworkIgnoreListSettingsTabInstance || forceNew) {\n frameworkIgnoreListSettingsTabInstance = new FrameworkIgnoreListSettingsTab();\n }\n\n return frameworkIgnoreListSettingsTabInstance;\n }\n\n override wasShown(): void {\n super.wasShown();\n this.list.registerCSSFiles([frameworkIgnoreListSettingsTabStyles]);\n this.registerCSSFiles([frameworkIgnoreListSettingsTabStyles]);\n this.settingUpdated();\n }\n\n private settingUpdated(): void {\n this.list.clear();\n const patterns = this.setting.getAsArray();\n for (let i = 0; i < patterns.length; ++i) {\n this.list.appendItem(patterns[i], true);\n }\n }\n\n private addButtonClicked(): void {\n this.list.addNewItem(this.setting.getAsArray().length, {pattern: '', disabled: false});\n }\n\n renderItem(item: Common.Settings.RegExpSettingItem, _editable: boolean): Element {\n const element = document.createElement('div');\n\n const listSetting = this.setting;\n\n const checkbox =\n UI.UIUtils.CheckboxLabel.create(item.pattern, !item.disabled, undefined, 'settings.ignore-list-pattern');\n const helpText = i18nString(UIStrings.ignoreScriptsWhoseNamesMatchS, {PH1: item.pattern});\n UI.Tooltip.Tooltip.install(checkbox, helpText);\n checkbox.checkboxElement.ariaLabel = helpText;\n checkbox.checkboxElement.addEventListener('change', inputChanged, false);\n element.appendChild(checkbox);\n element.classList.add('ignore-list-item');\n\n return element;\n\n function inputChanged(): void {\n const disabled = !checkbox.checkboxElement.checked;\n if (item.disabled !== disabled) {\n item.disabled = disabled;\n item.disabledForUrl = undefined;\n // Send changed event\n listSetting.setAsArray(listSetting.getAsArray());\n }\n }\n }\n\n removeItemRequested(item: Common.Settings.RegExpSettingItem, index: number): void {\n const patterns = this.setting.getAsArray();\n patterns.splice(index, 1);\n this.setting.setAsArray(patterns);\n }\n\n commitEdit(\n item: Common.Settings.RegExpSettingItem, editor: UI.ListWidget.Editor,\n isNew: boolean): void {\n item.pattern = editor.control('pattern').value.trim();\n\n const list = this.setting.getAsArray();\n if (isNew) {\n list.push(item);\n }\n this.setting.setAsArray(list);\n }\n\n beginEdit(item: Common.Settings.RegExpSettingItem): UI.ListWidget.Editor {\n const editor = this.createEditor();\n editor.control('pattern').value = item.pattern;\n return editor;\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n this.editor = editor;\n const content = editor.contentElement();\n\n const titles = content.createChild('div', 'ignore-list-edit-row');\n titles.createChild('div', 'ignore-list-pattern').textContent = i18nString(UIStrings.pattern);\n\n const fields = content.createChild('div', 'ignore-list-edit-row');\n const pattern = editor.createInput('pattern', 'text', '/framework\\\\.js$', patternValidator.bind(this));\n UI.ARIAUtils.setLabel(pattern, i18nString(UIStrings.pattern));\n fields.createChild('div', 'ignore-list-pattern').appendChild(pattern);\n\n return editor;\n\n function patternValidator(\n this: FrameworkIgnoreListSettingsTab, item: Common.Settings.RegExpSettingItem, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const pattern = input.value.trim();\n const patterns = this.setting.getAsArray();\n\n if (!pattern.length) {\n return {valid: false, errorMessage: i18nString(UIStrings.patternCannotBeEmpty)};\n }\n\n for (let i = 0; i < patterns.length; ++i) {\n if (i !== index && patterns[i].pattern === pattern) {\n return {valid: false, errorMessage: i18nString(UIStrings.patternAlreadyExists)};\n }\n }\n\n let regex;\n try {\n regex = new RegExp(pattern);\n } catch (e) {\n }\n if (!regex) {\n return {valid: false, errorMessage: i18nString(UIStrings.patternMustBeAValidRegular)};\n }\n return {valid: true, errorMessage: undefined};\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"FrameworkIgnoreListSettingsTab.js","sourceRoot":"","sources":["../../../../../../front_end/panels/settings/FrameworkIgnoreListSettingsTab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E,YAAY,EAAE,UAAU,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAC,CAAC;iBACjF;aACF;YAED,IAAI,KAAK,CAAC;YACV,IAAI;gBACF,KAAK,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;aAC7B;YAAC,OAAO,CAAC,EAAE;aACX;YACD,IAAI,CAAC,KAAK,EAAE;gBACV,OAAO,EAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,SAAS,CAAC,0BAA0B,CAAC,EAAC,CAAC;aACvF;YACD,OAAO,EAAC,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAC,CAAC;QAChD,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright 2014 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport frameworkIgnoreListSettingsTabStyles from './frameworkIgnoreListSettingsTab.css.js';\n\nconst UIStrings = {\n /**\n *@description Header text content in Framework Ignore List Settings Tab of the Settings\n */\n frameworkIgnoreList: 'Framework Ignore List',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n debuggerWillSkipThroughThe: 'Debugger will skip through the scripts and will not stop on exceptions thrown by them.',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n ignoreListContentScripts: 'Content scripts injected by extensions',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n automaticallyIgnoreListKnownThirdPartyScripts: 'Known third-party scripts from source maps',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n enableIgnoreListing: 'Enable Ignore Listing',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n enableIgnoreListingTooltip: 'Uncheck to disable all ignore listing',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n generalExclusionRules: 'General exclusion rules:',\n /**\n *@description Text in Framework Ignore List Settings Tab of the Settings\n */\n customExclusionRules: 'Custom exclusion rules:',\n /**\n *@description Text of the add pattern button in Framework Ignore List Settings Tab of the Settings\n */\n addPattern: 'Add pattern...',\n /**\n *@description Aria accessible name in Framework Ignore List Settings Tab of the Settings\n */\n addFilenamePattern: 'Add filename pattern',\n /**\n *@description Pattern title in Framework Ignore List Settings Tab of the Settings\n *@example {ad.*?} PH1\n */\n ignoreScriptsWhoseNamesMatchS: 'Ignore scripts whose names match \\'\\'{PH1}\\'\\'',\n /**\n *@description Aria accessible name in Framework Ignore List Settings Tab of the Settings. It labels the input\n * field used to add new or edit existing regular expressions that match file names to ignore in the debugger.\n */\n pattern: 'Add Pattern',\n /**\n *@description Error message in Framework Ignore List settings pane that declares pattern must not be empty\n */\n patternCannotBeEmpty: 'Pattern cannot be empty',\n /**\n *@description Error message in Framework Ignore List settings pane that declares pattern already exits\n */\n patternAlreadyExists: 'Pattern already exists',\n /**\n *@description Error message in Framework Ignore List settings pane that declares pattern must be a valid regular expression\n */\n patternMustBeAValidRegular: 'Pattern must be a valid regular expression',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/FrameworkIgnoreListSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class FrameworkIgnoreListSettingsTab extends UI.Widget.VBox implements\n UI.ListWidget.Delegate {\n private readonly list: UI.ListWidget.ListWidget;\n private readonly setting: Common.Settings.RegExpSetting;\n private editor?: UI.ListWidget.Editor;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('blackbox')}`);\n\n const header = this.contentElement.createChild('div', 'header');\n header.textContent = i18nString(UIStrings.frameworkIgnoreList);\n UI.ARIAUtils.markAsHeading(header, 1);\n\n this.contentElement.createChild('div', 'intro').textContent = i18nString(UIStrings.debuggerWillSkipThroughThe);\n\n const enabledSetting =\n Common.Settings.Settings.instance().moduleSetting('enableIgnoreListing') as Common.Settings.Setting;\n const enableIgnoreListing = this.contentElement.createChild('div', 'ignore-list-global-enable');\n enableIgnoreListing.appendChild(\n UI.SettingsUI.createSettingCheckbox(i18nString(UIStrings.enableIgnoreListing), enabledSetting, true));\n UI.Tooltip.Tooltip.install(enableIgnoreListing, i18nString(UIStrings.enableIgnoreListingTooltip));\n\n const ignoreListOptions = this.contentElement.createChild('div', 'ignore-list-options');\n\n ignoreListOptions.createChild('div', 'ignore-list-option-group').textContent =\n i18nString(UIStrings.generalExclusionRules);\n\n const ignoreListContentScripts = ignoreListOptions.createChild('div', 'ignore-list-option');\n ignoreListContentScripts.appendChild(UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.ignoreListContentScripts),\n Common.Settings.Settings.instance().moduleSetting('skipContentScripts'), true));\n\n const automaticallyIgnoreList = ignoreListOptions.createChild('div', 'ignore-list-option');\n automaticallyIgnoreList.appendChild(UI.SettingsUI.createSettingCheckbox(\n i18nString(UIStrings.automaticallyIgnoreListKnownThirdPartyScripts),\n Common.Settings.Settings.instance().moduleSetting('automaticallyIgnoreListKnownThirdPartyScripts'), true));\n\n const automaticallyIgnoreLink = UI.XLink.XLink.create('http://goo.gle/skip-third-party');\n automaticallyIgnoreLink.textContent = '';\n automaticallyIgnoreLink.setAttribute('aria-label', i18nString(UIStrings.learnMore));\n automaticallyIgnoreLink.setAttribute('jslog', `${VisualLogging.link().track({click: true}).context('learn-more')}`);\n\n const automaticallyIgnoreLinkIcon = new IconButton.Icon.Icon();\n automaticallyIgnoreLinkIcon.data = {iconName: 'help', color: 'var(--icon-default)', width: '16px', height: '16px'};\n automaticallyIgnoreLink.prepend(automaticallyIgnoreLinkIcon);\n automaticallyIgnoreList.appendChild(automaticallyIgnoreLink);\n\n ignoreListOptions.createChild('div', 'ignore-list-option-group').textContent =\n i18nString(UIStrings.customExclusionRules);\n\n this.list = new UI.ListWidget.ListWidget(this);\n this.list.element.classList.add('ignore-list');\n\n const placeholder = document.createElement('div');\n placeholder.classList.add('ignore-list-empty');\n this.list.setEmptyPlaceholder(placeholder);\n this.list.show(ignoreListOptions);\n const addPatternButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.addPattern), this.addButtonClicked.bind(this), 'add-button');\n addPatternButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('settings.add-ignore-list-pattern')}`);\n UI.ARIAUtils.setLabel(addPatternButton, i18nString(UIStrings.addFilenamePattern));\n ignoreListOptions.appendChild(addPatternButton);\n this.setting =\n Common.Settings.Settings.instance().moduleSetting('skipStackFramesPattern') as Common.Settings.RegExpSetting;\n this.setting.addChangeListener(this.settingUpdated, this);\n\n this.setDefaultFocusedElement(addPatternButton);\n\n enabledSetting.addChangeListener(enabledChanged);\n enabledChanged();\n\n function enabledChanged(): void {\n const enabled = enabledSetting.get();\n if (enabled) {\n ignoreListOptions.classList.remove('ignore-listing-disabled');\n } else {\n ignoreListOptions.classList.add('ignore-listing-disabled');\n }\n }\n }\n\n override wasShown(): void {\n super.wasShown();\n this.list.registerCSSFiles([frameworkIgnoreListSettingsTabStyles]);\n this.registerCSSFiles([frameworkIgnoreListSettingsTabStyles]);\n this.settingUpdated();\n }\n\n private settingUpdated(): void {\n this.list.clear();\n const patterns = this.setting.getAsArray();\n for (let i = 0; i < patterns.length; ++i) {\n this.list.appendItem(patterns[i], true);\n }\n }\n\n private addButtonClicked(): void {\n this.list.addNewItem(this.setting.getAsArray().length, {pattern: '', disabled: false});\n }\n\n renderItem(item: Common.Settings.RegExpSettingItem, _editable: boolean): Element {\n const element = document.createElement('div');\n\n const listSetting = this.setting;\n\n const checkbox =\n UI.UIUtils.CheckboxLabel.create(item.pattern, !item.disabled, undefined, 'settings.ignore-list-pattern');\n const helpText = i18nString(UIStrings.ignoreScriptsWhoseNamesMatchS, {PH1: item.pattern});\n UI.Tooltip.Tooltip.install(checkbox, helpText);\n checkbox.checkboxElement.ariaLabel = helpText;\n checkbox.checkboxElement.addEventListener('change', inputChanged, false);\n element.appendChild(checkbox);\n element.classList.add('ignore-list-item');\n\n return element;\n\n function inputChanged(): void {\n const disabled = !checkbox.checkboxElement.checked;\n if (item.disabled !== disabled) {\n item.disabled = disabled;\n item.disabledForUrl = undefined;\n // Send changed event\n listSetting.setAsArray(listSetting.getAsArray());\n }\n }\n }\n\n removeItemRequested(item: Common.Settings.RegExpSettingItem, index: number): void {\n const patterns = this.setting.getAsArray();\n patterns.splice(index, 1);\n this.setting.setAsArray(patterns);\n }\n\n commitEdit(\n item: Common.Settings.RegExpSettingItem, editor: UI.ListWidget.Editor,\n isNew: boolean): void {\n item.pattern = editor.control('pattern').value.trim();\n\n const list = this.setting.getAsArray();\n if (isNew) {\n list.push(item);\n }\n this.setting.setAsArray(list);\n }\n\n beginEdit(item: Common.Settings.RegExpSettingItem): UI.ListWidget.Editor {\n const editor = this.createEditor();\n editor.control('pattern').value = item.pattern;\n return editor;\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n this.editor = editor;\n const content = editor.contentElement();\n\n const titles = content.createChild('div', 'ignore-list-edit-row');\n titles.createChild('div', 'ignore-list-pattern').textContent = i18nString(UIStrings.pattern);\n\n const fields = content.createChild('div', 'ignore-list-edit-row');\n const pattern = editor.createInput('pattern', 'text', '/framework\\\\.js$', patternValidator.bind(this));\n UI.ARIAUtils.setLabel(pattern, i18nString(UIStrings.pattern));\n fields.createChild('div', 'ignore-list-pattern').appendChild(pattern);\n\n return editor;\n\n function patternValidator(\n this: FrameworkIgnoreListSettingsTab, item: Common.Settings.RegExpSettingItem, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n const pattern = input.value.trim();\n const patterns = this.setting.getAsArray();\n\n if (!pattern.length) {\n return {valid: false, errorMessage: i18nString(UIStrings.patternCannotBeEmpty)};\n }\n\n for (let i = 0; i < patterns.length; ++i) {\n if (i !== index && patterns[i].pattern === pattern) {\n return {valid: false, errorMessage: i18nString(UIStrings.patternAlreadyExists)};\n }\n }\n\n let regex;\n try {\n regex = new RegExp(pattern);\n } catch (e) {\n }\n if (!regex) {\n return {valid: false, errorMessage: i18nString(UIStrings.patternMustBeAValidRegular)};\n }\n return {valid: true, errorMessage: undefined};\n }\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/settings/KeybindsSettingsTab.d.ts b/public/panels/settings/KeybindsSettingsTab.d.ts index 84587cfab..3d7bdc31d 100644 --- a/public/panels/settings/KeybindsSettingsTab.d.ts +++ b/public/panels/settings/KeybindsSettingsTab.d.ts @@ -5,9 +5,6 @@ export declare class KeybindsSettingsTab extends UI.Widget.VBox implements UI.Li private editingItem; private editingRow; constructor(); - static instance(opts?: { - forceNew: null; - }): KeybindsSettingsTab; createElementForItem(item: KeybindsItem): Element; commitChanges(item: UI.ActionRegistration.Action, editedShortcuts: Map): void; /** diff --git a/public/panels/settings/KeybindsSettingsTab.js b/public/panels/settings/KeybindsSettingsTab.js index a7820d85c..4c7a1ceed 100644 --- a/public/panels/settings/KeybindsSettingsTab.js +++ b/public/panels/settings/KeybindsSettingsTab.js @@ -74,7 +74,6 @@ const UIStrings = { }; const str_ = i18n.i18n.registerUIStrings('panels/settings/KeybindsSettingsTab.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -let keybindsSettingsTabInstance; export class KeybindsSettingsTab extends UI.Widget.VBox { items; list; @@ -82,7 +81,7 @@ export class KeybindsSettingsTab extends UI.Widget.VBox { editingRow; constructor() { super(true); - this.element.setAttribute('jslog', `${VisualLogging.section().context('keybinds')}`); + this.element.setAttribute('jslog', `${VisualLogging.pane().context('keybinds')}`); const header = this.contentElement.createChild('header'); header.createChild('h1').textContent = i18nString(UIStrings.shortcuts); const keybindsSetSetting = Common.Settings.Settings.instance().moduleSetting('activeKeybindSet'); @@ -116,13 +115,6 @@ export class KeybindsSettingsTab extends UI.Widget.VBox { this.editingRow = null; this.update(); } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!keybindsSettingsTabInstance || forceNew) { - keybindsSettingsTabInstance = new KeybindsSettingsTab(); - } - return keybindsSettingsTabInstance; - } createElementForItem(item) { let itemElement = document.createElement('div'); if (typeof item === 'string') { diff --git a/public/panels/settings/KeybindsSettingsTab.js.map b/public/panels/settings/KeybindsSettingsTab.js.map index 82884c374..9f7764c48 100644 --- a/public/panels/settings/KeybindsSettingsTab.js.map +++ b/public/panels/settings/KeybindsSettingsTab.js.map @@ -1 +1 @@ -{"version":3,"file":"KeybindsSettingsTab.js","sourceRoot":"","sources":["../../../../../../front_end/panels/settings/KeybindsSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,yBAAyB,MAAM,8BAA8B,CAAC;AAErE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,wBAAwB,EAAE,6BAA6B;IACvD;;OAEG;IACH,qBAAqB,EAAE,yBAAyB;IAChD;;OAEG;IACH,gBAAgB,EAAE,mBAAmB;IACrC;;OAEG;IACH,mBAAmB,EAAE,wBAAwB;IAC7C;;OAEG;IACH,YAAY,EAAE,gBAAgB;IAC9B;;OAEG;IACH,cAAc,EAAE,iBAAiB;IACjC;;OAEG;IACH,cAAc,EAAE,iBAAiB;IACjC;;OAEG;IACH,cAAc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AC;YAC9C,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport keybindsSettingsTabStyles from './keybindsSettingsTab.css.js';\n\nconst UIStrings = {\n /**\n *@description Text for keyboard shortcuts\n */\n shortcuts: 'Shortcuts',\n /**\n *@description Text appearing before a select control offering users their choice of keyboard shortcut presets.\n */\n matchShortcutsFromPreset: 'Match shortcuts from preset',\n /**\n *@description Screen reader label for list of keyboard shortcuts in settings\n */\n keyboardShortcutsList: 'Keyboard shortcuts list',\n /**\n *@description Screen reader label for an icon denoting a shortcut that has been changed from its default\n */\n shortcutModified: 'Shortcut modified',\n /**\n *@description Screen reader label for an empty shortcut cell in custom shortcuts settings tab\n */\n noShortcutForAction: 'No shortcut for action',\n /**\n *@description Link text in the settings pane to add another shortcut for an action\n */\n addAShortcut: 'Add a shortcut',\n /**\n *@description Label for a button in the settings pane that confirms changes to a keyboard shortcut\n */\n confirmChanges: 'Confirm changes',\n /**\n *@description Label for a button in the settings pane that discards changes to the shortcut being edited\n */\n discardChanges: 'Discard changes',\n /**\n *@description Label for a button in the settings pane that removes a keyboard shortcut.\n */\n removeShortcut: 'Remove shortcut',\n /**\n *@description Label for a button in the settings pane that edits a keyboard shortcut\n */\n editShortcut: 'Edit shortcut',\n /**\n *@description Message shown in settings when the user inputs a modifier-only shortcut such as Ctrl+Shift.\n */\n shortcutsCannotContainOnly: 'Shortcuts cannot contain only modifier keys.',\n /**\n *@description Messages shown in shortcuts settings when the user inputs a shortcut that is already in use.\n *@example {Performance} PH1\n *@example {Start/stop recording} PH2\n */\n thisShortcutIsInUseByS: 'This shortcut is in use by {PH1}: {PH2}.',\n /**\n *@description Message shown in settings when to restore default shortcuts.\n */\n RestoreDefaultShortcuts: 'Restore default shortcuts',\n /**\n *@description Message shown in settings to show the full list of keyboard shortcuts.\n */\n FullListOfDevtoolsKeyboard: 'Full list of DevTools keyboard shortcuts and gestures',\n /**\n *@description Label for a button in the shortcut editor that resets all shortcuts for the current action.\n */\n ResetShortcutsForAction: 'Reset shortcuts for action',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/KeybindsSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet keybindsSettingsTabInstance: KeybindsSettingsTab;\nexport class KeybindsSettingsTab extends UI.Widget.VBox implements UI.ListControl.ListDelegate {\n private readonly items: UI.ListModel.ListModel;\n private list: UI.ListControl.ListControl;\n private editingItem: UI.ActionRegistration.Action|null;\n private editingRow: ShortcutListItem|null;\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.section().context('keybinds')}`);\n\n const header = this.contentElement.createChild('header');\n header.createChild('h1').textContent = i18nString(UIStrings.shortcuts);\n const keybindsSetSetting = Common.Settings.Settings.instance().moduleSetting('activeKeybindSet');\n const userShortcutsSetting = Common.Settings.Settings.instance().moduleSetting('userShortcuts');\n userShortcutsSetting.addChangeListener(this.update, this);\n keybindsSetSetting.addChangeListener(this.update, this);\n const keybindsSetSelect =\n UI.SettingsUI.createControlForSetting(keybindsSetSetting, i18nString(UIStrings.matchShortcutsFromPreset));\n if (keybindsSetSelect) {\n keybindsSetSelect.classList.add('keybinds-set-select');\n this.contentElement.appendChild(keybindsSetSelect);\n }\n\n this.items = new UI.ListModel.ListModel();\n this.list = new UI.ListControl.ListControl(this.items, this, UI.ListControl.ListMode.NonViewport);\n this.items.replaceAll(this.createListItems());\n UI.ARIAUtils.markAsList(this.list.element);\n\n this.contentElement.appendChild(this.list.element);\n UI.ARIAUtils.setLabel(this.list.element, i18nString(UIStrings.keyboardShortcutsList));\n const footer = this.contentElement.createChild('div');\n footer.classList.add('keybinds-footer');\n const docsLink = UI.XLink.XLink.create(\n 'https://developer.chrome.com/docs/devtools/shortcuts/', i18nString(UIStrings.FullListOfDevtoolsKeyboard));\n docsLink.setAttribute('jslog', `${VisualLogging.link().track({click: true}).context('learn-more')}`);\n docsLink.classList.add('docs-link');\n footer.appendChild(docsLink);\n const restoreDefaultShortcutsButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.RestoreDefaultShortcuts), () => {\n userShortcutsSetting.set([]);\n keybindsSetSetting.set(UI.ShortcutRegistry.DefaultShortcutSetting);\n });\n restoreDefaultShortcutsButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('restore-default-shortcuts')}`);\n footer.appendChild(restoreDefaultShortcutsButton);\n this.editingItem = null;\n this.editingRow = null;\n\n this.update();\n }\n\n static instance(opts = {forceNew: null}): KeybindsSettingsTab {\n const {forceNew} = opts;\n if (!keybindsSettingsTabInstance || forceNew) {\n keybindsSettingsTabInstance = new KeybindsSettingsTab();\n }\n\n return keybindsSettingsTabInstance;\n }\n\n createElementForItem(item: KeybindsItem): Element {\n let itemElement = document.createElement('div');\n\n if (typeof item === 'string') {\n UI.ARIAUtils.setLevel(itemElement, 1);\n itemElement.classList.add('keybinds-category-header');\n itemElement.textContent = UI.ActionRegistration.getLocalizedActionCategory(item);\n } else {\n const listItem = new ShortcutListItem(item, this, item === this.editingItem);\n itemElement = listItem.element;\n UI.ARIAUtils.setLevel(itemElement, 2);\n if (item === this.editingItem) {\n this.editingRow = listItem;\n }\n }\n\n itemElement.classList.add('keybinds-list-item');\n UI.ARIAUtils.markAsListitem(itemElement);\n itemElement.tabIndex = item === this.list.selectedItem() && item !== this.editingItem ? 0 : -1;\n return itemElement;\n }\n\n commitChanges(\n item: UI.ActionRegistration.Action,\n editedShortcuts: Map): void {\n for (const [originalShortcut, newDescriptors] of editedShortcuts) {\n if (originalShortcut.type !== UI.KeyboardShortcut.Type.UnsetShortcut) {\n UI.ShortcutRegistry.ShortcutRegistry.instance().removeShortcut(originalShortcut);\n if (!newDescriptors) {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ShortcutRemoved);\n }\n }\n if (newDescriptors) {\n UI.ShortcutRegistry.ShortcutRegistry.instance().registerUserShortcut(\n originalShortcut.changeKeys(newDescriptors as UI.KeyboardShortcut.Descriptor[])\n .changeType(UI.KeyboardShortcut.Type.UserShortcut));\n if (originalShortcut.type === UI.KeyboardShortcut.Type.UnsetShortcut) {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.UserShortcutAdded);\n } else {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ShortcutModified);\n }\n }\n }\n this.stopEditing(item);\n }\n\n /**\n * This method will never be called.\n */\n heightForItem(_item: KeybindsItem): number {\n return 0;\n }\n\n isItemSelectable(_item: KeybindsItem): boolean {\n return true;\n }\n\n selectedItemChanged(\n from: KeybindsItem|null, to: KeybindsItem|null, fromElement: HTMLElement|null,\n toElement: HTMLElement|null): void {\n if (fromElement) {\n fromElement.tabIndex = -1;\n }\n if (toElement) {\n if (to === this.editingItem && this.editingRow) {\n this.editingRow.focus();\n } else {\n toElement.tabIndex = 0;\n if (this.list.element.hasFocus()) {\n toElement.focus();\n }\n }\n this.setDefaultFocusedElement(toElement);\n }\n }\n\n updateSelectedItemARIA(_fromElement: Element|null, _toElement: Element|null): boolean {\n return true;\n }\n\n startEditing(action: UI.ActionRegistration.Action): void {\n this.list.selectItem(action);\n\n if (this.editingItem) {\n this.stopEditing(this.editingItem);\n }\n UI.UIUtils.markBeingEdited(this.list.element, true);\n this.editingItem = action;\n this.list.refreshItem(action);\n }\n\n stopEditing(action: UI.ActionRegistration.Action): void {\n UI.UIUtils.markBeingEdited(this.list.element, false);\n this.editingItem = null;\n this.editingRow = null;\n this.list.refreshItem(action);\n this.focus();\n }\n\n private createListItems(): KeybindsItem[] {\n const actions = UI.ActionRegistry.ActionRegistry.instance().actions().sort((actionA, actionB) => {\n if (actionA.category() < actionB.category()) {\n return -1;\n }\n if (actionA.category() > actionB.category()) {\n return 1;\n }\n if (actionA.id() < actionB.id()) {\n return -1;\n }\n if (actionA.id() > actionB.id()) {\n return 1;\n }\n return 0;\n });\n\n const items: KeybindsItem[] = [];\n\n let currentCategory: UI.ActionRegistration.ActionCategory;\n actions.forEach(action => {\n if (action.id() === 'elements.toggle-element-search') {\n return;\n }\n\n if (currentCategory !== action.category()) {\n items.push(action.category());\n }\n items.push(action);\n currentCategory = action.category();\n });\n return items;\n }\n\n onEscapeKeyPressed(event: Event): void {\n const deepActiveElement = Platform.DOMUtilities.deepActiveElement(document);\n if (this.editingRow && deepActiveElement && deepActiveElement.nodeName === 'INPUT') {\n this.editingRow.onEscapeKeyPressed(event);\n }\n }\n\n update(): void {\n if (this.editingItem) {\n this.stopEditing(this.editingItem);\n }\n this.list.refreshAllItems();\n if (!this.list.selectedItem()) {\n this.list.selectItem(this.items.at(0));\n }\n }\n\n override willHide(): void {\n if (this.editingItem) {\n this.stopEditing(this.editingItem);\n }\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([keybindsSettingsTabStyles]);\n }\n}\n\nexport class ShortcutListItem {\n private isEditing: boolean;\n private settingsTab: KeybindsSettingsTab;\n private item: UI.ActionRegistration.Action;\n element: HTMLDivElement;\n private editedShortcuts: Map;\n private readonly shortcutInputs: Map;\n private readonly shortcuts: UI.KeyboardShortcut.KeyboardShortcut[];\n private elementToFocus: HTMLElement|null;\n private confirmButton: HTMLButtonElement|null;\n private addShortcutLinkContainer: Element|null;\n private errorMessageElement: Element|null;\n private secondKeyTimeout: number|null;\n constructor(item: UI.ActionRegistration.Action, settingsTab: KeybindsSettingsTab, isEditing?: boolean) {\n this.isEditing = Boolean(isEditing);\n this.settingsTab = settingsTab;\n this.item = item;\n this.element = document.createElement('div');\n this.element.setAttribute('jslog', `${VisualLogging.item().context(item.id())}`);\n this.editedShortcuts = new Map();\n this.shortcutInputs = new Map();\n this.shortcuts = UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction(item.id());\n this.elementToFocus = null;\n this.confirmButton = null;\n this.addShortcutLinkContainer = null;\n this.errorMessageElement = null;\n this.secondKeyTimeout = null;\n\n this.update();\n }\n\n focus(): void {\n if (this.elementToFocus) {\n this.elementToFocus.focus();\n }\n }\n\n private update(): void {\n this.element.removeChildren();\n this.elementToFocus = null;\n this.shortcutInputs.clear();\n\n this.element.classList.toggle('keybinds-editing', this.isEditing);\n this.element.createChild('div', 'keybinds-action-name keybinds-list-text').textContent = this.item.title();\n this.shortcuts.forEach(this.createShortcutRow, this);\n if (this.shortcuts.length === 0) {\n this.createEmptyInfo();\n }\n if (this.isEditing) {\n this.setupEditor();\n }\n }\n\n private createEmptyInfo(): void {\n if (UI.ShortcutRegistry.ShortcutRegistry.instance().actionHasDefaultShortcut(this.item.id())) {\n const icon = UI.Icon.Icon.create('keyboard-pen', 'keybinds-modified');\n UI.ARIAUtils.setLabel(icon, i18nString(UIStrings.shortcutModified));\n this.element.appendChild(icon);\n }\n if (!this.isEditing) {\n const emptyElement = this.element.createChild('div', 'keybinds-shortcut keybinds-list-text');\n UI.ARIAUtils.setLabel(emptyElement, i18nString(UIStrings.noShortcutForAction));\n this.element.appendChild(this.createEditButton());\n }\n }\n\n private setupEditor(): void {\n this.addShortcutLinkContainer = this.element.createChild('div', 'keybinds-shortcut devtools-link');\n const addShortcutLink = this.addShortcutLinkContainer.createChild('span', 'devtools-link') as HTMLDivElement;\n addShortcutLink.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context('add-shortcut')}`);\n addShortcutLink.textContent = i18nString(UIStrings.addAShortcut);\n addShortcutLink.tabIndex = 0;\n UI.ARIAUtils.markAsLink(addShortcutLink);\n self.onInvokeElement(addShortcutLink, this.addShortcut.bind(this));\n if (!this.elementToFocus) {\n this.elementToFocus = addShortcutLink;\n }\n\n this.errorMessageElement = this.element.createChild('div', 'keybinds-info keybinds-error hidden');\n UI.ARIAUtils.markAsAlert(this.errorMessageElement);\n this.element.appendChild(this.createIconButton(\n i18nString(UIStrings.ResetShortcutsForAction), 'undo', '', 'undo', this.resetShortcutsToDefaults.bind(this)));\n this.confirmButton = this.createIconButton(\n i18nString(UIStrings.confirmChanges), 'checkmark', 'keybinds-confirm-button', 'confirm',\n () => this.settingsTab.commitChanges(this.item, this.editedShortcuts));\n this.element.appendChild(this.confirmButton);\n this.element.appendChild(this.createIconButton(\n i18nString(UIStrings.discardChanges), 'cross', 'keybinds-cancel-button', 'cancel',\n () => this.settingsTab.stopEditing(this.item)));\n this.element.addEventListener('keydown', event => {\n if (Platform.KeyboardUtilities.isEscKey(event)) {\n this.settingsTab.stopEditing(this.item);\n event.consume(true);\n }\n });\n }\n\n private addShortcut(): void {\n const shortcut =\n new UI.KeyboardShortcut.KeyboardShortcut([], this.item.id(), UI.KeyboardShortcut.Type.UnsetShortcut);\n this.shortcuts.push(shortcut);\n this.update();\n const shortcutInput = this.shortcutInputs.get(shortcut) as HTMLElement;\n if (shortcutInput) {\n shortcutInput.focus();\n }\n }\n\n private createShortcutRow(shortcut: UI.KeyboardShortcut.KeyboardShortcut, index?: number): void {\n if (this.editedShortcuts.has(shortcut) && !this.editedShortcuts.get(shortcut)) {\n return;\n }\n let icon: UI.Icon.Icon;\n if (shortcut.type !== UI.KeyboardShortcut.Type.UnsetShortcut && !shortcut.isDefault()) {\n icon = UI.Icon.Icon.create('keyboard-pen', 'keybinds-modified');\n UI.ARIAUtils.setLabel(icon, i18nString(UIStrings.shortcutModified));\n this.element.appendChild(icon);\n }\n const shortcutElement = this.element.createChild('div', 'keybinds-shortcut keybinds-list-text');\n if (this.isEditing) {\n const shortcutInput = shortcutElement.createChild('input', 'harmony-input') as HTMLInputElement;\n shortcutInput.setAttribute('jslog', `${VisualLogging.textField().track({keydown: true})}`);\n shortcutInput.spellcheck = false;\n shortcutInput.maxLength = 0;\n this.shortcutInputs.set(shortcut, shortcutInput);\n if (!this.elementToFocus) {\n this.elementToFocus = shortcutInput;\n }\n shortcutInput.value = shortcut.title();\n const userDescriptors = this.editedShortcuts.get(shortcut);\n if (userDescriptors) {\n shortcutInput.value = this.shortcutInputTextForDescriptors(userDescriptors);\n }\n shortcutInput.addEventListener('keydown', this.onShortcutInputKeyDown.bind(this, shortcut, shortcutInput));\n shortcutInput.addEventListener('blur', () => {\n if (this.secondKeyTimeout !== null) {\n clearTimeout(this.secondKeyTimeout);\n this.secondKeyTimeout = null;\n }\n });\n shortcutElement.appendChild(\n this.createIconButton(i18nString(UIStrings.removeShortcut), 'bin', 'keybinds-delete-button', 'delete', () => {\n const index = this.shortcuts.indexOf(shortcut);\n if (!shortcut.isDefault()) {\n this.shortcuts.splice(index, 1);\n }\n this.editedShortcuts.set(shortcut, null);\n this.update();\n this.focus();\n this.validateInputs();\n }));\n } else {\n const keys = shortcut.descriptors.flatMap(descriptor => descriptor.name.split(' + '));\n keys.forEach(key => {\n shortcutElement.createChild('span', 'keybinds-key').textContent = key;\n });\n if (index === 0) {\n this.element.appendChild(this.createEditButton());\n }\n }\n }\n\n private createEditButton(): HTMLElement {\n return this.createIconButton(\n i18nString(UIStrings.editShortcut), 'edit', 'keybinds-edit-button', 'edit',\n () => this.settingsTab.startEditing(this.item));\n }\n\n private createIconButton(\n label: string, iconName: string, className: string, jslogContext: string,\n listener: () => void): HTMLButtonElement {\n const button = document.createElement('button') as HTMLButtonElement;\n button.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context(jslogContext)}`);\n button.setAttribute('title', label);\n button.appendChild(UI.Icon.Icon.create(iconName));\n button.addEventListener('click', listener);\n UI.ARIAUtils.setLabel(button, label);\n if (className) {\n button.classList.add(className);\n }\n return button;\n }\n\n private onShortcutInputKeyDown(\n shortcut: UI.KeyboardShortcut.KeyboardShortcut, shortcutInput: HTMLInputElement, event: Event): void {\n if ((event as KeyboardEvent).key !== 'Tab') {\n const eventDescriptor = this.descriptorForEvent(event as KeyboardEvent);\n const userDescriptors = this.editedShortcuts.get(shortcut) || [];\n this.editedShortcuts.set(shortcut, userDescriptors);\n const isLastKeyOfShortcut =\n userDescriptors.length === 2 && UI.KeyboardShortcut.KeyboardShortcut.isModifier(userDescriptors[1].key);\n const shouldClearOldShortcut = userDescriptors.length === 2 && !isLastKeyOfShortcut;\n if (shouldClearOldShortcut) {\n userDescriptors.splice(0, 2);\n }\n if (this.secondKeyTimeout) {\n clearTimeout(this.secondKeyTimeout);\n this.secondKeyTimeout = null;\n userDescriptors.push(eventDescriptor);\n } else if (isLastKeyOfShortcut) {\n userDescriptors[1] = eventDescriptor;\n } else if (!UI.KeyboardShortcut.KeyboardShortcut.isModifier(eventDescriptor.key)) {\n userDescriptors[0] = eventDescriptor;\n this.secondKeyTimeout = window.setTimeout(() => {\n this.secondKeyTimeout = null;\n }, UI.ShortcutRegistry.KeyTimeout);\n } else {\n userDescriptors[0] = eventDescriptor;\n }\n shortcutInput.value = this.shortcutInputTextForDescriptors(userDescriptors);\n this.validateInputs();\n event.consume(true);\n }\n }\n\n private descriptorForEvent(event: KeyboardEvent): UI.KeyboardShortcut.Descriptor {\n const userKey = UI.KeyboardShortcut.KeyboardShortcut.makeKeyFromEvent(event as KeyboardEvent);\n const codeAndModifiers = UI.KeyboardShortcut.KeyboardShortcut.keyCodeAndModifiersFromKey(userKey);\n let key: UI.KeyboardShortcut.Key|string =\n UI.KeyboardShortcut.Keys[event.key] || UI.KeyboardShortcut.KeyBindings[event.key];\n\n if (!key && !/^[a-z]$/i.test(event.key)) {\n const keyCode = event.code;\n // if we still don't have a key name, let's try the code before falling back to the raw key\n key = UI.KeyboardShortcut.Keys[keyCode] || UI.KeyboardShortcut.KeyBindings[keyCode];\n if (keyCode.startsWith('Digit')) {\n key = keyCode.slice(5);\n } else if (keyCode.startsWith('Key')) {\n key = keyCode.slice(3);\n }\n }\n\n return UI.KeyboardShortcut.KeyboardShortcut.makeDescriptor(key || event.key, codeAndModifiers.modifiers);\n }\n\n private shortcutInputTextForDescriptors(descriptors: UI.KeyboardShortcut.Descriptor[]): string {\n return descriptors.map(descriptor => descriptor.name).join(' ');\n }\n\n private resetShortcutsToDefaults(): void {\n this.editedShortcuts.clear();\n for (const shortcut of this.shortcuts) {\n if (shortcut.type === UI.KeyboardShortcut.Type.UnsetShortcut) {\n const index = this.shortcuts.indexOf(shortcut);\n this.shortcuts.splice(index, 1);\n } else if (shortcut.type === UI.KeyboardShortcut.Type.UserShortcut) {\n this.editedShortcuts.set(shortcut, null);\n }\n }\n const disabledDefaults = UI.ShortcutRegistry.ShortcutRegistry.instance().disabledDefaultsForAction(this.item.id());\n disabledDefaults.forEach(shortcut => {\n if (this.shortcuts.includes(shortcut)) {\n return;\n }\n\n this.shortcuts.push(shortcut);\n this.editedShortcuts.set(shortcut, shortcut.descriptors);\n });\n this.update();\n this.focus();\n }\n\n onEscapeKeyPressed(event: Event): void {\n const activeElement = Platform.DOMUtilities.deepActiveElement(document);\n for (const [shortcut, shortcutInput] of this.shortcutInputs.entries()) {\n if (activeElement === shortcutInput) {\n this.onShortcutInputKeyDown(\n shortcut as UI.KeyboardShortcut.KeyboardShortcut, shortcutInput as HTMLInputElement,\n event as KeyboardEvent);\n }\n }\n }\n\n private validateInputs(): void {\n const confirmButton = this.confirmButton;\n const errorMessageElement = this.errorMessageElement;\n if (!confirmButton || !errorMessageElement) {\n return;\n }\n\n confirmButton.disabled = false;\n errorMessageElement.classList.add('hidden');\n this.shortcutInputs.forEach((shortcutInput, shortcut) => {\n const userDescriptors = this.editedShortcuts.get(shortcut);\n if (!userDescriptors) {\n return;\n }\n if (userDescriptors.some(descriptor => UI.KeyboardShortcut.KeyboardShortcut.isModifier(descriptor.key))) {\n confirmButton.disabled = true;\n shortcutInput.classList.add('error-input');\n UI.ARIAUtils.setInvalid(shortcutInput, true);\n errorMessageElement.classList.remove('hidden');\n errorMessageElement.textContent = i18nString(UIStrings.shortcutsCannotContainOnly);\n return;\n }\n const conflicts = UI.ShortcutRegistry.ShortcutRegistry.instance()\n .actionsForDescriptors(userDescriptors)\n .filter(actionId => actionId !== this.item.id());\n if (conflicts.length) {\n confirmButton.disabled = true;\n shortcutInput.classList.add('error-input');\n UI.ARIAUtils.setInvalid(shortcutInput, true);\n errorMessageElement.classList.remove('hidden');\n if (!UI.ActionRegistry.ActionRegistry.instance().hasAction(conflicts[0])) {\n return;\n }\n const action = UI.ActionRegistry.ActionRegistry.instance().getAction(conflicts[0]);\n const actionTitle = action.title();\n const actionCategory = action.category();\n errorMessageElement.textContent =\n i18nString(UIStrings.thisShortcutIsInUseByS, {PH1: actionCategory, PH2: actionTitle});\n return;\n }\n shortcutInput.classList.remove('error-input');\n UI.ARIAUtils.setInvalid(shortcutInput, false);\n });\n }\n}\n\nexport type KeybindsItem = UI.ActionRegistration.ActionCategory|UI.ActionRegistration.Action;\n"]} \ No newline at end of file +{"version":3,"file":"KeybindsSettingsTab.js","sourceRoot":"","sources":["../../../../../../front_end/panels/settings/KeybindsSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,yBAAyB,MAAM,8BAA8B,CAAC;AAErE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,wBAAwB,EAAE,6BAA6B;IACvD;;OAEG;IACH,qBAAqB,EAAE,yBAAyB;IAChD;;OAEG;IACH,gBAAgB,EAAE,mBAAmB;IACrC;;OAEG;IACH,mBAAmB,EAAE,wBAAw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Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport keybindsSettingsTabStyles from './keybindsSettingsTab.css.js';\n\nconst UIStrings = {\n /**\n *@description Text for keyboard shortcuts\n */\n shortcuts: 'Shortcuts',\n /**\n *@description Text appearing before a select control offering users their choice of keyboard shortcut presets.\n */\n matchShortcutsFromPreset: 'Match shortcuts from preset',\n /**\n *@description Screen reader label for list of keyboard shortcuts in settings\n */\n keyboardShortcutsList: 'Keyboard shortcuts list',\n /**\n *@description Screen reader label for an icon denoting a shortcut that has been changed from its default\n */\n shortcutModified: 'Shortcut modified',\n /**\n *@description Screen reader label for an empty shortcut cell in custom shortcuts settings tab\n */\n noShortcutForAction: 'No shortcut for action',\n /**\n *@description Link text in the settings pane to add another shortcut for an action\n */\n addAShortcut: 'Add a shortcut',\n /**\n *@description Label for a button in the settings pane that confirms changes to a keyboard shortcut\n */\n confirmChanges: 'Confirm changes',\n /**\n *@description Label for a button in the settings pane that discards changes to the shortcut being edited\n */\n discardChanges: 'Discard changes',\n /**\n *@description Label for a button in the settings pane that removes a keyboard shortcut.\n */\n removeShortcut: 'Remove shortcut',\n /**\n *@description Label for a button in the settings pane that edits a keyboard shortcut\n */\n editShortcut: 'Edit shortcut',\n /**\n *@description Message shown in settings when the user inputs a modifier-only shortcut such as Ctrl+Shift.\n */\n shortcutsCannotContainOnly: 'Shortcuts cannot contain only modifier keys.',\n /**\n *@description Messages shown in shortcuts settings when the user inputs a shortcut that is already in use.\n *@example {Performance} PH1\n *@example {Start/stop recording} PH2\n */\n thisShortcutIsInUseByS: 'This shortcut is in use by {PH1}: {PH2}.',\n /**\n *@description Message shown in settings when to restore default shortcuts.\n */\n RestoreDefaultShortcuts: 'Restore default shortcuts',\n /**\n *@description Message shown in settings to show the full list of keyboard shortcuts.\n */\n FullListOfDevtoolsKeyboard: 'Full list of DevTools keyboard shortcuts and gestures',\n /**\n *@description Label for a button in the shortcut editor that resets all shortcuts for the current action.\n */\n ResetShortcutsForAction: 'Reset shortcuts for action',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/KeybindsSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class KeybindsSettingsTab extends UI.Widget.VBox implements UI.ListControl.ListDelegate {\n private readonly items: UI.ListModel.ListModel;\n private list: UI.ListControl.ListControl;\n private editingItem: UI.ActionRegistration.Action|null;\n private editingRow: ShortcutListItem|null;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('keybinds')}`);\n\n const header = this.contentElement.createChild('header');\n header.createChild('h1').textContent = i18nString(UIStrings.shortcuts);\n const keybindsSetSetting = Common.Settings.Settings.instance().moduleSetting('activeKeybindSet');\n const userShortcutsSetting = Common.Settings.Settings.instance().moduleSetting('userShortcuts');\n userShortcutsSetting.addChangeListener(this.update, this);\n keybindsSetSetting.addChangeListener(this.update, this);\n const keybindsSetSelect =\n UI.SettingsUI.createControlForSetting(keybindsSetSetting, i18nString(UIStrings.matchShortcutsFromPreset));\n if (keybindsSetSelect) {\n keybindsSetSelect.classList.add('keybinds-set-select');\n this.contentElement.appendChild(keybindsSetSelect);\n }\n\n this.items = new UI.ListModel.ListModel();\n this.list = new UI.ListControl.ListControl(this.items, this, UI.ListControl.ListMode.NonViewport);\n this.items.replaceAll(this.createListItems());\n UI.ARIAUtils.markAsList(this.list.element);\n\n this.contentElement.appendChild(this.list.element);\n UI.ARIAUtils.setLabel(this.list.element, i18nString(UIStrings.keyboardShortcutsList));\n const footer = this.contentElement.createChild('div');\n footer.classList.add('keybinds-footer');\n const docsLink = UI.XLink.XLink.create(\n 'https://developer.chrome.com/docs/devtools/shortcuts/', i18nString(UIStrings.FullListOfDevtoolsKeyboard));\n docsLink.setAttribute('jslog', `${VisualLogging.link().track({click: true}).context('learn-more')}`);\n docsLink.classList.add('docs-link');\n footer.appendChild(docsLink);\n const restoreDefaultShortcutsButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.RestoreDefaultShortcuts), () => {\n userShortcutsSetting.set([]);\n keybindsSetSetting.set(UI.ShortcutRegistry.DefaultShortcutSetting);\n });\n restoreDefaultShortcutsButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('restore-default-shortcuts')}`);\n footer.appendChild(restoreDefaultShortcutsButton);\n this.editingItem = null;\n this.editingRow = null;\n\n this.update();\n }\n\n createElementForItem(item: KeybindsItem): Element {\n let itemElement = document.createElement('div');\n\n if (typeof item === 'string') {\n UI.ARIAUtils.setLevel(itemElement, 1);\n itemElement.classList.add('keybinds-category-header');\n itemElement.textContent = UI.ActionRegistration.getLocalizedActionCategory(item);\n } else {\n const listItem = new ShortcutListItem(item, this, item === this.editingItem);\n itemElement = listItem.element;\n UI.ARIAUtils.setLevel(itemElement, 2);\n if (item === this.editingItem) {\n this.editingRow = listItem;\n }\n }\n\n itemElement.classList.add('keybinds-list-item');\n UI.ARIAUtils.markAsListitem(itemElement);\n itemElement.tabIndex = item === this.list.selectedItem() && item !== this.editingItem ? 0 : -1;\n return itemElement;\n }\n\n commitChanges(\n item: UI.ActionRegistration.Action,\n editedShortcuts: Map): void {\n for (const [originalShortcut, newDescriptors] of editedShortcuts) {\n if (originalShortcut.type !== UI.KeyboardShortcut.Type.UnsetShortcut) {\n UI.ShortcutRegistry.ShortcutRegistry.instance().removeShortcut(originalShortcut);\n if (!newDescriptors) {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ShortcutRemoved);\n }\n }\n if (newDescriptors) {\n UI.ShortcutRegistry.ShortcutRegistry.instance().registerUserShortcut(\n originalShortcut.changeKeys(newDescriptors as UI.KeyboardShortcut.Descriptor[])\n .changeType(UI.KeyboardShortcut.Type.UserShortcut));\n if (originalShortcut.type === UI.KeyboardShortcut.Type.UnsetShortcut) {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.UserShortcutAdded);\n } else {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ShortcutModified);\n }\n }\n }\n this.stopEditing(item);\n }\n\n /**\n * This method will never be called.\n */\n heightForItem(_item: KeybindsItem): number {\n return 0;\n }\n\n isItemSelectable(_item: KeybindsItem): boolean {\n return true;\n }\n\n selectedItemChanged(\n from: KeybindsItem|null, to: KeybindsItem|null, fromElement: HTMLElement|null,\n toElement: HTMLElement|null): void {\n if (fromElement) {\n fromElement.tabIndex = -1;\n }\n if (toElement) {\n if (to === this.editingItem && this.editingRow) {\n this.editingRow.focus();\n } else {\n toElement.tabIndex = 0;\n if (this.list.element.hasFocus()) {\n toElement.focus();\n }\n }\n this.setDefaultFocusedElement(toElement);\n }\n }\n\n updateSelectedItemARIA(_fromElement: Element|null, _toElement: Element|null): boolean {\n return true;\n }\n\n startEditing(action: UI.ActionRegistration.Action): void {\n this.list.selectItem(action);\n\n if (this.editingItem) {\n this.stopEditing(this.editingItem);\n }\n UI.UIUtils.markBeingEdited(this.list.element, true);\n this.editingItem = action;\n this.list.refreshItem(action);\n }\n\n stopEditing(action: UI.ActionRegistration.Action): void {\n UI.UIUtils.markBeingEdited(this.list.element, false);\n this.editingItem = null;\n this.editingRow = null;\n this.list.refreshItem(action);\n this.focus();\n }\n\n private createListItems(): KeybindsItem[] {\n const actions = UI.ActionRegistry.ActionRegistry.instance().actions().sort((actionA, actionB) => {\n if (actionA.category() < actionB.category()) {\n return -1;\n }\n if (actionA.category() > actionB.category()) {\n return 1;\n }\n if (actionA.id() < actionB.id()) {\n return -1;\n }\n if (actionA.id() > actionB.id()) {\n return 1;\n }\n return 0;\n });\n\n const items: KeybindsItem[] = [];\n\n let currentCategory: UI.ActionRegistration.ActionCategory;\n actions.forEach(action => {\n if (action.id() === 'elements.toggle-element-search') {\n return;\n }\n\n if (currentCategory !== action.category()) {\n items.push(action.category());\n }\n items.push(action);\n currentCategory = action.category();\n });\n return items;\n }\n\n onEscapeKeyPressed(event: Event): void {\n const deepActiveElement = Platform.DOMUtilities.deepActiveElement(document);\n if (this.editingRow && deepActiveElement && deepActiveElement.nodeName === 'INPUT') {\n this.editingRow.onEscapeKeyPressed(event);\n }\n }\n\n update(): void {\n if (this.editingItem) {\n this.stopEditing(this.editingItem);\n }\n this.list.refreshAllItems();\n if (!this.list.selectedItem()) {\n this.list.selectItem(this.items.at(0));\n }\n }\n\n override willHide(): void {\n if (this.editingItem) {\n this.stopEditing(this.editingItem);\n }\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([keybindsSettingsTabStyles]);\n }\n}\n\nexport class ShortcutListItem {\n private isEditing: boolean;\n private settingsTab: KeybindsSettingsTab;\n private item: UI.ActionRegistration.Action;\n element: HTMLDivElement;\n private editedShortcuts: Map;\n private readonly shortcutInputs: Map;\n private readonly shortcuts: UI.KeyboardShortcut.KeyboardShortcut[];\n private elementToFocus: HTMLElement|null;\n private confirmButton: HTMLButtonElement|null;\n private addShortcutLinkContainer: Element|null;\n private errorMessageElement: Element|null;\n private secondKeyTimeout: number|null;\n constructor(item: UI.ActionRegistration.Action, settingsTab: KeybindsSettingsTab, isEditing?: boolean) {\n this.isEditing = Boolean(isEditing);\n this.settingsTab = settingsTab;\n this.item = item;\n this.element = document.createElement('div');\n this.element.setAttribute('jslog', `${VisualLogging.item().context(item.id())}`);\n this.editedShortcuts = new Map();\n this.shortcutInputs = new Map();\n this.shortcuts = UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction(item.id());\n this.elementToFocus = null;\n this.confirmButton = null;\n this.addShortcutLinkContainer = null;\n this.errorMessageElement = null;\n this.secondKeyTimeout = null;\n\n this.update();\n }\n\n focus(): void {\n if (this.elementToFocus) {\n this.elementToFocus.focus();\n }\n }\n\n private update(): void {\n this.element.removeChildren();\n this.elementToFocus = null;\n this.shortcutInputs.clear();\n\n this.element.classList.toggle('keybinds-editing', this.isEditing);\n this.element.createChild('div', 'keybinds-action-name keybinds-list-text').textContent = this.item.title();\n this.shortcuts.forEach(this.createShortcutRow, this);\n if (this.shortcuts.length === 0) {\n this.createEmptyInfo();\n }\n if (this.isEditing) {\n this.setupEditor();\n }\n }\n\n private createEmptyInfo(): void {\n if (UI.ShortcutRegistry.ShortcutRegistry.instance().actionHasDefaultShortcut(this.item.id())) {\n const icon = UI.Icon.Icon.create('keyboard-pen', 'keybinds-modified');\n UI.ARIAUtils.setLabel(icon, i18nString(UIStrings.shortcutModified));\n this.element.appendChild(icon);\n }\n if (!this.isEditing) {\n const emptyElement = this.element.createChild('div', 'keybinds-shortcut keybinds-list-text');\n UI.ARIAUtils.setLabel(emptyElement, i18nString(UIStrings.noShortcutForAction));\n this.element.appendChild(this.createEditButton());\n }\n }\n\n private setupEditor(): void {\n this.addShortcutLinkContainer = this.element.createChild('div', 'keybinds-shortcut devtools-link');\n const addShortcutLink = this.addShortcutLinkContainer.createChild('span', 'devtools-link') as HTMLDivElement;\n addShortcutLink.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context('add-shortcut')}`);\n addShortcutLink.textContent = i18nString(UIStrings.addAShortcut);\n addShortcutLink.tabIndex = 0;\n UI.ARIAUtils.markAsLink(addShortcutLink);\n self.onInvokeElement(addShortcutLink, this.addShortcut.bind(this));\n if (!this.elementToFocus) {\n this.elementToFocus = addShortcutLink;\n }\n\n this.errorMessageElement = this.element.createChild('div', 'keybinds-info keybinds-error hidden');\n UI.ARIAUtils.markAsAlert(this.errorMessageElement);\n this.element.appendChild(this.createIconButton(\n i18nString(UIStrings.ResetShortcutsForAction), 'undo', '', 'undo', this.resetShortcutsToDefaults.bind(this)));\n this.confirmButton = this.createIconButton(\n i18nString(UIStrings.confirmChanges), 'checkmark', 'keybinds-confirm-button', 'confirm',\n () => this.settingsTab.commitChanges(this.item, this.editedShortcuts));\n this.element.appendChild(this.confirmButton);\n this.element.appendChild(this.createIconButton(\n i18nString(UIStrings.discardChanges), 'cross', 'keybinds-cancel-button', 'cancel',\n () => this.settingsTab.stopEditing(this.item)));\n this.element.addEventListener('keydown', event => {\n if (Platform.KeyboardUtilities.isEscKey(event)) {\n this.settingsTab.stopEditing(this.item);\n event.consume(true);\n }\n });\n }\n\n private addShortcut(): void {\n const shortcut =\n new UI.KeyboardShortcut.KeyboardShortcut([], this.item.id(), UI.KeyboardShortcut.Type.UnsetShortcut);\n this.shortcuts.push(shortcut);\n this.update();\n const shortcutInput = this.shortcutInputs.get(shortcut) as HTMLElement;\n if (shortcutInput) {\n shortcutInput.focus();\n }\n }\n\n private createShortcutRow(shortcut: UI.KeyboardShortcut.KeyboardShortcut, index?: number): void {\n if (this.editedShortcuts.has(shortcut) && !this.editedShortcuts.get(shortcut)) {\n return;\n }\n let icon: UI.Icon.Icon;\n if (shortcut.type !== UI.KeyboardShortcut.Type.UnsetShortcut && !shortcut.isDefault()) {\n icon = UI.Icon.Icon.create('keyboard-pen', 'keybinds-modified');\n UI.ARIAUtils.setLabel(icon, i18nString(UIStrings.shortcutModified));\n this.element.appendChild(icon);\n }\n const shortcutElement = this.element.createChild('div', 'keybinds-shortcut keybinds-list-text');\n if (this.isEditing) {\n const shortcutInput = shortcutElement.createChild('input', 'harmony-input') as HTMLInputElement;\n shortcutInput.setAttribute('jslog', `${VisualLogging.textField().track({keydown: true})}`);\n shortcutInput.spellcheck = false;\n shortcutInput.maxLength = 0;\n this.shortcutInputs.set(shortcut, shortcutInput);\n if (!this.elementToFocus) {\n this.elementToFocus = shortcutInput;\n }\n shortcutInput.value = shortcut.title();\n const userDescriptors = this.editedShortcuts.get(shortcut);\n if (userDescriptors) {\n shortcutInput.value = this.shortcutInputTextForDescriptors(userDescriptors);\n }\n shortcutInput.addEventListener('keydown', this.onShortcutInputKeyDown.bind(this, shortcut, shortcutInput));\n shortcutInput.addEventListener('blur', () => {\n if (this.secondKeyTimeout !== null) {\n clearTimeout(this.secondKeyTimeout);\n this.secondKeyTimeout = null;\n }\n });\n shortcutElement.appendChild(\n this.createIconButton(i18nString(UIStrings.removeShortcut), 'bin', 'keybinds-delete-button', 'delete', () => {\n const index = this.shortcuts.indexOf(shortcut);\n if (!shortcut.isDefault()) {\n this.shortcuts.splice(index, 1);\n }\n this.editedShortcuts.set(shortcut, null);\n this.update();\n this.focus();\n this.validateInputs();\n }));\n } else {\n const keys = shortcut.descriptors.flatMap(descriptor => descriptor.name.split(' + '));\n keys.forEach(key => {\n shortcutElement.createChild('span', 'keybinds-key').textContent = key;\n });\n if (index === 0) {\n this.element.appendChild(this.createEditButton());\n }\n }\n }\n\n private createEditButton(): HTMLElement {\n return this.createIconButton(\n i18nString(UIStrings.editShortcut), 'edit', 'keybinds-edit-button', 'edit',\n () => this.settingsTab.startEditing(this.item));\n }\n\n private createIconButton(\n label: string, iconName: string, className: string, jslogContext: string,\n listener: () => void): HTMLButtonElement {\n const button = document.createElement('button') as HTMLButtonElement;\n button.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context(jslogContext)}`);\n button.setAttribute('title', label);\n button.appendChild(UI.Icon.Icon.create(iconName));\n button.addEventListener('click', listener);\n UI.ARIAUtils.setLabel(button, label);\n if (className) {\n button.classList.add(className);\n }\n return button;\n }\n\n private onShortcutInputKeyDown(\n shortcut: UI.KeyboardShortcut.KeyboardShortcut, shortcutInput: HTMLInputElement, event: Event): void {\n if ((event as KeyboardEvent).key !== 'Tab') {\n const eventDescriptor = this.descriptorForEvent(event as KeyboardEvent);\n const userDescriptors = this.editedShortcuts.get(shortcut) || [];\n this.editedShortcuts.set(shortcut, userDescriptors);\n const isLastKeyOfShortcut =\n userDescriptors.length === 2 && UI.KeyboardShortcut.KeyboardShortcut.isModifier(userDescriptors[1].key);\n const shouldClearOldShortcut = userDescriptors.length === 2 && !isLastKeyOfShortcut;\n if (shouldClearOldShortcut) {\n userDescriptors.splice(0, 2);\n }\n if (this.secondKeyTimeout) {\n clearTimeout(this.secondKeyTimeout);\n this.secondKeyTimeout = null;\n userDescriptors.push(eventDescriptor);\n } else if (isLastKeyOfShortcut) {\n userDescriptors[1] = eventDescriptor;\n } else if (!UI.KeyboardShortcut.KeyboardShortcut.isModifier(eventDescriptor.key)) {\n userDescriptors[0] = eventDescriptor;\n this.secondKeyTimeout = window.setTimeout(() => {\n this.secondKeyTimeout = null;\n }, UI.ShortcutRegistry.KeyTimeout);\n } else {\n userDescriptors[0] = eventDescriptor;\n }\n shortcutInput.value = this.shortcutInputTextForDescriptors(userDescriptors);\n this.validateInputs();\n event.consume(true);\n }\n }\n\n private descriptorForEvent(event: KeyboardEvent): UI.KeyboardShortcut.Descriptor {\n const userKey = UI.KeyboardShortcut.KeyboardShortcut.makeKeyFromEvent(event as KeyboardEvent);\n const codeAndModifiers = UI.KeyboardShortcut.KeyboardShortcut.keyCodeAndModifiersFromKey(userKey);\n let key: UI.KeyboardShortcut.Key|string =\n UI.KeyboardShortcut.Keys[event.key] || UI.KeyboardShortcut.KeyBindings[event.key];\n\n if (!key && !/^[a-z]$/i.test(event.key)) {\n const keyCode = event.code;\n // if we still don't have a key name, let's try the code before falling back to the raw key\n key = UI.KeyboardShortcut.Keys[keyCode] || UI.KeyboardShortcut.KeyBindings[keyCode];\n if (keyCode.startsWith('Digit')) {\n key = keyCode.slice(5);\n } else if (keyCode.startsWith('Key')) {\n key = keyCode.slice(3);\n }\n }\n\n return UI.KeyboardShortcut.KeyboardShortcut.makeDescriptor(key || event.key, codeAndModifiers.modifiers);\n }\n\n private shortcutInputTextForDescriptors(descriptors: UI.KeyboardShortcut.Descriptor[]): string {\n return descriptors.map(descriptor => descriptor.name).join(' ');\n }\n\n private resetShortcutsToDefaults(): void {\n this.editedShortcuts.clear();\n for (const shortcut of this.shortcuts) {\n if (shortcut.type === UI.KeyboardShortcut.Type.UnsetShortcut) {\n const index = this.shortcuts.indexOf(shortcut);\n this.shortcuts.splice(index, 1);\n } else if (shortcut.type === UI.KeyboardShortcut.Type.UserShortcut) {\n this.editedShortcuts.set(shortcut, null);\n }\n }\n const disabledDefaults = UI.ShortcutRegistry.ShortcutRegistry.instance().disabledDefaultsForAction(this.item.id());\n disabledDefaults.forEach(shortcut => {\n if (this.shortcuts.includes(shortcut)) {\n return;\n }\n\n this.shortcuts.push(shortcut);\n this.editedShortcuts.set(shortcut, shortcut.descriptors);\n });\n this.update();\n this.focus();\n }\n\n onEscapeKeyPressed(event: Event): void {\n const activeElement = Platform.DOMUtilities.deepActiveElement(document);\n for (const [shortcut, shortcutInput] of this.shortcutInputs.entries()) {\n if (activeElement === shortcutInput) {\n this.onShortcutInputKeyDown(\n shortcut as UI.KeyboardShortcut.KeyboardShortcut, shortcutInput as HTMLInputElement,\n event as KeyboardEvent);\n }\n }\n }\n\n private validateInputs(): void {\n const confirmButton = this.confirmButton;\n const errorMessageElement = this.errorMessageElement;\n if (!confirmButton || !errorMessageElement) {\n return;\n }\n\n confirmButton.disabled = false;\n errorMessageElement.classList.add('hidden');\n this.shortcutInputs.forEach((shortcutInput, shortcut) => {\n const userDescriptors = this.editedShortcuts.get(shortcut);\n if (!userDescriptors) {\n return;\n }\n if (userDescriptors.some(descriptor => UI.KeyboardShortcut.KeyboardShortcut.isModifier(descriptor.key))) {\n confirmButton.disabled = true;\n shortcutInput.classList.add('error-input');\n UI.ARIAUtils.setInvalid(shortcutInput, true);\n errorMessageElement.classList.remove('hidden');\n errorMessageElement.textContent = i18nString(UIStrings.shortcutsCannotContainOnly);\n return;\n }\n const conflicts = UI.ShortcutRegistry.ShortcutRegistry.instance()\n .actionsForDescriptors(userDescriptors)\n .filter(actionId => actionId !== this.item.id());\n if (conflicts.length) {\n confirmButton.disabled = true;\n shortcutInput.classList.add('error-input');\n UI.ARIAUtils.setInvalid(shortcutInput, true);\n errorMessageElement.classList.remove('hidden');\n if (!UI.ActionRegistry.ActionRegistry.instance().hasAction(conflicts[0])) {\n return;\n }\n const action = UI.ActionRegistry.ActionRegistry.instance().getAction(conflicts[0]);\n const actionTitle = action.title();\n const actionCategory = action.category();\n errorMessageElement.textContent =\n i18nString(UIStrings.thisShortcutIsInUseByS, {PH1: actionCategory, PH2: actionTitle});\n return;\n }\n shortcutInput.classList.remove('error-input');\n UI.ARIAUtils.setInvalid(shortcutInput, false);\n });\n }\n}\n\nexport type KeybindsItem = UI.ActionRegistration.ActionCategory|UI.ActionRegistration.Action;\n"]} \ No newline at end of file diff --git a/public/panels/settings/SettingsScreen.d.ts b/public/panels/settings/SettingsScreen.d.ts index 3a51321ec..66eb06a37 100644 --- a/public/panels/settings/SettingsScreen.d.ts +++ b/public/panels/settings/SettingsScreen.d.ts @@ -28,11 +28,9 @@ export declare class GenericSettingsTab extends SettingsTab { private readonly syncSection; private readonly settingToControl; constructor(); - static instance(opts?: { - forceNew: null; - }): GenericSettingsTab; static isSettingVisible(setting: Common.Settings.SettingRegistration): boolean; wasShown(): void; + willHide(): void; private updateSyncSection; private createExtensionSection; private createSectionElement; @@ -44,13 +42,12 @@ export declare class ExperimentsSettingsTab extends SettingsTab { private readonly experimentToControl; constructor(); private renderExperiments; - static instance(opts?: { - forceNew: null; - }): ExperimentsSettingsTab; private createExperimentsWarningSubsection; private createExperimentCheckbox; highlightObject(experiment: Object): void; setFilter(filterText: string): void; + wasShown(): void; + willHide(): void; } export declare class ActionDelegate implements UI.ActionRegistration.ActionDelegate { handleAction(context: UI.Context.Context, actionId: string): boolean; diff --git a/public/panels/settings/SettingsScreen.js b/public/panels/settings/SettingsScreen.js index 57e1db596..93ec9eb36 100644 --- a/public/panels/settings/SettingsScreen.js +++ b/public/panels/settings/SettingsScreen.js @@ -231,13 +231,12 @@ class SettingsTab extends UI.Widget.VBox { return block; } } -let genericSettingsTabInstance; export class GenericSettingsTab extends SettingsTab { syncSection = new PanelComponents.SyncSection.SyncSection(); settingToControl = new Map(); constructor() { super(i18nString(UIStrings.preferences), 'preferences-tab-content'); - this.element.setAttribute('jslog', `${VisualLogging.section().context('preferences')}`); + this.element.setAttribute('jslog', `${VisualLogging.pane().context('preferences')}`); // GRID, MOBILE, EMULATION, and RENDERING are intentionally excluded from this list. const explicitSectionOrder = [ Common.Settings.SettingCategory.NONE, @@ -279,13 +278,6 @@ export class GenericSettingsTab extends SettingsTab { Components.Reload.reload(); } } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!genericSettingsTabInstance || forceNew) { - genericSettingsTabInstance = new GenericSettingsTab(); - } - return genericSettingsTabInstance; - } static isSettingVisible(setting) { const titleMac = setting.titleMac && setting.titleMac(); const defaultTitle = setting.title && setting.title(); @@ -293,9 +285,14 @@ export class GenericSettingsTab extends SettingsTab { return Boolean(title && setting.category); } wasShown() { + UI.Context.Context.instance().setFlavor(GenericSettingsTab, this); super.wasShown(); this.updateSyncSection(); } + willHide() { + super.willHide(); + UI.Context.Context.instance().setFlavor(GenericSettingsTab, null); + } updateSyncSection() { Host.InspectorFrontendHost.InspectorFrontendHostInstance.getSyncInformation(syncInfo => { this.syncSection.data = { @@ -347,7 +344,6 @@ export class GenericSettingsTab extends SettingsTab { } } } -let experimentsSettingsTabInstance; export class ExperimentsSettingsTab extends SettingsTab { #experimentsSection; #unstableExperimentsSection; @@ -357,7 +353,7 @@ export class ExperimentsSettingsTab extends SettingsTab { super(i18nString(UIStrings.experiments), 'experiments-tab-content'); const filterSection = this.appendSection(); filterSection.classList.add('experiments-filter'); - this.element.setAttribute('jslog', `${VisualLogging.section().context('experiments')}`); + this.element.setAttribute('jslog', `${VisualLogging.pane().context('experiments')}`); const labelElement = filterSection.createChild('label'); labelElement.textContent = i18nString(UIStrings.filterExperimentsLabel); this.#inputElement = UI.UIUtils.createInput('', 'text', 'experiments-filter'); @@ -400,13 +396,6 @@ export class ExperimentsSettingsTab extends SettingsTab { warning.textContent = i18nString(UIStrings.noResults); } } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!experimentsSettingsTabInstance || forceNew) { - experimentsSettingsTabInstance = new ExperimentsSettingsTab(); - } - return experimentsSettingsTabInstance; - } createExperimentsWarningSubsection(warningMessage) { const subsection = document.createElement('div'); const warning = subsection.createChild('span', 'settings-experiments-warning-subsection-warning'); @@ -466,6 +455,14 @@ export class ExperimentsSettingsTab extends SettingsTab { this.#inputElement.value = filterText; this.#inputElement.dispatchEvent(new Event('input', { 'bubbles': true, 'cancelable': true })); } + wasShown() { + UI.Context.Context.instance().setFlavor(ExperimentsSettingsTab, this); + super.wasShown(); + } + willHide() { + super.willHide(); + UI.Context.Context.instance().setFlavor(ExperimentsSettingsTab, null); + } } export class ActionDelegate { handleAction(context, actionId) { @@ -484,12 +481,16 @@ export class ActionDelegate { } } export class Revealer { - reveal(object) { + async reveal(object) { + const context = UI.Context.Context.instance(); if (object instanceof Root.Runtime.Experiment) { Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront(); - void SettingsScreen.showSettingsScreen({ name: 'experiments' }) - .then(() => ExperimentsSettingsTab.instance().highlightObject(object)); - return Promise.resolve(); + await SettingsScreen.showSettingsScreen({ name: 'experiments' }); + const experimentsSettingsTab = context.flavor(ExperimentsSettingsTab); + if (experimentsSettingsTab !== null) { + experimentsSettingsTab.highlightObject(object); + } + return; } for (const settingRegistration of Common.Settings.getRegisteredSettings()) { if (!GenericSettingsTab.isSettingVisible(settingRegistration)) { @@ -497,8 +498,12 @@ export class Revealer { } if (settingRegistration.settingName === object.name) { Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront(); - void SettingsScreen.showSettingsScreen().then(() => GenericSettingsTab.instance().highlightObject(object)); - return Promise.resolve(); + await SettingsScreen.showSettingsScreen(); + const genericSettingsTab = context.flavor(GenericSettingsTab); + if (genericSettingsTab !== null) { + genericSettingsTab.highlightObject(object); + } + return; } } // Reveal settings views @@ -511,16 +516,14 @@ export class Revealer { const settings = view.settings(); if (settings && settings.indexOf(object.name) !== -1) { Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront(); - void SettingsScreen.showSettingsScreen({ name: id }).then(async () => { - const widget = await view.widget(); - if (widget instanceof SettingsTab) { - widget.highlightObject(object); - } - }); - return Promise.resolve(); + await SettingsScreen.showSettingsScreen({ name: id }); + const widget = await view.widget(); + if (widget instanceof SettingsTab) { + widget.highlightObject(object); + } + return; } } - return Promise.reject(); } } //# sourceMappingURL=SettingsScreen.js.map \ No newline at end of file diff --git a/public/panels/settings/SettingsScreen.js.map b/public/panels/settings/SettingsScreen.js.map index 54c5ea5ac..b5def90cc 100644 --- a/public/panels/settings/SettingsScreen.js.map +++ b/public/panels/settings/SettingsScreen.js.map @@ -1 +1 @@ -{"version":3,"file":"SettingsScreen.js","sourceRoot":"","sources":["../../../../../../front_end/panels/settings/SettingsScreen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAC;AAE9D,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,wBAAwB,EAAE,6BAA6B;IACvD;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,+BAA+B,EAC3B,4FAA4F;IAChG;;OAEG;IACH,+BAA+B,EAAE,uE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;IAC1B,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2013 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport {PanelUtils} from '../utils/utils.js';\n\nimport * as PanelComponents from './components/components.js';\nimport {type KeybindsSettingsTab} from './KeybindsSettingsTab.js';\nimport settingsScreenStyles from './settingsScreen.css.js';\n\nconst UIStrings = {\n /**\n *@description Name of the Settings view\n */\n settings: 'Settings',\n /**\n *@description Text for keyboard shortcuts\n */\n shortcuts: 'Shortcuts',\n /**\n *@description Text in Settings Screen of the Settings\n */\n preferences: 'Preferences',\n /**\n *@description Text of button in Settings Screen of the Settings\n */\n restoreDefaultsAndReload: 'Restore defaults and reload',\n /**\n *@description Text in Settings Screen of the Settings\n */\n experiments: 'Experiments',\n /**\n *@description Message shown in the experiments panel to warn users about any possible unstable features.\n */\n theseExperimentsCouldBeUnstable:\n 'These experiments could be unstable or unreliable and may require you to restart DevTools.',\n /**\n *@description Message text content in Settings Screen of the Settings\n */\n theseExperimentsAreParticularly: 'These experiments are particularly unstable. Enable at your own risk.',\n /**\n *@description Warning text content in Settings Screen of the Settings\n */\n warning: 'WARNING:',\n /**\n *@description Message to display if a setting change requires a reload of DevTools\n */\n oneOrMoreSettingsHaveChanged: 'One or more settings have changed which requires a reload to take effect.',\n /**\n * @description Label for a filter text input that controls which experiments are shown.\n */\n filterExperimentsLabel: 'Filter',\n /**\n * @description Warning text shown when the user has entered text to filter the\n * list of experiments, but no experiments match the filter.\n */\n noResults: 'No experiments match the filter',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Text that is usually a hyperlink to a feedback form\n */\n sendFeedback: 'Send feedback',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/SettingsScreen.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet settingsScreenInstance: SettingsScreen;\n\nexport class SettingsScreen extends UI.Widget.VBox implements UI.View.ViewLocationResolver {\n private readonly tabbedLocation: UI.View.TabbedViewLocation;\n private keybindsTab?: KeybindsSettingsTab;\n private reportTabOnReveal: boolean;\n\n private constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('settings')}`);\n\n this.contentElement.classList.add('settings-window-main');\n this.contentElement.classList.add('vbox');\n\n const settingsLabelElement = document.createElement('div');\n const settingsTitleElement =\n UI.Utils\n .createShadowRootWithCoreStyles(\n settingsLabelElement, {cssFile: [settingsScreenStyles], delegatesFocus: undefined})\n .createChild('div', 'settings-window-title');\n\n UI.ARIAUtils.markAsHeading(settingsTitleElement, 1);\n settingsTitleElement.textContent = i18nString(UIStrings.settings);\n\n this.tabbedLocation = UI.ViewManager.ViewManager.instance().createTabbedLocation(\n () => SettingsScreen.revealSettingsScreen(), 'settings-view');\n const tabbedPane = this.tabbedLocation.tabbedPane();\n tabbedPane.registerCSSFiles([settingsScreenStyles]);\n tabbedPane.leftToolbar().appendToolbarItem(new UI.Toolbar.ToolbarItem(settingsLabelElement));\n tabbedPane.setShrinkableTabs(false);\n tabbedPane.makeVerticalTabLayout();\n const keyBindsView = UI.ViewManager.ViewManager.instance().view('keybinds');\n if (keyBindsView) {\n void keyBindsView.widget().then(widget => {\n this.keybindsTab = widget as KeybindsSettingsTab;\n });\n }\n tabbedPane.show(this.contentElement);\n tabbedPane.selectTab('preferences');\n tabbedPane.addEventListener(UI.TabbedPane.Events.TabInvoked, this.tabInvoked, this);\n this.reportTabOnReveal = false;\n }\n\n static instance(opts: {forceNew: boolean|null} = {forceNew: null}): SettingsScreen {\n const {forceNew} = opts;\n if (!settingsScreenInstance || forceNew) {\n settingsScreenInstance = new SettingsScreen();\n }\n\n return settingsScreenInstance;\n }\n\n private static revealSettingsScreen(): SettingsScreen {\n const settingsScreen = SettingsScreen.instance();\n if (settingsScreen.isShowing()) {\n return settingsScreen;\n }\n\n settingsScreen.reportTabOnReveal = true;\n const dialog = new UI.Dialog.Dialog();\n dialog.contentElement.tabIndex = -1;\n dialog.addCloseButton();\n dialog.setOutsideClickCallback(() => {});\n dialog.setPointerEventsBehavior(UI.GlassPane.PointerEventsBehavior.PierceGlassPane);\n dialog.setOutsideTabIndexBehavior(UI.Dialog.OutsideTabIndexBehavior.PreserveMainViewTabIndex);\n settingsScreen.show(dialog.contentElement);\n dialog.setEscapeKeyCallback(settingsScreen.onEscapeKeyPressed.bind(settingsScreen));\n dialog.setMarginBehavior(UI.GlassPane.MarginBehavior.NoMargin);\n // UI.Dialog extends GlassPane and overrides the `show` method with a wider\n // accepted type. However, TypeScript uses the supertype declaration to\n // determine the full type, which requires a `!Document`.\n // @ts-ignore\n dialog.show();\n\n return settingsScreen;\n }\n\n static async showSettingsScreen(\n options: ShowSettingsScreenOptions|undefined = {name: undefined, focusTabHeader: undefined}): Promise {\n const {name, focusTabHeader} = options;\n const settingsScreen = SettingsScreen.revealSettingsScreen();\n\n settingsScreen.selectTab(name || 'preferences');\n const tabbedPane = settingsScreen.tabbedLocation.tabbedPane();\n await tabbedPane.waitForTabElementUpdate();\n if (focusTabHeader) {\n tabbedPane.focusSelectedTabHeader();\n } else {\n tabbedPane.focus();\n }\n }\n\n resolveLocation(_locationName: string): UI.View.ViewLocation|null {\n return this.tabbedLocation;\n }\n\n private selectTab(name: string): void {\n this.tabbedLocation.tabbedPane().selectTab(name, /* userGesture */ true);\n }\n\n private tabInvoked(event: Common.EventTarget.EventTargetEvent): void {\n const eventData = event.data;\n if (!eventData.isUserGesture) {\n return;\n }\n\n const prevTabId = eventData.prevTabId;\n const tabId = eventData.tabId;\n if (!this.reportTabOnReveal && prevTabId && prevTabId === tabId) {\n return;\n }\n\n this.reportTabOnReveal = false;\n this.reportSettingsPanelShown(tabId);\n }\n\n private reportSettingsPanelShown(tabId: string): void {\n if (tabId === i18nString(UIStrings.shortcuts)) {\n Host.userMetrics.settingsPanelShown('shortcuts');\n return;\n }\n\n Host.userMetrics.settingsPanelShown(tabId);\n }\n\n private onEscapeKeyPressed(event: Event): void {\n if (this.tabbedLocation.tabbedPane().selectedTabId === 'keybinds' && this.keybindsTab) {\n this.keybindsTab.onEscapeKeyPressed(event);\n }\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([settingsScreenStyles]);\n }\n}\n\nabstract class SettingsTab extends UI.Widget.VBox {\n containerElement: HTMLElement;\n constructor(name: string, id?: string) {\n super();\n this.element.classList.add('settings-tab-container');\n if (id) {\n this.element.id = id;\n }\n const header = this.element.createChild('header');\n UI.UIUtils.createTextChild(header.createChild('h1'), name);\n this.containerElement = this.element.createChild('div', 'settings-container-wrapper')\n .createChild('div', 'settings-tab settings-content settings-container');\n }\n\n protected appendSection(name?: string): HTMLElement {\n const block = this.containerElement.createChild('div', 'settings-block');\n if (name) {\n UI.ARIAUtils.markAsGroup(block);\n const title = block.createChild('div', 'settings-section-title');\n title.textContent = name;\n UI.ARIAUtils.markAsHeading(title, 2);\n UI.ARIAUtils.setLabel(block, name);\n }\n return block;\n }\n\n abstract highlightObject(_object: Object): void;\n}\n\nlet genericSettingsTabInstance: GenericSettingsTab;\n\nexport class GenericSettingsTab extends SettingsTab {\n private readonly syncSection: PanelComponents.SyncSection.SyncSection = new PanelComponents.SyncSection.SyncSection();\n private readonly settingToControl = new Map, HTMLElement>();\n\n constructor() {\n super(i18nString(UIStrings.preferences), 'preferences-tab-content');\n\n this.element.setAttribute('jslog', `${VisualLogging.section().context('preferences')}`);\n\n // GRID, MOBILE, EMULATION, and RENDERING are intentionally excluded from this list.\n const explicitSectionOrder: Common.Settings.SettingCategory[] = [\n Common.Settings.SettingCategory.NONE,\n Common.Settings.SettingCategory.APPEARANCE,\n Common.Settings.SettingCategory.SOURCES,\n Common.Settings.SettingCategory.ELEMENTS,\n Common.Settings.SettingCategory.NETWORK,\n Common.Settings.SettingCategory.PERFORMANCE,\n Common.Settings.SettingCategory.MEMORY,\n Common.Settings.SettingCategory.CONSOLE,\n Common.Settings.SettingCategory.EXTENSIONS,\n Common.Settings.SettingCategory.PERSISTENCE,\n Common.Settings.SettingCategory.DEBUGGER,\n Common.Settings.SettingCategory.GLOBAL,\n Common.Settings.SettingCategory.SYNC,\n ];\n\n // Some settings define their initial ordering.\n const preRegisteredSettings = Common.Settings.getRegisteredSettings().sort(\n (firstSetting, secondSetting) => {\n if (firstSetting.order && secondSetting.order) {\n return (firstSetting.order - secondSetting.order);\n }\n if (firstSetting.order) {\n return -1;\n }\n if (secondSetting.order) {\n return 1;\n }\n return 0;\n },\n );\n\n for (const sectionCategory of explicitSectionOrder) {\n const settingsForSection = preRegisteredSettings.filter(\n setting => setting.category === sectionCategory && GenericSettingsTab.isSettingVisible(setting));\n this.createSectionElement(sectionCategory, settingsForSection);\n }\n\n const restoreAndReloadButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.restoreDefaultsAndReload), restoreAndReload);\n restoreAndReloadButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('settings.restore-defaults-and-reload')}`);\n this.appendSection().appendChild(restoreAndReloadButton);\n\n function restoreAndReload(): void {\n Common.Settings.Settings.instance().clearAll();\n Components.Reload.reload();\n }\n }\n\n static instance(opts = {forceNew: null}): GenericSettingsTab {\n const {forceNew} = opts;\n if (!genericSettingsTabInstance || forceNew) {\n genericSettingsTabInstance = new GenericSettingsTab();\n }\n\n return genericSettingsTabInstance;\n }\n\n static isSettingVisible(setting: Common.Settings.SettingRegistration): boolean {\n const titleMac = setting.titleMac && setting.titleMac();\n const defaultTitle = setting.title && setting.title();\n const title = titleMac || defaultTitle;\n return Boolean(title && setting.category);\n }\n\n override wasShown(): void {\n super.wasShown();\n this.updateSyncSection();\n }\n\n private updateSyncSection(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.getSyncInformation(syncInfo => {\n this.syncSection.data = {\n syncInfo,\n syncSetting: Common.Settings.moduleSetting('sync_preferences') as Common.Settings.Setting,\n };\n });\n }\n\n private createExtensionSection(settings: Common.Settings.SettingRegistration[]): void {\n const sectionName = Common.Settings.SettingCategory.EXTENSIONS;\n const settingUI = Components.Linkifier.LinkHandlerSettingUI.instance() as UI.SettingsUI.SettingUI;\n const element = settingUI.settingElement();\n if (element) {\n const sectionElement = this.createStandardSectionElement(sectionName, settings);\n sectionElement.appendChild(element);\n }\n }\n\n private createSectionElement(\n category: Common.Settings.SettingCategory, settings: Common.Settings.SettingRegistration[]): void {\n // Always create the EXTENSIONS section and append the link handling control.\n if (category === Common.Settings.SettingCategory.EXTENSIONS) {\n this.createExtensionSection(settings);\n } else if (category === Common.Settings.SettingCategory.SYNC && settings.length > 0) {\n this.containerElement.appendChild(this.syncSection);\n } else if (settings.length > 0) {\n this.createStandardSectionElement(category, settings);\n }\n }\n\n private createStandardSectionElement(\n category: Common.Settings.SettingCategory, settings: Common.Settings.SettingRegistration[]): Element {\n const uiSectionName = Common.Settings.getLocalizedSettingsCategory(category);\n const sectionElement = this.appendSection(uiSectionName);\n for (const settingRegistration of settings) {\n const setting = Common.Settings.Settings.instance().moduleSetting(settingRegistration.settingName);\n const settingControl = UI.SettingsUI.createControlForSetting(setting);\n if (settingControl) {\n this.settingToControl.set(setting, settingControl);\n sectionElement.appendChild(settingControl);\n }\n }\n return sectionElement;\n }\n\n highlightObject(setting: Object): void {\n if (setting instanceof Common.Settings.Setting) {\n const element = this.settingToControl.get(setting);\n if (element) {\n PanelUtils.highlightElement(element);\n }\n }\n }\n}\n\nlet experimentsSettingsTabInstance: ExperimentsSettingsTab;\n\nexport class ExperimentsSettingsTab extends SettingsTab {\n #experimentsSection: HTMLElement|undefined;\n #unstableExperimentsSection: HTMLElement|undefined;\n #inputElement: HTMLInputElement;\n private readonly experimentToControl = new Map();\n\n constructor() {\n super(i18nString(UIStrings.experiments), 'experiments-tab-content');\n const filterSection = this.appendSection();\n filterSection.classList.add('experiments-filter');\n\n this.element.setAttribute('jslog', `${VisualLogging.section().context('experiments')}`);\n\n const labelElement = filterSection.createChild('label');\n labelElement.textContent = i18nString(UIStrings.filterExperimentsLabel);\n this.#inputElement = UI.UIUtils.createInput('', 'text', 'experiments-filter');\n UI.ARIAUtils.bindLabelToControl(labelElement, this.#inputElement);\n filterSection.appendChild(this.#inputElement);\n this.#inputElement.addEventListener(\n 'input', () => this.renderExperiments(this.#inputElement.value.toLowerCase()), false);\n this.setDefaultFocusedElement(this.#inputElement);\n\n this.setFilter('');\n }\n\n private renderExperiments(filterText: string): void {\n this.experimentToControl.clear();\n if (this.#experimentsSection) {\n this.#experimentsSection.remove();\n }\n if (this.#unstableExperimentsSection) {\n this.#unstableExperimentsSection.remove();\n }\n const experiments = Root.Runtime.experiments.allConfigurableExperiments().sort();\n const unstableExperiments = experiments.filter(e => e.unstable && e.title.toLowerCase().includes(filterText));\n const stableExperiments = experiments.filter(e => !e.unstable && e.title.toLowerCase().includes(filterText));\n if (stableExperiments.length) {\n this.#experimentsSection = this.appendSection();\n const warningMessage = i18nString(UIStrings.theseExperimentsCouldBeUnstable);\n this.#experimentsSection.appendChild(this.createExperimentsWarningSubsection(warningMessage));\n for (const experiment of stableExperiments) {\n this.#experimentsSection.appendChild(this.createExperimentCheckbox(experiment));\n }\n }\n if (unstableExperiments.length) {\n this.#unstableExperimentsSection = this.appendSection();\n const warningMessage = i18nString(UIStrings.theseExperimentsAreParticularly);\n this.#unstableExperimentsSection.appendChild(this.createExperimentsWarningSubsection(warningMessage));\n for (const experiment of unstableExperiments) {\n this.#unstableExperimentsSection.appendChild(this.createExperimentCheckbox(experiment));\n }\n }\n if (!stableExperiments.length && !unstableExperiments.length) {\n this.#experimentsSection = this.appendSection();\n const warning = this.#experimentsSection.createChild('span');\n warning.textContent = i18nString(UIStrings.noResults);\n }\n }\n\n static instance(opts = {forceNew: null}): ExperimentsSettingsTab {\n const {forceNew} = opts;\n if (!experimentsSettingsTabInstance || forceNew) {\n experimentsSettingsTabInstance = new ExperimentsSettingsTab();\n }\n\n return experimentsSettingsTabInstance;\n }\n\n private createExperimentsWarningSubsection(warningMessage: string): Element {\n const subsection = document.createElement('div');\n const warning = subsection.createChild('span', 'settings-experiments-warning-subsection-warning');\n warning.textContent = i18nString(UIStrings.warning);\n UI.UIUtils.createTextChild(subsection, ' ');\n const message = subsection.createChild('span', 'settings-experiments-warning-subsection-message');\n message.textContent = warningMessage;\n return subsection;\n }\n\n private createExperimentCheckbox(experiment: Root.Runtime.Experiment): HTMLParagraphElement {\n const label = UI.UIUtils.CheckboxLabel.create(experiment.title, experiment.isEnabled(), undefined, experiment.name);\n label.classList.add('experiment-label');\n const input = label.checkboxElement;\n input.name = experiment.name;\n function listener(): void {\n experiment.setEnabled(input.checked);\n Host.userMetrics.experimentChanged(experiment.name, experiment.isEnabled());\n UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(\n i18nString(UIStrings.oneOrMoreSettingsHaveChanged));\n }\n input.addEventListener('click', listener, false);\n\n const p = document.createElement('p');\n this.experimentToControl.set(experiment, p);\n p.classList.add('settings-experiment');\n if (experiment.unstable && !experiment.isEnabled()) {\n p.classList.add('settings-experiment-unstable');\n }\n p.appendChild(label);\n\n if (experiment.docLink) {\n const link = UI.XLink.XLink.create(experiment.docLink);\n link.textContent = '';\n link.setAttribute('aria-label', i18nString(UIStrings.learnMore));\n link.setAttribute(\n 'jslog', `${VisualLogging.link().track({click: true}).context(`${experiment.name}:documentation`)}`);\n\n const linkIcon = new IconButton.Icon.Icon();\n linkIcon.data = {iconName: 'help', color: 'var(--icon-default)', width: '16px', height: '16px'};\n linkIcon.classList.add('link-icon');\n link.prepend(linkIcon);\n\n p.appendChild(link);\n }\n\n if (experiment.feedbackLink) {\n const link = UI.XLink.XLink.create(experiment.feedbackLink);\n link.textContent = i18nString(UIStrings.sendFeedback);\n link.classList.add('feedback-link');\n link.setAttribute('jslog', `${VisualLogging.link().track({click: true}).context(`${experiment.name}:feedback`)}`);\n\n p.appendChild(link);\n }\n\n return p;\n }\n\n highlightObject(experiment: Object): void {\n if (experiment instanceof Root.Runtime.Experiment) {\n const element = this.experimentToControl.get(experiment);\n if (element) {\n PanelUtils.highlightElement(element);\n }\n }\n }\n\n setFilter(filterText: string): void {\n this.#inputElement.value = filterText;\n this.#inputElement.dispatchEvent(new Event('input', {'bubbles': true, 'cancelable': true}));\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n switch (actionId) {\n case 'settings.show':\n void SettingsScreen.showSettingsScreen({focusTabHeader: true} as ShowSettingsScreenOptions);\n return true;\n case 'settings.documentation':\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(UI.UIUtils.addReferrerToURL(\n 'https://developer.chrome.com/docs/devtools/' as Platform.DevToolsPath.UrlString));\n return true;\n case 'settings.shortcuts':\n void SettingsScreen.showSettingsScreen({name: 'keybinds', focusTabHeader: true});\n return true;\n }\n return false;\n }\n}\nexport class Revealer implements Common.Revealer.Revealer> {\n reveal(object: Root.Runtime.Experiment|Common.Settings.Setting): Promise {\n if (object instanceof Root.Runtime.Experiment) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n void SettingsScreen.showSettingsScreen({name: 'experiments'})\n .then(() => ExperimentsSettingsTab.instance().highlightObject(object));\n return Promise.resolve();\n }\n\n for (const settingRegistration of Common.Settings.getRegisteredSettings()) {\n if (!GenericSettingsTab.isSettingVisible(settingRegistration)) {\n continue;\n }\n if (settingRegistration.settingName === object.name) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n void SettingsScreen.showSettingsScreen().then(() => GenericSettingsTab.instance().highlightObject(object));\n return Promise.resolve();\n }\n }\n\n // Reveal settings views\n for (const view of UI.ViewManager.getRegisteredViewExtensions()) {\n const id = view.viewId();\n const location = view.location();\n if (location !== UI.ViewManager.ViewLocationValues.SETTINGS_VIEW) {\n continue;\n }\n const settings = view.settings();\n if (settings && settings.indexOf(object.name) !== -1) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n void SettingsScreen.showSettingsScreen({name: id}).then(async () => {\n const widget = await view.widget();\n if (widget instanceof SettingsTab) {\n widget.highlightObject(object);\n }\n });\n return Promise.resolve();\n }\n }\n\n return Promise.reject();\n }\n}\nexport interface ShowSettingsScreenOptions {\n name?: string;\n focusTabHeader?: boolean;\n}\n"]} \ No newline at end of file +{"version":3,"file":"SettingsScreen.js","sourceRoot":"","sources":["../../../../../../front_end/panels/settings/SettingsScreen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAC;AAE9D,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAE3D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,wBAAwB,EAAE,6BAA6B;IACvD;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,+BAA+B,EAC3B,4FAA4F;IAChG;;OAEG;IACH,+BAA+B,EAAE,uEAAuE;IACxG;;OAEG;IACH,OAAO,EAAE,UAAU;IACnB;;OAEG;IACH,4BAA4B,EAAE,2EAA2E;IACzG;;OAEG;IACH,sBAAsB,EAAE,QAAQ;IAChC;;;OAGG;IACH,SAAS,EAAE,iCAAiC;IAC5C;;OAEG;IACH,SAAS,EAAE,YAAY;IACvB;;OAEG;IACH,YA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AAmB,CAAC,WAAW,KAAK,MAAM,CAAC,IAAI,EAAE;gBACnD,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,YAAY,EAAE,CAAC;gBACxE,MAAM,cAAc,CAAC,kBAAkB,EAAE,CAAC;gBAC1C,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;gBAC9D,IAAI,kBAAkB,KAAK,IAAI,EAAE;oBAC/B,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;iBAC5C;gBACD,OAAO;aACR;SACF;QAED,wBAAwB;QACxB,KAAK,MAAM,IAAI,IAAI,EAAE,CAAC,WAAW,CAAC,2BAA2B,EAAE,EAAE;YAC/D,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACjC,IAAI,QAAQ,0EAAoD,EAAE;gBAChE,SAAS;aACV;YACD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACjC,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;gBACpD,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,YAAY,EAAE,CAAC;gBACxE,MAAM,cAAc,CAAC,kBAAkB,CAAC,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC;gBACpD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;gBACnC,IAAI,MAAM,YAAY,WAAW,EAAE;oBACjC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;iBAChC;gBACD,OAAO;aACR;SACF;IACH,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2013 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport {PanelUtils} from '../utils/utils.js';\n\nimport * as PanelComponents from './components/components.js';\nimport {type KeybindsSettingsTab} from './KeybindsSettingsTab.js';\nimport settingsScreenStyles from './settingsScreen.css.js';\n\nconst UIStrings = {\n /**\n *@description Name of the Settings view\n */\n settings: 'Settings',\n /**\n *@description Text for keyboard shortcuts\n */\n shortcuts: 'Shortcuts',\n /**\n *@description Text in Settings Screen of the Settings\n */\n preferences: 'Preferences',\n /**\n *@description Text of button in Settings Screen of the Settings\n */\n restoreDefaultsAndReload: 'Restore defaults and reload',\n /**\n *@description Text in Settings Screen of the Settings\n */\n experiments: 'Experiments',\n /**\n *@description Message shown in the experiments panel to warn users about any possible unstable features.\n */\n theseExperimentsCouldBeUnstable:\n 'These experiments could be unstable or unreliable and may require you to restart DevTools.',\n /**\n *@description Message text content in Settings Screen of the Settings\n */\n theseExperimentsAreParticularly: 'These experiments are particularly unstable. Enable at your own risk.',\n /**\n *@description Warning text content in Settings Screen of the Settings\n */\n warning: 'WARNING:',\n /**\n *@description Message to display if a setting change requires a reload of DevTools\n */\n oneOrMoreSettingsHaveChanged: 'One or more settings have changed which requires a reload to take effect.',\n /**\n * @description Label for a filter text input that controls which experiments are shown.\n */\n filterExperimentsLabel: 'Filter',\n /**\n * @description Warning text shown when the user has entered text to filter the\n * list of experiments, but no experiments match the filter.\n */\n noResults: 'No experiments match the filter',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Text that is usually a hyperlink to a feedback form\n */\n sendFeedback: 'Send feedback',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/SettingsScreen.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet settingsScreenInstance: SettingsScreen;\n\nexport class SettingsScreen extends UI.Widget.VBox implements UI.View.ViewLocationResolver {\n private readonly tabbedLocation: UI.View.TabbedViewLocation;\n private keybindsTab?: KeybindsSettingsTab;\n private reportTabOnReveal: boolean;\n\n private constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('settings')}`);\n\n this.contentElement.classList.add('settings-window-main');\n this.contentElement.classList.add('vbox');\n\n const settingsLabelElement = document.createElement('div');\n const settingsTitleElement =\n UI.Utils\n .createShadowRootWithCoreStyles(\n settingsLabelElement, {cssFile: [settingsScreenStyles], delegatesFocus: undefined})\n .createChild('div', 'settings-window-title');\n\n UI.ARIAUtils.markAsHeading(settingsTitleElement, 1);\n settingsTitleElement.textContent = i18nString(UIStrings.settings);\n\n this.tabbedLocation = UI.ViewManager.ViewManager.instance().createTabbedLocation(\n () => SettingsScreen.revealSettingsScreen(), 'settings-view');\n const tabbedPane = this.tabbedLocation.tabbedPane();\n tabbedPane.registerCSSFiles([settingsScreenStyles]);\n tabbedPane.leftToolbar().appendToolbarItem(new UI.Toolbar.ToolbarItem(settingsLabelElement));\n tabbedPane.setShrinkableTabs(false);\n tabbedPane.makeVerticalTabLayout();\n const keyBindsView = UI.ViewManager.ViewManager.instance().view('keybinds');\n if (keyBindsView) {\n void keyBindsView.widget().then(widget => {\n this.keybindsTab = widget as KeybindsSettingsTab;\n });\n }\n tabbedPane.show(this.contentElement);\n tabbedPane.selectTab('preferences');\n tabbedPane.addEventListener(UI.TabbedPane.Events.TabInvoked, this.tabInvoked, this);\n this.reportTabOnReveal = false;\n }\n\n static instance(opts: {forceNew: boolean|null} = {forceNew: null}): SettingsScreen {\n const {forceNew} = opts;\n if (!settingsScreenInstance || forceNew) {\n settingsScreenInstance = new SettingsScreen();\n }\n\n return settingsScreenInstance;\n }\n\n private static revealSettingsScreen(): SettingsScreen {\n const settingsScreen = SettingsScreen.instance();\n if (settingsScreen.isShowing()) {\n return settingsScreen;\n }\n\n settingsScreen.reportTabOnReveal = true;\n const dialog = new UI.Dialog.Dialog();\n dialog.contentElement.tabIndex = -1;\n dialog.addCloseButton();\n dialog.setOutsideClickCallback(() => {});\n dialog.setPointerEventsBehavior(UI.GlassPane.PointerEventsBehavior.PierceGlassPane);\n dialog.setOutsideTabIndexBehavior(UI.Dialog.OutsideTabIndexBehavior.PreserveMainViewTabIndex);\n settingsScreen.show(dialog.contentElement);\n dialog.setEscapeKeyCallback(settingsScreen.onEscapeKeyPressed.bind(settingsScreen));\n dialog.setMarginBehavior(UI.GlassPane.MarginBehavior.NoMargin);\n // UI.Dialog extends GlassPane and overrides the `show` method with a wider\n // accepted type. However, TypeScript uses the supertype declaration to\n // determine the full type, which requires a `!Document`.\n // @ts-ignore\n dialog.show();\n\n return settingsScreen;\n }\n\n static async showSettingsScreen(\n options: ShowSettingsScreenOptions|undefined = {name: undefined, focusTabHeader: undefined}): Promise {\n const {name, focusTabHeader} = options;\n const settingsScreen = SettingsScreen.revealSettingsScreen();\n\n settingsScreen.selectTab(name || 'preferences');\n const tabbedPane = settingsScreen.tabbedLocation.tabbedPane();\n await tabbedPane.waitForTabElementUpdate();\n if (focusTabHeader) {\n tabbedPane.focusSelectedTabHeader();\n } else {\n tabbedPane.focus();\n }\n }\n\n resolveLocation(_locationName: string): UI.View.ViewLocation|null {\n return this.tabbedLocation;\n }\n\n private selectTab(name: string): void {\n this.tabbedLocation.tabbedPane().selectTab(name, /* userGesture */ true);\n }\n\n private tabInvoked(event: Common.EventTarget.EventTargetEvent): void {\n const eventData = event.data;\n if (!eventData.isUserGesture) {\n return;\n }\n\n const prevTabId = eventData.prevTabId;\n const tabId = eventData.tabId;\n if (!this.reportTabOnReveal && prevTabId && prevTabId === tabId) {\n return;\n }\n\n this.reportTabOnReveal = false;\n this.reportSettingsPanelShown(tabId);\n }\n\n private reportSettingsPanelShown(tabId: string): void {\n if (tabId === i18nString(UIStrings.shortcuts)) {\n Host.userMetrics.settingsPanelShown('shortcuts');\n return;\n }\n\n Host.userMetrics.settingsPanelShown(tabId);\n }\n\n private onEscapeKeyPressed(event: Event): void {\n if (this.tabbedLocation.tabbedPane().selectedTabId === 'keybinds' && this.keybindsTab) {\n this.keybindsTab.onEscapeKeyPressed(event);\n }\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([settingsScreenStyles]);\n }\n}\n\nabstract class SettingsTab extends UI.Widget.VBox {\n containerElement: HTMLElement;\n constructor(name: string, id?: string) {\n super();\n this.element.classList.add('settings-tab-container');\n if (id) {\n this.element.id = id;\n }\n const header = this.element.createChild('header');\n UI.UIUtils.createTextChild(header.createChild('h1'), name);\n this.containerElement = this.element.createChild('div', 'settings-container-wrapper')\n .createChild('div', 'settings-tab settings-content settings-container');\n }\n\n protected appendSection(name?: string): HTMLElement {\n const block = this.containerElement.createChild('div', 'settings-block');\n if (name) {\n UI.ARIAUtils.markAsGroup(block);\n const title = block.createChild('div', 'settings-section-title');\n title.textContent = name;\n UI.ARIAUtils.markAsHeading(title, 2);\n UI.ARIAUtils.setLabel(block, name);\n }\n return block;\n }\n\n abstract highlightObject(_object: Object): void;\n}\n\nexport class GenericSettingsTab extends SettingsTab {\n private readonly syncSection: PanelComponents.SyncSection.SyncSection = new PanelComponents.SyncSection.SyncSection();\n private readonly settingToControl = new Map, HTMLElement>();\n\n constructor() {\n super(i18nString(UIStrings.preferences), 'preferences-tab-content');\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('preferences')}`);\n\n // GRID, MOBILE, EMULATION, and RENDERING are intentionally excluded from this list.\n const explicitSectionOrder: Common.Settings.SettingCategory[] = [\n Common.Settings.SettingCategory.NONE,\n Common.Settings.SettingCategory.APPEARANCE,\n Common.Settings.SettingCategory.SOURCES,\n Common.Settings.SettingCategory.ELEMENTS,\n Common.Settings.SettingCategory.NETWORK,\n Common.Settings.SettingCategory.PERFORMANCE,\n Common.Settings.SettingCategory.MEMORY,\n Common.Settings.SettingCategory.CONSOLE,\n Common.Settings.SettingCategory.EXTENSIONS,\n Common.Settings.SettingCategory.PERSISTENCE,\n Common.Settings.SettingCategory.DEBUGGER,\n Common.Settings.SettingCategory.GLOBAL,\n Common.Settings.SettingCategory.SYNC,\n ];\n\n // Some settings define their initial ordering.\n const preRegisteredSettings = Common.Settings.getRegisteredSettings().sort(\n (firstSetting, secondSetting) => {\n if (firstSetting.order && secondSetting.order) {\n return (firstSetting.order - secondSetting.order);\n }\n if (firstSetting.order) {\n return -1;\n }\n if (secondSetting.order) {\n return 1;\n }\n return 0;\n },\n );\n\n for (const sectionCategory of explicitSectionOrder) {\n const settingsForSection = preRegisteredSettings.filter(\n setting => setting.category === sectionCategory && GenericSettingsTab.isSettingVisible(setting));\n this.createSectionElement(sectionCategory, settingsForSection);\n }\n\n const restoreAndReloadButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.restoreDefaultsAndReload), restoreAndReload);\n restoreAndReloadButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('settings.restore-defaults-and-reload')}`);\n this.appendSection().appendChild(restoreAndReloadButton);\n\n function restoreAndReload(): void {\n Common.Settings.Settings.instance().clearAll();\n Components.Reload.reload();\n }\n }\n\n static isSettingVisible(setting: Common.Settings.SettingRegistration): boolean {\n const titleMac = setting.titleMac && setting.titleMac();\n const defaultTitle = setting.title && setting.title();\n const title = titleMac || defaultTitle;\n return Boolean(title && setting.category);\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(GenericSettingsTab, this);\n super.wasShown();\n this.updateSyncSection();\n }\n\n override willHide(): void {\n super.willHide();\n UI.Context.Context.instance().setFlavor(GenericSettingsTab, null);\n }\n\n private updateSyncSection(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.getSyncInformation(syncInfo => {\n this.syncSection.data = {\n syncInfo,\n syncSetting: Common.Settings.moduleSetting('sync_preferences') as Common.Settings.Setting,\n };\n });\n }\n\n private createExtensionSection(settings: Common.Settings.SettingRegistration[]): void {\n const sectionName = Common.Settings.SettingCategory.EXTENSIONS;\n const settingUI = Components.Linkifier.LinkHandlerSettingUI.instance() as UI.SettingsUI.SettingUI;\n const element = settingUI.settingElement();\n if (element) {\n const sectionElement = this.createStandardSectionElement(sectionName, settings);\n sectionElement.appendChild(element);\n }\n }\n\n private createSectionElement(\n category: Common.Settings.SettingCategory, settings: Common.Settings.SettingRegistration[]): void {\n // Always create the EXTENSIONS section and append the link handling control.\n if (category === Common.Settings.SettingCategory.EXTENSIONS) {\n this.createExtensionSection(settings);\n } else if (category === Common.Settings.SettingCategory.SYNC && settings.length > 0) {\n this.containerElement.appendChild(this.syncSection);\n } else if (settings.length > 0) {\n this.createStandardSectionElement(category, settings);\n }\n }\n\n private createStandardSectionElement(\n category: Common.Settings.SettingCategory, settings: Common.Settings.SettingRegistration[]): Element {\n const uiSectionName = Common.Settings.getLocalizedSettingsCategory(category);\n const sectionElement = this.appendSection(uiSectionName);\n for (const settingRegistration of settings) {\n const setting = Common.Settings.Settings.instance().moduleSetting(settingRegistration.settingName);\n const settingControl = UI.SettingsUI.createControlForSetting(setting);\n if (settingControl) {\n this.settingToControl.set(setting, settingControl);\n sectionElement.appendChild(settingControl);\n }\n }\n return sectionElement;\n }\n\n highlightObject(setting: Object): void {\n if (setting instanceof Common.Settings.Setting) {\n const element = this.settingToControl.get(setting);\n if (element) {\n PanelUtils.highlightElement(element);\n }\n }\n }\n}\n\nexport class ExperimentsSettingsTab extends SettingsTab {\n #experimentsSection: HTMLElement|undefined;\n #unstableExperimentsSection: HTMLElement|undefined;\n #inputElement: HTMLInputElement;\n private readonly experimentToControl = new Map();\n\n constructor() {\n super(i18nString(UIStrings.experiments), 'experiments-tab-content');\n const filterSection = this.appendSection();\n filterSection.classList.add('experiments-filter');\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('experiments')}`);\n\n const labelElement = filterSection.createChild('label');\n labelElement.textContent = i18nString(UIStrings.filterExperimentsLabel);\n this.#inputElement = UI.UIUtils.createInput('', 'text', 'experiments-filter');\n UI.ARIAUtils.bindLabelToControl(labelElement, this.#inputElement);\n filterSection.appendChild(this.#inputElement);\n this.#inputElement.addEventListener(\n 'input', () => this.renderExperiments(this.#inputElement.value.toLowerCase()), false);\n this.setDefaultFocusedElement(this.#inputElement);\n\n this.setFilter('');\n }\n\n private renderExperiments(filterText: string): void {\n this.experimentToControl.clear();\n if (this.#experimentsSection) {\n this.#experimentsSection.remove();\n }\n if (this.#unstableExperimentsSection) {\n this.#unstableExperimentsSection.remove();\n }\n const experiments = Root.Runtime.experiments.allConfigurableExperiments().sort();\n const unstableExperiments = experiments.filter(e => e.unstable && e.title.toLowerCase().includes(filterText));\n const stableExperiments = experiments.filter(e => !e.unstable && e.title.toLowerCase().includes(filterText));\n if (stableExperiments.length) {\n this.#experimentsSection = this.appendSection();\n const warningMessage = i18nString(UIStrings.theseExperimentsCouldBeUnstable);\n this.#experimentsSection.appendChild(this.createExperimentsWarningSubsection(warningMessage));\n for (const experiment of stableExperiments) {\n this.#experimentsSection.appendChild(this.createExperimentCheckbox(experiment));\n }\n }\n if (unstableExperiments.length) {\n this.#unstableExperimentsSection = this.appendSection();\n const warningMessage = i18nString(UIStrings.theseExperimentsAreParticularly);\n this.#unstableExperimentsSection.appendChild(this.createExperimentsWarningSubsection(warningMessage));\n for (const experiment of unstableExperiments) {\n this.#unstableExperimentsSection.appendChild(this.createExperimentCheckbox(experiment));\n }\n }\n if (!stableExperiments.length && !unstableExperiments.length) {\n this.#experimentsSection = this.appendSection();\n const warning = this.#experimentsSection.createChild('span');\n warning.textContent = i18nString(UIStrings.noResults);\n }\n }\n\n private createExperimentsWarningSubsection(warningMessage: string): Element {\n const subsection = document.createElement('div');\n const warning = subsection.createChild('span', 'settings-experiments-warning-subsection-warning');\n warning.textContent = i18nString(UIStrings.warning);\n UI.UIUtils.createTextChild(subsection, ' ');\n const message = subsection.createChild('span', 'settings-experiments-warning-subsection-message');\n message.textContent = warningMessage;\n return subsection;\n }\n\n private createExperimentCheckbox(experiment: Root.Runtime.Experiment): HTMLParagraphElement {\n const label = UI.UIUtils.CheckboxLabel.create(experiment.title, experiment.isEnabled(), undefined, experiment.name);\n label.classList.add('experiment-label');\n const input = label.checkboxElement;\n input.name = experiment.name;\n function listener(): void {\n experiment.setEnabled(input.checked);\n Host.userMetrics.experimentChanged(experiment.name, experiment.isEnabled());\n UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(\n i18nString(UIStrings.oneOrMoreSettingsHaveChanged));\n }\n input.addEventListener('click', listener, false);\n\n const p = document.createElement('p');\n this.experimentToControl.set(experiment, p);\n p.classList.add('settings-experiment');\n if (experiment.unstable && !experiment.isEnabled()) {\n p.classList.add('settings-experiment-unstable');\n }\n p.appendChild(label);\n\n if (experiment.docLink) {\n const link = UI.XLink.XLink.create(experiment.docLink);\n link.textContent = '';\n link.setAttribute('aria-label', i18nString(UIStrings.learnMore));\n link.setAttribute(\n 'jslog', `${VisualLogging.link().track({click: true}).context(`${experiment.name}:documentation`)}`);\n\n const linkIcon = new IconButton.Icon.Icon();\n linkIcon.data = {iconName: 'help', color: 'var(--icon-default)', width: '16px', height: '16px'};\n linkIcon.classList.add('link-icon');\n link.prepend(linkIcon);\n\n p.appendChild(link);\n }\n\n if (experiment.feedbackLink) {\n const link = UI.XLink.XLink.create(experiment.feedbackLink);\n link.textContent = i18nString(UIStrings.sendFeedback);\n link.classList.add('feedback-link');\n link.setAttribute('jslog', `${VisualLogging.link().track({click: true}).context(`${experiment.name}:feedback`)}`);\n\n p.appendChild(link);\n }\n\n return p;\n }\n\n highlightObject(experiment: Object): void {\n if (experiment instanceof Root.Runtime.Experiment) {\n const element = this.experimentToControl.get(experiment);\n if (element) {\n PanelUtils.highlightElement(element);\n }\n }\n }\n\n setFilter(filterText: string): void {\n this.#inputElement.value = filterText;\n this.#inputElement.dispatchEvent(new Event('input', {'bubbles': true, 'cancelable': true}));\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(ExperimentsSettingsTab, this);\n super.wasShown();\n }\n\n override willHide(): void {\n super.willHide();\n UI.Context.Context.instance().setFlavor(ExperimentsSettingsTab, null);\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n switch (actionId) {\n case 'settings.show':\n void SettingsScreen.showSettingsScreen({focusTabHeader: true} as ShowSettingsScreenOptions);\n return true;\n case 'settings.documentation':\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(UI.UIUtils.addReferrerToURL(\n 'https://developer.chrome.com/docs/devtools/' as Platform.DevToolsPath.UrlString));\n return true;\n case 'settings.shortcuts':\n void SettingsScreen.showSettingsScreen({name: 'keybinds', focusTabHeader: true});\n return true;\n }\n return false;\n }\n}\nexport class Revealer implements Common.Revealer.Revealer> {\n async reveal(object: Root.Runtime.Experiment|Common.Settings.Setting): Promise {\n const context = UI.Context.Context.instance();\n if (object instanceof Root.Runtime.Experiment) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n await SettingsScreen.showSettingsScreen({name: 'experiments'});\n const experimentsSettingsTab = context.flavor(ExperimentsSettingsTab);\n if (experimentsSettingsTab !== null) {\n experimentsSettingsTab.highlightObject(object);\n }\n return;\n }\n\n for (const settingRegistration of Common.Settings.getRegisteredSettings()) {\n if (!GenericSettingsTab.isSettingVisible(settingRegistration)) {\n continue;\n }\n if (settingRegistration.settingName === object.name) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n await SettingsScreen.showSettingsScreen();\n const genericSettingsTab = context.flavor(GenericSettingsTab);\n if (genericSettingsTab !== null) {\n genericSettingsTab.highlightObject(object);\n }\n return;\n }\n }\n\n // Reveal settings views\n for (const view of UI.ViewManager.getRegisteredViewExtensions()) {\n const id = view.viewId();\n const location = view.location();\n if (location !== UI.ViewManager.ViewLocationValues.SETTINGS_VIEW) {\n continue;\n }\n const settings = view.settings();\n if (settings && settings.indexOf(object.name) !== -1) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n await SettingsScreen.showSettingsScreen({name: id});\n const widget = await view.widget();\n if (widget instanceof SettingsTab) {\n widget.highlightObject(object);\n }\n return;\n }\n }\n }\n}\nexport interface ShowSettingsScreenOptions {\n name?: string;\n focusTabHeader?: boolean;\n}\n"]} \ No newline at end of file diff --git a/public/panels/settings/emulation/DevicesSettingsTab.d.ts b/public/panels/settings/emulation/DevicesSettingsTab.d.ts index b37eeb714..2780670cc 100644 --- a/public/panels/settings/emulation/DevicesSettingsTab.d.ts +++ b/public/panels/settings/emulation/DevicesSettingsTab.d.ts @@ -8,8 +8,7 @@ export declare class DevicesSettingsTab extends UI.Widget.VBox implements UI.Lis private muteUpdate; private emulatedDevicesList; private editor?; - private constructor(); - static instance(): DevicesSettingsTab; + constructor(); wasShown(): void; private devicesUpdated; private muteAndSaveDeviceList; diff --git a/public/panels/settings/emulation/DevicesSettingsTab.js b/public/panels/settings/emulation/DevicesSettingsTab.js index b1f572dd7..23f374129 100644 --- a/public/panels/settings/emulation/DevicesSettingsTab.js +++ b/public/panels/settings/emulation/DevicesSettingsTab.js @@ -7,7 +7,6 @@ import * as UI from '../../../ui/legacy/legacy.js'; import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js'; import * as EmulationComponents from './components/components.js'; import devicesSettingsTabStyles from './devicesSettingsTab.css.js'; -let devicesSettingsTabInstance; const UIStrings = { /** *@description Title for a section of the UI that shows all of the devices the user can emulate, in the Device Toolbar. @@ -73,7 +72,7 @@ export class DevicesSettingsTab extends UI.Widget.VBox { editor; constructor() { super(); - this.element.setAttribute('jslog', `${VisualLogging.section().context('devices')}`); + this.element.setAttribute('jslog', `${VisualLogging.pane().context('devices')}`); this.element.classList.add('settings-tab-container'); this.element.classList.add('devices-settings-tab'); const header = this.element.createChild('header'); @@ -97,12 +96,6 @@ export class DevicesSettingsTab extends UI.Widget.VBox { this.emulatedDevicesList.addEventListener("StandardDevicesUpdated" /* EmulationModel.EmulatedDevices.Events.StandardDevicesUpdated */, this.devicesUpdated, this); this.setDefaultFocusedElement(this.addCustomButton); } - static instance() { - if (!devicesSettingsTabInstance) { - devicesSettingsTabInstance = new DevicesSettingsTab(); - } - return devicesSettingsTabInstance; - } wasShown() { super.wasShown(); this.devicesUpdated(); diff --git a/public/panels/settings/emulation/DevicesSettingsTab.js.map b/public/panels/settings/emulation/DevicesSettingsTab.js.map index 0318c1c0b..55e2a989d 100644 --- a/public/panels/settings/emulation/DevicesSettingsTab.js.map +++ b/public/panels/settings/emulation/DevicesSettingsTab.js.map @@ -1 +1 @@ -{"version":3,"file":"DevicesSettingsTab.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/settings/emulation/DevicesSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,cAAc,MAAM,wCAAwC,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,aAAa,MAAM,8CAA8C,CAAC;AAE9E,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,IAAI,0BAA8C,CAAC;AAEnD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,eAAe,EAAE,kBAAkB;IACnC;;OAEG;IACH,eAAe,EAAE,sBAAsB;IACvC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,gBAAgB,EAAE,oBAAoB;IACtC;;OAEG;IACH,eAAe,EAAE,mBAAmB;IACpC;;;OAGG;IACH,aAAa,EAAE,iBAAiB;IAChC;;;OAGG;IACH,yBAAyB,EAAE,iDAAiD;IAC5E;;OAEG;IACH,uBAAuB,EAAE,8BAA8B;IACvD;;;OAGG;IACH,oBAAoB,EAAE,0CAA0C;CACjE,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,iDAAiD,EAAE,SAAS,CAAC,CAAC;AACvG,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,MAAM,OAAO,kBAAmB,SAA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C,OAAO,cAAc,CAAC,eAAe,CAAC,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrF,CAAC;QAED,SAAS,cAAc,CACnB,IAAmD,EAAE,KAAa,EAClE,KAAkC;YACpC,OAAO,cAAc,CAAC,eAAe,CAAC,eAAe,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as EmulationModel from '../../../models/emulation/emulation.js';\nimport * as UI from '../../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport * as EmulationComponents from './components/components.js';\nimport devicesSettingsTabStyles from './devicesSettingsTab.css.js';\n\nlet devicesSettingsTabInstance: DevicesSettingsTab;\n\nconst UIStrings = {\n /**\n *@description Title for a section of the UI that shows all of the devices the user can emulate, in the Device Toolbar.\n */\n emulatedDevices: 'Emulated Devices',\n /**\n *@description Button to add a custom device (e.g. phone, tablet) the Device Toolbar.\n */\n addCustomDevice: 'Add custom device...',\n /**\n *@description Label/title for UI to add a new custom device type. Device means mobile/tablet etc.\n */\n device: 'Device',\n /**\n *@description Placeholder for text input for the name of a custom device.\n */\n deviceName: 'Device Name',\n /**\n *@description Placeholder text for text input for the width of a custom device in pixels.\n */\n width: 'Width',\n /**\n *@description Placeholder text for text input for the height of a custom device in pixels.\n */\n height: 'Height',\n /**\n *@description Placeholder text for text input for the height/width ratio of a custom device in pixels.\n */\n devicePixelRatio: 'Device pixel ratio',\n /**\n *@description Label in the Devices settings pane for the user agent string input of a custom device\n */\n userAgentString: 'User agent string',\n /**\n *@description Tooltip text for a drop-down in the Devices settings pane, for the 'user agent type' input of a custom device.\n * 'Type' refers to different options e.g. mobile or desktop.\n */\n userAgentType: 'User agent type',\n /**\n *@description Error message in the Devices settings pane that declares the maximum length of the device name input\n *@example {50} PH1\n */\n deviceNameMustBeLessThanS: 'Device name must be less than {PH1} characters.',\n /**\n *@description Error message in the Devices settings pane that declares that the device name input must not be empty\n */\n deviceNameCannotBeEmpty: 'Device name cannot be empty.',\n /**\n *@description Success message for screen readers when device is added.\n *@example {TestDevice} PH1\n */\n deviceAddedOrUpdated: 'Device {PH1} successfully added/updated.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/emulation/DevicesSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class DevicesSettingsTab extends UI.Widget.VBox implements\n UI.ListWidget.Delegate {\n containerElement: HTMLElement;\n private readonly addCustomButton: HTMLButtonElement;\n private readonly ariaSuccessMessageElement: HTMLElement;\n private readonly list: UI.ListWidget.ListWidget;\n private muteUpdate: boolean;\n private emulatedDevicesList: EmulationModel.EmulatedDevices.EmulatedDevicesList;\n private editor?: UI.ListWidget.Editor;\n\n private constructor() {\n super();\n\n this.element.setAttribute('jslog', `${VisualLogging.section().context('devices')}`);\n\n this.element.classList.add('settings-tab-container');\n this.element.classList.add('devices-settings-tab');\n\n const header = this.element.createChild('header');\n UI.UIUtils.createTextChild(header.createChild('h1'), i18nString(UIStrings.emulatedDevices));\n this.containerElement = this.element.createChild('div', 'settings-container-wrapper')\n .createChild('div', 'settings-tab settings-content settings-container');\n\n const buttonsRow = this.containerElement.createChild('div', 'devices-button-row');\n this.addCustomButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.addCustomDevice), this.addCustomDevice.bind(this));\n this.addCustomButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('custom-device-add-button')}`);\n this.addCustomButton.id = 'custom-device-add-button';\n buttonsRow.appendChild(this.addCustomButton);\n this.ariaSuccessMessageElement = this.containerElement.createChild('div', 'device-success-message');\n UI.ARIAUtils.markAsPoliteLiveRegion(this.ariaSuccessMessageElement, false);\n\n this.list = new UI.ListWidget.ListWidget(this, false /* delegatesFocus */);\n this.list.element.classList.add('devices-list');\n this.list.show(this.containerElement);\n\n this.muteUpdate = false;\n this.emulatedDevicesList = EmulationModel.EmulatedDevices.EmulatedDevicesList.instance();\n this.emulatedDevicesList.addEventListener(\n EmulationModel.EmulatedDevices.Events.CustomDevicesUpdated, this.devicesUpdated, this);\n this.emulatedDevicesList.addEventListener(\n EmulationModel.EmulatedDevices.Events.StandardDevicesUpdated, this.devicesUpdated, this);\n\n this.setDefaultFocusedElement(this.addCustomButton);\n }\n\n static instance(): DevicesSettingsTab {\n if (!devicesSettingsTabInstance) {\n devicesSettingsTabInstance = new DevicesSettingsTab();\n }\n return devicesSettingsTabInstance;\n }\n\n override wasShown(): void {\n super.wasShown();\n this.devicesUpdated();\n this.registerCSSFiles([devicesSettingsTabStyles]);\n this.list.registerCSSFiles([devicesSettingsTabStyles]);\n }\n\n private devicesUpdated(): void {\n if (this.muteUpdate) {\n return;\n }\n\n this.list.clear();\n\n let devices = this.emulatedDevicesList.custom().slice();\n for (let i = 0; i < devices.length; ++i) {\n this.list.appendItem(devices[i], true);\n }\n\n this.list.appendSeparator();\n\n devices = this.emulatedDevicesList.standard().slice();\n devices.sort(EmulationModel.EmulatedDevices.EmulatedDevice.deviceComparator);\n for (let i = 0; i < devices.length; ++i) {\n this.list.appendItem(devices[i], false);\n }\n }\n\n private muteAndSaveDeviceList(custom: boolean): void {\n this.muteUpdate = true;\n if (custom) {\n this.emulatedDevicesList.saveCustomDevices();\n } else {\n this.emulatedDevicesList.saveStandardDevices();\n }\n this.muteUpdate = false;\n }\n\n private addCustomDevice(): void {\n const device = new EmulationModel.EmulatedDevices.EmulatedDevice();\n device.deviceScaleFactor = 0;\n device.horizontal.width = 700;\n device.horizontal.height = 400;\n device.vertical.width = 400;\n device.vertical.height = 700;\n this.list.addNewItem(this.emulatedDevicesList.custom().length, device);\n }\n\n private toNumericInputValue(value: number): string {\n return value ? String(value) : '';\n }\n\n renderItem(device: EmulationModel.EmulatedDevices.EmulatedDevice, editable: boolean): Element {\n const label = document.createElement('label');\n label.classList.add('devices-list-item');\n const checkbox = (label.createChild('input', 'devices-list-checkbox') as HTMLInputElement);\n checkbox.type = 'checkbox';\n checkbox.checked = device.show();\n checkbox.addEventListener('click', onItemClicked.bind(this), false);\n checkbox.setAttribute('jslog', `${VisualLogging.toggle().track({click: true})}`);\n const span = document.createElement('span');\n span.classList.add('device-name');\n span.appendChild(document.createTextNode(device.title));\n label.appendChild(span);\n return label;\n\n function onItemClicked(this: DevicesSettingsTab, event: Event): void {\n const show = checkbox.checked;\n device.setShow(show);\n this.muteAndSaveDeviceList(editable);\n event.consume();\n }\n }\n\n removeItemRequested(item: EmulationModel.EmulatedDevices.EmulatedDevice): void {\n this.emulatedDevicesList.removeCustomDevice(item);\n }\n\n commitEdit(\n device: EmulationModel.EmulatedDevices.EmulatedDevice,\n editor: UI.ListWidget.Editor, isNew: boolean): void {\n device.title = editor.control('title').value.trim();\n device.vertical.width = editor.control('width').value ? parseInt(editor.control('width').value, 10) : 0;\n device.vertical.height = editor.control('height').value ? parseInt(editor.control('height').value, 10) : 0;\n device.horizontal.width = device.vertical.height;\n device.horizontal.height = device.vertical.width;\n device.deviceScaleFactor = editor.control('scale').value ? parseFloat(editor.control('scale').value) : 0;\n device.userAgent = editor.control('user-agent').value;\n device.modes = [];\n device.modes.push({\n title: '',\n orientation: EmulationModel.EmulatedDevices.Vertical,\n insets: new EmulationModel.DeviceModeModel.Insets(0, 0, 0, 0),\n image: null,\n });\n device.modes.push({\n title: '',\n orientation: EmulationModel.EmulatedDevices.Horizontal,\n insets: new EmulationModel.DeviceModeModel.Insets(0, 0, 0, 0),\n image: null,\n });\n device.capabilities = [];\n const uaType = editor.control('ua-type').value;\n if (uaType === EmulationModel.DeviceModeModel.UA.Mobile ||\n uaType === EmulationModel.DeviceModeModel.UA.MobileNoTouch) {\n device.capabilities.push(EmulationModel.EmulatedDevices.Capability.Mobile);\n }\n if (uaType === EmulationModel.DeviceModeModel.UA.Mobile ||\n uaType === EmulationModel.DeviceModeModel.UA.DesktopTouch) {\n device.capabilities.push(EmulationModel.EmulatedDevices.Capability.Touch);\n }\n const userAgentControlValue =\n (editor.control('ua-metadata') as\n UI.ListWidget.CustomEditorControl)\n .value.metaData;\n if (userAgentControlValue) {\n device.userAgentMetadata = {\n ...userAgentControlValue,\n mobile:\n (uaType === EmulationModel.DeviceModeModel.UA.Mobile ||\n uaType === EmulationModel.DeviceModeModel.UA.MobileNoTouch),\n };\n }\n if (isNew) {\n this.emulatedDevicesList.addCustomDevice(device);\n } else {\n this.emulatedDevicesList.saveCustomDevices();\n }\n this.addCustomButton.scrollIntoViewIfNeeded();\n this.addCustomButton.focus();\n this.ariaSuccessMessageElement.setAttribute(\n 'aria-label', i18nString(UIStrings.deviceAddedOrUpdated, {PH1: device.title}));\n }\n\n beginEdit(device: EmulationModel.EmulatedDevices.EmulatedDevice):\n UI.ListWidget.Editor {\n const editor = this.createEditor();\n editor.control('title').value = device.title;\n editor.control('width').value = this.toNumericInputValue(device.vertical.width);\n editor.control('height').value = this.toNumericInputValue(device.vertical.height);\n editor.control('scale').value = this.toNumericInputValue(device.deviceScaleFactor);\n editor.control('user-agent').value = device.userAgent;\n let uaType;\n if (device.mobile()) {\n uaType =\n device.touch() ? EmulationModel.DeviceModeModel.UA.Mobile : EmulationModel.DeviceModeModel.UA.MobileNoTouch;\n } else {\n uaType =\n device.touch() ? EmulationModel.DeviceModeModel.UA.DesktopTouch : EmulationModel.DeviceModeModel.UA.Desktop;\n }\n editor.control('ua-type').value = uaType;\n (editor.control('ua-metadata') as\n UI.ListWidget.CustomEditorControl)\n .value = {metaData: device.userAgentMetadata || undefined};\n return editor;\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n this.editor = editor;\n const content = editor.contentElement();\n\n const deviceFields = content.createChild('div', 'devices-edit-fields');\n UI.UIUtils.createTextChild(deviceFields.createChild('b'), i18nString(UIStrings.device));\n const deviceNameField = editor.createInput('title', 'text', i18nString(UIStrings.deviceName), titleValidator);\n deviceFields.createChild('div', 'hbox').appendChild(deviceNameField);\n deviceNameField.id = 'custom-device-name-field';\n const screen = deviceFields.createChild('div', 'hbox');\n screen.appendChild(editor.createInput('width', 'text', i18nString(UIStrings.width), widthValidator));\n screen.appendChild(editor.createInput('height', 'text', i18nString(UIStrings.height), heightValidator));\n const dpr = editor.createInput('scale', 'text', i18nString(UIStrings.devicePixelRatio), scaleValidator);\n dpr.classList.add('device-edit-fixed');\n screen.appendChild(dpr);\n\n const uaStringFields = content.createChild('div', 'devices-edit-fields');\n UI.UIUtils.createTextChild(uaStringFields.createChild('b'), i18nString(UIStrings.userAgentString));\n\n const ua = uaStringFields.createChild('div', 'hbox');\n ua.appendChild(editor.createInput('user-agent', 'text', i18nString(UIStrings.userAgentString), () => {\n return {valid: true, errorMessage: undefined};\n }));\n const uaTypeOptions = [\n EmulationModel.DeviceModeModel.UA.Mobile,\n EmulationModel.DeviceModeModel.UA.MobileNoTouch,\n EmulationModel.DeviceModeModel.UA.Desktop,\n EmulationModel.DeviceModeModel.UA.DesktopTouch,\n ];\n const uaType = editor.createSelect('ua-type', uaTypeOptions, () => {\n return {valid: true, errorMessage: undefined};\n }, i18nString(UIStrings.userAgentType));\n uaType.classList.add('device-edit-fixed');\n ua.appendChild(uaType);\n\n const uaMetadata = editor.createCustomControl(\n 'ua-metadata', EmulationComponents.UserAgentClientHintsForm.UserAgentClientHintsForm,\n userAgentMetadataValidator);\n uaMetadata.value = {};\n uaMetadata.addEventListener('clienthintschange', () => editor.requestValidation(), false);\n content.appendChild(uaMetadata);\n\n return editor;\n\n function userAgentMetadataValidator(): UI.ListWidget.ValidatorResult {\n return uaMetadata.validate();\n }\n\n function titleValidator(\n item: EmulationModel.EmulatedDevices.EmulatedDevice, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n let valid = false;\n let errorMessage;\n\n const value = input.value.trim();\n if (value.length >= EmulationModel.DeviceModeModel.MaxDeviceNameLength) {\n errorMessage =\n i18nString(UIStrings.deviceNameMustBeLessThanS, {PH1: EmulationModel.DeviceModeModel.MaxDeviceNameLength});\n } else if (value.length === 0) {\n errorMessage = i18nString(UIStrings.deviceNameCannotBeEmpty);\n } else {\n valid = true;\n }\n\n return {valid, errorMessage};\n }\n\n function widthValidator(\n item: EmulationModel.EmulatedDevices.EmulatedDevice, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n return EmulationModel.DeviceModeModel.DeviceModeModel.widthValidator(input.value);\n }\n\n function heightValidator(\n item: EmulationModel.EmulatedDevices.EmulatedDevice, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n return EmulationModel.DeviceModeModel.DeviceModeModel.heightValidator(input.value);\n }\n\n function scaleValidator(\n item: EmulationModel.EmulatedDevices.EmulatedDevice, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n return EmulationModel.DeviceModeModel.DeviceModeModel.scaleValidator(input.value);\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"DevicesSettingsTab.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/settings/emulation/DevicesSettingsTab.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,cAAc,MAAM,wCAAwC,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,aAAa,MAAM,8CAA8C,CAAC;AAE9E,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,eAAe,EAAE,kBAAkB;IACnC;;OAEG;IACH,eAAe,EAAE,sBAAsB;IACvC;;OAEG;IACH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AmB,EAAC,CAAC,CAAC;aAChH;iBAAM,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7B,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;aAC9D;iBAAM;gBACL,KAAK,GAAG,IAAI,CAAC;aACd;YAED,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,CAAC;QAC/B,CAAC;QAED,SAAS,cAAc,CACnB,IAAmD,EAAE,KAAa,EAClE,KAAkC;YACpC,OAAO,cAAc,CAAC,eAAe,CAAC,eAAe,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpF,CAAC;QAED,SAAS,eAAe,CACpB,IAAmD,EAAE,KAAa,EAClE,KAAkC;YACpC,OAAO,cAAc,CAAC,eAAe,CAAC,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrF,CAAC;QAED,SAAS,cAAc,CACnB,IAAmD,EAAE,KAAa,EAClE,KAAkC;YACpC,OAAO,cAAc,CAAC,eAAe,CAAC,eAAe,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as EmulationModel from '../../../models/emulation/emulation.js';\nimport * as UI from '../../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport * as EmulationComponents from './components/components.js';\nimport devicesSettingsTabStyles from './devicesSettingsTab.css.js';\n\nconst UIStrings = {\n /**\n *@description Title for a section of the UI that shows all of the devices the user can emulate, in the Device Toolbar.\n */\n emulatedDevices: 'Emulated Devices',\n /**\n *@description Button to add a custom device (e.g. phone, tablet) the Device Toolbar.\n */\n addCustomDevice: 'Add custom device...',\n /**\n *@description Label/title for UI to add a new custom device type. Device means mobile/tablet etc.\n */\n device: 'Device',\n /**\n *@description Placeholder for text input for the name of a custom device.\n */\n deviceName: 'Device Name',\n /**\n *@description Placeholder text for text input for the width of a custom device in pixels.\n */\n width: 'Width',\n /**\n *@description Placeholder text for text input for the height of a custom device in pixels.\n */\n height: 'Height',\n /**\n *@description Placeholder text for text input for the height/width ratio of a custom device in pixels.\n */\n devicePixelRatio: 'Device pixel ratio',\n /**\n *@description Label in the Devices settings pane for the user agent string input of a custom device\n */\n userAgentString: 'User agent string',\n /**\n *@description Tooltip text for a drop-down in the Devices settings pane, for the 'user agent type' input of a custom device.\n * 'Type' refers to different options e.g. mobile or desktop.\n */\n userAgentType: 'User agent type',\n /**\n *@description Error message in the Devices settings pane that declares the maximum length of the device name input\n *@example {50} PH1\n */\n deviceNameMustBeLessThanS: 'Device name must be less than {PH1} characters.',\n /**\n *@description Error message in the Devices settings pane that declares that the device name input must not be empty\n */\n deviceNameCannotBeEmpty: 'Device name cannot be empty.',\n /**\n *@description Success message for screen readers when device is added.\n *@example {TestDevice} PH1\n */\n deviceAddedOrUpdated: 'Device {PH1} successfully added/updated.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/emulation/DevicesSettingsTab.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class DevicesSettingsTab extends UI.Widget.VBox implements\n UI.ListWidget.Delegate {\n containerElement: HTMLElement;\n private readonly addCustomButton: HTMLButtonElement;\n private readonly ariaSuccessMessageElement: HTMLElement;\n private readonly list: UI.ListWidget.ListWidget;\n private muteUpdate: boolean;\n private emulatedDevicesList: EmulationModel.EmulatedDevices.EmulatedDevicesList;\n private editor?: UI.ListWidget.Editor;\n\n constructor() {\n super();\n\n this.element.setAttribute('jslog', `${VisualLogging.pane().context('devices')}`);\n\n this.element.classList.add('settings-tab-container');\n this.element.classList.add('devices-settings-tab');\n\n const header = this.element.createChild('header');\n UI.UIUtils.createTextChild(header.createChild('h1'), i18nString(UIStrings.emulatedDevices));\n this.containerElement = this.element.createChild('div', 'settings-container-wrapper')\n .createChild('div', 'settings-tab settings-content settings-container');\n\n const buttonsRow = this.containerElement.createChild('div', 'devices-button-row');\n this.addCustomButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.addCustomDevice), this.addCustomDevice.bind(this));\n this.addCustomButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('custom-device-add-button')}`);\n this.addCustomButton.id = 'custom-device-add-button';\n buttonsRow.appendChild(this.addCustomButton);\n this.ariaSuccessMessageElement = this.containerElement.createChild('div', 'device-success-message');\n UI.ARIAUtils.markAsPoliteLiveRegion(this.ariaSuccessMessageElement, false);\n\n this.list = new UI.ListWidget.ListWidget(this, false /* delegatesFocus */);\n this.list.element.classList.add('devices-list');\n this.list.show(this.containerElement);\n\n this.muteUpdate = false;\n this.emulatedDevicesList = EmulationModel.EmulatedDevices.EmulatedDevicesList.instance();\n this.emulatedDevicesList.addEventListener(\n EmulationModel.EmulatedDevices.Events.CustomDevicesUpdated, this.devicesUpdated, this);\n this.emulatedDevicesList.addEventListener(\n EmulationModel.EmulatedDevices.Events.StandardDevicesUpdated, this.devicesUpdated, this);\n\n this.setDefaultFocusedElement(this.addCustomButton);\n }\n\n override wasShown(): void {\n super.wasShown();\n this.devicesUpdated();\n this.registerCSSFiles([devicesSettingsTabStyles]);\n this.list.registerCSSFiles([devicesSettingsTabStyles]);\n }\n\n private devicesUpdated(): void {\n if (this.muteUpdate) {\n return;\n }\n\n this.list.clear();\n\n let devices = this.emulatedDevicesList.custom().slice();\n for (let i = 0; i < devices.length; ++i) {\n this.list.appendItem(devices[i], true);\n }\n\n this.list.appendSeparator();\n\n devices = this.emulatedDevicesList.standard().slice();\n devices.sort(EmulationModel.EmulatedDevices.EmulatedDevice.deviceComparator);\n for (let i = 0; i < devices.length; ++i) {\n this.list.appendItem(devices[i], false);\n }\n }\n\n private muteAndSaveDeviceList(custom: boolean): void {\n this.muteUpdate = true;\n if (custom) {\n this.emulatedDevicesList.saveCustomDevices();\n } else {\n this.emulatedDevicesList.saveStandardDevices();\n }\n this.muteUpdate = false;\n }\n\n private addCustomDevice(): void {\n const device = new EmulationModel.EmulatedDevices.EmulatedDevice();\n device.deviceScaleFactor = 0;\n device.horizontal.width = 700;\n device.horizontal.height = 400;\n device.vertical.width = 400;\n device.vertical.height = 700;\n this.list.addNewItem(this.emulatedDevicesList.custom().length, device);\n }\n\n private toNumericInputValue(value: number): string {\n return value ? String(value) : '';\n }\n\n renderItem(device: EmulationModel.EmulatedDevices.EmulatedDevice, editable: boolean): Element {\n const label = document.createElement('label');\n label.classList.add('devices-list-item');\n const checkbox = (label.createChild('input', 'devices-list-checkbox') as HTMLInputElement);\n checkbox.type = 'checkbox';\n checkbox.checked = device.show();\n checkbox.addEventListener('click', onItemClicked.bind(this), false);\n checkbox.setAttribute('jslog', `${VisualLogging.toggle().track({click: true})}`);\n const span = document.createElement('span');\n span.classList.add('device-name');\n span.appendChild(document.createTextNode(device.title));\n label.appendChild(span);\n return label;\n\n function onItemClicked(this: DevicesSettingsTab, event: Event): void {\n const show = checkbox.checked;\n device.setShow(show);\n this.muteAndSaveDeviceList(editable);\n event.consume();\n }\n }\n\n removeItemRequested(item: EmulationModel.EmulatedDevices.EmulatedDevice): void {\n this.emulatedDevicesList.removeCustomDevice(item);\n }\n\n commitEdit(\n device: EmulationModel.EmulatedDevices.EmulatedDevice,\n editor: UI.ListWidget.Editor, isNew: boolean): void {\n device.title = editor.control('title').value.trim();\n device.vertical.width = editor.control('width').value ? parseInt(editor.control('width').value, 10) : 0;\n device.vertical.height = editor.control('height').value ? parseInt(editor.control('height').value, 10) : 0;\n device.horizontal.width = device.vertical.height;\n device.horizontal.height = device.vertical.width;\n device.deviceScaleFactor = editor.control('scale').value ? parseFloat(editor.control('scale').value) : 0;\n device.userAgent = editor.control('user-agent').value;\n device.modes = [];\n device.modes.push({\n title: '',\n orientation: EmulationModel.EmulatedDevices.Vertical,\n insets: new EmulationModel.DeviceModeModel.Insets(0, 0, 0, 0),\n image: null,\n });\n device.modes.push({\n title: '',\n orientation: EmulationModel.EmulatedDevices.Horizontal,\n insets: new EmulationModel.DeviceModeModel.Insets(0, 0, 0, 0),\n image: null,\n });\n device.capabilities = [];\n const uaType = editor.control('ua-type').value;\n if (uaType === EmulationModel.DeviceModeModel.UA.Mobile ||\n uaType === EmulationModel.DeviceModeModel.UA.MobileNoTouch) {\n device.capabilities.push(EmulationModel.EmulatedDevices.Capability.Mobile);\n }\n if (uaType === EmulationModel.DeviceModeModel.UA.Mobile ||\n uaType === EmulationModel.DeviceModeModel.UA.DesktopTouch) {\n device.capabilities.push(EmulationModel.EmulatedDevices.Capability.Touch);\n }\n const userAgentControlValue =\n (editor.control('ua-metadata') as\n UI.ListWidget.CustomEditorControl)\n .value.metaData;\n if (userAgentControlValue) {\n device.userAgentMetadata = {\n ...userAgentControlValue,\n mobile:\n (uaType === EmulationModel.DeviceModeModel.UA.Mobile ||\n uaType === EmulationModel.DeviceModeModel.UA.MobileNoTouch),\n };\n }\n if (isNew) {\n this.emulatedDevicesList.addCustomDevice(device);\n } else {\n this.emulatedDevicesList.saveCustomDevices();\n }\n this.addCustomButton.scrollIntoViewIfNeeded();\n this.addCustomButton.focus();\n this.ariaSuccessMessageElement.setAttribute(\n 'aria-label', i18nString(UIStrings.deviceAddedOrUpdated, {PH1: device.title}));\n }\n\n beginEdit(device: EmulationModel.EmulatedDevices.EmulatedDevice):\n UI.ListWidget.Editor {\n const editor = this.createEditor();\n editor.control('title').value = device.title;\n editor.control('width').value = this.toNumericInputValue(device.vertical.width);\n editor.control('height').value = this.toNumericInputValue(device.vertical.height);\n editor.control('scale').value = this.toNumericInputValue(device.deviceScaleFactor);\n editor.control('user-agent').value = device.userAgent;\n let uaType;\n if (device.mobile()) {\n uaType =\n device.touch() ? EmulationModel.DeviceModeModel.UA.Mobile : EmulationModel.DeviceModeModel.UA.MobileNoTouch;\n } else {\n uaType =\n device.touch() ? EmulationModel.DeviceModeModel.UA.DesktopTouch : EmulationModel.DeviceModeModel.UA.Desktop;\n }\n editor.control('ua-type').value = uaType;\n (editor.control('ua-metadata') as\n UI.ListWidget.CustomEditorControl)\n .value = {metaData: device.userAgentMetadata || undefined};\n return editor;\n }\n\n private createEditor(): UI.ListWidget.Editor {\n if (this.editor) {\n return this.editor;\n }\n\n const editor = new UI.ListWidget.Editor();\n this.editor = editor;\n const content = editor.contentElement();\n\n const deviceFields = content.createChild('div', 'devices-edit-fields');\n UI.UIUtils.createTextChild(deviceFields.createChild('b'), i18nString(UIStrings.device));\n const deviceNameField = editor.createInput('title', 'text', i18nString(UIStrings.deviceName), titleValidator);\n deviceFields.createChild('div', 'hbox').appendChild(deviceNameField);\n deviceNameField.id = 'custom-device-name-field';\n const screen = deviceFields.createChild('div', 'hbox');\n screen.appendChild(editor.createInput('width', 'text', i18nString(UIStrings.width), widthValidator));\n screen.appendChild(editor.createInput('height', 'text', i18nString(UIStrings.height), heightValidator));\n const dpr = editor.createInput('scale', 'text', i18nString(UIStrings.devicePixelRatio), scaleValidator);\n dpr.classList.add('device-edit-fixed');\n screen.appendChild(dpr);\n\n const uaStringFields = content.createChild('div', 'devices-edit-fields');\n UI.UIUtils.createTextChild(uaStringFields.createChild('b'), i18nString(UIStrings.userAgentString));\n\n const ua = uaStringFields.createChild('div', 'hbox');\n ua.appendChild(editor.createInput('user-agent', 'text', i18nString(UIStrings.userAgentString), () => {\n return {valid: true, errorMessage: undefined};\n }));\n const uaTypeOptions = [\n EmulationModel.DeviceModeModel.UA.Mobile,\n EmulationModel.DeviceModeModel.UA.MobileNoTouch,\n EmulationModel.DeviceModeModel.UA.Desktop,\n EmulationModel.DeviceModeModel.UA.DesktopTouch,\n ];\n const uaType = editor.createSelect('ua-type', uaTypeOptions, () => {\n return {valid: true, errorMessage: undefined};\n }, i18nString(UIStrings.userAgentType));\n uaType.classList.add('device-edit-fixed');\n ua.appendChild(uaType);\n\n const uaMetadata = editor.createCustomControl(\n 'ua-metadata', EmulationComponents.UserAgentClientHintsForm.UserAgentClientHintsForm,\n userAgentMetadataValidator);\n uaMetadata.value = {};\n uaMetadata.addEventListener('clienthintschange', () => editor.requestValidation(), false);\n content.appendChild(uaMetadata);\n\n return editor;\n\n function userAgentMetadataValidator(): UI.ListWidget.ValidatorResult {\n return uaMetadata.validate();\n }\n\n function titleValidator(\n item: EmulationModel.EmulatedDevices.EmulatedDevice, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n let valid = false;\n let errorMessage;\n\n const value = input.value.trim();\n if (value.length >= EmulationModel.DeviceModeModel.MaxDeviceNameLength) {\n errorMessage =\n i18nString(UIStrings.deviceNameMustBeLessThanS, {PH1: EmulationModel.DeviceModeModel.MaxDeviceNameLength});\n } else if (value.length === 0) {\n errorMessage = i18nString(UIStrings.deviceNameCannotBeEmpty);\n } else {\n valid = true;\n }\n\n return {valid, errorMessage};\n }\n\n function widthValidator(\n item: EmulationModel.EmulatedDevices.EmulatedDevice, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n return EmulationModel.DeviceModeModel.DeviceModeModel.widthValidator(input.value);\n }\n\n function heightValidator(\n item: EmulationModel.EmulatedDevices.EmulatedDevice, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n return EmulationModel.DeviceModeModel.DeviceModeModel.heightValidator(input.value);\n }\n\n function scaleValidator(\n item: EmulationModel.EmulatedDevices.EmulatedDevice, index: number,\n input: UI.ListWidget.EditorControl): UI.ListWidget.ValidatorResult {\n return EmulationModel.DeviceModeModel.DeviceModeModel.scaleValidator(input.value);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/settings/emulation/emulation-meta.js b/public/panels/settings/emulation/emulation-meta.js index e4bb1fdd3..7f507e0d6 100644 --- a/public/panels/settings/emulation/emulation-meta.js +++ b/public/panels/settings/emulation/emulation-meta.js @@ -29,7 +29,7 @@ UI.ViewManager.registerViewExtension({ order: 30, async loadView() { const Emulation = await loadEmulationModule(); - return Emulation.DevicesSettingsTab.DevicesSettingsTab.instance(); + return new Emulation.DevicesSettingsTab.DevicesSettingsTab(); }, id: 'devices', settings: [ diff --git a/public/panels/settings/emulation/emulation-meta.js.map b/public/panels/settings/emulation/emulation-meta.js.map index 3002a4e62..ea5102c49 100644 --- a/public/panels/settings/emulation/emulation-meta.js.map +++ b/public/panels/settings/emulation/emulation-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"emulation-meta.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/settings/emulation/emulation-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAInD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,6CAA6C,EAAE,SAAS,CAAC,CAAC;AACnG,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,qBAAmD,CAAC;AAExD,KAAK,UAAU,mBAAmB;IAChC,IAAI,CAAC,qBAAqB,EAAE;QAC1B,qBAAqB,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;KACxD;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,uEAAiD;IACzD,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,WAAW,CAAC;IACpD,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC;IACxC,KAAK,EAAE,EAAE;IACT,KAAK,CAAC,QAAQ;QACZ,MAAM,SAAS,GAAG,MAAM,mBAAmB,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;IACpE,CAAC;IACD,EAAE,EAAE,SAAS;IACb,QAAQ,EAAE;QACR,4BAA4B;QAC5B,0BAA0B;KAC3B;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as UI from '../../../ui/legacy/legacy.js';\n\nimport type * as Emulation from './emulation.js';\n\nconst UIStrings = {\n /**\n *@description Title of the Devices tab/tool. Devices refers to e.g. phones/tablets.\n */\n devices: 'Devices',\n /**\n *@description Command that opens the device emulation view.\n */\n showDevices: 'Show Devices',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/emulation/emulation-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedEmulationModule: (typeof Emulation|undefined);\n\nasync function loadEmulationModule(): Promise {\n if (!loadedEmulationModule) {\n loadedEmulationModule = await import('./emulation.js');\n }\n return loadedEmulationModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n commandPrompt: i18nLazyString(UIStrings.showDevices),\n title: i18nLazyString(UIStrings.devices),\n order: 30,\n async loadView() {\n const Emulation = await loadEmulationModule();\n return Emulation.DevicesSettingsTab.DevicesSettingsTab.instance();\n },\n id: 'devices',\n settings: [\n 'standardEmulatedDeviceList',\n 'customEmulatedDeviceList',\n ],\n});\n"]} \ No newline at end of file +{"version":3,"file":"emulation-meta.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/settings/emulation/emulation-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAInD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,6CAA6C,EAAE,SAAS,CAAC,CAAC;AACnG,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,qBAAmD,CAAC;AAExD,KAAK,UAAU,mBAAmB;IAChC,IAAI,CAAC,qBAAqB,EAAE;QAC1B,qBAAqB,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;KACxD;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,uEAAiD;IACzD,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,WAAW,CAAC;IACpD,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC;IACxC,KAAK,EAAE,EAAE;IACT,KAAK,CAAC,QAAQ;QACZ,MAAM,SAAS,GAAG,MAAM,mBAAmB,EAAE,CAAC;QAC9C,OAAO,IAAI,SAAS,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,CAAC;IAC/D,CAAC;IACD,EAAE,EAAE,SAAS;IACb,QAAQ,EAAE;QACR,4BAA4B;QAC5B,0BAA0B;KAC3B;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as UI from '../../../ui/legacy/legacy.js';\n\nimport type * as Emulation from './emulation.js';\n\nconst UIStrings = {\n /**\n *@description Title of the Devices tab/tool. Devices refers to e.g. phones/tablets.\n */\n devices: 'Devices',\n /**\n *@description Command that opens the device emulation view.\n */\n showDevices: 'Show Devices',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/emulation/emulation-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedEmulationModule: (typeof Emulation|undefined);\n\nasync function loadEmulationModule(): Promise {\n if (!loadedEmulationModule) {\n loadedEmulationModule = await import('./emulation.js');\n }\n return loadedEmulationModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n commandPrompt: i18nLazyString(UIStrings.showDevices),\n title: i18nLazyString(UIStrings.devices),\n order: 30,\n async loadView() {\n const Emulation = await loadEmulationModule();\n return new Emulation.DevicesSettingsTab.DevicesSettingsTab();\n },\n id: 'devices',\n settings: [\n 'standardEmulatedDeviceList',\n 'customEmulatedDeviceList',\n ],\n});\n"]} \ No newline at end of file diff --git a/public/panels/settings/settings-meta.js b/public/panels/settings/settings-meta.js index be34e9610..a85c3f373 100644 --- a/public/panels/settings/settings-meta.js +++ b/public/panels/settings/settings-meta.js @@ -65,7 +65,7 @@ UI.ViewManager.registerViewExtension({ order: 0, async loadView() { const Settings = await loadSettingsModule(); - return Settings.SettingsScreen.GenericSettingsTab.instance(); + return new Settings.SettingsScreen.GenericSettingsTab(); }, }); UI.ViewManager.registerViewExtension({ @@ -77,7 +77,7 @@ UI.ViewManager.registerViewExtension({ experiment: Root.Runtime.ExperimentName.ALL, async loadView() { const Settings = await loadSettingsModule(); - return Settings.SettingsScreen.ExperimentsSettingsTab.instance(); + return new Settings.SettingsScreen.ExperimentsSettingsTab(); }, }); UI.ViewManager.registerViewExtension({ @@ -88,7 +88,7 @@ UI.ViewManager.registerViewExtension({ order: 4, async loadView() { const Settings = await loadSettingsModule(); - return Settings.FrameworkIgnoreListSettingsTab.FrameworkIgnoreListSettingsTab.instance(); + return new Settings.FrameworkIgnoreListSettingsTab.FrameworkIgnoreListSettingsTab(); }, }); UI.ViewManager.registerViewExtension({ @@ -99,7 +99,7 @@ UI.ViewManager.registerViewExtension({ order: 100, async loadView() { const Settings = await loadSettingsModule(); - return Settings.KeybindsSettingsTab.KeybindsSettingsTab.instance(); + return new Settings.KeybindsSettingsTab.KeybindsSettingsTab(); }, }); UI.ActionRegistration.registerActionExtension({ diff --git a/public/panels/settings/settings-meta.js.map b/public/panels/settings/settings-meta.js.map index 61c760bb0..81a037987 100644 --- a/public/panels/settings/settings-meta.js.map +++ b/public/panels/settings/settings-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"settings-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/settings/settings-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAC7B,OAAO,+BAA+B,CAAC;AAEvC,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAC/B;;OAEG;IACH,eAAe,EAAE,kBAAkB;IACnC;;OAEG;IACH,eAAe,EAAE,kBAAkB;IACnC;;OAEG;IACH,cAAc,EAAE,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,aAAa,EAAE,eAAe;CAC/B,CAAC;AAEF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;AACxF,MAAM,cAAc,GAAG,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,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC5C,OAAO,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;IAC3D,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC/B,YAAY;QACV,OAAO;YACL,MAAM,CAAC,QAAQ,CAAC,OAAO;YACvB,IAAI,CAAC,OAAO,CAAC,UAAU;SACxB,CAAC;IACJ,CAAC;IACD,WAAW,EAAE,SAAS;IACtB,KAAK,CAAC,YAAY;QAChB,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC5C,OAAO,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;IAChD,CAAC;CACF,CAAC,CAAC;AAEH,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC;IAC1B,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,gBAAgB;IACtD,QAAQ,EAAE,oBAAoB;IAC9B,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAEH,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC;IAC1B,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,sBAAsB;IAC5D,QAAQ,EAAE,wBAAwB;IAClC,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport './emulation/emulation-meta.js';\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Root from '../../core/root/root.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Settings from './settings.js';\n\nconst UIStrings = {\n /**\n *@description Text for keyboard shortcuts\n */\n shortcuts: 'Shortcuts',\n /**\n *@description Text in Settings Screen of the Settings\n */\n preferences: 'Preferences',\n /**\n *@description Text in Settings Screen of the Settings\n */\n experiments: 'Experiments',\n /**\n *@description Title of Ignore List settings\n */\n ignoreList: 'Ignore List',\n /**\n *@description Command for showing the keyboard shortcuts in Settings\n */\n showShortcuts: 'Show Shortcuts',\n /**\n *@description Command for showing the preference tab in the Settings Screen\n */\n showPreferences: 'Show Preferences',\n /**\n *@description Command for showing the experiments tab in the Settings Screen\n */\n showExperiments: 'Show Experiments',\n /**\n *@description Command for showing the Ignore List settings\n */\n showIgnoreList: 'Show Ignore List',\n /**\n *@description Name of the Settings view\n */\n settings: 'Settings',\n /**\n *@description Text for the documentation of something\n */\n documentation: 'Documentation',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/settings-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedSettingsModule: (typeof Settings|undefined);\n\nasync function loadSettingsModule(): Promise {\n if (!loadedSettingsModule) {\n loadedSettingsModule = await import('./settings.js');\n }\n return loadedSettingsModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'preferences',\n title: i18nLazyString(UIStrings.preferences),\n commandPrompt: i18nLazyString(UIStrings.showPreferences),\n order: 0,\n async loadView() {\n const Settings = await loadSettingsModule();\n return Settings.SettingsScreen.GenericSettingsTab.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'experiments',\n title: i18nLazyString(UIStrings.experiments),\n commandPrompt: i18nLazyString(UIStrings.showExperiments),\n order: 3,\n experiment: Root.Runtime.ExperimentName.ALL,\n async loadView() {\n const Settings = await loadSettingsModule();\n return Settings.SettingsScreen.ExperimentsSettingsTab.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'blackbox',\n title: i18nLazyString(UIStrings.ignoreList),\n commandPrompt: i18nLazyString(UIStrings.showIgnoreList),\n order: 4,\n async loadView() {\n const Settings = await loadSettingsModule();\n return Settings.FrameworkIgnoreListSettingsTab.FrameworkIgnoreListSettingsTab.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'keybinds',\n title: i18nLazyString(UIStrings.shortcuts),\n commandPrompt: i18nLazyString(UIStrings.showShortcuts),\n order: 100,\n async loadView() {\n const Settings = await loadSettingsModule();\n return Settings.KeybindsSettingsTab.KeybindsSettingsTab.instance();\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SETTINGS,\n actionId: 'settings.show',\n title: i18nLazyString(UIStrings.settings),\n async loadActionDelegate() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.ActionDelegate();\n },\n iconClass: UI.ActionRegistration.IconClass.LARGEICON_SETTINGS_GEAR,\n bindings: [\n {\n shortcut: 'F1',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n shortcut: 'Shift+?',\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+,',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+,',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SETTINGS,\n actionId: 'settings.documentation',\n title: i18nLazyString(UIStrings.documentation),\n async loadActionDelegate() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.ActionDelegate();\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SETTINGS,\n actionId: 'settings.shortcuts',\n title: i18nLazyString(UIStrings.showShortcuts),\n async loadActionDelegate() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.ActionDelegate();\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+K Ctrl+S',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+K Meta+S',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n category: UI.ViewManager.ViewLocationCategory.SETTINGS,\n async loadResolver() {\n const Settings = await loadSettingsModule();\n return Settings.SettingsScreen.SettingsScreen.instance();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Common.Settings.Setting,\n Root.Runtime.Experiment,\n ];\n },\n destination: undefined,\n async loadRevealer() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.Revealer();\n },\n});\n\nUI.ContextMenu.registerItem({\n location: UI.ContextMenu.ItemLocation.MAIN_MENU_FOOTER,\n actionId: 'settings.shortcuts',\n order: undefined,\n});\n\nUI.ContextMenu.registerItem({\n location: UI.ContextMenu.ItemLocation.MAIN_MENU_HELP_DEFAULT,\n actionId: 'settings.documentation',\n order: undefined,\n});\n"]} \ No newline at end of file +{"version":3,"file":"settings-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/settings/settings-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAC7B,OAAO,+BAA+B,CAAC;AAEvC,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,WAAW,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AAK,EAAE,SAAS;CACjB,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport './emulation/emulation-meta.js';\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Root from '../../core/root/root.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Settings from './settings.js';\n\nconst UIStrings = {\n /**\n *@description Text for keyboard shortcuts\n */\n shortcuts: 'Shortcuts',\n /**\n *@description Text in Settings Screen of the Settings\n */\n preferences: 'Preferences',\n /**\n *@description Text in Settings Screen of the Settings\n */\n experiments: 'Experiments',\n /**\n *@description Title of Ignore List settings\n */\n ignoreList: 'Ignore List',\n /**\n *@description Command for showing the keyboard shortcuts in Settings\n */\n showShortcuts: 'Show Shortcuts',\n /**\n *@description Command for showing the preference tab in the Settings Screen\n */\n showPreferences: 'Show Preferences',\n /**\n *@description Command for showing the experiments tab in the Settings Screen\n */\n showExperiments: 'Show Experiments',\n /**\n *@description Command for showing the Ignore List settings\n */\n showIgnoreList: 'Show Ignore List',\n /**\n *@description Name of the Settings view\n */\n settings: 'Settings',\n /**\n *@description Text for the documentation of something\n */\n documentation: 'Documentation',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/settings/settings-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedSettingsModule: (typeof Settings|undefined);\n\nasync function loadSettingsModule(): Promise {\n if (!loadedSettingsModule) {\n loadedSettingsModule = await import('./settings.js');\n }\n return loadedSettingsModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'preferences',\n title: i18nLazyString(UIStrings.preferences),\n commandPrompt: i18nLazyString(UIStrings.showPreferences),\n order: 0,\n async loadView() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.GenericSettingsTab();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'experiments',\n title: i18nLazyString(UIStrings.experiments),\n commandPrompt: i18nLazyString(UIStrings.showExperiments),\n order: 3,\n experiment: Root.Runtime.ExperimentName.ALL,\n async loadView() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.ExperimentsSettingsTab();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'blackbox',\n title: i18nLazyString(UIStrings.ignoreList),\n commandPrompt: i18nLazyString(UIStrings.showIgnoreList),\n order: 4,\n async loadView() {\n const Settings = await loadSettingsModule();\n return new Settings.FrameworkIgnoreListSettingsTab.FrameworkIgnoreListSettingsTab();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n id: 'keybinds',\n title: i18nLazyString(UIStrings.shortcuts),\n commandPrompt: i18nLazyString(UIStrings.showShortcuts),\n order: 100,\n async loadView() {\n const Settings = await loadSettingsModule();\n return new Settings.KeybindsSettingsTab.KeybindsSettingsTab();\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SETTINGS,\n actionId: 'settings.show',\n title: i18nLazyString(UIStrings.settings),\n async loadActionDelegate() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.ActionDelegate();\n },\n iconClass: UI.ActionRegistration.IconClass.LARGEICON_SETTINGS_GEAR,\n bindings: [\n {\n shortcut: 'F1',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n shortcut: 'Shift+?',\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+,',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+,',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SETTINGS,\n actionId: 'settings.documentation',\n title: i18nLazyString(UIStrings.documentation),\n async loadActionDelegate() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.ActionDelegate();\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SETTINGS,\n actionId: 'settings.shortcuts',\n title: i18nLazyString(UIStrings.showShortcuts),\n async loadActionDelegate() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.ActionDelegate();\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+K Ctrl+S',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+K Meta+S',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,\n category: UI.ViewManager.ViewLocationCategory.SETTINGS,\n async loadResolver() {\n const Settings = await loadSettingsModule();\n return Settings.SettingsScreen.SettingsScreen.instance();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Common.Settings.Setting,\n Root.Runtime.Experiment,\n ];\n },\n destination: undefined,\n async loadRevealer() {\n const Settings = await loadSettingsModule();\n return new Settings.SettingsScreen.Revealer();\n },\n});\n\nUI.ContextMenu.registerItem({\n location: UI.ContextMenu.ItemLocation.MAIN_MENU_FOOTER,\n actionId: 'settings.shortcuts',\n order: undefined,\n});\n\nUI.ContextMenu.registerItem({\n location: UI.ContextMenu.ItemLocation.MAIN_MENU_HELP_DEFAULT,\n actionId: 'settings.documentation',\n order: undefined,\n});\n"]} \ No newline at end of file diff --git a/public/panels/sources/DebuggerPlugin.js b/public/panels/sources/DebuggerPlugin.js index 5a29ee0be..eff7fb165 100644 --- a/public/panels/sources/DebuggerPlugin.js +++ b/public/panels/sources/DebuggerPlugin.js @@ -43,9 +43,9 @@ import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.j import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js'; import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js'; import * as UI from '../../ui/legacy/legacy.js'; -import * as SourceComponents from './components/components.js'; import { AddDebugInfoURLDialog } from './AddSourceMapURLDialog.js'; import { BreakpointEditDialog } from './BreakpointEditDialog.js'; +import * as SourceComponents from './components/components.js'; import { Plugin } from './Plugin.js'; import { SourcesPanel } from './SourcesPanel.js'; const { EMPTY_BREAKPOINT_CONDITION, NEVER_PAUSE_HERE_CONDITION } = Breakpoints.BreakpointManager; @@ -195,8 +195,6 @@ export class DebuggerPlugin extends Plugin { // content is edited and later saved, these are used as a source of // truth for re-creating the breakpoints. breakpoints = []; - // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration) - // eslint-disable-next-line @typescript-eslint/no-explicit-any continueToLocations = null; liveLocationPool; // When the editor content is changed by the user, this becomes @@ -311,7 +309,7 @@ export class DebuggerPlugin extends Plugin { }, }); } - #openEditDialogForLine(line) { + #openEditDialogForLine(line, isLogpoint) { if (this.muted) { return; } @@ -319,7 +317,10 @@ export class DebuggerPlugin extends Plugin { this.activeBreakpointDialog.finishEditing(false, ''); } const breakpoint = this.breakpoints.find(b => b.position >= line.from && b.position <= line.to)?.breakpoint || null; - this.editBreakpointCondition({ line, breakpoint, location: null, isLogpoint: breakpoint?.isLogpoint() }); + if (isLogpoint === undefined && breakpoint !== null) { + isLogpoint = breakpoint.isLogpoint(); + } + this.editBreakpointCondition({ line, breakpoint, location: null, isLogpoint }); } editorInitialized(editor) { // Start asynchronous actions that require access to the editor @@ -1385,11 +1386,8 @@ export class DebuggerPlugin extends Plugin { return false; } if (event.metaKey || event.ctrlKey) { - if (event.shiftKey) { - return false; - } Host.userMetrics.breakpointEditDialogRevealedFrom(6 /* Host.UserMetrics.BreakpointEditDialogRevealedFrom.MouseClick */); - this.#openEditDialogForLine(line); + this.#openEditDialogForLine(line, event.shiftKey); return true; } void this.toggleBreakpoint(line, event.shiftKey); diff --git a/public/panels/sources/DebuggerPlugin.js.map b/public/panels/sources/DebuggerPlugin.js.map index 17916c88e..01aa9ddf7 100644 --- a/public/panels/sources/DebuggerPlugin.js.map +++ b/public/panels/sources/DebuggerPlugin.js.map @@ -1 +1 @@ -{"version":3,"file":"DebuggerPlugin.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/DebuggerPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qDAAqD,CAAC;AACvF,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,UAAU,MAAM,sDAAsD,CAAC;AAEnF,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,WAAW,MAAM,yDAAyD,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,gBAAgB,M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,EAAE,8BAA8B;QAC/C,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,MAAM;QAClB,qBAAqB,EAAE;YACrB,eAAe,EAAE,aAAa;YAC9B,OAAO,EAAE,KAAK;SACf;KACF;CACF,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,KAAa,EAAE,OAAe;IACrD,OAAO,qIACH,kBAAkB,CAAC,KAAK,CAAC,aAAa,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,CAAC;AAC7F,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa,EAAE,OAAe,EAAE,UAAkB,GAAG;IAClF,OAAO,kRACH,kBAAkB,CACd,KAAK,CAAC,aAAa,kBAAkB,CAAC,OAAO,CAAC,mBAAmB,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC;AACpH,CAAC;AAED,SAAS,gCAAgC,CAAC,KAAa,EAAE,OAAe,EAAE,UAAkB,GAAG;IAC7F,OAAO,oRACH,kBAAkB,CAAC,KAAK,CAAC,mBAAmB,kBAAkB,CAAC,OAAO,CAAC,aACvE,kBAAkB,CACd,OAAO,CAAC,i/BAAi/B,CAAC;AACpgC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa,EAAE,OAAe,EAAE,UAAkB,GAAG;IAChF,OAAO,kRACH,kBAAkB,CAAC,KAAK,CAAC,aAAa,kBAAkB,CAAC,OAAO,CAAC,mBACjE,kBAAkB,CACd,OAAO,CAAC,iGAAiG,CAAC;AACpH,CAAC","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Breakpoints from '../../models/breakpoints/breakpoints.js';\nimport * as Formatter from '../../models/formatter/formatter.js';\nimport * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';\nimport type * as TextEditor from '../../ui/components/text_editor/text_editor.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as SourceComponents from './components/components.js';\n\nimport {AddDebugInfoURLDialog} from './AddSourceMapURLDialog.js';\nimport {BreakpointEditDialog, type BreakpointEditDialogResult} from './BreakpointEditDialog.js';\nimport {Plugin} from './Plugin.js';\nimport {SourcesPanel} from './SourcesPanel.js';\n\nconst {EMPTY_BREAKPOINT_CONDITION, NEVER_PAUSE_HERE_CONDITION} = Breakpoints.BreakpointManager;\n\nconst UIStrings = {\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n thisScriptIsOnTheDebuggersIgnore: 'This script is on the debugger\\'s ignore list',\n /**\n *@description Text to stop preventing the debugger from stepping into library code\n */\n removeFromIgnoreList: 'Remove from ignore list',\n /**\n *@description Text of a button in the Sources panel Debugger Plugin to configure ignore listing in Settings\n */\n configure: 'Configure',\n /**\n *@description Text to add a breakpoint\n */\n addBreakpoint: 'Add breakpoint',\n /**\n *@description A context menu item in the Debugger Plugin of the Sources panel\n */\n addConditionalBreakpoint: 'Add conditional breakpoint…',\n /**\n *@description A context menu item in the Debugger Plugin of the Sources panel\n */\n addLogpoint: 'Add logpoint…',\n /**\n *@description A context menu item in the Debugger Plugin of the Sources panel\n */\n neverPauseHere: 'Never pause here',\n /**\n *@description Context menu command to delete/remove a breakpoint that the user\n *has set. One line of code can have multiple breakpoints. Always >= 1 breakpoint.\n */\n removeBreakpoint: '{n, plural, =1 {Remove breakpoint} other {Remove all breakpoints in line}}',\n /**\n *@description A context menu item in the Debugger Plugin of the Sources panel\n */\n editBreakpoint: 'Edit breakpoint…',\n /**\n *@description Context menu command to disable (but not delete) a breakpoint\n *that the user has set. One line of code can have multiple breakpoints. Always\n *>= 1 breakpoint.\n */\n disableBreakpoint: '{n, plural, =1 {Disable breakpoint} other {Disable all breakpoints in line}}',\n /**\n *@description Context menu command to enable a breakpoint that the user has\n *set. One line of code can have multiple breakpoints. Always >= 1 breakpoint.\n */\n enableBreakpoint: '{n, plural, =1 {Enable breakpoint} other {Enable all breakpoints in line}}',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n addSourceMap: 'Add source map…',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n addWasmDebugInfo: 'Add DWARF debug info…',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n sourceMapLoaded: 'Source map loaded.',\n /**\n *@description Title of the Filtered List WidgetProvider of Quick Open\n *@example {Ctrl+P Ctrl+O} PH1\n */\n associatedFilesAreAvailable: 'Associated files are available via file tree or {PH1}.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n associatedFilesShouldBeAdded:\n 'Associated files should be added to the file tree. You can debug these resolved source files as regular JavaScript files.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n theDebuggerWillSkipStepping: 'The debugger will skip stepping through this script, and will not stop on exceptions.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n sourceMapSkipped: 'Source map skipped for this file.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n sourceMapFailed: 'Source map failed to load.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n debuggingPowerReduced: 'DevTools can\\'t show authored sources, but you can debug the deployed code.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n reloadForSourceMap: 'To enable again, make sure the file isn\\'t on the ignore list and reload.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n *@example {http://site.com/lib.js.map} PH1\n *@example {HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME} PH2\n */\n errorLoading: 'Error loading url {PH1}: {PH2}',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n ignoreScript: 'Ignore this file',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n ignoreContentScripts: 'Ignore extension scripts',\n /**\n *@description Error message that is displayed in UI when a file needed for debugging information for a call frame is missing\n *@example {src/myapp.debug.wasm.dwp} PH1\n */\n debugFileNotFound: 'Failed to load debug file \"{PH1}\".',\n /**\n *@description Error message that is displayed when no debug info could be loaded\n *@example {app.wasm} PH1\n */\n debugInfoNotFound: 'Failed to load any debug info for {PH1}.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/DebuggerPlugin.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// Note: Line numbers are passed around as zero-based numbers (though\n// CodeMirror numbers them from 1).\n\n// Don't scan for possible breakpoints on a line beyond this position;\nconst MAX_POSSIBLE_BREAKPOINT_LINE = 2500;\n\n// Limits on inline variable view computation.\nconst MAX_CODE_SIZE_FOR_VALUE_DECORATIONS = 10000;\nconst MAX_PROPERTIES_IN_SCOPE_FOR_VALUE_DECORATIONS = 500;\n\ntype BreakpointDescription = {\n position: number,\n breakpoint: Breakpoints.BreakpointManager.Breakpoint,\n};\n\ntype BreakpointEditRequest = {\n line: CodeMirror.Line,\n breakpoint: Breakpoints.BreakpointManager.Breakpoint|null,\n location: {lineNumber: number, columnNumber: number}|null,\n isLogpoint?: boolean,\n};\n\nconst debuggerPluginForUISourceCode = new Map();\n\nexport class DebuggerPlugin extends Plugin {\n private editor: TextEditor.TextEditor.TextEditor|undefined = undefined;\n // Set if the debugger is stopped on a breakpoint in this file\n private executionLocation: Workspace.UISourceCode.UILocation|null = null;\n // Track state of the control key because holding it makes debugger\n // target locations show up in the editor\n private controlDown: boolean = false;\n private controlTimeout: number|undefined = undefined;\n private sourceMapInfobar: UI.Infobar.Infobar|null = null;\n private readonly scriptsPanel: SourcesPanel;\n private readonly breakpointManager: Breakpoints.BreakpointManager.BreakpointManager;\n // Manages pop-overs shown when the debugger is active and the user\n // hovers over an expression\n private popoverHelper: UI.PopoverHelper.PopoverHelper|null = null;\n private scriptFileForDebuggerModel:\n Map;\n // The current set of breakpoints for this file. The locations in\n // here are kept in sync with their editor position. When a file's\n // content is edited and later saved, these are used as a source of\n // truth for re-creating the breakpoints.\n private breakpoints: BreakpointDescription[] = [];\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private continueToLocations: {from: number, to: number, async: boolean, click: () => void}[]|null = null;\n private readonly liveLocationPool: Bindings.LiveLocation.LiveLocationPool;\n // When the editor content is changed by the user, this becomes\n // true. When the plugin is muted, breakpoints show up as disabled\n // and can't be manipulated. It is cleared again when the content is\n // saved.\n private muted: boolean;\n // If the plugin is initialized in muted state, we cannot correlated\n // breakpoint position in the breakpoint manager with editor\n // locations, so breakpoint manipulation is permanently disabled.\n private initializedMuted: boolean;\n private ignoreListInfobar: UI.Infobar.Infobar|null;\n private refreshBreakpointsTimeout: undefined|number = undefined;\n private activeBreakpointDialog: BreakpointEditDialog|null = null;\n #activeBreakpointEditRequest?: BreakpointEditRequest = undefined;\n #scheduledFinishingActiveDialog = false;\n private missingDebugInfoBar: UI.Infobar.Infobar|null = null;\n #sourcesPanelDebuggedMetricsRecorded = false;\n private readonly loader: SDK.PageResourceLoader.PageResourceLoader;\n\n private readonly ignoreListCallback: () => void;\n\n constructor(\n uiSourceCode: Workspace.UISourceCode.UISourceCode,\n private readonly transformer: SourceFrame.SourceFrame.Transformer) {\n super(uiSourceCode);\n\n debuggerPluginForUISourceCode.set(uiSourceCode, this);\n\n this.scriptsPanel = SourcesPanel.instance();\n this.breakpointManager = Breakpoints.BreakpointManager.BreakpointManager.instance();\n\n this.breakpointManager.addEventListener(\n Breakpoints.BreakpointManager.Events.BreakpointAdded, this.breakpointChange, this);\n this.breakpointManager.addEventListener(\n Breakpoints.BreakpointManager.Events.BreakpointRemoved, this.breakpointChange, this);\n\n this.uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.workingCopyChanged, this);\n this.uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this);\n\n this.scriptFileForDebuggerModel = new Map();\n\n this.loader = SDK.PageResourceLoader.PageResourceLoader.instance();\n this.loader.addEventListener(\n SDK.PageResourceLoader.Events.Update, this.showSourceMapInfobarIfNeeded.bind(this), this);\n\n this.ignoreListCallback = this.showIgnoreListInfobarIfNeeded.bind(this);\n Bindings.IgnoreListManager.IgnoreListManager.instance().addChangeListener(this.ignoreListCallback);\n\n UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);\n this.liveLocationPool = new Bindings.LiveLocation.LiveLocationPool();\n\n this.updateScriptFiles();\n\n this.muted = this.uiSourceCode.isDirty();\n this.initializedMuted = this.muted;\n\n this.ignoreListInfobar = null;\n this.showIgnoreListInfobarIfNeeded();\n for (const scriptFile of this.scriptFileForDebuggerModel.values()) {\n scriptFile.checkMapping();\n }\n }\n\n override editorExtension(): CodeMirror.Extension {\n // Kludge to hook editor keyboard events into the ShortcutRegistry\n // system.\n const handlers = this.shortcutHandlers();\n\n return [\n CodeMirror.EditorView.updateListener.of(update => this.onEditorUpdate(update)),\n CodeMirror.EditorView.domEventHandlers({\n keydown: (event): boolean => {\n if (this.onKeyDown(event)) {\n return true;\n }\n handlers(event);\n return event.defaultPrevented;\n },\n keyup: event => this.onKeyUp(event),\n mousemove: event => this.onMouseMove(event),\n mousedown: event => this.onMouseDown(event),\n focusout: event => this.onBlur(event),\n wheel: event => this.onWheel(event),\n }),\n CodeMirror.lineNumbers({\n domEventHandlers: {\n mousedown: (view, block, event) =>\n this.handleGutterClick(view.state.doc.lineAt(block.from), event as MouseEvent),\n },\n }),\n infobarState,\n breakpointMarkers,\n CodeMirror.Prec.highest(executionLine.field),\n CodeMirror.Prec.lowest(continueToMarkers.field),\n markIfContinueTo,\n valueDecorations.field,\n CodeMirror.Prec.lowest(evalExpression.field),\n theme,\n this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Debugger ?\n CodeMirror.EditorView.editorAttributes.of({class: 'source-frame-debugger-script'}) :\n [],\n ];\n }\n\n private shortcutHandlers(): (event: KeyboardEvent) => void {\n const selectionLine = (editor: TextEditor.TextEditor.TextEditor): CodeMirror.Line => {\n return editor.state.doc.lineAt(editor.state.selection.main.head);\n };\n\n return UI.ShortcutRegistry.ShortcutRegistry.instance().getShortcutListener({\n 'debugger.toggle-breakpoint': async(): Promise => {\n if (this.muted || !this.editor) {\n return false;\n }\n await this.toggleBreakpoint(selectionLine(this.editor), false);\n return true;\n },\n 'debugger.toggle-breakpoint-enabled': async(): Promise => {\n if (this.muted || !this.editor) {\n return false;\n }\n await this.toggleBreakpoint(selectionLine(this.editor), true);\n return true;\n },\n 'debugger.breakpoint-input-window': async(): Promise => {\n if (this.muted || !this.editor) {\n return false;\n }\n const line = selectionLine(this.editor);\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.KeyboardShortcut);\n\n this.#openEditDialogForLine(line);\n return true;\n },\n });\n }\n\n #openEditDialogForLine(line: CodeMirror.Line): void {\n if (this.muted) {\n return;\n }\n if (this.activeBreakpointDialog) {\n this.activeBreakpointDialog.finishEditing(false, '');\n }\n const breakpoint = this.breakpoints.find(b => b.position >= line.from && b.position <= line.to)?.breakpoint || null;\n this.editBreakpointCondition({line, breakpoint, location: null, isLogpoint: breakpoint?.isLogpoint()});\n }\n\n override editorInitialized(editor: TextEditor.TextEditor.TextEditor): void {\n // Start asynchronous actions that require access to the editor\n // instance\n this.editor = editor;\n computeNonBreakableLines(editor.state, this.transformer, this.uiSourceCode).then(linePositions => {\n if (linePositions.length) {\n editor.dispatch({effects: SourceFrame.SourceFrame.addNonBreakableLines.of(linePositions)});\n }\n }, console.error);\n if (this.ignoreListInfobar) {\n this.attachInfobar(this.ignoreListInfobar);\n }\n if (this.missingDebugInfoBar) {\n this.attachInfobar(this.missingDebugInfoBar);\n }\n if (this.sourceMapInfobar) {\n this.attachInfobar(this.sourceMapInfobar);\n }\n if (!this.muted) {\n void this.refreshBreakpoints();\n }\n void this.callFrameChanged();\n\n this.popoverHelper?.dispose();\n this.popoverHelper = new UI.PopoverHelper.PopoverHelper(editor, this.getPopoverRequest.bind(this));\n this.popoverHelper.setDisableOnClick(true);\n this.popoverHelper.setTimeout(250, 250);\n this.popoverHelper.setHasPadding(true);\n }\n\n static override accepts(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {\n return uiSourceCode.contentType().hasScripts();\n }\n\n private showIgnoreListInfobarIfNeeded(): void {\n const uiSourceCode = this.uiSourceCode;\n if (!uiSourceCode.contentType().hasScripts()) {\n return;\n }\n\n if (!Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n uiSourceCode)) {\n this.hideIgnoreListInfobar();\n return;\n }\n\n if (this.ignoreListInfobar) {\n this.ignoreListInfobar.dispose();\n }\n\n function unIgnoreList(): void {\n Bindings.IgnoreListManager.IgnoreListManager.instance().unIgnoreListUISourceCode(uiSourceCode);\n }\n\n const infobar =\n new UI.Infobar.Infobar(UI.Infobar.Type.Warning, i18nString(UIStrings.thisScriptIsOnTheDebuggersIgnore), [\n {text: i18nString(UIStrings.removeFromIgnoreList), highlight: false, delegate: unIgnoreList, dismiss: true},\n {\n text: i18nString(UIStrings.configure),\n highlight: false,\n delegate:\n UI.ViewManager.ViewManager.instance().showView.bind(UI.ViewManager.ViewManager.instance(), 'blackbox'),\n dismiss: false,\n },\n ]);\n this.ignoreListInfobar = infobar;\n infobar.setCloseCallback(() => this.removeInfobar(this.ignoreListInfobar));\n\n infobar.createDetailsRowMessage(i18nString(UIStrings.theDebuggerWillSkipStepping));\n\n this.attachInfobar(this.ignoreListInfobar);\n }\n\n attachInfobar(bar: UI.Infobar.Infobar): void {\n if (this.editor) {\n this.editor.dispatch({effects: addInfobar.of(bar)});\n }\n }\n\n removeInfobar(bar: UI.Infobar.Infobar|null): void {\n if (this.editor && bar) {\n this.editor.dispatch({effects: removeInfobar.of(bar)});\n }\n }\n\n private hideIgnoreListInfobar(): void {\n if (!this.ignoreListInfobar) {\n return;\n }\n this.ignoreListInfobar.dispose();\n this.ignoreListInfobar = null;\n }\n\n override willHide(): void {\n this.popoverHelper?.hidePopover();\n }\n\n editBreakpointLocation({breakpoint, uiLocation}: Breakpoints.BreakpointManager.BreakpointLocation): void {\n const {lineNumber} = this.transformer.uiLocationToEditorLocation(uiLocation.lineNumber, uiLocation.columnNumber);\n const line = this.editor?.state.doc.line(lineNumber + 1);\n if (!line) {\n return;\n }\n this.editBreakpointCondition({line, breakpoint, location: null, isLogpoint: breakpoint.isLogpoint()});\n }\n\n override populateLineGutterContextMenu(contextMenu: UI.ContextMenu.ContextMenu, editorLineNumber: number): void {\n const uiLocation = new Workspace.UISourceCode.UILocation(this.uiSourceCode, editorLineNumber, 0);\n this.scriptsPanel.appendUILocationItems(contextMenu, uiLocation);\n if (this.muted || !this.editor) {\n return;\n }\n const line = this.editor.state.doc.line(editorLineNumber + 1);\n const breakpoints = this.lineBreakpoints(line);\n const supportsConditionalBreakpoints =\n Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().supportsConditionalBreakpoints(\n this.uiSourceCode);\n if (!breakpoints.length) {\n if (this.editor && SourceFrame.SourceFrame.isBreakableLine(this.editor.state, line)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.addBreakpoint),\n this.createNewBreakpoint.bind(\n this, line, EMPTY_BREAKPOINT_CONDITION, /* enabled */ true, /* isLogpoint */ false),\n {jslogContext: 'add-breakpoint'});\n if (supportsConditionalBreakpoints) {\n contextMenu.debugSection().appendItem(i18nString(UIStrings.addConditionalBreakpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.LineGutterContextMenu);\n this.editBreakpointCondition({line, breakpoint: null, location: null, isLogpoint: false});\n }, {jslogContext: 'add-cnd-breakpoint'});\n contextMenu.debugSection().appendItem(i18nString(UIStrings.addLogpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.LineGutterContextMenu);\n this.editBreakpointCondition({line, breakpoint: null, location: null, isLogpoint: true});\n }, {jslogContext: 'add-logpoint'});\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.neverPauseHere),\n this.createNewBreakpoint.bind(\n this, line, NEVER_PAUSE_HERE_CONDITION, /* enabled */ true, /* isLogpoint */ false),\n {jslogContext: 'never-pause-here'});\n }\n }\n } else {\n const removeTitle = i18nString(UIStrings.removeBreakpoint, {n: breakpoints.length});\n contextMenu.debugSection().appendItem(\n removeTitle, () => breakpoints.forEach(breakpoint => {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.BreakpointRemovedFromGutterContextMenu);\n void breakpoint.remove(false);\n }),\n {jslogContext: 'remove-breakpoint'});\n if (breakpoints.length === 1 && supportsConditionalBreakpoints) {\n // Editing breakpoints only make sense for conditional breakpoints\n // and logpoints and both are currently only available for JavaScript\n // debugging.\n contextMenu.debugSection().appendItem(i18nString(UIStrings.editBreakpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.BreakpointMarkerContextMenu);\n this.editBreakpointCondition({line, breakpoint: breakpoints[0], location: null});\n }, {jslogContext: 'edit-breakpoint'});\n }\n const hasEnabled = breakpoints.some(breakpoint => breakpoint.enabled());\n if (hasEnabled) {\n const title = i18nString(UIStrings.disableBreakpoint, {n: breakpoints.length});\n contextMenu.debugSection().appendItem(\n title, () => breakpoints.forEach(breakpoint => breakpoint.setEnabled(false)),\n {jslogContext: 'enable-breakpoint'});\n }\n const hasDisabled = breakpoints.some(breakpoint => !breakpoint.enabled());\n if (hasDisabled) {\n const title = i18nString(UIStrings.enableBreakpoint, {n: breakpoints.length});\n contextMenu.debugSection().appendItem(\n title, () => breakpoints.forEach(breakpoint => breakpoint.setEnabled(true)),\n {jslogContext: 'disable-breakpoint'});\n }\n }\n }\n\n override populateTextAreaContextMenu(contextMenu: UI.ContextMenu.ContextMenu): void {\n function addSourceMapURL(scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile): void {\n const dialog =\n AddDebugInfoURLDialog.createAddSourceMapURLDialog(addSourceMapURLDialogCallback.bind(null, scriptFile));\n dialog.show();\n }\n\n function addSourceMapURLDialogCallback(\n scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile, url: Platform.DevToolsPath.UrlString): void {\n if (!url) {\n return;\n }\n scriptFile.addSourceMapURL(url);\n }\n\n function addDebugInfoURL(scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile): void {\n const dialog =\n AddDebugInfoURLDialog.createAddDWARFSymbolsURLDialog(addDebugInfoURLDialogCallback.bind(null, scriptFile));\n dialog.show();\n }\n\n function addDebugInfoURLDialogCallback(\n scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile, url: Platform.DevToolsPath.UrlString): void {\n if (!url) {\n return;\n }\n scriptFile.addDebugInfoURL(url);\n }\n\n if (this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Network &&\n Common.Settings.Settings.instance().moduleSetting('jsSourceMapsEnabled').get() &&\n !Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(this.uiSourceCode.url())) {\n if (this.scriptFileForDebuggerModel.size) {\n const scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile =\n this.scriptFileForDebuggerModel.values().next().value;\n const addSourceMapURLLabel = i18nString(UIStrings.addSourceMap);\n contextMenu.debugSection().appendItem(\n addSourceMapURLLabel, addSourceMapURL.bind(null, scriptFile), {jslogContext: 'add-source-map'});\n if (scriptFile.script?.isWasm() &&\n !Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().pluginManager.hasPluginForScript(\n scriptFile.script)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.addWasmDebugInfo), addDebugInfoURL.bind(null, scriptFile),\n {jslogContext: 'add-wasm-debug-info'});\n }\n }\n }\n }\n\n private workingCopyChanged(): void {\n if (!this.scriptFileForDebuggerModel.size) {\n this.setMuted(this.uiSourceCode.isDirty());\n }\n }\n\n private workingCopyCommitted(): void {\n this.scriptsPanel.updateLastModificationTime();\n if (!this.scriptFileForDebuggerModel.size) {\n this.setMuted(false);\n }\n }\n\n private didMergeToVM(): void {\n if (this.consistentScripts()) {\n this.setMuted(false);\n }\n }\n\n private didDivergeFromVM(): void {\n this.setMuted(true);\n }\n\n private setMuted(value: boolean): void {\n if (this.initializedMuted) {\n return;\n }\n if (value !== this.muted) {\n this.muted = value;\n if (!value) {\n void this.restoreBreakpointsAfterEditing();\n } else if (this.editor) {\n this.editor.dispatch({effects: muteBreakpoints.of(null)});\n }\n }\n }\n\n private consistentScripts(): boolean {\n for (const scriptFile of this.scriptFileForDebuggerModel.values()) {\n if (scriptFile.hasDivergedFromVM() || scriptFile.isMergingToVM()) {\n return false;\n }\n }\n return true;\n }\n\n private isVariableIdentifier(tokenType: string): boolean {\n return tokenType === 'VariableName' || tokenType === 'VariableDefinition';\n }\n\n private isIdentifier(tokenType: string): boolean {\n return tokenType === 'VariableName' || tokenType === 'VariableDefinition' || tokenType === 'PropertyName' ||\n tokenType === 'PropertyDefinition';\n }\n\n private getPopoverRequest(event: MouseEvent): UI.PopoverHelper.PopoverRequest|null {\n if (UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {\n return null;\n }\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n const {editor} = this;\n if (!debuggerModel || !debuggerModel.isPaused() || !editor) {\n return null;\n }\n\n const selectedCallFrame =\n (UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame) as SDK.DebuggerModel.CallFrame);\n if (!selectedCallFrame) {\n return null;\n }\n\n let textPosition = editor.editor.posAtCoords(event);\n if (!textPosition) {\n return null;\n }\n const positionCoords = editor.editor.coordsAtPos(textPosition);\n if (!positionCoords || event.clientY < positionCoords.top || event.clientY > positionCoords.bottom ||\n event.clientX < positionCoords.left - 30 || event.clientX > positionCoords.right + 30) {\n return null;\n }\n if (event.clientX < positionCoords.left && textPosition > editor.state.doc.lineAt(textPosition).from) {\n textPosition -= 1;\n }\n\n const highlightRange = computePopoverHighlightRange(editor.state, this.uiSourceCode.mimeType(), textPosition);\n if (!highlightRange) {\n return null;\n }\n\n const highlightLine = editor.state.doc.lineAt(highlightRange.from);\n if (highlightRange.to > highlightLine.to) {\n return null;\n }\n\n const leftCorner = editor.editor.coordsAtPos(highlightRange.from);\n const rightCorner = editor.editor.coordsAtPos(highlightRange.to);\n if (!leftCorner || !rightCorner) {\n return null;\n }\n const box = new AnchorBox(\n leftCorner.left, leftCorner.top - 2, rightCorner.right - leftCorner.left, rightCorner.bottom - leftCorner.top);\n const evaluationText = editor.state.sliceDoc(highlightRange.from, highlightRange.to);\n\n let objectPopoverHelper: ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper|null = null;\n return {\n box,\n show: async(popover: UI.GlassPane.GlassPane): Promise => {\n let resolvedText: string = '';\n if (Root.Runtime.experiments.isEnabled('evaluateExpressionsWithSourceMaps')) {\n const nameMap = await SourceMapScopes.NamesResolver.allVariablesInCallFrame(selectedCallFrame);\n try {\n resolvedText =\n await Formatter.FormatterWorkerPool.formatterWorkerPool().javaScriptSubstitute(evaluationText, nameMap);\n } catch {\n }\n } else {\n resolvedText = await SourceMapScopes.NamesResolver.resolveExpression(\n selectedCallFrame, evaluationText, this.uiSourceCode, highlightLine.number - 1,\n highlightRange.from - highlightLine.from, highlightRange.to - highlightLine.from);\n }\n // We use side-effect free debug-evaluate when the highlighted expression contains a\n // function/method call. Otherwise we allow side-effects. The motiviation here are\n // frameworks like Vue, that heavily use proxies for caching:\n //\n // * We deem a simple property access of a proxy as deterministic so it should be\n // successful even if V8 thinks its side-effecting.\n // * Explicit function calls on the other hand must be side-effect free. The canonical\n // example is hovering over {Math.random()} which would result in a different value\n // each time the user hovers over it.\n const throwOnSideEffect = Root.Runtime.experiments.isEnabled('evaluateExpressionsWithSourceMaps') &&\n highlightRange.containsCallExpression;\n const result = await selectedCallFrame.evaluate({\n expression: resolvedText || evaluationText,\n objectGroup: 'popover',\n includeCommandLineAPI: false,\n silent: true,\n returnByValue: false,\n generatePreview: false,\n throwOnSideEffect,\n timeout: undefined,\n disableBreaks: undefined,\n replMode: undefined,\n allowUnsafeEvalBlockedByCSP: undefined,\n });\n if (!result || 'error' in result || !result.object ||\n (result.object.type === 'object' && result.object.subtype === 'error')) {\n return false;\n }\n objectPopoverHelper =\n await ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper.buildObjectPopover(result.object, popover);\n const potentiallyUpdatedCallFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!objectPopoverHelper || selectedCallFrame !== potentiallyUpdatedCallFrame) {\n debuggerModel.runtimeModel().releaseObjectGroup('popover');\n if (objectPopoverHelper) {\n objectPopoverHelper.dispose();\n }\n return false;\n }\n const decoration = CodeMirror.Decoration.set(evalExpressionMark.range(highlightRange.from, highlightRange.to));\n editor.dispatch({effects: evalExpression.update.of(decoration)});\n return true;\n },\n hide: (): void => {\n if (objectPopoverHelper) {\n objectPopoverHelper.dispose();\n }\n debuggerModel.runtimeModel().releaseObjectGroup('popover');\n editor.dispatch({effects: evalExpression.update.of(CodeMirror.Decoration.none)});\n },\n };\n }\n\n private onEditorUpdate(update: CodeMirror.ViewUpdate): void {\n if (!update.changes.empty) {\n // If the document changed, adjust known breakpoint positions\n // for that change\n for (const breakpointDesc of this.breakpoints) {\n breakpointDesc.position = update.changes.mapPos(breakpointDesc.position);\n }\n }\n }\n\n private onWheel(event: WheelEvent): void {\n if (this.executionLocation && UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {\n event.preventDefault();\n }\n }\n\n private onKeyDown(event: KeyboardEvent): boolean {\n const ctrlDown = UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event);\n if (!ctrlDown) {\n this.setControlDown(false);\n }\n if (event.key === Platform.KeyboardUtilities.ESCAPE_KEY) {\n if (this.popoverHelper && this.popoverHelper.isPopoverVisible()) {\n this.popoverHelper.hidePopover();\n event.consume();\n return true;\n }\n }\n if (ctrlDown && this.executionLocation) {\n this.setControlDown(true);\n }\n return false;\n }\n\n private onMouseMove(event: MouseEvent): void {\n if (this.executionLocation && this.controlDown &&\n UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {\n if (!this.continueToLocations) {\n void this.showContinueToLocations();\n }\n }\n }\n\n private onMouseDown(event: MouseEvent): void {\n if (!this.executionLocation || !UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {\n return;\n }\n if (!this.continueToLocations || !this.editor) {\n return;\n }\n event.consume();\n const textPosition = this.editor.editor.posAtCoords(event);\n if (textPosition === null) {\n return;\n }\n for (const {from, to, click} of this.continueToLocations) {\n if (from <= textPosition && to >= textPosition) {\n click();\n break;\n }\n }\n }\n\n private onBlur(_event: Event): void {\n this.setControlDown(false);\n }\n\n private onKeyUp(_event: KeyboardEvent): void {\n this.setControlDown(false);\n }\n\n private setControlDown(state: boolean): void {\n if (state !== this.controlDown) {\n this.controlDown = state;\n clearTimeout(this.controlTimeout);\n this.controlTimeout = undefined;\n if (state && this.executionLocation) {\n this.controlTimeout = window.setTimeout(() => {\n if (this.executionLocation && this.controlDown) {\n void this.showContinueToLocations();\n }\n }, 150);\n } else {\n this.clearContinueToLocations();\n }\n }\n }\n\n private editBreakpointCondition(breakpointEditRequest: BreakpointEditRequest): void {\n const {line, breakpoint, location, isLogpoint} = breakpointEditRequest;\n if (breakpoint?.isRemoved) {\n // This method can get called for stale breakpoints, e.g. via the revealer.\n // In that case we don't show the edit dialog as to not resurrect the breakpoint\n // unintentionally.\n return;\n }\n\n this.#scheduledFinishingActiveDialog = false;\n const isRepeatedEditRequest = this.#activeBreakpointEditRequest &&\n isSameEditRequest(this.#activeBreakpointEditRequest, breakpointEditRequest);\n if (isRepeatedEditRequest) {\n // Do not re-show the same edit dialog, instead use the already open one.\n return;\n }\n\n if (this.activeBreakpointDialog) {\n // If this a request to edit a different dialog, make sure to close the current active one\n // to avoid showing two dialogs at the same time.\n this.activeBreakpointDialog.saveAndFinish();\n }\n\n const editor = this.editor as TextEditor.TextEditor.TextEditor;\n const oldCondition = breakpoint ? breakpoint.condition() : '';\n const isLogpointForDialog = breakpoint?.isLogpoint() ?? Boolean(isLogpoint);\n const decorationElement = document.createElement('div');\n const compartment = new CodeMirror.Compartment();\n const dialog = new BreakpointEditDialog(line.number - 1, oldCondition, isLogpointForDialog, async result => {\n this.activeBreakpointDialog = null;\n this.#activeBreakpointEditRequest = undefined;\n dialog.detach();\n editor.dispatch({effects: compartment.reconfigure([])});\n if (!result.committed) {\n SourceComponents.BreakpointsView.BreakpointsSidebarController.instance().breakpointEditFinished(\n breakpoint, false);\n return;\n }\n SourceComponents.BreakpointsView.BreakpointsSidebarController.instance().breakpointEditFinished(\n breakpoint, oldCondition !== result.condition);\n recordBreakpointWithConditionAdded(result);\n if (breakpoint) {\n breakpoint.setCondition(result.condition, result.isLogpoint);\n } else if (location) {\n await this.setBreakpoint(\n location.lineNumber, location.columnNumber, result.condition, /* enabled */ true, result.isLogpoint);\n } else {\n await this.createNewBreakpoint(line, result.condition, /* enabled */ true, result.isLogpoint);\n }\n });\n editor.dispatch({\n effects: CodeMirror.StateEffect.appendConfig.of(compartment.of(CodeMirror.EditorView.decorations.of(\n CodeMirror.Decoration.set([CodeMirror.Decoration\n .widget({\n block: true, widget: new class extends CodeMirror.WidgetType {\n toDOM(): HTMLElement {\n return decorationElement;\n }\n }(),\n side: 1,\n })\n .range(line.to)])))),\n });\n dialog.element.addEventListener('blur', async event => {\n if (!event.relatedTarget ||\n (event.relatedTarget && !(event.relatedTarget as Node).isSelfOrDescendant(dialog.element))) {\n this.#scheduledFinishingActiveDialog = true;\n // Debounce repeated clicks on opening the edit dialog. Wait for a short amount of time\n // in order to see whether we get a request to open the exact same dialog again.\n setTimeout(() => {\n if (this.activeBreakpointDialog === dialog) {\n if (this.#scheduledFinishingActiveDialog) {\n dialog.saveAndFinish();\n this.#scheduledFinishingActiveDialog = false;\n } else {\n dialog.focusEditor();\n }\n }\n }, 200);\n }\n }, true);\n\n dialog.markAsExternallyManaged();\n dialog.show(decorationElement);\n dialog.focusEditor();\n this.activeBreakpointDialog = dialog;\n this.#activeBreakpointEditRequest = breakpointEditRequest;\n\n // This counts new conditional breakpoints or logpoints that are added.\n function recordBreakpointWithConditionAdded(result: BreakpointEditDialogResult): void {\n const {condition: newCondition, isLogpoint} = result;\n const isConditionalBreakpoint = newCondition.length !== 0 && !isLogpoint;\n\n const wasLogpoint = breakpoint?.isLogpoint();\n const wasConditionalBreakpoint = oldCondition && oldCondition.length !== 0 && !wasLogpoint;\n if (isLogpoint && !wasLogpoint) {\n Host.userMetrics.breakpointWithConditionAdded(Host.UserMetrics.BreakpointWithConditionAdded.Logpoint);\n } else if (isConditionalBreakpoint && !wasConditionalBreakpoint) {\n Host.userMetrics.breakpointWithConditionAdded(\n Host.UserMetrics.BreakpointWithConditionAdded.ConditionalBreakpoint);\n }\n }\n\n function isSameEditRequest(editA: BreakpointEditRequest, editB: BreakpointEditRequest): boolean {\n if (editA.line.number !== editB.line.number) {\n return false;\n }\n if (editA.line.from !== editB.line.from) {\n return false;\n }\n if (editA.line.text !== editB.line.text) {\n return false;\n }\n if (editA.breakpoint !== editB.breakpoint) {\n return false;\n }\n if (editA.location !== editB.location) {\n return false;\n }\n return editA.isLogpoint === editB.isLogpoint;\n }\n }\n\n // Show widgets with variable's values after lines that mention the\n // variables, if the debugger is paused in this file.\n private async updateValueDecorations(): Promise {\n if (!this.editor) {\n return;\n }\n const decorations = this.executionLocation ? await this.computeValueDecorations() : null;\n // After the `await` the DebuggerPlugin could have been disposed. Re-check `this.editor`.\n if (!this.editor) {\n return;\n }\n if (decorations || this.editor.state.field(valueDecorations.field).size) {\n this.editor.dispatch({effects: valueDecorations.update.of(decorations || CodeMirror.Decoration.none)});\n }\n }\n\n async #rawLocationToEditorOffset(location: SDK.DebuggerModel.Location|null, url: Platform.DevToolsPath.UrlString):\n Promise {\n const uiLocation = location &&\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(location);\n if (!uiLocation || uiLocation.uiSourceCode.url() !== url) {\n return null;\n }\n const offset = this.editor?.toOffset(\n this.transformer.uiLocationToEditorLocation(uiLocation.lineNumber, uiLocation.columnNumber));\n return offset ?? null;\n }\n\n private async computeValueDecorations(): Promise {\n if (!this.editor) {\n return null;\n }\n if (!Common.Settings.Settings.instance().moduleSetting('inlineVariableValues').get()) {\n return null;\n }\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (!executionContext) {\n return null;\n }\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n return null;\n }\n const url = this.uiSourceCode.url();\n\n const rawLocationToEditorOffset: (location: SDK.DebuggerModel.Location|null) => Promise = location =>\n this.#rawLocationToEditorOffset(location, url);\n\n const functionOffsetPromise = this.#rawLocationToEditorOffset(callFrame.functionLocation(), url);\n const executionOffsetPromise = this.#rawLocationToEditorOffset(callFrame.location(), url);\n const [functionOffset, executionOffset] = await Promise.all([functionOffsetPromise, executionOffsetPromise]);\n if (!functionOffset || !executionOffset || !this.editor) {\n return null;\n }\n\n if (functionOffset >= executionOffset || executionOffset - functionOffset > MAX_CODE_SIZE_FOR_VALUE_DECORATIONS) {\n return null;\n }\n\n const variableNames = getVariableNamesByLine(this.editor.state, functionOffset, executionOffset, executionOffset);\n if (variableNames.length === 0) {\n return null;\n }\n\n const scopeMappings = await computeScopeMappings(callFrame, rawLocationToEditorOffset);\n if (scopeMappings.length === 0) {\n return null;\n }\n\n const variablesByLine = getVariableValuesByLine(scopeMappings, variableNames);\n if (!variablesByLine || !this.editor) {\n return null;\n }\n\n const decorations: CodeMirror.Range[] = [];\n\n for (const [line, names] of variablesByLine) {\n const prevLine = variablesByLine.get(line - 1);\n let newNames = prevLine ? Array.from(names).filter(n => prevLine.get(n[0]) !== n[1]) : Array.from(names);\n if (!newNames.length) {\n continue;\n }\n if (newNames.length > 10) {\n newNames = newNames.slice(0, 10);\n }\n decorations.push(CodeMirror.Decoration.widget({widget: new ValueDecoration(newNames), side: 1})\n .range(this.editor.state.doc.line(line + 1).to));\n }\n return CodeMirror.Decoration.set(decorations, true);\n }\n\n // Highlight the locations the debugger can continue to (when\n // Control is held)\n private async showContinueToLocations(): Promise {\n this.popoverHelper?.hidePopover();\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (!executionContext || !this.editor) {\n return;\n }\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n return;\n }\n const start = callFrame.functionLocation() || callFrame.location();\n const debuggerModel = callFrame.debuggerModel;\n\n const {state} = this.editor;\n const locations = await debuggerModel.getPossibleBreakpoints(start, null, true);\n\n this.continueToLocations = [];\n let previousCallLine = -1;\n for (const location of locations.reverse()) {\n const editorLocation = this.transformer.uiLocationToEditorLocation(location.lineNumber, location.columnNumber);\n if (previousCallLine === editorLocation.lineNumber &&\n location.type !== Protocol.Debugger.BreakLocationType.Call ||\n editorLocation.lineNumber >= state.doc.lines) {\n continue;\n }\n const line = state.doc.line(editorLocation.lineNumber + 1);\n const position = Math.min(line.to, line.from + editorLocation.columnNumber);\n let syntaxNode = CodeMirror.syntaxTree(state).resolveInner(position, 1);\n if (syntaxNode.firstChild || syntaxNode.from < line.from ||\n syntaxNode.to > line.to) { // Only use leaf nodes within the line\n continue;\n }\n if (syntaxNode.name === '.') {\n const nextNode = syntaxNode.resolve(syntaxNode.to, 1);\n if (nextNode.firstChild || nextNode.from < line.from || nextNode.to > line.to) {\n continue;\n }\n syntaxNode = nextNode;\n }\n const syntaxType = syntaxNode.name;\n const validKeyword = syntaxType === 'this' || syntaxType === 'return' || syntaxType === 'new' ||\n syntaxType === 'break' || syntaxType === 'continue';\n if (!validKeyword && !this.isIdentifier(syntaxType)) {\n continue;\n }\n\n this.continueToLocations.push(\n {from: syntaxNode.from, to: syntaxNode.to, async: false, click: () => location.continueToLocation()});\n if (location.type === Protocol.Debugger.BreakLocationType.Call) {\n previousCallLine = editorLocation.lineNumber;\n }\n\n const identifierName =\n validKeyword ? '' : line.text.slice(syntaxNode.from - line.from, syntaxNode.to - line.from);\n let asyncCall: CodeMirror.SyntaxNode|null = null;\n if (identifierName === 'then' && syntaxNode.parent?.name === 'MemberExpression') {\n asyncCall = syntaxNode.parent.parent;\n } else if (\n identifierName === 'setTimeout' || identifierName === 'setInterval' || identifierName === 'postMessage') {\n asyncCall = syntaxNode.parent;\n }\n if (syntaxType === 'new') {\n const callee = syntaxNode.parent?.getChild('Expression');\n if (callee && callee.name === 'VariableName' && state.sliceDoc(callee.from, callee.to) === 'Worker') {\n asyncCall = syntaxNode.parent;\n }\n }\n if (asyncCall && (asyncCall.name === 'CallExpression' || asyncCall.name === 'NewExpression') &&\n location.type === Protocol.Debugger.BreakLocationType.Call) {\n const firstArg = asyncCall.getChild('ArgList')?.firstChild?.nextSibling;\n let highlightNode;\n if (firstArg?.name === 'VariableName') {\n highlightNode = firstArg;\n } else if (firstArg?.name === 'ArrowFunction' || firstArg?.name === 'FunctionExpression') {\n highlightNode = firstArg.firstChild;\n if (highlightNode?.name === 'async') {\n highlightNode = highlightNode.nextSibling;\n }\n }\n if (highlightNode) {\n const isCurrentPosition = this.executionLocation &&\n location.lineNumber === this.executionLocation.lineNumber &&\n location.columnNumber === this.executionLocation.columnNumber;\n this.continueToLocations.push({\n from: highlightNode.from,\n to: highlightNode.to,\n async: true,\n click: () => this.asyncStepIn(location, Boolean(isCurrentPosition)),\n });\n }\n }\n }\n const decorations = CodeMirror.Decoration.set(\n this.continueToLocations.map(loc => {\n return (loc.async ? asyncContinueToMark : continueToMark).range(loc.from, loc.to);\n }),\n true);\n this.editor.dispatch({effects: continueToMarkers.update.of(decorations)});\n }\n\n private clearContinueToLocations(): void {\n if (this.editor && this.editor.state.field(continueToMarkers.field).size) {\n this.editor.dispatch({effects: continueToMarkers.update.of(CodeMirror.Decoration.none)});\n }\n }\n\n private asyncStepIn(location: SDK.DebuggerModel.BreakLocation, isCurrentPosition: boolean): void {\n if (!isCurrentPosition) {\n location.continueToLocation(asyncStepIn);\n } else {\n asyncStepIn();\n }\n\n function asyncStepIn(): void {\n location.debuggerModel.scheduleStepIntoAsync();\n }\n }\n\n private fetchBreakpoints(): {\n position: number,\n breakpoint: Breakpoints.BreakpointManager.Breakpoint,\n }[] {\n if (!this.editor) {\n return [];\n }\n const {editor} = this;\n const breakpointLocations = this.breakpointManager.breakpointLocationsForUISourceCode(this.uiSourceCode);\n return breakpointLocations.map(({uiLocation, breakpoint}) => {\n const editorLocation =\n this.transformer.uiLocationToEditorLocation(uiLocation.lineNumber, uiLocation.columnNumber);\n return {\n position: editor.toOffset(editorLocation),\n breakpoint,\n };\n });\n }\n\n private lineBreakpoints(line: CodeMirror.Line): readonly Breakpoints.BreakpointManager.Breakpoint[] {\n return this.breakpoints.filter(b => b.position >= line.from && b.position <= line.to).map(b => b.breakpoint);\n }\n\n // Compute the decorations for existing breakpoints (both on the\n // gutter and inline in the code)\n private async computeBreakpointDecoration(state: CodeMirror.EditorState, breakpoints: BreakpointDescription[]):\n Promise {\n const decorations: CodeMirror.Range[] = [];\n const gutterMarkers: CodeMirror.Range[] = [];\n const breakpointsByLine = new Map();\n const inlineMarkersByLine =\n new Map();\n const possibleBreakpointRequests: Promise[] = [];\n const inlineMarkerPositions = new Set();\n\n const addInlineMarker =\n (linePos: number, columnNumber: number, breakpoint: Breakpoints.BreakpointManager.Breakpoint|null): void => {\n let inlineMarkers = inlineMarkersByLine.get(linePos);\n if (!inlineMarkers) {\n inlineMarkers = [];\n inlineMarkersByLine.set(linePos, inlineMarkers);\n }\n inlineMarkers.push({breakpoint, column: columnNumber});\n };\n\n for (const {position, breakpoint} of breakpoints) {\n const line = state.doc.lineAt(position);\n let forThisLine = breakpointsByLine.get(line.from);\n if (!forThisLine) {\n forThisLine = [];\n breakpointsByLine.set(line.from, forThisLine);\n }\n if (breakpoint.enabled() && forThisLine.every(b => !b.enabled())) {\n // Start a request for possible breakpoint positions on this line\n const start = this.transformer.editorLocationToUILocation(line.number - 1, 0);\n const end = this.transformer.editorLocationToUILocation(\n line.number - 1, Math.min(line.length, MAX_POSSIBLE_BREAKPOINT_LINE));\n const range = new TextUtils.TextRange.TextRange(\n start.lineNumber, start.columnNumber || 0, end.lineNumber, end.columnNumber || 0);\n possibleBreakpointRequests.push(this.breakpointManager.possibleBreakpoints(this.uiSourceCode, range)\n .then(locations => addPossibleBreakpoints(line, locations)));\n }\n forThisLine.push(breakpoint);\n if (breakpoint.enabled()) {\n inlineMarkerPositions.add(position);\n addInlineMarker(line.from, position - line.from, breakpoint);\n }\n }\n\n for (const [lineStart, lineBreakpoints] of breakpointsByLine) {\n const main = lineBreakpoints.sort(mostSpecificBreakpoint)[0];\n let gutterClass = 'cm-breakpoint';\n if (!main.enabled()) {\n gutterClass += ' cm-breakpoint-disabled';\n }\n if (!main.bound()) {\n gutterClass += ' cm-breakpoint-unbound';\n }\n if (main.isLogpoint()) {\n gutterClass += ' cm-breakpoint-logpoint';\n } else if (main.condition()) {\n gutterClass += ' cm-breakpoint-conditional';\n }\n gutterMarkers.push((new BreakpointGutterMarker(gutterClass)).range(lineStart));\n }\n\n const addPossibleBreakpoints = (line: CodeMirror.Line, locations: Workspace.UISourceCode.UILocation[]): void => {\n for (const location of locations) {\n const editorLocation = this.transformer.uiLocationToEditorLocation(location.lineNumber, location.columnNumber);\n if (editorLocation.lineNumber !== line.number - 1) {\n continue;\n }\n const position = Math.min(line.to, line.from + editorLocation.columnNumber);\n if (!inlineMarkerPositions.has(position)) {\n addInlineMarker(line.from, editorLocation.columnNumber, null);\n }\n }\n };\n\n await Promise.all(possibleBreakpointRequests);\n for (const [linePos, inlineMarkers] of inlineMarkersByLine) {\n if (inlineMarkers.length > 1) {\n for (const {column, breakpoint} of inlineMarkers) {\n const marker = new BreakpointInlineMarker(breakpoint, this);\n decorations.push(CodeMirror.Decoration.widget({widget: marker, side: -1}).range(linePos + column));\n }\n }\n }\n\n return {content: CodeMirror.Decoration.set(decorations, true), gutter: CodeMirror.RangeSet.of(gutterMarkers, true)};\n }\n\n // If, after editing, the editor is synced again (either by going\n // back to the original document or by saving), we replace any\n // breakpoints the breakpoint manager might have (which point into\n // the old file) with the breakpoints we have, which had their\n // positions tracked through the changes.\n private async restoreBreakpointsAfterEditing(): Promise {\n const {breakpoints} = this;\n const editor = this.editor as TextEditor.TextEditor.TextEditor;\n this.breakpoints = [];\n await Promise.all(breakpoints.map(async description => {\n const {breakpoint, position} = description;\n const condition = breakpoint.condition(), enabled = breakpoint.enabled(), isLogpoint = breakpoint.isLogpoint();\n await breakpoint.remove(false);\n const editorLocation = editor.toLineColumn(position);\n const uiLocation =\n this.transformer.editorLocationToUILocation(editorLocation.lineNumber, editorLocation.columnNumber);\n await this.setBreakpoint(uiLocation.lineNumber, uiLocation.columnNumber, condition, enabled, isLogpoint);\n }));\n }\n\n private async refreshBreakpoints(): Promise {\n if (this.editor) {\n this.breakpoints = this.fetchBreakpoints();\n const forBreakpoints = this.breakpoints;\n const decorations = await this.computeBreakpointDecoration(this.editor.state, forBreakpoints);\n // After the `await` we could have disposed of this DebuggerPlugin, so re-check `this.editor`.\n if (this.editor && this.breakpoints === forBreakpoints &&\n (decorations.gutter.size || this.editor.state.field(breakpointMarkers, false)?.gutter.size)) {\n this.editor.dispatch({effects: setBreakpointDeco.of(decorations)});\n }\n }\n }\n\n private breakpointChange(\n event: Common.EventTarget.EventTargetEvent): void {\n const {uiLocation} = event.data;\n if (uiLocation.uiSourceCode !== this.uiSourceCode || this.muted) {\n return;\n }\n for (const scriptFile of this.scriptFileForDebuggerModel.values()) {\n if (scriptFile.isDivergingFromVM() || scriptFile.isMergingToVM()) {\n return;\n }\n }\n // These tend to arrive in bursts, so debounce them\n window.clearTimeout(this.refreshBreakpointsTimeout);\n this.refreshBreakpointsTimeout = window.setTimeout(() => this.refreshBreakpoints(), 50);\n }\n\n onInlineBreakpointMarkerClick(event: MouseEvent, breakpoint: Breakpoints.BreakpointManager.Breakpoint|null): void {\n event.consume(true);\n if (breakpoint) {\n if (event.shiftKey) {\n breakpoint.setEnabled(!breakpoint.enabled());\n } else {\n void breakpoint.remove(false);\n }\n } else if (this.editor) {\n const editorLocation = this.editor.editor.posAtDOM(event.target as unknown as HTMLElement);\n const line = this.editor.state.doc.lineAt(editorLocation);\n const uiLocation = this.transformer.editorLocationToUILocation(line.number - 1, editorLocation - line.from);\n void this.setBreakpoint(\n uiLocation.lineNumber, uiLocation.columnNumber, EMPTY_BREAKPOINT_CONDITION, /* enabled */ true,\n /* isLogpoint */ false);\n }\n }\n\n onInlineBreakpointMarkerContextMenu(event: MouseEvent, breakpoint: Breakpoints.BreakpointManager.Breakpoint|null):\n void {\n event.consume(true);\n // If there's events coming from the editor, there must be an editor.\n const editor = this.editor as TextEditor.TextEditor.TextEditor;\n const position = editor.editor.posAtDOM(event.target as unknown as HTMLElement);\n const line = editor.state.doc.lineAt(position);\n if (!SourceFrame.SourceFrame.isBreakableLine(editor.state, line) ||\n // Editing breakpoints only make sense for conditional breakpoints\n // and logpoints.\n !Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().supportsConditionalBreakpoints(\n this.uiSourceCode)) {\n return;\n }\n const contextMenu = new UI.ContextMenu.ContextMenu(event, {jsLogContext: 'sources-inline-breakpoint'});\n if (breakpoint) {\n contextMenu.debugSection().appendItem(i18nString(UIStrings.editBreakpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.BreakpointMarkerContextMenu);\n this.editBreakpointCondition({line, breakpoint, location: null});\n }, {jslogContext: 'edit-breakpoint'});\n } else {\n const uiLocation = this.transformer.editorLocationToUILocation(line.number - 1, position - line.from);\n contextMenu.debugSection().appendItem(i18nString(UIStrings.addConditionalBreakpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.BreakpointMarkerContextMenu);\n this.editBreakpointCondition({line, breakpoint: null, location: uiLocation, isLogpoint: false});\n }, {jslogContext: 'add-cnd-breakpoint'});\n contextMenu.debugSection().appendItem(i18nString(UIStrings.addLogpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.BreakpointMarkerContextMenu);\n this.editBreakpointCondition({line, breakpoint: null, location: uiLocation, isLogpoint: true});\n }, {jslogContext: 'add-logpoint'});\n\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.neverPauseHere),\n () => this.setBreakpoint(\n uiLocation.lineNumber, uiLocation.columnNumber, NEVER_PAUSE_HERE_CONDITION, /* enabled */ true,\n /* isLogpoint */ false),\n {jslogContext: 'never-pause-here'});\n }\n void contextMenu.show();\n }\n\n private updateScriptFiles(): void {\n for (const debuggerModel of SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)) {\n const scriptFile = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().scriptFile(\n this.uiSourceCode, debuggerModel);\n if (scriptFile) {\n this.updateScriptFile(debuggerModel);\n }\n }\n this.showSourceMapInfobarIfNeeded();\n }\n\n private updateScriptFile(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n const oldScriptFile = this.scriptFileForDebuggerModel.get(debuggerModel);\n const newScriptFile = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().scriptFile(\n this.uiSourceCode, debuggerModel);\n this.scriptFileForDebuggerModel.delete(debuggerModel);\n if (oldScriptFile) {\n oldScriptFile.removeEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidMergeToVM, this.didMergeToVM, this);\n oldScriptFile.removeEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidDivergeFromVM, this.didDivergeFromVM, this);\n if (this.muted && !this.uiSourceCode.isDirty() && this.consistentScripts()) {\n this.setMuted(false);\n }\n }\n if (!newScriptFile) {\n return;\n }\n this.scriptFileForDebuggerModel.set(debuggerModel, newScriptFile);\n newScriptFile.addEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidMergeToVM, this.didMergeToVM, this);\n newScriptFile.addEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidDivergeFromVM, this.didDivergeFromVM, this);\n newScriptFile.checkMapping();\n\n void newScriptFile.missingSymbolFiles().then(resources => {\n if (resources) {\n const details = i18nString(UIStrings.debugInfoNotFound, {PH1: newScriptFile.uiSourceCode.url()});\n this.updateMissingDebugInfoInfobar({resources, details});\n } else {\n this.updateMissingDebugInfoInfobar(null);\n }\n });\n }\n\n private updateMissingDebugInfoInfobar(warning: SDK.DebuggerModel.MissingDebugInfoDetails|null): void {\n if (this.missingDebugInfoBar) {\n return;\n }\n if (warning === null) {\n this.removeInfobar(this.missingDebugInfoBar);\n this.missingDebugInfoBar = null;\n return;\n }\n this.missingDebugInfoBar = UI.Infobar.Infobar.create(UI.Infobar.Type.Error, warning.details, []);\n if (!this.missingDebugInfoBar) {\n return;\n }\n for (const resource of warning.resources) {\n const detailsRow =\n this.missingDebugInfoBar?.createDetailsRowMessage(i18nString(UIStrings.debugFileNotFound, {PH1: resource}));\n if (detailsRow) {\n detailsRow.classList.add('infobar-selectable');\n }\n }\n this.missingDebugInfoBar.setCloseCallback(() => {\n this.removeInfobar(this.missingDebugInfoBar);\n this.missingDebugInfoBar = null;\n });\n this.attachInfobar(this.missingDebugInfoBar);\n }\n\n private scriptHasSourceMap(): boolean {\n for (const debuggerModel of SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)) {\n const scriptFile = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().scriptFile(\n this.uiSourceCode, debuggerModel);\n if (scriptFile && scriptFile.hasSourceMapURL()) {\n return true;\n }\n }\n return false;\n }\n\n private getSourceMapResource(): SDK.PageResourceLoader.PageResource|null {\n const resourceMap = this.loader.getResourcesLoaded();\n for (const [debuggerModel, script] of this.scriptFileForDebuggerModel.entries()) {\n const url = script.script?.sourceMapURL;\n if (url) {\n const initiatorUrl = SDK.SourceMapManager.SourceMapManager.resolveRelativeSourceURL(\n debuggerModel.target(), script.script.sourceURL);\n const resolvedUrl = Common.ParsedURL.ParsedURL.completeURL(initiatorUrl, url);\n if (resolvedUrl) {\n const resource = resourceMap.get(SDK.PageResourceLoader.PageResourceLoader.makeKey(\n resolvedUrl, script.script.createPageResourceLoadInitiator()));\n if (resource) {\n return resource;\n }\n }\n }\n }\n return null;\n }\n\n private showSourceMapInfobarIfNeeded(): void {\n if (this.sourceMapInfobar) {\n return;\n }\n if (!Common.Settings.Settings.instance().moduleSetting('jsSourceMapsEnabled').get()) {\n return;\n }\n if (!this.scriptHasSourceMap()) {\n return;\n }\n\n const resource = this.getSourceMapResource();\n if (resource && resource.success === null) {\n // Don't create the infobar until we know whether loading succeeded or failed.\n return;\n }\n\n if (!resource) {\n this.sourceMapInfobar = UI.Infobar.Infobar.create(\n UI.Infobar.Type.Info, i18nString(UIStrings.sourceMapSkipped), [],\n Common.Settings.Settings.instance().createSetting('sourceMapSkippedInfobarDisabled', false));\n if (!this.sourceMapInfobar) {\n return;\n }\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.debuggingPowerReduced));\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.reloadForSourceMap));\n } else if (resource.success) {\n this.sourceMapInfobar = UI.Infobar.Infobar.create(\n UI.Infobar.Type.Info, i18nString(UIStrings.sourceMapLoaded), [],\n Common.Settings.Settings.instance().createSetting('sourceMapInfobarDisabled', false));\n if (!this.sourceMapInfobar) {\n return;\n }\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.associatedFilesShouldBeAdded));\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.associatedFilesAreAvailable, {\n PH1: String(UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutTitleForAction('quickOpen.show')),\n }));\n } else {\n let text: string;\n let delegate: () => void;\n const ignoreListManager = Bindings.IgnoreListManager.IgnoreListManager.instance();\n if (this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.ContentScripts) {\n text = i18nString(UIStrings.ignoreContentScripts);\n delegate = ignoreListManager.ignoreListContentScripts.bind(ignoreListManager);\n } else {\n text = i18nString(UIStrings.ignoreScript);\n delegate = ignoreListManager.ignoreListUISourceCode.bind(ignoreListManager, this.uiSourceCode);\n }\n this.sourceMapInfobar =\n UI.Infobar.Infobar.create(UI.Infobar.Type.Warning, i18nString(UIStrings.sourceMapFailed), [\n {text, highlight: false, delegate, dismiss: true},\n ]);\n if (!this.sourceMapInfobar) {\n return;\n }\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.debuggingPowerReduced));\n if (resource.errorMessage) {\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.errorLoading, {\n PH1: Platform.StringUtilities.trimMiddle(resource.url, UI.UIUtils.MaxLengthForDisplayedURLs),\n PH2: resource.errorMessage,\n }));\n }\n }\n this.sourceMapInfobar.setCloseCallback(() => {\n this.removeInfobar(this.sourceMapInfobar);\n this.sourceMapInfobar = null;\n });\n this.attachInfobar(this.sourceMapInfobar);\n }\n\n private handleGutterClick(line: CodeMirror.Line, event: MouseEvent): boolean {\n if (this.muted || event.button !== 0 || event.altKey) {\n return false;\n }\n if (event.metaKey || event.ctrlKey) {\n if (event.shiftKey) {\n return false;\n }\n Host.userMetrics.breakpointEditDialogRevealedFrom(Host.UserMetrics.BreakpointEditDialogRevealedFrom.MouseClick);\n this.#openEditDialogForLine(line);\n return true;\n }\n\n void this.toggleBreakpoint(line, event.shiftKey);\n return true;\n }\n\n private async toggleBreakpoint(line: CodeMirror.Line, onlyDisable: boolean): Promise {\n if (this.muted) {\n return;\n }\n if (this.activeBreakpointDialog) {\n this.activeBreakpointDialog.finishEditing(false, '');\n }\n\n const breakpoints = this.lineBreakpoints(line);\n if (!breakpoints.length) {\n await this.createNewBreakpoint(line, EMPTY_BREAKPOINT_CONDITION, /* enabled */ true, /* isLogpoint */ false);\n return;\n }\n const hasDisabled = breakpoints.some(b => !b.enabled());\n for (const breakpoint of breakpoints) {\n if (onlyDisable) {\n breakpoint.setEnabled(hasDisabled);\n } else {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.BreakpointRemovedFromGutterToggle);\n void breakpoint.remove(false);\n }\n }\n }\n\n private async createNewBreakpoint(\n line: CodeMirror.Line, condition: Breakpoints.BreakpointManager.UserCondition, enabled: boolean,\n isLogpoint: boolean): Promise {\n if (!this.editor || !SourceFrame.SourceFrame.isBreakableLine(this.editor.state, line)) {\n return;\n }\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ScriptsBreakpointSet);\n this.#recordSourcesPanelDebuggedMetrics();\n const origin = this.transformer.editorLocationToUILocation(line.number - 1);\n await this.setBreakpoint(origin.lineNumber, origin.columnNumber, condition, enabled, isLogpoint);\n }\n\n private async setBreakpoint(\n lineNumber: number, columnNumber: number|undefined, condition: Breakpoints.BreakpointManager.UserCondition,\n enabled: boolean, isLogpoint: boolean): Promise {\n Common.Settings.Settings.instance().moduleSetting('breakpointsActive').set(true);\n const bp = await this.breakpointManager.setBreakpoint(\n this.uiSourceCode, lineNumber, columnNumber, condition, enabled, isLogpoint,\n Breakpoints.BreakpointManager.BreakpointOrigin.USER_ACTION);\n this.breakpointWasSetForTest(lineNumber, columnNumber, condition, enabled);\n return bp;\n }\n\n private breakpointWasSetForTest(\n _lineNumber: number, _columnNumber: number|undefined, _condition: string, _enabled: boolean): void {\n }\n\n private async callFrameChanged(): Promise {\n this.liveLocationPool.disposeAll();\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n this.setExecutionLocation(null);\n } else {\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createCallFrameLiveLocation(\n callFrame.location(), async(liveLocation: Bindings.LiveLocation.LiveLocation): Promise => {\n const uiLocation = await liveLocation.uiLocation();\n if (uiLocation && uiLocation.uiSourceCode === this.uiSourceCode) {\n this.setExecutionLocation(uiLocation);\n this.updateMissingDebugInfoInfobar(callFrame.missingDebugInfoDetails);\n // We are paused and the user is specifically looking at this UISourceCode either because\n // this file is on top of stack, or the user explicitly selected a stack frame for this UISourceCode.\n this.#recordSourcesPanelDebuggedMetrics();\n } else {\n this.setExecutionLocation(null);\n }\n }, this.liveLocationPool);\n }\n }\n\n private setExecutionLocation(executionLocation: Workspace.UISourceCode.UILocation|null): void {\n if (this.executionLocation === executionLocation || !this.editor) {\n return;\n }\n this.executionLocation = executionLocation;\n\n if (executionLocation) {\n const editorLocation =\n this.transformer.uiLocationToEditorLocation(executionLocation.lineNumber, executionLocation.columnNumber);\n const decorations =\n computeExecutionDecorations(this.editor.state, editorLocation.lineNumber, editorLocation.columnNumber);\n this.editor.dispatch({effects: executionLine.update.of(decorations)});\n void this.updateValueDecorations();\n if (this.controlDown) {\n void this.showContinueToLocations();\n }\n } else {\n this.editor.dispatch({\n effects: [\n executionLine.update.of(CodeMirror.Decoration.none),\n continueToMarkers.update.of(CodeMirror.Decoration.none),\n valueDecorations.update.of(CodeMirror.Decoration.none),\n ],\n });\n }\n }\n\n override dispose(): void {\n this.hideIgnoreListInfobar();\n if (this.sourceMapInfobar) {\n this.sourceMapInfobar.dispose();\n }\n for (const script of this.scriptFileForDebuggerModel.values()) {\n script.removeEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidMergeToVM, this.didMergeToVM, this);\n script.removeEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidDivergeFromVM, this.didDivergeFromVM, this);\n }\n this.scriptFileForDebuggerModel.clear();\n\n this.popoverHelper?.hidePopover();\n this.popoverHelper?.dispose();\n this.setExecutionLocation(null);\n\n this.breakpointManager.removeEventListener(\n Breakpoints.BreakpointManager.Events.BreakpointAdded, this.breakpointChange, this);\n this.breakpointManager.removeEventListener(\n Breakpoints.BreakpointManager.Events.BreakpointRemoved, this.breakpointChange, this);\n this.uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.workingCopyChanged, this);\n this.uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this);\n\n Bindings.IgnoreListManager.IgnoreListManager.instance().removeChangeListener(this.ignoreListCallback);\n\n debuggerPluginForUISourceCode.delete(this.uiSourceCode);\n super.dispose();\n\n window.clearTimeout(this.refreshBreakpointsTimeout);\n // Clear `this.editor` to signal that we are disposed. Any function from this `DebuggerPlugin` instance\n // still running or scheduled will early return and not do any work.\n this.editor = undefined;\n\n UI.Context.Context.instance().removeFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);\n this.liveLocationPool.disposeAll();\n }\n\n /**\n * Only records metrics once per DebuggerPlugin instance and must only be\n * called once the content of the UISourceCode is available.\n */\n #recordSourcesPanelDebuggedMetrics(): void {\n if (this.#sourcesPanelDebuggedMetricsRecorded) {\n return;\n }\n this.#sourcesPanelDebuggedMetricsRecorded = true;\n\n const mimeType = Common.ResourceType.ResourceType.mimeFromURL(this.uiSourceCode.url());\n const mediaType = Common.ResourceType.ResourceType.mediaTypeForMetrics(\n mimeType ?? '', this.uiSourceCode.contentType().isFromSourceMap(),\n TextUtils.TextUtils.isMinified(this.uiSourceCode.content()));\n Host.userMetrics.sourcesPanelFileDebugged(mediaType);\n }\n}\n\nexport class BreakpointLocationRevealer implements\n Common.Revealer.Revealer {\n async reveal(breakpointLocation: Breakpoints.BreakpointManager.BreakpointLocation, omitFocus?: boolean|undefined):\n Promise {\n const {uiLocation} = breakpointLocation;\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n const debuggerPlugin = debuggerPluginForUISourceCode.get(uiLocation.uiSourceCode);\n if (debuggerPlugin) {\n debuggerPlugin.editBreakpointLocation(breakpointLocation);\n } else {\n SourceComponents.BreakpointsView.BreakpointsSidebarController.instance().breakpointEditFinished(\n breakpointLocation.breakpoint, false);\n }\n }\n}\n\n// Infobar panel state, used to show additional panels below the editor.\n\nconst addInfobar = CodeMirror.StateEffect.define();\nconst removeInfobar = CodeMirror.StateEffect.define();\n\nconst infobarState = CodeMirror.StateField.define({\n create(): UI.Infobar.Infobar[] {\n return [];\n },\n update(current, tr): UI.Infobar.Infobar[] {\n for (const effect of tr.effects) {\n if (effect.is(addInfobar)) {\n current = current.concat(effect.value);\n } else if (effect.is(removeInfobar)) {\n current = current.filter(b => b !== effect.value);\n }\n }\n return current;\n },\n provide: (field): CodeMirror.Extension => CodeMirror.showPanel.computeN(\n [field],\n (state): (() => CodeMirror.Panel)[] =>\n state.field(field).map((bar): (() => CodeMirror.Panel) => (): CodeMirror.Panel => ({dom: bar.element}))),\n});\n\n// Enumerate non-breakable lines (lines without a known corresponding\n// position in the UISource).\nasync function computeNonBreakableLines(\n state: CodeMirror.EditorState, transformer: SourceFrame.SourceFrame.Transformer,\n sourceCode: Workspace.UISourceCode.UISourceCode): Promise {\n const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();\n const mappedLines = await debuggerWorkspaceBinding.getMappedLines(sourceCode);\n if (!mappedLines) {\n return [];\n }\n const linePositions = [];\n for (let i = 0; i < state.doc.lines; i++) {\n const {lineNumber} = transformer.editorLocationToUILocation(i, 0);\n if (!mappedLines.has(lineNumber)) {\n linePositions.push(state.doc.line(i + 1).from);\n }\n }\n return linePositions;\n}\n\n// Breakpoint markers\n\ntype BreakpointDecoration = {\n content: CodeMirror.DecorationSet,\n gutter: CodeMirror.RangeSet,\n};\n\nconst setBreakpointDeco = CodeMirror.StateEffect.define();\nconst muteBreakpoints = CodeMirror.StateEffect.define();\n\nfunction muteGutterMarkers(markers: CodeMirror.RangeSet, doc: CodeMirror.Text):\n CodeMirror.RangeSet {\n const newMarkers: CodeMirror.Range[] = [];\n markers.between(0, doc.length, (from, _to, marker) => {\n let className: string = marker.elementClass;\n if (!/cm-breakpoint-disabled/.test(className)) {\n className += ' cm-breakpoint-disabled';\n }\n newMarkers.push(new BreakpointGutterMarker(className).range(from));\n });\n return CodeMirror.RangeSet.of(newMarkers, false);\n}\n\n// Holds the inline breakpoint marker decorations and the gutter\n// markers for lines with breakpoints. When the set of active markers\n// changes in non-muted state (the editor content matches the original\n// file), it is recomputed and updated with `setBreakpointDeco`. When\n// the editor content goes out of sync with the original file, the\n// `muteBreakpoints` effect hides the inline markers and makes sure\n// all gutter markers are displayed as disabled.\nconst breakpointMarkers = CodeMirror.StateField.define({\n create(): BreakpointDecoration {\n return {content: CodeMirror.RangeSet.empty, gutter: CodeMirror.RangeSet.empty};\n },\n update(deco, tr): BreakpointDecoration {\n if (!tr.changes.empty) {\n deco = {content: deco.content.map(tr.changes), gutter: deco.gutter.map(tr.changes)};\n }\n for (const effect of tr.effects) {\n if (effect.is(setBreakpointDeco)) {\n deco = effect.value;\n } else if (effect.is(muteBreakpoints)) {\n deco = {content: CodeMirror.RangeSet.empty, gutter: muteGutterMarkers(deco.gutter, tr.state.doc)};\n }\n }\n return deco;\n },\n provide: field =>\n [CodeMirror.EditorView.decorations.from(field, deco => deco.content),\n CodeMirror.lineNumberMarkers.from(field, deco => deco.gutter)],\n});\n\nclass BreakpointInlineMarker extends CodeMirror.WidgetType {\n class: string;\n\n constructor(readonly breakpoint: Breakpoints.BreakpointManager.Breakpoint|null, readonly parent: DebuggerPlugin) {\n super();\n // Eagerly compute DOM class so that the widget is recreated when it changes.\n this.class = 'cm-inlineBreakpoint';\n if (breakpoint?.isLogpoint()) {\n this.class += ' cm-inlineBreakpoint-logpoint';\n } else if (breakpoint?.condition()) {\n this.class += ' cm-inlineBreakpoint-conditional';\n }\n if (!breakpoint?.enabled()) {\n this.class += ' cm-inlineBreakpoint-disabled';\n }\n }\n\n override eq(other: BreakpointInlineMarker): boolean {\n return other.class === this.class && other.breakpoint === this.breakpoint;\n }\n\n toDOM(): HTMLElement {\n const span = document.createElement('span');\n span.className = this.class;\n span.addEventListener('click', (event: MouseEvent) => {\n this.parent.onInlineBreakpointMarkerClick(event, this.breakpoint);\n event.consume();\n });\n span.addEventListener('contextmenu', (event: MouseEvent) => {\n this.parent.onInlineBreakpointMarkerContextMenu(event, this.breakpoint);\n event.consume();\n });\n return span;\n }\n\n override ignoreEvent(): boolean {\n return true;\n }\n}\n\nclass BreakpointGutterMarker extends CodeMirror.GutterMarker {\n constructor(override readonly elementClass: string) {\n super();\n }\n\n override eq(other: BreakpointGutterMarker): boolean {\n return other.elementClass === this.elementClass;\n }\n}\n\nfunction mostSpecificBreakpoint(\n a: Breakpoints.BreakpointManager.Breakpoint, b: Breakpoints.BreakpointManager.Breakpoint): number {\n if (a.enabled() !== b.enabled()) {\n return a.enabled() ? -1 : 1;\n }\n if (a.bound() !== b.bound()) {\n return a.bound() ? -1 : 1;\n }\n if (Boolean(a.condition()) !== Boolean(b.condition())) {\n return Boolean(a.condition()) ? -1 : 1;\n }\n return 0;\n}\n\n// Generic helper for creating pairs of editor state fields and\n// effects to model imperatively updated decorations.\n\nfunction defineStatefulDecoration(): {\n update: CodeMirror.StateEffectType,\n field: CodeMirror.StateField,\n} {\n const update = CodeMirror.StateEffect.define();\n const field = CodeMirror.StateField.define({\n create(): CodeMirror.DecorationSet {\n return CodeMirror.Decoration.none;\n },\n update(deco, tr): CodeMirror.DecorationSet {\n return tr.effects.reduce((deco, effect) => effect.is(update) ? effect.value : deco, deco.map(tr.changes));\n },\n provide: field => CodeMirror.EditorView.decorations.from(field),\n });\n return {update, field};\n}\n\n// Execution line highlight\n\nconst executionLineDeco = CodeMirror.Decoration.line({attributes: {class: 'cm-executionLine'}});\nconst executionTokenDeco = CodeMirror.Decoration.mark({attributes: {class: 'cm-executionToken'}});\nconst executionLine = defineStatefulDecoration();\n\n// Create decorations to indicate the current debugging position\nexport function computeExecutionDecorations(\n state: CodeMirror.EditorState, lineNumber: number, columnNumber: number): CodeMirror.DecorationSet {\n const {doc} = state;\n if (lineNumber >= doc.lines) {\n return CodeMirror.Decoration.none;\n }\n const line = doc.line(lineNumber + 1);\n const decorations: CodeMirror.Range[] = [executionLineDeco.range(line.from)];\n const position = Math.min(line.to, line.from + columnNumber);\n let syntaxTree = null;\n while (syntaxTree === null) {\n syntaxTree = CodeMirror.ensureSyntaxTree(state, line.to, /* timeout= */ 500);\n }\n let syntaxNode = syntaxTree.resolveInner(position, 1);\n if (syntaxNode.to === syntaxNode.from - 1 && /[(.]/.test(doc.sliceString(syntaxNode.from, syntaxNode.to))) {\n syntaxNode = syntaxNode.resolve(syntaxNode.to, 1);\n }\n const tokenEnd = Math.min(line.to, syntaxNode.to);\n if (tokenEnd > position) {\n decorations.push(executionTokenDeco.range(position, tokenEnd));\n }\n return CodeMirror.Decoration.set(decorations);\n}\n\n// Continue-to markers\n\nconst continueToMark = CodeMirror.Decoration.mark({class: 'cm-continueToLocation'});\nconst asyncContinueToMark = CodeMirror.Decoration.mark({class: 'cm-continueToLocation cm-continueToLocation-async'});\n\nconst continueToMarkers = defineStatefulDecoration();\n\nconst noMarkers = {}, hasContinueMarkers = {\n class: 'cm-hasContinueMarkers',\n};\n\n// Add a class to the content element when there are active\n// continue-to markers. This hides the background on the current\n// execution line.\nconst markIfContinueTo =\n CodeMirror.EditorView.contentAttributes.compute([continueToMarkers.field], (state): Record => {\n return state.field(continueToMarkers.field).size ? hasContinueMarkers : noMarkers;\n });\n\n// Variable value decorations\n\nclass ValueDecoration extends CodeMirror.WidgetType {\n constructor(readonly pairs: [string, SDK.RemoteObject.RemoteObject][]) {\n super();\n }\n\n override eq(other: ValueDecoration): boolean {\n return this.pairs.length === other.pairs.length &&\n this.pairs.every((p, i) => p[0] === other.pairs[i][0] && p[1] === other.pairs[i][1]);\n }\n\n toDOM(): HTMLElement {\n const formatter = new ObjectUI.RemoteObjectPreviewFormatter.RemoteObjectPreviewFormatter();\n const widget = document.createElement('div');\n widget.classList.add('cm-variableValues');\n let first = true;\n for (const [name, value] of this.pairs) {\n if (first) {\n first = false;\n } else {\n UI.UIUtils.createTextChild(widget, ', ');\n }\n const nameValuePair = (widget.createChild('span') as HTMLElement);\n UI.UIUtils.createTextChild(nameValuePair, name + ' = ');\n const propertyCount = value.preview ? value.preview.properties.length : 0;\n const entryCount = value.preview && value.preview.entries ? value.preview.entries.length : 0;\n if (value.preview && propertyCount + entryCount < 10) {\n formatter.appendObjectPreview(nameValuePair, value.preview, false /* isEntry */);\n } else {\n const propertyValue = ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.createPropertyValue(\n value, /* wasThrown */ false, /* showPreview */ false);\n nameValuePair.appendChild(propertyValue.element);\n }\n }\n return widget;\n }\n}\n\nconst valueDecorations = defineStatefulDecoration();\n\nfunction isVariableIdentifier(tokenType: string): boolean {\n return tokenType === 'VariableName' || tokenType === 'VariableDefinition';\n}\n\nfunction isVariableDefinition(tokenType: string): boolean {\n return tokenType === 'VariableDefinition';\n}\n\nfunction isLetConstDefinition(tokenType: string): boolean {\n return tokenType === 'let' || tokenType === 'const';\n}\n\nfunction isScopeNode(tokenType: string): boolean {\n return tokenType === 'Block' || tokenType === 'ForSpec';\n}\n\nclass SiblingScopeVariables {\n blockList: Set = new Set();\n variables: {line: number, from: number, id: string}[] = [];\n}\n\nexport function getVariableNamesByLine(\n editorState: CodeMirror.EditorState, fromPos: number, toPos: number,\n currentPos: number): {line: number, from: number, id: string}[] {\n const fromLine = editorState.doc.lineAt(fromPos);\n fromPos = Math.min(fromLine.to, fromPos);\n toPos = editorState.doc.lineAt(toPos).from;\n\n const tree = CodeMirror.ensureSyntaxTree(editorState, toPos, 100);\n if (!tree) {\n return [];\n }\n\n // Sibling scope is a scope that does not contain the current position.\n // We will exclude variables that are defined (and used in those scopes (since we are currently outside of their lifetime).\n function isSiblingScopeNode(node: {name: string, from: number, to: number}): boolean {\n return isScopeNode(node.name) && (node.to < currentPos || currentPos < node.from);\n }\n\n const names: {line: number, from: number, id: string}[] = [];\n let curLine = fromLine;\n const siblingStack: SiblingScopeVariables[] = [];\n let currentLetConstDefinition: CodeMirror.SyntaxNode|null = null;\n\n function currentNames(): {line: number, from: number, id: string}[] {\n return siblingStack.length ? siblingStack[siblingStack.length - 1].variables : names;\n }\n\n tree.iterate({\n from: fromPos,\n to: toPos,\n enter: node => {\n if (node.from < fromPos) {\n return;\n }\n\n if (isLetConstDefinition(node.name)) {\n currentLetConstDefinition = node.node.nextSibling;\n return;\n }\n\n if (isSiblingScopeNode(node)) {\n siblingStack.push(new SiblingScopeVariables());\n return;\n }\n\n const varName = isVariableIdentifier(node.name) && editorState.sliceDoc(node.from, node.to);\n if (!varName) {\n return;\n }\n\n if (currentLetConstDefinition && isVariableDefinition(node.name) && siblingStack.length > 0) {\n siblingStack[siblingStack.length - 1].blockList.add(varName);\n return;\n }\n\n if (node.from > curLine.to) {\n curLine = editorState.doc.lineAt(node.from);\n }\n\n currentNames().push({line: curLine.number - 1, from: node.from, id: varName});\n },\n leave: node => {\n if (currentLetConstDefinition === node.node) {\n currentLetConstDefinition = null;\n } else if (isSiblingScopeNode(node)) {\n const topScope = siblingStack.pop();\n const nameList = currentNames();\n for (const token of topScope?.variables ?? []) {\n if (!topScope?.blockList.has(token.id)) {\n nameList.push(token);\n }\n }\n }\n },\n });\n return names;\n}\n\nexport async function computeScopeMappings(\n callFrame: SDK.DebuggerModel.CallFrame,\n rawLocationToEditorOffset: (l: SDK.DebuggerModel.Location|null) => Promise):\n Promise<{scopeStart: number, scopeEnd: number, variableMap: Map}[]> {\n const scopeMappings:\n {scopeStart: number, scopeEnd: number, variableMap: Map}[] = [];\n for (const scope of callFrame.scopeChain()) {\n const scopeStart = await rawLocationToEditorOffset(scope.range()?.start ?? null);\n if (!scopeStart) {\n break;\n }\n const scopeEnd = await rawLocationToEditorOffset(scope.range()?.end ?? null);\n if (!scopeEnd) {\n break;\n }\n\n const {properties} = await SourceMapScopes.NamesResolver.resolveScopeInObject(scope).getAllProperties(false, false);\n if (!properties || properties.length > MAX_PROPERTIES_IN_SCOPE_FOR_VALUE_DECORATIONS) {\n break;\n }\n const variableMap = new Map(\n properties.map(p => [p.name, p.value] as [string, SDK.RemoteObject.RemoteObject]));\n\n scopeMappings.push({scopeStart, scopeEnd, variableMap});\n\n // Let us only get mappings for block scopes until we see a surrounding function (local) scope.\n if (scope.type() === Protocol.Debugger.ScopeType.Local) {\n break;\n }\n }\n return scopeMappings;\n}\n\nexport function getVariableValuesByLine(\n scopeMappings: {scopeStart: number, scopeEnd: number, variableMap: Map}[],\n variableNames: {line: number, from: number, id: string}[]): Map>|\n null {\n const namesPerLine = new Map>();\n for (const {line, from, id} of variableNames) {\n const varValue = findVariableInChain(id, from, scopeMappings);\n if (!varValue) {\n continue;\n }\n let names = namesPerLine.get(line);\n if (!names) {\n names = new Map();\n namesPerLine.set(line, names);\n }\n names.set(id, varValue);\n }\n return namesPerLine;\n\n function findVariableInChain(\n name: string,\n pos: number,\n scopeMappings: {scopeStart: number, scopeEnd: number, variableMap: Map}[],\n ): SDK.RemoteObject.RemoteObject|null {\n for (const scope of scopeMappings) {\n if (pos < scope.scopeStart || pos >= scope.scopeEnd) {\n continue;\n }\n const value = scope.variableMap.get(name);\n if (value) {\n return value;\n }\n }\n return null;\n }\n}\n\n// Pop-over\n\nexport function computePopoverHighlightRange(state: CodeMirror.EditorState, mimeType: string, cursorPos: number): {\n from: number,\n to: number,\n containsCallExpression: boolean,\n}|null {\n const {main} = state.selection;\n if (!main.empty) {\n if (cursorPos < main.from || main.to < cursorPos) {\n return null;\n }\n // If the user goes through the trouble of manually selecting an expression, we'll allow side-effects.\n return {from: main.from, to: main.to, containsCallExpression: false};\n }\n\n const tree = CodeMirror.ensureSyntaxTree(state, cursorPos, 5 * 1000);\n if (!tree) {\n return null;\n }\n\n const node = tree.resolveInner(cursorPos, 1);\n // Only do something if the cursor is over a leaf node.\n if (node.firstChild) {\n return null;\n }\n\n switch (mimeType) {\n case 'application/wasm': {\n if (node.name !== 'Identifier') {\n return null;\n }\n // For $label identifiers we can't show a meaningful preview (https://crbug.com/1155548),\n // so we suppress them for now. Label identifiers can only appear as operands to control\n // instructions[1].\n //\n // [1]: https://webassembly.github.io/spec/core/text/instructions.html#control-instructions\n const controlInstructions = ['block', 'loop', 'if', 'else', 'end', 'br', 'br_if', 'br_table'];\n for (let parent: CodeMirror.SyntaxNode|null = node.parent; parent; parent = parent.parent) {\n if (parent.name === 'App') {\n const firstChild = parent.firstChild;\n const opName = firstChild?.name === 'Keyword' && state.sliceDoc(firstChild.from, firstChild.to);\n if (opName && controlInstructions.includes(opName)) {\n return null;\n }\n }\n }\n return {from: node.from, to: node.to, containsCallExpression: false};\n }\n\n case 'text/html':\n case 'text/javascript':\n case 'text/jsx':\n case 'text/typescript':\n case 'text/typescript-jsx': {\n let current: CodeMirror.SyntaxNode|null = node;\n while (current && current.name !== 'this' && current.name !== 'VariableDefinition' &&\n current.name !== 'VariableName' && current.name !== 'MemberExpression' &&\n !(current.name === 'PropertyName' && current.parent?.name === 'PatternProperty' &&\n current.nextSibling?.name !== ':') &&\n !(current.name === 'PropertyDefinition' && current.parent?.name === 'Property' &&\n current.nextSibling?.name !== ':')) {\n current = current.parent;\n }\n if (!current) {\n return null;\n }\n return {from: current.from, to: current.to, containsCallExpression: nodeContainsCallExpression(current)};\n }\n\n default: {\n // In other languages, just assume a token consisting entirely\n // of identifier-like characters is an identifier.\n if (node.to - node.from > 50 || /[^\\w_\\-$]/.test(state.sliceDoc(node.from, node.to))) {\n return null;\n }\n return {from: node.from, to: node.to, containsCallExpression: false};\n }\n }\n}\n\nfunction nodeContainsCallExpression(node: CodeMirror.SyntaxNode): boolean {\n let containsCallExpression = false;\n node.cursor().iterate(node => {\n containsCallExpression ||= node.name === 'CallExpression';\n return !containsCallExpression; // No need to recurse into children if we are alraedy done.\n });\n return containsCallExpression;\n}\n\n// Evaluated expression mark for pop-over\n\nconst evalExpressionMark = CodeMirror.Decoration.mark({class: 'cm-evaluatedExpression'});\n\nconst evalExpression = defineStatefulDecoration();\n\n// Styling for plugin-local elements\n\nconst theme = CodeMirror.EditorView.baseTheme({\n '.cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement': {\n '&:hover, &.cm-breakpoint': {\n borderStyle: 'solid',\n borderWidth: '1px 4px 1px 1px',\n marginRight: '-4px',\n paddingLeft: '8px',\n // Make sure text doesn't move down due to the border above it.\n lineHeight: 'calc(1.2em - 2px)',\n position: 'relative',\n },\n '&:hover': {\n WebkitBorderImage: lineNumberArrow('#ebeced', '#ebeced'),\n },\n '&.cm-breakpoint': {\n color: '#fff',\n WebkitBorderImage: lineNumberArrow('#4285f4', '#1a73e8'),\n },\n '&.cm-breakpoint-conditional': {\n WebkitBorderImage: lineNumberArrow('#f29900', '#e37400'),\n '&::before': {\n content: '\"?\"',\n position: 'absolute',\n top: 0,\n left: '1px',\n },\n },\n '&.cm-breakpoint-logpoint': {\n WebkitBorderImage: lineNumberArrow('#f439a0', '#d01884'),\n '&::before': {\n content: '\"‥\"',\n position: 'absolute',\n top: '-3px',\n left: '1px',\n },\n },\n },\n '&dark .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement': {\n '&:hover': {\n WebkitBorderImage: lineNumberArrow('#3c4043', '#3c4043'),\n },\n '&.cm-breakpoint': {\n WebkitBorderImage: lineNumberArrow('#5186EC', '#1a73e8'),\n },\n '&.cm-breakpoint-conditional': {\n WebkitBorderImage: lineNumberArrow('#e9a33a', '#e37400'),\n },\n '&.cm-breakpoint-logpoint': {\n WebkitBorderImage: lineNumberArrow('#E54D9B', '#d01884'),\n },\n },\n ':host-context(.breakpoints-deactivated) & .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement.cm-breakpoint, .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement.cm-breakpoint-disabled':\n {\n color: '#1a73e8',\n WebkitBorderImage: lineNumberArrow('#d9e7fd', '#1a73e8'),\n '&.cm-breakpoint-conditional': {\n color: '#e37400',\n WebkitBorderImage: lineNumberArrow('#fcebcc', '#e37400'),\n },\n '&.cm-breakpoint-logpoint': {\n color: '#d01884',\n WebkitBorderImage: lineNumberArrow('#fdd7ec', '#f439a0'),\n },\n },\n ':host-context(.breakpoints-deactivated) &dark .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement.cm-breakpoint, &dark .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement.cm-breakpoint-disabled':\n {\n WebkitBorderImage: lineNumberArrow('#2a384e', '#1a73e8'),\n '&.cm-breakpoint-conditional': {\n WebkitBorderImage: lineNumberArrow('#4d3c1d', '#e37400'),\n },\n '&.cm-breakpoint-logpoint': {\n WebkitBorderImage: lineNumberArrow('#4e283d', '#f439a0'),\n },\n },\n\n '.cm-inlineBreakpoint': {\n cursor: 'pointer',\n position: 'relative',\n top: '1px',\n content: inlineBreakpointArrow('#4285F4', '#1A73E8'),\n height: '10px',\n '&.cm-inlineBreakpoint-conditional': {\n content: inlineConditionalBreakpointArrow('#F29900', '#E37400'),\n },\n '&.cm-inlineBreakpoint-logpoint': {\n content: inlineLogpointArrow('#F439A0', '#D01884'),\n },\n },\n '&dark .cm-inlineBreakpoint': {\n content: inlineBreakpointArrow('#5186EC', '#1A73E8'),\n '&.cm-inlineBreakpoint-conditional': {\n content: inlineConditionalBreakpointArrow('#e9a33a', '#E37400'),\n },\n '&.cm-inlineBreakpoint-logpoint': {\n content: inlineLogpointArrow('#E54D9B', '#D01884'),\n },\n },\n ':host-context(.breakpoints-deactivated) & .cm-inlineBreakpoint, .cm-inlineBreakpoint-disabled': {\n content: inlineBreakpointArrow('#4285F4', '#1A73E8', '0.2'),\n '&.cm-inlineBreakpoint-conditional': {\n content: inlineConditionalBreakpointArrow('#F9AB00', '#E37400', '0.2'),\n },\n '&.cm-inlineBreakpoint-logpoint': {\n content: inlineLogpointArrow('#F439A0', '#D01884', '0.2'),\n },\n },\n\n '.cm-executionLine': {\n backgroundColor: 'var(--sys-color-yellow-container)',\n outline: '1px solid var(--sys-color-yellow-outline)',\n '.cm-hasContinueMarkers &': {\n backgroundColor: 'transparent',\n },\n '&.cm-highlightedLine': {\n animation: 'cm-fading-highlight-execution 2s 0s',\n },\n '&.cm-line::selection, &.cm-line ::selection': {\n backgroundColor: 'var(--sys-color-tonal-container) !important',\n },\n },\n '.cm-executionToken': {\n backgroundColor: 'var(--sys-color-state-focus-select)',\n },\n '@keyframes cm-fading-highlight-execution': {\n from: {\n backgroundColor: 'var(--sys-color-tonal-container)',\n },\n to: {\n backgroundColor: 'var(--sys-color-yellow-container)',\n },\n },\n\n '.cm-continueToLocation': {\n cursor: 'pointer',\n backgroundColor: 'var(--color-continue-to-location)',\n '&:hover': {\n backgroundColor: 'var(--color-continue-to-location-hover)',\n border: '1px solid var(--color-continue-to-location-hover-border)',\n margin: '0 -1px',\n },\n '&.cm-continueToLocation-async': {\n backgroundColor: 'var(--color-continue-to-location-async)',\n '&:hover': {\n backgroundColor: 'var(--color-continue-to-location-async-hover)',\n border: '1px solid var(--color-continue-to-location-async-hover-border)',\n margin: '0 -1px',\n },\n },\n },\n\n '.cm-evaluatedExpression': {\n backgroundColor: 'var(--color-evaluated-expression)',\n border: '1px solid var(--color-evaluated-expression-border)',\n margin: '0 -1px',\n },\n\n '.cm-variableValues': {\n display: 'inline',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '1000px',\n opacity: '80%',\n backgroundColor: 'var(--color-variable-values)',\n marginLeft: '10px',\n padding: '0 5px',\n userSelect: 'text',\n '.cm-executionLine &': {\n backgroundColor: 'transparent',\n opacity: '50%',\n },\n },\n});\n\nfunction lineNumberArrow(color: string, outline: string): string {\n return `url('data:image/svg+xml,') 1 3 1 1`;\n}\n\nfunction inlineBreakpointArrow(color: string, outline: string, opacity: string = '1'): string {\n return `url('data:image/svg+xml,')`;\n}\n\nfunction inlineConditionalBreakpointArrow(color: string, outline: string, opacity: string = '1'): string {\n return `url('data:image/svg+xml,')`;\n}\n\nfunction inlineLogpointArrow(color: string, outline: string, opacity: string = '1'): string {\n return `url('data:image/svg+xml,')`;\n}\n"]} \ No newline at end of file +{"version":3,"file":"DebuggerPlugin.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/DebuggerPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qDAAqD,CAAC;AACvF,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,UAAU,MAAM,sDAAsD,CAAC;AAEnF,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,WAAW,MAAM,yDAAyD,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,oBAAoB,EAAkC,MAAM,2BAA2B,CAAC;AAChG,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAE/C,MAAM,EAAC,0BAA0B,EAAE,0BAA0B,EAAC,GAAG,WAAW,CAAC,iBAAiB,CAAC;AAE/F,MA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AC,OAAO,CAAC,qBAAqB,CAAC;AAC7F,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa,EAAE,OAAe,EAAE,UAAkB,GAAG;IAClF,OAAO,kRACH,kBAAkB,CACd,KAAK,CAAC,aAAa,kBAAkB,CAAC,OAAO,CAAC,mBAAmB,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC;AACpH,CAAC;AAED,SAAS,gCAAgC,CAAC,KAAa,EAAE,OAAe,EAAE,UAAkB,GAAG;IAC7F,OAAO,oRACH,kBAAkB,CAAC,KAAK,CAAC,mBAAmB,kBAAkB,CAAC,OAAO,CAAC,aACvE,kBAAkB,CACd,OAAO,CAAC,i/BAAi/B,CAAC;AACpgC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa,EAAE,OAAe,EAAE,UAAkB,GAAG;IAChF,OAAO,kRACH,kBAAkB,CAAC,KAAK,CAAC,aAAa,kBAAkB,CAAC,OAAO,CAAC,mBACjE,kBAAkB,CACd,OAAO,CAAC,iGAAiG,CAAC;AACpH,CAAC","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Breakpoints from '../../models/breakpoints/breakpoints.js';\nimport * as Formatter from '../../models/formatter/formatter.js';\nimport * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';\nimport type * as TextEditor from '../../ui/components/text_editor/text_editor.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {AddDebugInfoURLDialog} from './AddSourceMapURLDialog.js';\nimport {BreakpointEditDialog, type BreakpointEditDialogResult} from './BreakpointEditDialog.js';\nimport * as SourceComponents from './components/components.js';\nimport {Plugin} from './Plugin.js';\nimport {SourcesPanel} from './SourcesPanel.js';\n\nconst {EMPTY_BREAKPOINT_CONDITION, NEVER_PAUSE_HERE_CONDITION} = Breakpoints.BreakpointManager;\n\nconst UIStrings = {\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n thisScriptIsOnTheDebuggersIgnore: 'This script is on the debugger\\'s ignore list',\n /**\n *@description Text to stop preventing the debugger from stepping into library code\n */\n removeFromIgnoreList: 'Remove from ignore list',\n /**\n *@description Text of a button in the Sources panel Debugger Plugin to configure ignore listing in Settings\n */\n configure: 'Configure',\n /**\n *@description Text to add a breakpoint\n */\n addBreakpoint: 'Add breakpoint',\n /**\n *@description A context menu item in the Debugger Plugin of the Sources panel\n */\n addConditionalBreakpoint: 'Add conditional breakpoint…',\n /**\n *@description A context menu item in the Debugger Plugin of the Sources panel\n */\n addLogpoint: 'Add logpoint…',\n /**\n *@description A context menu item in the Debugger Plugin of the Sources panel\n */\n neverPauseHere: 'Never pause here',\n /**\n *@description Context menu command to delete/remove a breakpoint that the user\n *has set. One line of code can have multiple breakpoints. Always >= 1 breakpoint.\n */\n removeBreakpoint: '{n, plural, =1 {Remove breakpoint} other {Remove all breakpoints in line}}',\n /**\n *@description A context menu item in the Debugger Plugin of the Sources panel\n */\n editBreakpoint: 'Edit breakpoint…',\n /**\n *@description Context menu command to disable (but not delete) a breakpoint\n *that the user has set. One line of code can have multiple breakpoints. Always\n *>= 1 breakpoint.\n */\n disableBreakpoint: '{n, plural, =1 {Disable breakpoint} other {Disable all breakpoints in line}}',\n /**\n *@description Context menu command to enable a breakpoint that the user has\n *set. One line of code can have multiple breakpoints. Always >= 1 breakpoint.\n */\n enableBreakpoint: '{n, plural, =1 {Enable breakpoint} other {Enable all breakpoints in line}}',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n addSourceMap: 'Add source map…',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n addWasmDebugInfo: 'Add DWARF debug info…',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n sourceMapLoaded: 'Source map loaded.',\n /**\n *@description Title of the Filtered List WidgetProvider of Quick Open\n *@example {Ctrl+P Ctrl+O} PH1\n */\n associatedFilesAreAvailable: 'Associated files are available via file tree or {PH1}.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n associatedFilesShouldBeAdded:\n 'Associated files should be added to the file tree. You can debug these resolved source files as regular JavaScript files.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n theDebuggerWillSkipStepping: 'The debugger will skip stepping through this script, and will not stop on exceptions.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n sourceMapSkipped: 'Source map skipped for this file.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n sourceMapFailed: 'Source map failed to load.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n debuggingPowerReduced: 'DevTools can\\'t show authored sources, but you can debug the deployed code.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n reloadForSourceMap: 'To enable again, make sure the file isn\\'t on the ignore list and reload.',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n *@example {http://site.com/lib.js.map} PH1\n *@example {HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME} PH2\n */\n errorLoading: 'Error loading url {PH1}: {PH2}',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n ignoreScript: 'Ignore this file',\n /**\n *@description Text in Debugger Plugin of the Sources panel\n */\n ignoreContentScripts: 'Ignore extension scripts',\n /**\n *@description Error message that is displayed in UI when a file needed for debugging information for a call frame is missing\n *@example {src/myapp.debug.wasm.dwp} PH1\n */\n debugFileNotFound: 'Failed to load debug file \"{PH1}\".',\n /**\n *@description Error message that is displayed when no debug info could be loaded\n *@example {app.wasm} PH1\n */\n debugInfoNotFound: 'Failed to load any debug info for {PH1}.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/DebuggerPlugin.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// Note: Line numbers are passed around as zero-based numbers (though\n// CodeMirror numbers them from 1).\n\n// Don't scan for possible breakpoints on a line beyond this position;\nconst MAX_POSSIBLE_BREAKPOINT_LINE = 2500;\n\n// Limits on inline variable view computation.\nconst MAX_CODE_SIZE_FOR_VALUE_DECORATIONS = 10000;\nconst MAX_PROPERTIES_IN_SCOPE_FOR_VALUE_DECORATIONS = 500;\n\ntype BreakpointDescription = {\n position: number,\n breakpoint: Breakpoints.BreakpointManager.Breakpoint,\n};\n\ntype BreakpointEditRequest = {\n line: CodeMirror.Line,\n breakpoint: Breakpoints.BreakpointManager.Breakpoint|null,\n location: {lineNumber: number, columnNumber: number}|null,\n isLogpoint?: boolean,\n};\n\nconst debuggerPluginForUISourceCode = new Map();\n\nexport class DebuggerPlugin extends Plugin {\n private editor: TextEditor.TextEditor.TextEditor|undefined = undefined;\n // Set if the debugger is stopped on a breakpoint in this file\n private executionLocation: Workspace.UISourceCode.UILocation|null = null;\n // Track state of the control key because holding it makes debugger\n // target locations show up in the editor\n private controlDown: boolean = false;\n private controlTimeout: number|undefined = undefined;\n private sourceMapInfobar: UI.Infobar.Infobar|null = null;\n private readonly scriptsPanel: SourcesPanel;\n private readonly breakpointManager: Breakpoints.BreakpointManager.BreakpointManager;\n // Manages pop-overs shown when the debugger is active and the user\n // hovers over an expression\n private popoverHelper: UI.PopoverHelper.PopoverHelper|null = null;\n private scriptFileForDebuggerModel:\n Map;\n // The current set of breakpoints for this file. The locations in\n // here are kept in sync with their editor position. When a file's\n // content is edited and later saved, these are used as a source of\n // truth for re-creating the breakpoints.\n private breakpoints: BreakpointDescription[] = [];\n private continueToLocations: {from: number, to: number, async: boolean, click: () => void}[]|null = null;\n private readonly liveLocationPool: Bindings.LiveLocation.LiveLocationPool;\n // When the editor content is changed by the user, this becomes\n // true. When the plugin is muted, breakpoints show up as disabled\n // and can't be manipulated. It is cleared again when the content is\n // saved.\n private muted: boolean;\n // If the plugin is initialized in muted state, we cannot correlated\n // breakpoint position in the breakpoint manager with editor\n // locations, so breakpoint manipulation is permanently disabled.\n private initializedMuted: boolean;\n private ignoreListInfobar: UI.Infobar.Infobar|null;\n private refreshBreakpointsTimeout: undefined|number = undefined;\n private activeBreakpointDialog: BreakpointEditDialog|null = null;\n #activeBreakpointEditRequest?: BreakpointEditRequest = undefined;\n #scheduledFinishingActiveDialog = false;\n private missingDebugInfoBar: UI.Infobar.Infobar|null = null;\n #sourcesPanelDebuggedMetricsRecorded = false;\n private readonly loader: SDK.PageResourceLoader.PageResourceLoader;\n\n private readonly ignoreListCallback: () => void;\n\n constructor(\n uiSourceCode: Workspace.UISourceCode.UISourceCode,\n private readonly transformer: SourceFrame.SourceFrame.Transformer) {\n super(uiSourceCode);\n\n debuggerPluginForUISourceCode.set(uiSourceCode, this);\n\n this.scriptsPanel = SourcesPanel.instance();\n this.breakpointManager = Breakpoints.BreakpointManager.BreakpointManager.instance();\n\n this.breakpointManager.addEventListener(\n Breakpoints.BreakpointManager.Events.BreakpointAdded, this.breakpointChange, this);\n this.breakpointManager.addEventListener(\n Breakpoints.BreakpointManager.Events.BreakpointRemoved, this.breakpointChange, this);\n\n this.uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.workingCopyChanged, this);\n this.uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this);\n\n this.scriptFileForDebuggerModel = new Map();\n\n this.loader = SDK.PageResourceLoader.PageResourceLoader.instance();\n this.loader.addEventListener(\n SDK.PageResourceLoader.Events.Update, this.showSourceMapInfobarIfNeeded.bind(this), this);\n\n this.ignoreListCallback = this.showIgnoreListInfobarIfNeeded.bind(this);\n Bindings.IgnoreListManager.IgnoreListManager.instance().addChangeListener(this.ignoreListCallback);\n\n UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);\n this.liveLocationPool = new Bindings.LiveLocation.LiveLocationPool();\n\n this.updateScriptFiles();\n\n this.muted = this.uiSourceCode.isDirty();\n this.initializedMuted = this.muted;\n\n this.ignoreListInfobar = null;\n this.showIgnoreListInfobarIfNeeded();\n for (const scriptFile of this.scriptFileForDebuggerModel.values()) {\n scriptFile.checkMapping();\n }\n }\n\n override editorExtension(): CodeMirror.Extension {\n // Kludge to hook editor keyboard events into the ShortcutRegistry\n // system.\n const handlers = this.shortcutHandlers();\n\n return [\n CodeMirror.EditorView.updateListener.of(update => this.onEditorUpdate(update)),\n CodeMirror.EditorView.domEventHandlers({\n keydown: (event): boolean => {\n if (this.onKeyDown(event)) {\n return true;\n }\n handlers(event);\n return event.defaultPrevented;\n },\n keyup: event => this.onKeyUp(event),\n mousemove: event => this.onMouseMove(event),\n mousedown: event => this.onMouseDown(event),\n focusout: event => this.onBlur(event),\n wheel: event => this.onWheel(event),\n }),\n CodeMirror.lineNumbers({\n domEventHandlers: {\n mousedown: (view, block, event) =>\n this.handleGutterClick(view.state.doc.lineAt(block.from), event as MouseEvent),\n },\n }),\n infobarState,\n breakpointMarkers,\n CodeMirror.Prec.highest(executionLine.field),\n CodeMirror.Prec.lowest(continueToMarkers.field),\n markIfContinueTo,\n valueDecorations.field,\n CodeMirror.Prec.lowest(evalExpression.field),\n theme,\n this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Debugger ?\n CodeMirror.EditorView.editorAttributes.of({class: 'source-frame-debugger-script'}) :\n [],\n ];\n }\n\n private shortcutHandlers(): (event: KeyboardEvent) => void {\n const selectionLine = (editor: TextEditor.TextEditor.TextEditor): CodeMirror.Line => {\n return editor.state.doc.lineAt(editor.state.selection.main.head);\n };\n\n return UI.ShortcutRegistry.ShortcutRegistry.instance().getShortcutListener({\n 'debugger.toggle-breakpoint': async(): Promise => {\n if (this.muted || !this.editor) {\n return false;\n }\n await this.toggleBreakpoint(selectionLine(this.editor), false);\n return true;\n },\n 'debugger.toggle-breakpoint-enabled': async(): Promise => {\n if (this.muted || !this.editor) {\n return false;\n }\n await this.toggleBreakpoint(selectionLine(this.editor), true);\n return true;\n },\n 'debugger.breakpoint-input-window': async(): Promise => {\n if (this.muted || !this.editor) {\n return false;\n }\n const line = selectionLine(this.editor);\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.KeyboardShortcut);\n\n this.#openEditDialogForLine(line);\n return true;\n },\n });\n }\n\n #openEditDialogForLine(line: CodeMirror.Line, isLogpoint?: boolean): void {\n if (this.muted) {\n return;\n }\n if (this.activeBreakpointDialog) {\n this.activeBreakpointDialog.finishEditing(false, '');\n }\n const breakpoint = this.breakpoints.find(b => b.position >= line.from && b.position <= line.to)?.breakpoint || null;\n if (isLogpoint === undefined && breakpoint !== null) {\n isLogpoint = breakpoint.isLogpoint();\n }\n this.editBreakpointCondition({line, breakpoint, location: null, isLogpoint});\n }\n\n override editorInitialized(editor: TextEditor.TextEditor.TextEditor): void {\n // Start asynchronous actions that require access to the editor\n // instance\n this.editor = editor;\n computeNonBreakableLines(editor.state, this.transformer, this.uiSourceCode).then(linePositions => {\n if (linePositions.length) {\n editor.dispatch({effects: SourceFrame.SourceFrame.addNonBreakableLines.of(linePositions)});\n }\n }, console.error);\n if (this.ignoreListInfobar) {\n this.attachInfobar(this.ignoreListInfobar);\n }\n if (this.missingDebugInfoBar) {\n this.attachInfobar(this.missingDebugInfoBar);\n }\n if (this.sourceMapInfobar) {\n this.attachInfobar(this.sourceMapInfobar);\n }\n if (!this.muted) {\n void this.refreshBreakpoints();\n }\n void this.callFrameChanged();\n\n this.popoverHelper?.dispose();\n this.popoverHelper = new UI.PopoverHelper.PopoverHelper(editor, this.getPopoverRequest.bind(this));\n this.popoverHelper.setDisableOnClick(true);\n this.popoverHelper.setTimeout(250, 250);\n this.popoverHelper.setHasPadding(true);\n }\n\n static override accepts(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {\n return uiSourceCode.contentType().hasScripts();\n }\n\n private showIgnoreListInfobarIfNeeded(): void {\n const uiSourceCode = this.uiSourceCode;\n if (!uiSourceCode.contentType().hasScripts()) {\n return;\n }\n\n if (!Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n uiSourceCode)) {\n this.hideIgnoreListInfobar();\n return;\n }\n\n if (this.ignoreListInfobar) {\n this.ignoreListInfobar.dispose();\n }\n\n function unIgnoreList(): void {\n Bindings.IgnoreListManager.IgnoreListManager.instance().unIgnoreListUISourceCode(uiSourceCode);\n }\n\n const infobar =\n new UI.Infobar.Infobar(UI.Infobar.Type.Warning, i18nString(UIStrings.thisScriptIsOnTheDebuggersIgnore), [\n {text: i18nString(UIStrings.removeFromIgnoreList), highlight: false, delegate: unIgnoreList, dismiss: true},\n {\n text: i18nString(UIStrings.configure),\n highlight: false,\n delegate:\n UI.ViewManager.ViewManager.instance().showView.bind(UI.ViewManager.ViewManager.instance(), 'blackbox'),\n dismiss: false,\n },\n ]);\n this.ignoreListInfobar = infobar;\n infobar.setCloseCallback(() => this.removeInfobar(this.ignoreListInfobar));\n\n infobar.createDetailsRowMessage(i18nString(UIStrings.theDebuggerWillSkipStepping));\n\n this.attachInfobar(this.ignoreListInfobar);\n }\n\n attachInfobar(bar: UI.Infobar.Infobar): void {\n if (this.editor) {\n this.editor.dispatch({effects: addInfobar.of(bar)});\n }\n }\n\n removeInfobar(bar: UI.Infobar.Infobar|null): void {\n if (this.editor && bar) {\n this.editor.dispatch({effects: removeInfobar.of(bar)});\n }\n }\n\n private hideIgnoreListInfobar(): void {\n if (!this.ignoreListInfobar) {\n return;\n }\n this.ignoreListInfobar.dispose();\n this.ignoreListInfobar = null;\n }\n\n override willHide(): void {\n this.popoverHelper?.hidePopover();\n }\n\n editBreakpointLocation({breakpoint, uiLocation}: Breakpoints.BreakpointManager.BreakpointLocation): void {\n const {lineNumber} = this.transformer.uiLocationToEditorLocation(uiLocation.lineNumber, uiLocation.columnNumber);\n const line = this.editor?.state.doc.line(lineNumber + 1);\n if (!line) {\n return;\n }\n this.editBreakpointCondition({line, breakpoint, location: null, isLogpoint: breakpoint.isLogpoint()});\n }\n\n override populateLineGutterContextMenu(contextMenu: UI.ContextMenu.ContextMenu, editorLineNumber: number): void {\n const uiLocation = new Workspace.UISourceCode.UILocation(this.uiSourceCode, editorLineNumber, 0);\n this.scriptsPanel.appendUILocationItems(contextMenu, uiLocation);\n if (this.muted || !this.editor) {\n return;\n }\n const line = this.editor.state.doc.line(editorLineNumber + 1);\n const breakpoints = this.lineBreakpoints(line);\n const supportsConditionalBreakpoints =\n Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().supportsConditionalBreakpoints(\n this.uiSourceCode);\n if (!breakpoints.length) {\n if (this.editor && SourceFrame.SourceFrame.isBreakableLine(this.editor.state, line)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.addBreakpoint),\n this.createNewBreakpoint.bind(\n this, line, EMPTY_BREAKPOINT_CONDITION, /* enabled */ true, /* isLogpoint */ false),\n {jslogContext: 'add-breakpoint'});\n if (supportsConditionalBreakpoints) {\n contextMenu.debugSection().appendItem(i18nString(UIStrings.addConditionalBreakpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.LineGutterContextMenu);\n this.editBreakpointCondition({line, breakpoint: null, location: null, isLogpoint: false});\n }, {jslogContext: 'add-cnd-breakpoint'});\n contextMenu.debugSection().appendItem(i18nString(UIStrings.addLogpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.LineGutterContextMenu);\n this.editBreakpointCondition({line, breakpoint: null, location: null, isLogpoint: true});\n }, {jslogContext: 'add-logpoint'});\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.neverPauseHere),\n this.createNewBreakpoint.bind(\n this, line, NEVER_PAUSE_HERE_CONDITION, /* enabled */ true, /* isLogpoint */ false),\n {jslogContext: 'never-pause-here'});\n }\n }\n } else {\n const removeTitle = i18nString(UIStrings.removeBreakpoint, {n: breakpoints.length});\n contextMenu.debugSection().appendItem(\n removeTitle, () => breakpoints.forEach(breakpoint => {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.BreakpointRemovedFromGutterContextMenu);\n void breakpoint.remove(false);\n }),\n {jslogContext: 'remove-breakpoint'});\n if (breakpoints.length === 1 && supportsConditionalBreakpoints) {\n // Editing breakpoints only make sense for conditional breakpoints\n // and logpoints and both are currently only available for JavaScript\n // debugging.\n contextMenu.debugSection().appendItem(i18nString(UIStrings.editBreakpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.BreakpointMarkerContextMenu);\n this.editBreakpointCondition({line, breakpoint: breakpoints[0], location: null});\n }, {jslogContext: 'edit-breakpoint'});\n }\n const hasEnabled = breakpoints.some(breakpoint => breakpoint.enabled());\n if (hasEnabled) {\n const title = i18nString(UIStrings.disableBreakpoint, {n: breakpoints.length});\n contextMenu.debugSection().appendItem(\n title, () => breakpoints.forEach(breakpoint => breakpoint.setEnabled(false)),\n {jslogContext: 'enable-breakpoint'});\n }\n const hasDisabled = breakpoints.some(breakpoint => !breakpoint.enabled());\n if (hasDisabled) {\n const title = i18nString(UIStrings.enableBreakpoint, {n: breakpoints.length});\n contextMenu.debugSection().appendItem(\n title, () => breakpoints.forEach(breakpoint => breakpoint.setEnabled(true)),\n {jslogContext: 'disable-breakpoint'});\n }\n }\n }\n\n override populateTextAreaContextMenu(contextMenu: UI.ContextMenu.ContextMenu): void {\n function addSourceMapURL(scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile): void {\n const dialog =\n AddDebugInfoURLDialog.createAddSourceMapURLDialog(addSourceMapURLDialogCallback.bind(null, scriptFile));\n dialog.show();\n }\n\n function addSourceMapURLDialogCallback(\n scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile, url: Platform.DevToolsPath.UrlString): void {\n if (!url) {\n return;\n }\n scriptFile.addSourceMapURL(url);\n }\n\n function addDebugInfoURL(scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile): void {\n const dialog =\n AddDebugInfoURLDialog.createAddDWARFSymbolsURLDialog(addDebugInfoURLDialogCallback.bind(null, scriptFile));\n dialog.show();\n }\n\n function addDebugInfoURLDialogCallback(\n scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile, url: Platform.DevToolsPath.UrlString): void {\n if (!url) {\n return;\n }\n scriptFile.addDebugInfoURL(url);\n }\n\n if (this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Network &&\n Common.Settings.Settings.instance().moduleSetting('jsSourceMapsEnabled').get() &&\n !Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(this.uiSourceCode.url())) {\n if (this.scriptFileForDebuggerModel.size) {\n const scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile =\n this.scriptFileForDebuggerModel.values().next().value;\n const addSourceMapURLLabel = i18nString(UIStrings.addSourceMap);\n contextMenu.debugSection().appendItem(\n addSourceMapURLLabel, addSourceMapURL.bind(null, scriptFile), {jslogContext: 'add-source-map'});\n if (scriptFile.script?.isWasm() &&\n !Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().pluginManager.hasPluginForScript(\n scriptFile.script)) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.addWasmDebugInfo), addDebugInfoURL.bind(null, scriptFile),\n {jslogContext: 'add-wasm-debug-info'});\n }\n }\n }\n }\n\n private workingCopyChanged(): void {\n if (!this.scriptFileForDebuggerModel.size) {\n this.setMuted(this.uiSourceCode.isDirty());\n }\n }\n\n private workingCopyCommitted(): void {\n this.scriptsPanel.updateLastModificationTime();\n if (!this.scriptFileForDebuggerModel.size) {\n this.setMuted(false);\n }\n }\n\n private didMergeToVM(): void {\n if (this.consistentScripts()) {\n this.setMuted(false);\n }\n }\n\n private didDivergeFromVM(): void {\n this.setMuted(true);\n }\n\n private setMuted(value: boolean): void {\n if (this.initializedMuted) {\n return;\n }\n if (value !== this.muted) {\n this.muted = value;\n if (!value) {\n void this.restoreBreakpointsAfterEditing();\n } else if (this.editor) {\n this.editor.dispatch({effects: muteBreakpoints.of(null)});\n }\n }\n }\n\n private consistentScripts(): boolean {\n for (const scriptFile of this.scriptFileForDebuggerModel.values()) {\n if (scriptFile.hasDivergedFromVM() || scriptFile.isMergingToVM()) {\n return false;\n }\n }\n return true;\n }\n\n private isVariableIdentifier(tokenType: string): boolean {\n return tokenType === 'VariableName' || tokenType === 'VariableDefinition';\n }\n\n private isIdentifier(tokenType: string): boolean {\n return tokenType === 'VariableName' || tokenType === 'VariableDefinition' || tokenType === 'PropertyName' ||\n tokenType === 'PropertyDefinition';\n }\n\n private getPopoverRequest(event: MouseEvent): UI.PopoverHelper.PopoverRequest|null {\n if (UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {\n return null;\n }\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n const {editor} = this;\n if (!debuggerModel || !debuggerModel.isPaused() || !editor) {\n return null;\n }\n\n const selectedCallFrame =\n (UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame) as SDK.DebuggerModel.CallFrame);\n if (!selectedCallFrame) {\n return null;\n }\n\n let textPosition = editor.editor.posAtCoords(event);\n if (!textPosition) {\n return null;\n }\n const positionCoords = editor.editor.coordsAtPos(textPosition);\n if (!positionCoords || event.clientY < positionCoords.top || event.clientY > positionCoords.bottom ||\n event.clientX < positionCoords.left - 30 || event.clientX > positionCoords.right + 30) {\n return null;\n }\n if (event.clientX < positionCoords.left && textPosition > editor.state.doc.lineAt(textPosition).from) {\n textPosition -= 1;\n }\n\n const highlightRange = computePopoverHighlightRange(editor.state, this.uiSourceCode.mimeType(), textPosition);\n if (!highlightRange) {\n return null;\n }\n\n const highlightLine = editor.state.doc.lineAt(highlightRange.from);\n if (highlightRange.to > highlightLine.to) {\n return null;\n }\n\n const leftCorner = editor.editor.coordsAtPos(highlightRange.from);\n const rightCorner = editor.editor.coordsAtPos(highlightRange.to);\n if (!leftCorner || !rightCorner) {\n return null;\n }\n const box = new AnchorBox(\n leftCorner.left, leftCorner.top - 2, rightCorner.right - leftCorner.left, rightCorner.bottom - leftCorner.top);\n const evaluationText = editor.state.sliceDoc(highlightRange.from, highlightRange.to);\n\n let objectPopoverHelper: ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper|null = null;\n return {\n box,\n show: async(popover: UI.GlassPane.GlassPane): Promise => {\n let resolvedText: string = '';\n if (Root.Runtime.experiments.isEnabled('evaluateExpressionsWithSourceMaps')) {\n const nameMap = await SourceMapScopes.NamesResolver.allVariablesInCallFrame(selectedCallFrame);\n try {\n resolvedText =\n await Formatter.FormatterWorkerPool.formatterWorkerPool().javaScriptSubstitute(evaluationText, nameMap);\n } catch {\n }\n } else {\n resolvedText = await SourceMapScopes.NamesResolver.resolveExpression(\n selectedCallFrame, evaluationText, this.uiSourceCode, highlightLine.number - 1,\n highlightRange.from - highlightLine.from, highlightRange.to - highlightLine.from);\n }\n // We use side-effect free debug-evaluate when the highlighted expression contains a\n // function/method call. Otherwise we allow side-effects. The motiviation here are\n // frameworks like Vue, that heavily use proxies for caching:\n //\n // * We deem a simple property access of a proxy as deterministic so it should be\n // successful even if V8 thinks its side-effecting.\n // * Explicit function calls on the other hand must be side-effect free. The canonical\n // example is hovering over {Math.random()} which would result in a different value\n // each time the user hovers over it.\n const throwOnSideEffect = Root.Runtime.experiments.isEnabled('evaluateExpressionsWithSourceMaps') &&\n highlightRange.containsCallExpression;\n const result = await selectedCallFrame.evaluate({\n expression: resolvedText || evaluationText,\n objectGroup: 'popover',\n includeCommandLineAPI: false,\n silent: true,\n returnByValue: false,\n generatePreview: false,\n throwOnSideEffect,\n timeout: undefined,\n disableBreaks: undefined,\n replMode: undefined,\n allowUnsafeEvalBlockedByCSP: undefined,\n });\n if (!result || 'error' in result || !result.object ||\n (result.object.type === 'object' && result.object.subtype === 'error')) {\n return false;\n }\n objectPopoverHelper =\n await ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper.buildObjectPopover(result.object, popover);\n const potentiallyUpdatedCallFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!objectPopoverHelper || selectedCallFrame !== potentiallyUpdatedCallFrame) {\n debuggerModel.runtimeModel().releaseObjectGroup('popover');\n if (objectPopoverHelper) {\n objectPopoverHelper.dispose();\n }\n return false;\n }\n const decoration = CodeMirror.Decoration.set(evalExpressionMark.range(highlightRange.from, highlightRange.to));\n editor.dispatch({effects: evalExpression.update.of(decoration)});\n return true;\n },\n hide: (): void => {\n if (objectPopoverHelper) {\n objectPopoverHelper.dispose();\n }\n debuggerModel.runtimeModel().releaseObjectGroup('popover');\n editor.dispatch({effects: evalExpression.update.of(CodeMirror.Decoration.none)});\n },\n };\n }\n\n private onEditorUpdate(update: CodeMirror.ViewUpdate): void {\n if (!update.changes.empty) {\n // If the document changed, adjust known breakpoint positions\n // for that change\n for (const breakpointDesc of this.breakpoints) {\n breakpointDesc.position = update.changes.mapPos(breakpointDesc.position);\n }\n }\n }\n\n private onWheel(event: WheelEvent): void {\n if (this.executionLocation && UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {\n event.preventDefault();\n }\n }\n\n private onKeyDown(event: KeyboardEvent): boolean {\n const ctrlDown = UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event);\n if (!ctrlDown) {\n this.setControlDown(false);\n }\n if (event.key === Platform.KeyboardUtilities.ESCAPE_KEY) {\n if (this.popoverHelper && this.popoverHelper.isPopoverVisible()) {\n this.popoverHelper.hidePopover();\n event.consume();\n return true;\n }\n }\n if (ctrlDown && this.executionLocation) {\n this.setControlDown(true);\n }\n return false;\n }\n\n private onMouseMove(event: MouseEvent): void {\n if (this.executionLocation && this.controlDown &&\n UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {\n if (!this.continueToLocations) {\n void this.showContinueToLocations();\n }\n }\n }\n\n private onMouseDown(event: MouseEvent): void {\n if (!this.executionLocation || !UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {\n return;\n }\n if (!this.continueToLocations || !this.editor) {\n return;\n }\n event.consume();\n const textPosition = this.editor.editor.posAtCoords(event);\n if (textPosition === null) {\n return;\n }\n for (const {from, to, click} of this.continueToLocations) {\n if (from <= textPosition && to >= textPosition) {\n click();\n break;\n }\n }\n }\n\n private onBlur(_event: Event): void {\n this.setControlDown(false);\n }\n\n private onKeyUp(_event: KeyboardEvent): void {\n this.setControlDown(false);\n }\n\n private setControlDown(state: boolean): void {\n if (state !== this.controlDown) {\n this.controlDown = state;\n clearTimeout(this.controlTimeout);\n this.controlTimeout = undefined;\n if (state && this.executionLocation) {\n this.controlTimeout = window.setTimeout(() => {\n if (this.executionLocation && this.controlDown) {\n void this.showContinueToLocations();\n }\n }, 150);\n } else {\n this.clearContinueToLocations();\n }\n }\n }\n\n private editBreakpointCondition(breakpointEditRequest: BreakpointEditRequest): void {\n const {line, breakpoint, location, isLogpoint} = breakpointEditRequest;\n if (breakpoint?.isRemoved) {\n // This method can get called for stale breakpoints, e.g. via the revealer.\n // In that case we don't show the edit dialog as to not resurrect the breakpoint\n // unintentionally.\n return;\n }\n\n this.#scheduledFinishingActiveDialog = false;\n const isRepeatedEditRequest = this.#activeBreakpointEditRequest &&\n isSameEditRequest(this.#activeBreakpointEditRequest, breakpointEditRequest);\n if (isRepeatedEditRequest) {\n // Do not re-show the same edit dialog, instead use the already open one.\n return;\n }\n\n if (this.activeBreakpointDialog) {\n // If this a request to edit a different dialog, make sure to close the current active one\n // to avoid showing two dialogs at the same time.\n this.activeBreakpointDialog.saveAndFinish();\n }\n\n const editor = this.editor as TextEditor.TextEditor.TextEditor;\n const oldCondition = breakpoint ? breakpoint.condition() : '';\n const isLogpointForDialog = breakpoint?.isLogpoint() ?? Boolean(isLogpoint);\n const decorationElement = document.createElement('div');\n const compartment = new CodeMirror.Compartment();\n const dialog = new BreakpointEditDialog(line.number - 1, oldCondition, isLogpointForDialog, async result => {\n this.activeBreakpointDialog = null;\n this.#activeBreakpointEditRequest = undefined;\n dialog.detach();\n editor.dispatch({effects: compartment.reconfigure([])});\n if (!result.committed) {\n SourceComponents.BreakpointsView.BreakpointsSidebarController.instance().breakpointEditFinished(\n breakpoint, false);\n return;\n }\n SourceComponents.BreakpointsView.BreakpointsSidebarController.instance().breakpointEditFinished(\n breakpoint, oldCondition !== result.condition);\n recordBreakpointWithConditionAdded(result);\n if (breakpoint) {\n breakpoint.setCondition(result.condition, result.isLogpoint);\n } else if (location) {\n await this.setBreakpoint(\n location.lineNumber, location.columnNumber, result.condition, /* enabled */ true, result.isLogpoint);\n } else {\n await this.createNewBreakpoint(line, result.condition, /* enabled */ true, result.isLogpoint);\n }\n });\n editor.dispatch({\n effects: CodeMirror.StateEffect.appendConfig.of(compartment.of(CodeMirror.EditorView.decorations.of(\n CodeMirror.Decoration.set([CodeMirror.Decoration\n .widget({\n block: true, widget: new class extends CodeMirror.WidgetType {\n toDOM(): HTMLElement {\n return decorationElement;\n }\n }(),\n side: 1,\n })\n .range(line.to)])))),\n });\n dialog.element.addEventListener('blur', async event => {\n if (!event.relatedTarget ||\n (event.relatedTarget && !(event.relatedTarget as Node).isSelfOrDescendant(dialog.element))) {\n this.#scheduledFinishingActiveDialog = true;\n // Debounce repeated clicks on opening the edit dialog. Wait for a short amount of time\n // in order to see whether we get a request to open the exact same dialog again.\n setTimeout(() => {\n if (this.activeBreakpointDialog === dialog) {\n if (this.#scheduledFinishingActiveDialog) {\n dialog.saveAndFinish();\n this.#scheduledFinishingActiveDialog = false;\n } else {\n dialog.focusEditor();\n }\n }\n }, 200);\n }\n }, true);\n\n dialog.markAsExternallyManaged();\n dialog.show(decorationElement);\n dialog.focusEditor();\n this.activeBreakpointDialog = dialog;\n this.#activeBreakpointEditRequest = breakpointEditRequest;\n\n // This counts new conditional breakpoints or logpoints that are added.\n function recordBreakpointWithConditionAdded(result: BreakpointEditDialogResult): void {\n const {condition: newCondition, isLogpoint} = result;\n const isConditionalBreakpoint = newCondition.length !== 0 && !isLogpoint;\n\n const wasLogpoint = breakpoint?.isLogpoint();\n const wasConditionalBreakpoint = oldCondition && oldCondition.length !== 0 && !wasLogpoint;\n if (isLogpoint && !wasLogpoint) {\n Host.userMetrics.breakpointWithConditionAdded(Host.UserMetrics.BreakpointWithConditionAdded.Logpoint);\n } else if (isConditionalBreakpoint && !wasConditionalBreakpoint) {\n Host.userMetrics.breakpointWithConditionAdded(\n Host.UserMetrics.BreakpointWithConditionAdded.ConditionalBreakpoint);\n }\n }\n\n function isSameEditRequest(editA: BreakpointEditRequest, editB: BreakpointEditRequest): boolean {\n if (editA.line.number !== editB.line.number) {\n return false;\n }\n if (editA.line.from !== editB.line.from) {\n return false;\n }\n if (editA.line.text !== editB.line.text) {\n return false;\n }\n if (editA.breakpoint !== editB.breakpoint) {\n return false;\n }\n if (editA.location !== editB.location) {\n return false;\n }\n return editA.isLogpoint === editB.isLogpoint;\n }\n }\n\n // Show widgets with variable's values after lines that mention the\n // variables, if the debugger is paused in this file.\n private async updateValueDecorations(): Promise {\n if (!this.editor) {\n return;\n }\n const decorations = this.executionLocation ? await this.computeValueDecorations() : null;\n // After the `await` the DebuggerPlugin could have been disposed. Re-check `this.editor`.\n if (!this.editor) {\n return;\n }\n if (decorations || this.editor.state.field(valueDecorations.field).size) {\n this.editor.dispatch({effects: valueDecorations.update.of(decorations || CodeMirror.Decoration.none)});\n }\n }\n\n async #rawLocationToEditorOffset(location: SDK.DebuggerModel.Location|null, url: Platform.DevToolsPath.UrlString):\n Promise {\n const uiLocation = location &&\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(location);\n if (!uiLocation || uiLocation.uiSourceCode.url() !== url) {\n return null;\n }\n const offset = this.editor?.toOffset(\n this.transformer.uiLocationToEditorLocation(uiLocation.lineNumber, uiLocation.columnNumber));\n return offset ?? null;\n }\n\n private async computeValueDecorations(): Promise {\n if (!this.editor) {\n return null;\n }\n if (!Common.Settings.Settings.instance().moduleSetting('inlineVariableValues').get()) {\n return null;\n }\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (!executionContext) {\n return null;\n }\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n return null;\n }\n const url = this.uiSourceCode.url();\n\n const rawLocationToEditorOffset: (location: SDK.DebuggerModel.Location|null) => Promise = location =>\n this.#rawLocationToEditorOffset(location, url);\n\n const functionOffsetPromise = this.#rawLocationToEditorOffset(callFrame.functionLocation(), url);\n const executionOffsetPromise = this.#rawLocationToEditorOffset(callFrame.location(), url);\n const [functionOffset, executionOffset] = await Promise.all([functionOffsetPromise, executionOffsetPromise]);\n if (!functionOffset || !executionOffset || !this.editor) {\n return null;\n }\n\n if (functionOffset >= executionOffset || executionOffset - functionOffset > MAX_CODE_SIZE_FOR_VALUE_DECORATIONS) {\n return null;\n }\n\n const variableNames = getVariableNamesByLine(this.editor.state, functionOffset, executionOffset, executionOffset);\n if (variableNames.length === 0) {\n return null;\n }\n\n const scopeMappings = await computeScopeMappings(callFrame, rawLocationToEditorOffset);\n if (scopeMappings.length === 0) {\n return null;\n }\n\n const variablesByLine = getVariableValuesByLine(scopeMappings, variableNames);\n if (!variablesByLine || !this.editor) {\n return null;\n }\n\n const decorations: CodeMirror.Range[] = [];\n\n for (const [line, names] of variablesByLine) {\n const prevLine = variablesByLine.get(line - 1);\n let newNames = prevLine ? Array.from(names).filter(n => prevLine.get(n[0]) !== n[1]) : Array.from(names);\n if (!newNames.length) {\n continue;\n }\n if (newNames.length > 10) {\n newNames = newNames.slice(0, 10);\n }\n decorations.push(CodeMirror.Decoration.widget({widget: new ValueDecoration(newNames), side: 1})\n .range(this.editor.state.doc.line(line + 1).to));\n }\n return CodeMirror.Decoration.set(decorations, true);\n }\n\n // Highlight the locations the debugger can continue to (when\n // Control is held)\n private async showContinueToLocations(): Promise {\n this.popoverHelper?.hidePopover();\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (!executionContext || !this.editor) {\n return;\n }\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n return;\n }\n const start = callFrame.functionLocation() || callFrame.location();\n const debuggerModel = callFrame.debuggerModel;\n\n const {state} = this.editor;\n const locations = await debuggerModel.getPossibleBreakpoints(start, null, true);\n\n this.continueToLocations = [];\n let previousCallLine = -1;\n for (const location of locations.reverse()) {\n const editorLocation = this.transformer.uiLocationToEditorLocation(location.lineNumber, location.columnNumber);\n if (previousCallLine === editorLocation.lineNumber &&\n location.type !== Protocol.Debugger.BreakLocationType.Call ||\n editorLocation.lineNumber >= state.doc.lines) {\n continue;\n }\n const line = state.doc.line(editorLocation.lineNumber + 1);\n const position = Math.min(line.to, line.from + editorLocation.columnNumber);\n let syntaxNode = CodeMirror.syntaxTree(state).resolveInner(position, 1);\n if (syntaxNode.firstChild || syntaxNode.from < line.from ||\n syntaxNode.to > line.to) { // Only use leaf nodes within the line\n continue;\n }\n if (syntaxNode.name === '.') {\n const nextNode = syntaxNode.resolve(syntaxNode.to, 1);\n if (nextNode.firstChild || nextNode.from < line.from || nextNode.to > line.to) {\n continue;\n }\n syntaxNode = nextNode;\n }\n const syntaxType = syntaxNode.name;\n const validKeyword = syntaxType === 'this' || syntaxType === 'return' || syntaxType === 'new' ||\n syntaxType === 'break' || syntaxType === 'continue';\n if (!validKeyword && !this.isIdentifier(syntaxType)) {\n continue;\n }\n\n this.continueToLocations.push(\n {from: syntaxNode.from, to: syntaxNode.to, async: false, click: () => location.continueToLocation()});\n if (location.type === Protocol.Debugger.BreakLocationType.Call) {\n previousCallLine = editorLocation.lineNumber;\n }\n\n const identifierName =\n validKeyword ? '' : line.text.slice(syntaxNode.from - line.from, syntaxNode.to - line.from);\n let asyncCall: CodeMirror.SyntaxNode|null = null;\n if (identifierName === 'then' && syntaxNode.parent?.name === 'MemberExpression') {\n asyncCall = syntaxNode.parent.parent;\n } else if (\n identifierName === 'setTimeout' || identifierName === 'setInterval' || identifierName === 'postMessage') {\n asyncCall = syntaxNode.parent;\n }\n if (syntaxType === 'new') {\n const callee = syntaxNode.parent?.getChild('Expression');\n if (callee && callee.name === 'VariableName' && state.sliceDoc(callee.from, callee.to) === 'Worker') {\n asyncCall = syntaxNode.parent;\n }\n }\n if (asyncCall && (asyncCall.name === 'CallExpression' || asyncCall.name === 'NewExpression') &&\n location.type === Protocol.Debugger.BreakLocationType.Call) {\n const firstArg = asyncCall.getChild('ArgList')?.firstChild?.nextSibling;\n let highlightNode;\n if (firstArg?.name === 'VariableName') {\n highlightNode = firstArg;\n } else if (firstArg?.name === 'ArrowFunction' || firstArg?.name === 'FunctionExpression') {\n highlightNode = firstArg.firstChild;\n if (highlightNode?.name === 'async') {\n highlightNode = highlightNode.nextSibling;\n }\n }\n if (highlightNode) {\n const isCurrentPosition = this.executionLocation &&\n location.lineNumber === this.executionLocation.lineNumber &&\n location.columnNumber === this.executionLocation.columnNumber;\n this.continueToLocations.push({\n from: highlightNode.from,\n to: highlightNode.to,\n async: true,\n click: () => this.asyncStepIn(location, Boolean(isCurrentPosition)),\n });\n }\n }\n }\n const decorations = CodeMirror.Decoration.set(\n this.continueToLocations.map(loc => {\n return (loc.async ? asyncContinueToMark : continueToMark).range(loc.from, loc.to);\n }),\n true);\n this.editor.dispatch({effects: continueToMarkers.update.of(decorations)});\n }\n\n private clearContinueToLocations(): void {\n if (this.editor && this.editor.state.field(continueToMarkers.field).size) {\n this.editor.dispatch({effects: continueToMarkers.update.of(CodeMirror.Decoration.none)});\n }\n }\n\n private asyncStepIn(location: SDK.DebuggerModel.BreakLocation, isCurrentPosition: boolean): void {\n if (!isCurrentPosition) {\n location.continueToLocation(asyncStepIn);\n } else {\n asyncStepIn();\n }\n\n function asyncStepIn(): void {\n location.debuggerModel.scheduleStepIntoAsync();\n }\n }\n\n private fetchBreakpoints(): {\n position: number,\n breakpoint: Breakpoints.BreakpointManager.Breakpoint,\n }[] {\n if (!this.editor) {\n return [];\n }\n const {editor} = this;\n const breakpointLocations = this.breakpointManager.breakpointLocationsForUISourceCode(this.uiSourceCode);\n return breakpointLocations.map(({uiLocation, breakpoint}) => {\n const editorLocation =\n this.transformer.uiLocationToEditorLocation(uiLocation.lineNumber, uiLocation.columnNumber);\n return {\n position: editor.toOffset(editorLocation),\n breakpoint,\n };\n });\n }\n\n private lineBreakpoints(line: CodeMirror.Line): readonly Breakpoints.BreakpointManager.Breakpoint[] {\n return this.breakpoints.filter(b => b.position >= line.from && b.position <= line.to).map(b => b.breakpoint);\n }\n\n // Compute the decorations for existing breakpoints (both on the\n // gutter and inline in the code)\n private async computeBreakpointDecoration(state: CodeMirror.EditorState, breakpoints: BreakpointDescription[]):\n Promise {\n const decorations: CodeMirror.Range[] = [];\n const gutterMarkers: CodeMirror.Range[] = [];\n const breakpointsByLine = new Map();\n const inlineMarkersByLine =\n new Map();\n const possibleBreakpointRequests: Promise[] = [];\n const inlineMarkerPositions = new Set();\n\n const addInlineMarker =\n (linePos: number, columnNumber: number, breakpoint: Breakpoints.BreakpointManager.Breakpoint|null): void => {\n let inlineMarkers = inlineMarkersByLine.get(linePos);\n if (!inlineMarkers) {\n inlineMarkers = [];\n inlineMarkersByLine.set(linePos, inlineMarkers);\n }\n inlineMarkers.push({breakpoint, column: columnNumber});\n };\n\n for (const {position, breakpoint} of breakpoints) {\n const line = state.doc.lineAt(position);\n let forThisLine = breakpointsByLine.get(line.from);\n if (!forThisLine) {\n forThisLine = [];\n breakpointsByLine.set(line.from, forThisLine);\n }\n if (breakpoint.enabled() && forThisLine.every(b => !b.enabled())) {\n // Start a request for possible breakpoint positions on this line\n const start = this.transformer.editorLocationToUILocation(line.number - 1, 0);\n const end = this.transformer.editorLocationToUILocation(\n line.number - 1, Math.min(line.length, MAX_POSSIBLE_BREAKPOINT_LINE));\n const range = new TextUtils.TextRange.TextRange(\n start.lineNumber, start.columnNumber || 0, end.lineNumber, end.columnNumber || 0);\n possibleBreakpointRequests.push(this.breakpointManager.possibleBreakpoints(this.uiSourceCode, range)\n .then(locations => addPossibleBreakpoints(line, locations)));\n }\n forThisLine.push(breakpoint);\n if (breakpoint.enabled()) {\n inlineMarkerPositions.add(position);\n addInlineMarker(line.from, position - line.from, breakpoint);\n }\n }\n\n for (const [lineStart, lineBreakpoints] of breakpointsByLine) {\n const main = lineBreakpoints.sort(mostSpecificBreakpoint)[0];\n let gutterClass = 'cm-breakpoint';\n if (!main.enabled()) {\n gutterClass += ' cm-breakpoint-disabled';\n }\n if (!main.bound()) {\n gutterClass += ' cm-breakpoint-unbound';\n }\n if (main.isLogpoint()) {\n gutterClass += ' cm-breakpoint-logpoint';\n } else if (main.condition()) {\n gutterClass += ' cm-breakpoint-conditional';\n }\n gutterMarkers.push((new BreakpointGutterMarker(gutterClass)).range(lineStart));\n }\n\n const addPossibleBreakpoints = (line: CodeMirror.Line, locations: Workspace.UISourceCode.UILocation[]): void => {\n for (const location of locations) {\n const editorLocation = this.transformer.uiLocationToEditorLocation(location.lineNumber, location.columnNumber);\n if (editorLocation.lineNumber !== line.number - 1) {\n continue;\n }\n const position = Math.min(line.to, line.from + editorLocation.columnNumber);\n if (!inlineMarkerPositions.has(position)) {\n addInlineMarker(line.from, editorLocation.columnNumber, null);\n }\n }\n };\n\n await Promise.all(possibleBreakpointRequests);\n for (const [linePos, inlineMarkers] of inlineMarkersByLine) {\n if (inlineMarkers.length > 1) {\n for (const {column, breakpoint} of inlineMarkers) {\n const marker = new BreakpointInlineMarker(breakpoint, this);\n decorations.push(CodeMirror.Decoration.widget({widget: marker, side: -1}).range(linePos + column));\n }\n }\n }\n\n return {content: CodeMirror.Decoration.set(decorations, true), gutter: CodeMirror.RangeSet.of(gutterMarkers, true)};\n }\n\n // If, after editing, the editor is synced again (either by going\n // back to the original document or by saving), we replace any\n // breakpoints the breakpoint manager might have (which point into\n // the old file) with the breakpoints we have, which had their\n // positions tracked through the changes.\n private async restoreBreakpointsAfterEditing(): Promise {\n const {breakpoints} = this;\n const editor = this.editor as TextEditor.TextEditor.TextEditor;\n this.breakpoints = [];\n await Promise.all(breakpoints.map(async description => {\n const {breakpoint, position} = description;\n const condition = breakpoint.condition(), enabled = breakpoint.enabled(), isLogpoint = breakpoint.isLogpoint();\n await breakpoint.remove(false);\n const editorLocation = editor.toLineColumn(position);\n const uiLocation =\n this.transformer.editorLocationToUILocation(editorLocation.lineNumber, editorLocation.columnNumber);\n await this.setBreakpoint(uiLocation.lineNumber, uiLocation.columnNumber, condition, enabled, isLogpoint);\n }));\n }\n\n private async refreshBreakpoints(): Promise {\n if (this.editor) {\n this.breakpoints = this.fetchBreakpoints();\n const forBreakpoints = this.breakpoints;\n const decorations = await this.computeBreakpointDecoration(this.editor.state, forBreakpoints);\n // After the `await` we could have disposed of this DebuggerPlugin, so re-check `this.editor`.\n if (this.editor && this.breakpoints === forBreakpoints &&\n (decorations.gutter.size || this.editor.state.field(breakpointMarkers, false)?.gutter.size)) {\n this.editor.dispatch({effects: setBreakpointDeco.of(decorations)});\n }\n }\n }\n\n private breakpointChange(\n event: Common.EventTarget.EventTargetEvent): void {\n const {uiLocation} = event.data;\n if (uiLocation.uiSourceCode !== this.uiSourceCode || this.muted) {\n return;\n }\n for (const scriptFile of this.scriptFileForDebuggerModel.values()) {\n if (scriptFile.isDivergingFromVM() || scriptFile.isMergingToVM()) {\n return;\n }\n }\n // These tend to arrive in bursts, so debounce them\n window.clearTimeout(this.refreshBreakpointsTimeout);\n this.refreshBreakpointsTimeout = window.setTimeout(() => this.refreshBreakpoints(), 50);\n }\n\n onInlineBreakpointMarkerClick(event: MouseEvent, breakpoint: Breakpoints.BreakpointManager.Breakpoint|null): void {\n event.consume(true);\n if (breakpoint) {\n if (event.shiftKey) {\n breakpoint.setEnabled(!breakpoint.enabled());\n } else {\n void breakpoint.remove(false);\n }\n } else if (this.editor) {\n const editorLocation = this.editor.editor.posAtDOM(event.target as unknown as HTMLElement);\n const line = this.editor.state.doc.lineAt(editorLocation);\n const uiLocation = this.transformer.editorLocationToUILocation(line.number - 1, editorLocation - line.from);\n void this.setBreakpoint(\n uiLocation.lineNumber, uiLocation.columnNumber, EMPTY_BREAKPOINT_CONDITION, /* enabled */ true,\n /* isLogpoint */ false);\n }\n }\n\n onInlineBreakpointMarkerContextMenu(event: MouseEvent, breakpoint: Breakpoints.BreakpointManager.Breakpoint|null):\n void {\n event.consume(true);\n // If there's events coming from the editor, there must be an editor.\n const editor = this.editor as TextEditor.TextEditor.TextEditor;\n const position = editor.editor.posAtDOM(event.target as unknown as HTMLElement);\n const line = editor.state.doc.lineAt(position);\n if (!SourceFrame.SourceFrame.isBreakableLine(editor.state, line) ||\n // Editing breakpoints only make sense for conditional breakpoints\n // and logpoints.\n !Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().supportsConditionalBreakpoints(\n this.uiSourceCode)) {\n return;\n }\n const contextMenu = new UI.ContextMenu.ContextMenu(event, {jsLogContext: 'sources-inline-breakpoint'});\n if (breakpoint) {\n contextMenu.debugSection().appendItem(i18nString(UIStrings.editBreakpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.BreakpointMarkerContextMenu);\n this.editBreakpointCondition({line, breakpoint, location: null});\n }, {jslogContext: 'edit-breakpoint'});\n } else {\n const uiLocation = this.transformer.editorLocationToUILocation(line.number - 1, position - line.from);\n contextMenu.debugSection().appendItem(i18nString(UIStrings.addConditionalBreakpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.BreakpointMarkerContextMenu);\n this.editBreakpointCondition({line, breakpoint: null, location: uiLocation, isLogpoint: false});\n }, {jslogContext: 'add-cnd-breakpoint'});\n contextMenu.debugSection().appendItem(i18nString(UIStrings.addLogpoint), () => {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.BreakpointMarkerContextMenu);\n this.editBreakpointCondition({line, breakpoint: null, location: uiLocation, isLogpoint: true});\n }, {jslogContext: 'add-logpoint'});\n\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.neverPauseHere),\n () => this.setBreakpoint(\n uiLocation.lineNumber, uiLocation.columnNumber, NEVER_PAUSE_HERE_CONDITION, /* enabled */ true,\n /* isLogpoint */ false),\n {jslogContext: 'never-pause-here'});\n }\n void contextMenu.show();\n }\n\n private updateScriptFiles(): void {\n for (const debuggerModel of SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)) {\n const scriptFile = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().scriptFile(\n this.uiSourceCode, debuggerModel);\n if (scriptFile) {\n this.updateScriptFile(debuggerModel);\n }\n }\n this.showSourceMapInfobarIfNeeded();\n }\n\n private updateScriptFile(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n const oldScriptFile = this.scriptFileForDebuggerModel.get(debuggerModel);\n const newScriptFile = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().scriptFile(\n this.uiSourceCode, debuggerModel);\n this.scriptFileForDebuggerModel.delete(debuggerModel);\n if (oldScriptFile) {\n oldScriptFile.removeEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidMergeToVM, this.didMergeToVM, this);\n oldScriptFile.removeEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidDivergeFromVM, this.didDivergeFromVM, this);\n if (this.muted && !this.uiSourceCode.isDirty() && this.consistentScripts()) {\n this.setMuted(false);\n }\n }\n if (!newScriptFile) {\n return;\n }\n this.scriptFileForDebuggerModel.set(debuggerModel, newScriptFile);\n newScriptFile.addEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidMergeToVM, this.didMergeToVM, this);\n newScriptFile.addEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidDivergeFromVM, this.didDivergeFromVM, this);\n newScriptFile.checkMapping();\n\n void newScriptFile.missingSymbolFiles().then(resources => {\n if (resources) {\n const details = i18nString(UIStrings.debugInfoNotFound, {PH1: newScriptFile.uiSourceCode.url()});\n this.updateMissingDebugInfoInfobar({resources, details});\n } else {\n this.updateMissingDebugInfoInfobar(null);\n }\n });\n }\n\n private updateMissingDebugInfoInfobar(warning: SDK.DebuggerModel.MissingDebugInfoDetails|null): void {\n if (this.missingDebugInfoBar) {\n return;\n }\n if (warning === null) {\n this.removeInfobar(this.missingDebugInfoBar);\n this.missingDebugInfoBar = null;\n return;\n }\n this.missingDebugInfoBar = UI.Infobar.Infobar.create(UI.Infobar.Type.Error, warning.details, []);\n if (!this.missingDebugInfoBar) {\n return;\n }\n for (const resource of warning.resources) {\n const detailsRow =\n this.missingDebugInfoBar?.createDetailsRowMessage(i18nString(UIStrings.debugFileNotFound, {PH1: resource}));\n if (detailsRow) {\n detailsRow.classList.add('infobar-selectable');\n }\n }\n this.missingDebugInfoBar.setCloseCallback(() => {\n this.removeInfobar(this.missingDebugInfoBar);\n this.missingDebugInfoBar = null;\n });\n this.attachInfobar(this.missingDebugInfoBar);\n }\n\n private scriptHasSourceMap(): boolean {\n for (const debuggerModel of SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)) {\n const scriptFile = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().scriptFile(\n this.uiSourceCode, debuggerModel);\n if (scriptFile && scriptFile.hasSourceMapURL()) {\n return true;\n }\n }\n return false;\n }\n\n private getSourceMapResource(): SDK.PageResourceLoader.PageResource|null {\n const resourceMap = this.loader.getResourcesLoaded();\n for (const [debuggerModel, script] of this.scriptFileForDebuggerModel.entries()) {\n const url = script.script?.sourceMapURL;\n if (url) {\n const initiatorUrl = SDK.SourceMapManager.SourceMapManager.resolveRelativeSourceURL(\n debuggerModel.target(), script.script.sourceURL);\n const resolvedUrl = Common.ParsedURL.ParsedURL.completeURL(initiatorUrl, url);\n if (resolvedUrl) {\n const resource = resourceMap.get(SDK.PageResourceLoader.PageResourceLoader.makeKey(\n resolvedUrl, script.script.createPageResourceLoadInitiator()));\n if (resource) {\n return resource;\n }\n }\n }\n }\n return null;\n }\n\n private showSourceMapInfobarIfNeeded(): void {\n if (this.sourceMapInfobar) {\n return;\n }\n if (!Common.Settings.Settings.instance().moduleSetting('jsSourceMapsEnabled').get()) {\n return;\n }\n if (!this.scriptHasSourceMap()) {\n return;\n }\n\n const resource = this.getSourceMapResource();\n if (resource && resource.success === null) {\n // Don't create the infobar until we know whether loading succeeded or failed.\n return;\n }\n\n if (!resource) {\n this.sourceMapInfobar = UI.Infobar.Infobar.create(\n UI.Infobar.Type.Info, i18nString(UIStrings.sourceMapSkipped), [],\n Common.Settings.Settings.instance().createSetting('sourceMapSkippedInfobarDisabled', false));\n if (!this.sourceMapInfobar) {\n return;\n }\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.debuggingPowerReduced));\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.reloadForSourceMap));\n } else if (resource.success) {\n this.sourceMapInfobar = UI.Infobar.Infobar.create(\n UI.Infobar.Type.Info, i18nString(UIStrings.sourceMapLoaded), [],\n Common.Settings.Settings.instance().createSetting('sourceMapInfobarDisabled', false));\n if (!this.sourceMapInfobar) {\n return;\n }\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.associatedFilesShouldBeAdded));\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.associatedFilesAreAvailable, {\n PH1: String(UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutTitleForAction('quickOpen.show')),\n }));\n } else {\n let text: string;\n let delegate: () => void;\n const ignoreListManager = Bindings.IgnoreListManager.IgnoreListManager.instance();\n if (this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.ContentScripts) {\n text = i18nString(UIStrings.ignoreContentScripts);\n delegate = ignoreListManager.ignoreListContentScripts.bind(ignoreListManager);\n } else {\n text = i18nString(UIStrings.ignoreScript);\n delegate = ignoreListManager.ignoreListUISourceCode.bind(ignoreListManager, this.uiSourceCode);\n }\n this.sourceMapInfobar =\n UI.Infobar.Infobar.create(UI.Infobar.Type.Warning, i18nString(UIStrings.sourceMapFailed), [\n {text, highlight: false, delegate, dismiss: true},\n ]);\n if (!this.sourceMapInfobar) {\n return;\n }\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.debuggingPowerReduced));\n if (resource.errorMessage) {\n this.sourceMapInfobar.createDetailsRowMessage(i18nString(UIStrings.errorLoading, {\n PH1: Platform.StringUtilities.trimMiddle(resource.url, UI.UIUtils.MaxLengthForDisplayedURLs),\n PH2: resource.errorMessage,\n }));\n }\n }\n this.sourceMapInfobar.setCloseCallback(() => {\n this.removeInfobar(this.sourceMapInfobar);\n this.sourceMapInfobar = null;\n });\n this.attachInfobar(this.sourceMapInfobar);\n }\n\n private handleGutterClick(line: CodeMirror.Line, event: MouseEvent): boolean {\n if (this.muted || event.button !== 0 || event.altKey) {\n return false;\n }\n if (event.metaKey || event.ctrlKey) {\n Host.userMetrics.breakpointEditDialogRevealedFrom(Host.UserMetrics.BreakpointEditDialogRevealedFrom.MouseClick);\n this.#openEditDialogForLine(line, event.shiftKey);\n return true;\n }\n\n void this.toggleBreakpoint(line, event.shiftKey);\n return true;\n }\n\n private async toggleBreakpoint(line: CodeMirror.Line, onlyDisable: boolean): Promise {\n if (this.muted) {\n return;\n }\n if (this.activeBreakpointDialog) {\n this.activeBreakpointDialog.finishEditing(false, '');\n }\n\n const breakpoints = this.lineBreakpoints(line);\n if (!breakpoints.length) {\n await this.createNewBreakpoint(line, EMPTY_BREAKPOINT_CONDITION, /* enabled */ true, /* isLogpoint */ false);\n return;\n }\n const hasDisabled = breakpoints.some(b => !b.enabled());\n for (const breakpoint of breakpoints) {\n if (onlyDisable) {\n breakpoint.setEnabled(hasDisabled);\n } else {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.BreakpointRemovedFromGutterToggle);\n void breakpoint.remove(false);\n }\n }\n }\n\n private async createNewBreakpoint(\n line: CodeMirror.Line, condition: Breakpoints.BreakpointManager.UserCondition, enabled: boolean,\n isLogpoint: boolean): Promise {\n if (!this.editor || !SourceFrame.SourceFrame.isBreakableLine(this.editor.state, line)) {\n return;\n }\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ScriptsBreakpointSet);\n this.#recordSourcesPanelDebuggedMetrics();\n const origin = this.transformer.editorLocationToUILocation(line.number - 1);\n await this.setBreakpoint(origin.lineNumber, origin.columnNumber, condition, enabled, isLogpoint);\n }\n\n private async setBreakpoint(\n lineNumber: number, columnNumber: number|undefined, condition: Breakpoints.BreakpointManager.UserCondition,\n enabled: boolean, isLogpoint: boolean): Promise {\n Common.Settings.Settings.instance().moduleSetting('breakpointsActive').set(true);\n const bp = await this.breakpointManager.setBreakpoint(\n this.uiSourceCode, lineNumber, columnNumber, condition, enabled, isLogpoint,\n Breakpoints.BreakpointManager.BreakpointOrigin.USER_ACTION);\n this.breakpointWasSetForTest(lineNumber, columnNumber, condition, enabled);\n return bp;\n }\n\n private breakpointWasSetForTest(\n _lineNumber: number, _columnNumber: number|undefined, _condition: string, _enabled: boolean): void {\n }\n\n private async callFrameChanged(): Promise {\n this.liveLocationPool.disposeAll();\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n this.setExecutionLocation(null);\n } else {\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createCallFrameLiveLocation(\n callFrame.location(), async(liveLocation: Bindings.LiveLocation.LiveLocation): Promise => {\n const uiLocation = await liveLocation.uiLocation();\n if (uiLocation && uiLocation.uiSourceCode === this.uiSourceCode) {\n this.setExecutionLocation(uiLocation);\n this.updateMissingDebugInfoInfobar(callFrame.missingDebugInfoDetails);\n // We are paused and the user is specifically looking at this UISourceCode either because\n // this file is on top of stack, or the user explicitly selected a stack frame for this UISourceCode.\n this.#recordSourcesPanelDebuggedMetrics();\n } else {\n this.setExecutionLocation(null);\n }\n }, this.liveLocationPool);\n }\n }\n\n private setExecutionLocation(executionLocation: Workspace.UISourceCode.UILocation|null): void {\n if (this.executionLocation === executionLocation || !this.editor) {\n return;\n }\n this.executionLocation = executionLocation;\n\n if (executionLocation) {\n const editorLocation =\n this.transformer.uiLocationToEditorLocation(executionLocation.lineNumber, executionLocation.columnNumber);\n const decorations =\n computeExecutionDecorations(this.editor.state, editorLocation.lineNumber, editorLocation.columnNumber);\n this.editor.dispatch({effects: executionLine.update.of(decorations)});\n void this.updateValueDecorations();\n if (this.controlDown) {\n void this.showContinueToLocations();\n }\n } else {\n this.editor.dispatch({\n effects: [\n executionLine.update.of(CodeMirror.Decoration.none),\n continueToMarkers.update.of(CodeMirror.Decoration.none),\n valueDecorations.update.of(CodeMirror.Decoration.none),\n ],\n });\n }\n }\n\n override dispose(): void {\n this.hideIgnoreListInfobar();\n if (this.sourceMapInfobar) {\n this.sourceMapInfobar.dispose();\n }\n for (const script of this.scriptFileForDebuggerModel.values()) {\n script.removeEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidMergeToVM, this.didMergeToVM, this);\n script.removeEventListener(\n Bindings.ResourceScriptMapping.ResourceScriptFile.Events.DidDivergeFromVM, this.didDivergeFromVM, this);\n }\n this.scriptFileForDebuggerModel.clear();\n\n this.popoverHelper?.hidePopover();\n this.popoverHelper?.dispose();\n this.setExecutionLocation(null);\n\n this.breakpointManager.removeEventListener(\n Breakpoints.BreakpointManager.Events.BreakpointAdded, this.breakpointChange, this);\n this.breakpointManager.removeEventListener(\n Breakpoints.BreakpointManager.Events.BreakpointRemoved, this.breakpointChange, this);\n this.uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.workingCopyChanged, this);\n this.uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.workingCopyCommitted, this);\n\n Bindings.IgnoreListManager.IgnoreListManager.instance().removeChangeListener(this.ignoreListCallback);\n\n debuggerPluginForUISourceCode.delete(this.uiSourceCode);\n super.dispose();\n\n window.clearTimeout(this.refreshBreakpointsTimeout);\n // Clear `this.editor` to signal that we are disposed. Any function from this `DebuggerPlugin` instance\n // still running or scheduled will early return and not do any work.\n this.editor = undefined;\n\n UI.Context.Context.instance().removeFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);\n this.liveLocationPool.disposeAll();\n }\n\n /**\n * Only records metrics once per DebuggerPlugin instance and must only be\n * called once the content of the UISourceCode is available.\n */\n #recordSourcesPanelDebuggedMetrics(): void {\n if (this.#sourcesPanelDebuggedMetricsRecorded) {\n return;\n }\n this.#sourcesPanelDebuggedMetricsRecorded = true;\n\n const mimeType = Common.ResourceType.ResourceType.mimeFromURL(this.uiSourceCode.url());\n const mediaType = Common.ResourceType.ResourceType.mediaTypeForMetrics(\n mimeType ?? '', this.uiSourceCode.contentType().isFromSourceMap(),\n TextUtils.TextUtils.isMinified(this.uiSourceCode.content()));\n Host.userMetrics.sourcesPanelFileDebugged(mediaType);\n }\n}\n\nexport class BreakpointLocationRevealer implements\n Common.Revealer.Revealer {\n async reveal(breakpointLocation: Breakpoints.BreakpointManager.BreakpointLocation, omitFocus?: boolean|undefined):\n Promise {\n const {uiLocation} = breakpointLocation;\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n const debuggerPlugin = debuggerPluginForUISourceCode.get(uiLocation.uiSourceCode);\n if (debuggerPlugin) {\n debuggerPlugin.editBreakpointLocation(breakpointLocation);\n } else {\n SourceComponents.BreakpointsView.BreakpointsSidebarController.instance().breakpointEditFinished(\n breakpointLocation.breakpoint, false);\n }\n }\n}\n\n// Infobar panel state, used to show additional panels below the editor.\n\nconst addInfobar = CodeMirror.StateEffect.define();\nconst removeInfobar = CodeMirror.StateEffect.define();\n\nconst infobarState = CodeMirror.StateField.define({\n create(): UI.Infobar.Infobar[] {\n return [];\n },\n update(current, tr): UI.Infobar.Infobar[] {\n for (const effect of tr.effects) {\n if (effect.is(addInfobar)) {\n current = current.concat(effect.value);\n } else if (effect.is(removeInfobar)) {\n current = current.filter(b => b !== effect.value);\n }\n }\n return current;\n },\n provide: (field): CodeMirror.Extension => CodeMirror.showPanel.computeN(\n [field],\n (state): (() => CodeMirror.Panel)[] =>\n state.field(field).map((bar): (() => CodeMirror.Panel) => (): CodeMirror.Panel => ({dom: bar.element}))),\n});\n\n// Enumerate non-breakable lines (lines without a known corresponding\n// position in the UISource).\nasync function computeNonBreakableLines(\n state: CodeMirror.EditorState, transformer: SourceFrame.SourceFrame.Transformer,\n sourceCode: Workspace.UISourceCode.UISourceCode): Promise {\n const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();\n const mappedLines = await debuggerWorkspaceBinding.getMappedLines(sourceCode);\n if (!mappedLines) {\n return [];\n }\n const linePositions = [];\n for (let i = 0; i < state.doc.lines; i++) {\n const {lineNumber} = transformer.editorLocationToUILocation(i, 0);\n if (!mappedLines.has(lineNumber)) {\n linePositions.push(state.doc.line(i + 1).from);\n }\n }\n return linePositions;\n}\n\n// Breakpoint markers\n\ntype BreakpointDecoration = {\n content: CodeMirror.DecorationSet,\n gutter: CodeMirror.RangeSet,\n};\n\nconst setBreakpointDeco = CodeMirror.StateEffect.define();\nconst muteBreakpoints = CodeMirror.StateEffect.define();\n\nfunction muteGutterMarkers(markers: CodeMirror.RangeSet, doc: CodeMirror.Text):\n CodeMirror.RangeSet {\n const newMarkers: CodeMirror.Range[] = [];\n markers.between(0, doc.length, (from, _to, marker) => {\n let className: string = marker.elementClass;\n if (!/cm-breakpoint-disabled/.test(className)) {\n className += ' cm-breakpoint-disabled';\n }\n newMarkers.push(new BreakpointGutterMarker(className).range(from));\n });\n return CodeMirror.RangeSet.of(newMarkers, false);\n}\n\n// Holds the inline breakpoint marker decorations and the gutter\n// markers for lines with breakpoints. When the set of active markers\n// changes in non-muted state (the editor content matches the original\n// file), it is recomputed and updated with `setBreakpointDeco`. When\n// the editor content goes out of sync with the original file, the\n// `muteBreakpoints` effect hides the inline markers and makes sure\n// all gutter markers are displayed as disabled.\nconst breakpointMarkers = CodeMirror.StateField.define({\n create(): BreakpointDecoration {\n return {content: CodeMirror.RangeSet.empty, gutter: CodeMirror.RangeSet.empty};\n },\n update(deco, tr): BreakpointDecoration {\n if (!tr.changes.empty) {\n deco = {content: deco.content.map(tr.changes), gutter: deco.gutter.map(tr.changes)};\n }\n for (const effect of tr.effects) {\n if (effect.is(setBreakpointDeco)) {\n deco = effect.value;\n } else if (effect.is(muteBreakpoints)) {\n deco = {content: CodeMirror.RangeSet.empty, gutter: muteGutterMarkers(deco.gutter, tr.state.doc)};\n }\n }\n return deco;\n },\n provide: field =>\n [CodeMirror.EditorView.decorations.from(field, deco => deco.content),\n CodeMirror.lineNumberMarkers.from(field, deco => deco.gutter)],\n});\n\nclass BreakpointInlineMarker extends CodeMirror.WidgetType {\n class: string;\n\n constructor(readonly breakpoint: Breakpoints.BreakpointManager.Breakpoint|null, readonly parent: DebuggerPlugin) {\n super();\n // Eagerly compute DOM class so that the widget is recreated when it changes.\n this.class = 'cm-inlineBreakpoint';\n if (breakpoint?.isLogpoint()) {\n this.class += ' cm-inlineBreakpoint-logpoint';\n } else if (breakpoint?.condition()) {\n this.class += ' cm-inlineBreakpoint-conditional';\n }\n if (!breakpoint?.enabled()) {\n this.class += ' cm-inlineBreakpoint-disabled';\n }\n }\n\n override eq(other: BreakpointInlineMarker): boolean {\n return other.class === this.class && other.breakpoint === this.breakpoint;\n }\n\n toDOM(): HTMLElement {\n const span = document.createElement('span');\n span.className = this.class;\n span.addEventListener('click', (event: MouseEvent) => {\n this.parent.onInlineBreakpointMarkerClick(event, this.breakpoint);\n event.consume();\n });\n span.addEventListener('contextmenu', (event: MouseEvent) => {\n this.parent.onInlineBreakpointMarkerContextMenu(event, this.breakpoint);\n event.consume();\n });\n return span;\n }\n\n override ignoreEvent(): boolean {\n return true;\n }\n}\n\nclass BreakpointGutterMarker extends CodeMirror.GutterMarker {\n constructor(override readonly elementClass: string) {\n super();\n }\n\n override eq(other: BreakpointGutterMarker): boolean {\n return other.elementClass === this.elementClass;\n }\n}\n\nfunction mostSpecificBreakpoint(\n a: Breakpoints.BreakpointManager.Breakpoint, b: Breakpoints.BreakpointManager.Breakpoint): number {\n if (a.enabled() !== b.enabled()) {\n return a.enabled() ? -1 : 1;\n }\n if (a.bound() !== b.bound()) {\n return a.bound() ? -1 : 1;\n }\n if (Boolean(a.condition()) !== Boolean(b.condition())) {\n return Boolean(a.condition()) ? -1 : 1;\n }\n return 0;\n}\n\n// Generic helper for creating pairs of editor state fields and\n// effects to model imperatively updated decorations.\n\nfunction defineStatefulDecoration(): {\n update: CodeMirror.StateEffectType,\n field: CodeMirror.StateField,\n} {\n const update = CodeMirror.StateEffect.define();\n const field = CodeMirror.StateField.define({\n create(): CodeMirror.DecorationSet {\n return CodeMirror.Decoration.none;\n },\n update(deco, tr): CodeMirror.DecorationSet {\n return tr.effects.reduce((deco, effect) => effect.is(update) ? effect.value : deco, deco.map(tr.changes));\n },\n provide: field => CodeMirror.EditorView.decorations.from(field),\n });\n return {update, field};\n}\n\n// Execution line highlight\n\nconst executionLineDeco = CodeMirror.Decoration.line({attributes: {class: 'cm-executionLine'}});\nconst executionTokenDeco = CodeMirror.Decoration.mark({attributes: {class: 'cm-executionToken'}});\nconst executionLine = defineStatefulDecoration();\n\n// Create decorations to indicate the current debugging position\nexport function computeExecutionDecorations(\n state: CodeMirror.EditorState, lineNumber: number, columnNumber: number): CodeMirror.DecorationSet {\n const {doc} = state;\n if (lineNumber >= doc.lines) {\n return CodeMirror.Decoration.none;\n }\n const line = doc.line(lineNumber + 1);\n const decorations: CodeMirror.Range[] = [executionLineDeco.range(line.from)];\n const position = Math.min(line.to, line.from + columnNumber);\n let syntaxTree = null;\n while (syntaxTree === null) {\n syntaxTree = CodeMirror.ensureSyntaxTree(state, line.to, /* timeout= */ 500);\n }\n let syntaxNode = syntaxTree.resolveInner(position, 1);\n if (syntaxNode.to === syntaxNode.from - 1 && /[(.]/.test(doc.sliceString(syntaxNode.from, syntaxNode.to))) {\n syntaxNode = syntaxNode.resolve(syntaxNode.to, 1);\n }\n const tokenEnd = Math.min(line.to, syntaxNode.to);\n if (tokenEnd > position) {\n decorations.push(executionTokenDeco.range(position, tokenEnd));\n }\n return CodeMirror.Decoration.set(decorations);\n}\n\n// Continue-to markers\n\nconst continueToMark = CodeMirror.Decoration.mark({class: 'cm-continueToLocation'});\nconst asyncContinueToMark = CodeMirror.Decoration.mark({class: 'cm-continueToLocation cm-continueToLocation-async'});\n\nconst continueToMarkers = defineStatefulDecoration();\n\nconst noMarkers = {}, hasContinueMarkers = {\n class: 'cm-hasContinueMarkers',\n};\n\n// Add a class to the content element when there are active\n// continue-to markers. This hides the background on the current\n// execution line.\nconst markIfContinueTo =\n CodeMirror.EditorView.contentAttributes.compute([continueToMarkers.field], (state): Record => {\n return state.field(continueToMarkers.field).size ? hasContinueMarkers : noMarkers;\n });\n\n// Variable value decorations\n\nclass ValueDecoration extends CodeMirror.WidgetType {\n constructor(readonly pairs: [string, SDK.RemoteObject.RemoteObject][]) {\n super();\n }\n\n override eq(other: ValueDecoration): boolean {\n return this.pairs.length === other.pairs.length &&\n this.pairs.every((p, i) => p[0] === other.pairs[i][0] && p[1] === other.pairs[i][1]);\n }\n\n toDOM(): HTMLElement {\n const formatter = new ObjectUI.RemoteObjectPreviewFormatter.RemoteObjectPreviewFormatter();\n const widget = document.createElement('div');\n widget.classList.add('cm-variableValues');\n let first = true;\n for (const [name, value] of this.pairs) {\n if (first) {\n first = false;\n } else {\n UI.UIUtils.createTextChild(widget, ', ');\n }\n const nameValuePair = (widget.createChild('span') as HTMLElement);\n UI.UIUtils.createTextChild(nameValuePair, name + ' = ');\n const propertyCount = value.preview ? value.preview.properties.length : 0;\n const entryCount = value.preview && value.preview.entries ? value.preview.entries.length : 0;\n if (value.preview && propertyCount + entryCount < 10) {\n formatter.appendObjectPreview(nameValuePair, value.preview, false /* isEntry */);\n } else {\n const propertyValue = ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.createPropertyValue(\n value, /* wasThrown */ false, /* showPreview */ false);\n nameValuePair.appendChild(propertyValue.element);\n }\n }\n return widget;\n }\n}\n\nconst valueDecorations = defineStatefulDecoration();\n\nfunction isVariableIdentifier(tokenType: string): boolean {\n return tokenType === 'VariableName' || tokenType === 'VariableDefinition';\n}\n\nfunction isVariableDefinition(tokenType: string): boolean {\n return tokenType === 'VariableDefinition';\n}\n\nfunction isLetConstDefinition(tokenType: string): boolean {\n return tokenType === 'let' || tokenType === 'const';\n}\n\nfunction isScopeNode(tokenType: string): boolean {\n return tokenType === 'Block' || tokenType === 'ForSpec';\n}\n\nclass SiblingScopeVariables {\n blockList: Set = new Set();\n variables: {line: number, from: number, id: string}[] = [];\n}\n\nexport function getVariableNamesByLine(\n editorState: CodeMirror.EditorState, fromPos: number, toPos: number,\n currentPos: number): {line: number, from: number, id: string}[] {\n const fromLine = editorState.doc.lineAt(fromPos);\n fromPos = Math.min(fromLine.to, fromPos);\n toPos = editorState.doc.lineAt(toPos).from;\n\n const tree = CodeMirror.ensureSyntaxTree(editorState, toPos, 100);\n if (!tree) {\n return [];\n }\n\n // Sibling scope is a scope that does not contain the current position.\n // We will exclude variables that are defined (and used in those scopes (since we are currently outside of their lifetime).\n function isSiblingScopeNode(node: {name: string, from: number, to: number}): boolean {\n return isScopeNode(node.name) && (node.to < currentPos || currentPos < node.from);\n }\n\n const names: {line: number, from: number, id: string}[] = [];\n let curLine = fromLine;\n const siblingStack: SiblingScopeVariables[] = [];\n let currentLetConstDefinition: CodeMirror.SyntaxNode|null = null;\n\n function currentNames(): {line: number, from: number, id: string}[] {\n return siblingStack.length ? siblingStack[siblingStack.length - 1].variables : names;\n }\n\n tree.iterate({\n from: fromPos,\n to: toPos,\n enter: node => {\n if (node.from < fromPos) {\n return;\n }\n\n if (isLetConstDefinition(node.name)) {\n currentLetConstDefinition = node.node.nextSibling;\n return;\n }\n\n if (isSiblingScopeNode(node)) {\n siblingStack.push(new SiblingScopeVariables());\n return;\n }\n\n const varName = isVariableIdentifier(node.name) && editorState.sliceDoc(node.from, node.to);\n if (!varName) {\n return;\n }\n\n if (currentLetConstDefinition && isVariableDefinition(node.name) && siblingStack.length > 0) {\n siblingStack[siblingStack.length - 1].blockList.add(varName);\n return;\n }\n\n if (node.from > curLine.to) {\n curLine = editorState.doc.lineAt(node.from);\n }\n\n currentNames().push({line: curLine.number - 1, from: node.from, id: varName});\n },\n leave: node => {\n if (currentLetConstDefinition === node.node) {\n currentLetConstDefinition = null;\n } else if (isSiblingScopeNode(node)) {\n const topScope = siblingStack.pop();\n const nameList = currentNames();\n for (const token of topScope?.variables ?? []) {\n if (!topScope?.blockList.has(token.id)) {\n nameList.push(token);\n }\n }\n }\n },\n });\n return names;\n}\n\nexport async function computeScopeMappings(\n callFrame: SDK.DebuggerModel.CallFrame,\n rawLocationToEditorOffset: (l: SDK.DebuggerModel.Location|null) => Promise):\n Promise<{scopeStart: number, scopeEnd: number, variableMap: Map}[]> {\n const scopeMappings:\n {scopeStart: number, scopeEnd: number, variableMap: Map}[] = [];\n for (const scope of callFrame.scopeChain()) {\n const scopeStart = await rawLocationToEditorOffset(scope.range()?.start ?? null);\n if (!scopeStart) {\n break;\n }\n const scopeEnd = await rawLocationToEditorOffset(scope.range()?.end ?? null);\n if (!scopeEnd) {\n break;\n }\n\n const {properties} = await SourceMapScopes.NamesResolver.resolveScopeInObject(scope).getAllProperties(false, false);\n if (!properties || properties.length > MAX_PROPERTIES_IN_SCOPE_FOR_VALUE_DECORATIONS) {\n break;\n }\n const variableMap = new Map(\n properties.map(p => [p.name, p.value] as [string, SDK.RemoteObject.RemoteObject]));\n\n scopeMappings.push({scopeStart, scopeEnd, variableMap});\n\n // Let us only get mappings for block scopes until we see a surrounding function (local) scope.\n if (scope.type() === Protocol.Debugger.ScopeType.Local) {\n break;\n }\n }\n return scopeMappings;\n}\n\nexport function getVariableValuesByLine(\n scopeMappings: {scopeStart: number, scopeEnd: number, variableMap: Map}[],\n variableNames: {line: number, from: number, id: string}[]): Map>|\n null {\n const namesPerLine = new Map>();\n for (const {line, from, id} of variableNames) {\n const varValue = findVariableInChain(id, from, scopeMappings);\n if (!varValue) {\n continue;\n }\n let names = namesPerLine.get(line);\n if (!names) {\n names = new Map();\n namesPerLine.set(line, names);\n }\n names.set(id, varValue);\n }\n return namesPerLine;\n\n function findVariableInChain(\n name: string,\n pos: number,\n scopeMappings: {scopeStart: number, scopeEnd: number, variableMap: Map}[],\n ): SDK.RemoteObject.RemoteObject|null {\n for (const scope of scopeMappings) {\n if (pos < scope.scopeStart || pos >= scope.scopeEnd) {\n continue;\n }\n const value = scope.variableMap.get(name);\n if (value) {\n return value;\n }\n }\n return null;\n }\n}\n\n// Pop-over\n\nexport function computePopoverHighlightRange(state: CodeMirror.EditorState, mimeType: string, cursorPos: number): {\n from: number,\n to: number,\n containsCallExpression: boolean,\n}|null {\n const {main} = state.selection;\n if (!main.empty) {\n if (cursorPos < main.from || main.to < cursorPos) {\n return null;\n }\n // If the user goes through the trouble of manually selecting an expression, we'll allow side-effects.\n return {from: main.from, to: main.to, containsCallExpression: false};\n }\n\n const tree = CodeMirror.ensureSyntaxTree(state, cursorPos, 5 * 1000);\n if (!tree) {\n return null;\n }\n\n const node = tree.resolveInner(cursorPos, 1);\n // Only do something if the cursor is over a leaf node.\n if (node.firstChild) {\n return null;\n }\n\n switch (mimeType) {\n case 'application/wasm': {\n if (node.name !== 'Identifier') {\n return null;\n }\n // For $label identifiers we can't show a meaningful preview (https://crbug.com/1155548),\n // so we suppress them for now. Label identifiers can only appear as operands to control\n // instructions[1].\n //\n // [1]: https://webassembly.github.io/spec/core/text/instructions.html#control-instructions\n const controlInstructions = ['block', 'loop', 'if', 'else', 'end', 'br', 'br_if', 'br_table'];\n for (let parent: CodeMirror.SyntaxNode|null = node.parent; parent; parent = parent.parent) {\n if (parent.name === 'App') {\n const firstChild = parent.firstChild;\n const opName = firstChild?.name === 'Keyword' && state.sliceDoc(firstChild.from, firstChild.to);\n if (opName && controlInstructions.includes(opName)) {\n return null;\n }\n }\n }\n return {from: node.from, to: node.to, containsCallExpression: false};\n }\n\n case 'text/html':\n case 'text/javascript':\n case 'text/jsx':\n case 'text/typescript':\n case 'text/typescript-jsx': {\n let current: CodeMirror.SyntaxNode|null = node;\n while (current && current.name !== 'this' && current.name !== 'VariableDefinition' &&\n current.name !== 'VariableName' && current.name !== 'MemberExpression' &&\n !(current.name === 'PropertyName' && current.parent?.name === 'PatternProperty' &&\n current.nextSibling?.name !== ':') &&\n !(current.name === 'PropertyDefinition' && current.parent?.name === 'Property' &&\n current.nextSibling?.name !== ':')) {\n current = current.parent;\n }\n if (!current) {\n return null;\n }\n return {from: current.from, to: current.to, containsCallExpression: nodeContainsCallExpression(current)};\n }\n\n default: {\n // In other languages, just assume a token consisting entirely\n // of identifier-like characters is an identifier.\n if (node.to - node.from > 50 || /[^\\w_\\-$]/.test(state.sliceDoc(node.from, node.to))) {\n return null;\n }\n return {from: node.from, to: node.to, containsCallExpression: false};\n }\n }\n}\n\nfunction nodeContainsCallExpression(node: CodeMirror.SyntaxNode): boolean {\n let containsCallExpression = false;\n node.cursor().iterate(node => {\n containsCallExpression ||= node.name === 'CallExpression';\n return !containsCallExpression; // No need to recurse into children if we are alraedy done.\n });\n return containsCallExpression;\n}\n\n// Evaluated expression mark for pop-over\n\nconst evalExpressionMark = CodeMirror.Decoration.mark({class: 'cm-evaluatedExpression'});\n\nconst evalExpression = defineStatefulDecoration();\n\n// Styling for plugin-local elements\n\nconst theme = CodeMirror.EditorView.baseTheme({\n '.cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement': {\n '&:hover, &.cm-breakpoint': {\n borderStyle: 'solid',\n borderWidth: '1px 4px 1px 1px',\n marginRight: '-4px',\n paddingLeft: '8px',\n // Make sure text doesn't move down due to the border above it.\n lineHeight: 'calc(1.2em - 2px)',\n position: 'relative',\n },\n '&:hover': {\n WebkitBorderImage: lineNumberArrow('#ebeced', '#ebeced'),\n },\n '&.cm-breakpoint': {\n color: '#fff',\n WebkitBorderImage: lineNumberArrow('#4285f4', '#1a73e8'),\n },\n '&.cm-breakpoint-conditional': {\n WebkitBorderImage: lineNumberArrow('#f29900', '#e37400'),\n '&::before': {\n content: '\"?\"',\n position: 'absolute',\n top: 0,\n left: '1px',\n },\n },\n '&.cm-breakpoint-logpoint': {\n WebkitBorderImage: lineNumberArrow('#f439a0', '#d01884'),\n '&::before': {\n content: '\"‥\"',\n position: 'absolute',\n top: '-3px',\n left: '1px',\n },\n },\n },\n '&dark .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement': {\n '&:hover': {\n WebkitBorderImage: lineNumberArrow('#3c4043', '#3c4043'),\n },\n '&.cm-breakpoint': {\n WebkitBorderImage: lineNumberArrow('#5186EC', '#1a73e8'),\n },\n '&.cm-breakpoint-conditional': {\n WebkitBorderImage: lineNumberArrow('#e9a33a', '#e37400'),\n },\n '&.cm-breakpoint-logpoint': {\n WebkitBorderImage: lineNumberArrow('#E54D9B', '#d01884'),\n },\n },\n ':host-context(.breakpoints-deactivated) & .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement.cm-breakpoint, .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement.cm-breakpoint-disabled':\n {\n color: '#1a73e8',\n WebkitBorderImage: lineNumberArrow('#d9e7fd', '#1a73e8'),\n '&.cm-breakpoint-conditional': {\n color: '#e37400',\n WebkitBorderImage: lineNumberArrow('#fcebcc', '#e37400'),\n },\n '&.cm-breakpoint-logpoint': {\n color: '#d01884',\n WebkitBorderImage: lineNumberArrow('#fdd7ec', '#f439a0'),\n },\n },\n ':host-context(.breakpoints-deactivated) &dark .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement.cm-breakpoint, &dark .cm-gutters .cm-gutter.cm-lineNumbers .cm-gutterElement.cm-breakpoint-disabled':\n {\n WebkitBorderImage: lineNumberArrow('#2a384e', '#1a73e8'),\n '&.cm-breakpoint-conditional': {\n WebkitBorderImage: lineNumberArrow('#4d3c1d', '#e37400'),\n },\n '&.cm-breakpoint-logpoint': {\n WebkitBorderImage: lineNumberArrow('#4e283d', '#f439a0'),\n },\n },\n\n '.cm-inlineBreakpoint': {\n cursor: 'pointer',\n position: 'relative',\n top: '1px',\n content: inlineBreakpointArrow('#4285F4', '#1A73E8'),\n height: '10px',\n '&.cm-inlineBreakpoint-conditional': {\n content: inlineConditionalBreakpointArrow('#F29900', '#E37400'),\n },\n '&.cm-inlineBreakpoint-logpoint': {\n content: inlineLogpointArrow('#F439A0', '#D01884'),\n },\n },\n '&dark .cm-inlineBreakpoint': {\n content: inlineBreakpointArrow('#5186EC', '#1A73E8'),\n '&.cm-inlineBreakpoint-conditional': {\n content: inlineConditionalBreakpointArrow('#e9a33a', '#E37400'),\n },\n '&.cm-inlineBreakpoint-logpoint': {\n content: inlineLogpointArrow('#E54D9B', '#D01884'),\n },\n },\n ':host-context(.breakpoints-deactivated) & .cm-inlineBreakpoint, .cm-inlineBreakpoint-disabled': {\n content: inlineBreakpointArrow('#4285F4', '#1A73E8', '0.2'),\n '&.cm-inlineBreakpoint-conditional': {\n content: inlineConditionalBreakpointArrow('#F9AB00', '#E37400', '0.2'),\n },\n '&.cm-inlineBreakpoint-logpoint': {\n content: inlineLogpointArrow('#F439A0', '#D01884', '0.2'),\n },\n },\n\n '.cm-executionLine': {\n backgroundColor: 'var(--sys-color-yellow-container)',\n outline: '1px solid var(--sys-color-yellow-outline)',\n '.cm-hasContinueMarkers &': {\n backgroundColor: 'transparent',\n },\n '&.cm-highlightedLine': {\n animation: 'cm-fading-highlight-execution 2s 0s',\n },\n '&.cm-line::selection, &.cm-line ::selection': {\n backgroundColor: 'var(--sys-color-tonal-container) !important',\n },\n },\n '.cm-executionToken': {\n backgroundColor: 'var(--sys-color-state-focus-select)',\n },\n '@keyframes cm-fading-highlight-execution': {\n from: {\n backgroundColor: 'var(--sys-color-tonal-container)',\n },\n to: {\n backgroundColor: 'var(--sys-color-yellow-container)',\n },\n },\n\n '.cm-continueToLocation': {\n cursor: 'pointer',\n backgroundColor: 'var(--color-continue-to-location)',\n '&:hover': {\n backgroundColor: 'var(--color-continue-to-location-hover)',\n border: '1px solid var(--color-continue-to-location-hover-border)',\n margin: '0 -1px',\n },\n '&.cm-continueToLocation-async': {\n backgroundColor: 'var(--color-continue-to-location-async)',\n '&:hover': {\n backgroundColor: 'var(--color-continue-to-location-async-hover)',\n border: '1px solid var(--color-continue-to-location-async-hover-border)',\n margin: '0 -1px',\n },\n },\n },\n\n '.cm-evaluatedExpression': {\n backgroundColor: 'var(--color-evaluated-expression)',\n border: '1px solid var(--color-evaluated-expression-border)',\n margin: '0 -1px',\n },\n\n '.cm-variableValues': {\n display: 'inline',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '1000px',\n opacity: '80%',\n backgroundColor: 'var(--color-variable-values)',\n marginLeft: '10px',\n padding: '0 5px',\n userSelect: 'text',\n '.cm-executionLine &': {\n backgroundColor: 'transparent',\n opacity: '50%',\n },\n },\n});\n\nfunction lineNumberArrow(color: string, outline: string): string {\n return `url('data:image/svg+xml,') 1 3 1 1`;\n}\n\nfunction inlineBreakpointArrow(color: string, outline: string, opacity: string = '1'): string {\n return `url('data:image/svg+xml,')`;\n}\n\nfunction inlineConditionalBreakpointArrow(color: string, outline: string, opacity: string = '1'): string {\n return `url('data:image/svg+xml,')`;\n}\n\nfunction inlineLogpointArrow(color: string, outline: string, opacity: string = '1'): string {\n return `url('data:image/svg+xml,')`;\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/NavigatorView.d.ts b/public/panels/sources/NavigatorView.d.ts index 9f0f94ce7..d9d07c4ef 100644 --- a/public/panels/sources/NavigatorView.d.ts +++ b/public/panels/sources/NavigatorView.d.ts @@ -27,14 +27,13 @@ export declare class NavigatorView extends UI.Widget.VBox implements SDK.TargetM private navigatorGroupByFolderSetting; private navigatorGroupByAuthoredExperiment?; private workspaceInternal; - private lastSelectedUISourceCode?; private groupByFrame?; private groupByAuthored?; private groupByDomain?; private groupByFolder?; - constructor(enableAuthoredGrouping?: boolean); + constructor(jslogContext: string, enableAuthoredGrouping?: boolean); private static treeElementOrder; - static appendSearchItem(contextMenu: UI.ContextMenu.ContextMenu, path?: Platform.DevToolsPath.EncodedPathString): void; + static appendSearchItem(contextMenu: UI.ContextMenu.ContextMenu, path: string): void; private static treeElementsCompare; setPlaceholder(placeholder: UI.Widget.Widget): void; private onBindingChanged; diff --git a/public/panels/sources/NavigatorView.js b/public/panels/sources/NavigatorView.js index ce2918240..b14d34d7b 100644 --- a/public/panels/sources/NavigatorView.js +++ b/public/panels/sources/NavigatorView.js @@ -38,10 +38,11 @@ import * as Persistence from '../../models/persistence/persistence.js'; import * as Workspace from '../../models/workspace/workspace.js'; import * as IconButton from '../../ui/components/icon_button/icon_button.js'; import * as UI from '../../ui/legacy/legacy.js'; +import * as VisualLogging from '../../ui/visual_logging/visual_logging.js'; import * as Snippets from '../snippets/snippets.js'; import navigatorTreeStyles from './navigatorTree.css.js'; import navigatorViewStyles from './navigatorView.css.js'; -import { SearchSourcesView } from './SearchSourcesView.js'; +import { SearchSources } from './SearchSourcesView.js'; const UIStrings = { /** *@description Text in Navigator View of the Sources panel @@ -174,26 +175,20 @@ export class NavigatorView extends UI.Widget.VBox { frameNodes; authoredNode; deployedNode; - // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration) - // eslint-disable-next-line @typescript-eslint/no-explicit-any navigatorGroupByFolderSetting; navigatorGroupByAuthoredExperiment; workspaceInternal; - lastSelectedUISourceCode; groupByFrame; groupByAuthored; - // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration) - // eslint-disable-next-line @typescript-eslint/no-explicit-any groupByDomain; - // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration) - // eslint-disable-next-line @typescript-eslint/no-explicit-any groupByFolder; - constructor(enableAuthoredGrouping) { + constructor(jslogContext, enableAuthoredGrouping) { super(true); this.placeholder = null; this.scriptsTree = new UI.TreeOutline.TreeOutlineInShadow(); this.scriptsTree.setComparator(NavigatorView.treeElementsCompare); this.scriptsTree.setFocusable(false); + this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context(jslogContext)}`); this.contentElement.appendChild(this.scriptsTree.element); this.setDefaultFocusedElement(this.scriptsTree.element); this.uiSourceCodeNodes = new Platform.MapUtilities.Multimap(); @@ -244,16 +239,9 @@ export class NavigatorView extends UI.Widget.VBox { return order; } static appendSearchItem(contextMenu, path) { - let searchLabel = i18nString(UIStrings.searchInFolder); - if (!path || !path.trim()) { - path = '*'; - searchLabel = i18nString(UIStrings.searchInAllFiles); - } - contextMenu.viewSection().appendItem(searchLabel, () => { - if (path) { - void SearchSourcesView.openSearch(`file:${path.trim()}`); - } - }); + const searchLabel = path ? i18nString(UIStrings.searchInFolder) : i18nString(UIStrings.searchInAllFiles); + const searchSources = new SearchSources(path && `file:${path}`); + contextMenu.viewSection().appendItem(searchLabel, () => Common.Revealer.reveal(searchSources)); } static treeElementsCompare(treeElement1, treeElement2) { const typeWeight1 = NavigatorView.treeElementOrder(treeElement1); @@ -681,13 +669,11 @@ export class NavigatorView extends UI.Widget.VBox { } this.scriptsTree.selectedTreeElement.deselect(); } - this.lastSelectedUISourceCode = uiSourceCode; // TODO(dgozman): figure out revealing multiple. node.reveal(select); return node; } sourceSelected(uiSourceCode, focusSource) { - this.lastSelectedUISourceCode = uiSourceCode; void Common.Revealer.reveal(uiSourceCode, !focusSource); } #isUISourceCodeOrAnyAncestorSelected(node) { diff --git a/public/panels/sources/NavigatorView.js.map b/public/panels/sources/NavigatorView.js.map index 11e4b6acc..20f8268f6 100644 --- a/public/panels/sources/NavigatorView.js.map +++ b/public/panels/sources/NavigatorView.js.map @@ -1 +1 @@ -{"version":3,"file":"NavigatorView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/NavigatorView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACt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,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,UAAU,EAAE;YAC7G,OAAO;SACR;QACD,MAAM,cAAc,GAAG,WAAW,CAAC,0BAA0B,CAAC,0BAA0B,CAAC,cAAc,CACnG,IAAI,CAAC,OAAO,CAAC,EAAE,EAAqC,CAAC,CAAC;QAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;QAC1F,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;QACxG,IAAI,SAAS,KAAK,QAAQ,EAAE;YAC1B,OAAO;SACR;QACD,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAChF,IAAI,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,EAAE;YACnD,OAAO;SACR;QACD,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;SAC3B;aAAM;YACL,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;SAC7B;IACH,CAAC;IAEQ,QAAQ,CAAC,KAAa;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SACrC;IACH,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2012 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Persistence from '../../models/persistence/persistence.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport navigatorTreeStyles from './navigatorTree.css.js';\nimport navigatorViewStyles from './navigatorView.css.js';\nimport {SearchSourcesView} from './SearchSourcesView.js';\n\nconst UIStrings = {\n /**\n *@description Text in Navigator View of the Sources panel\n */\n searchInFolder: 'Search in folder',\n /**\n *@description Search label in Navigator View of the Sources panel\n */\n searchInAllFiles: 'Search in all files',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n noDomain: '(no domain)',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n authored: 'Authored',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n authoredTooltip: 'Contains original sources',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n deployed: 'Deployed',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n deployedTooltip: 'Contains final sources the browser sees',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n areYouSureYouWantToExcludeThis: 'Are you sure you want to exclude this folder?',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n areYouSureYouWantToDeleteThis: 'Are you sure you want to delete this file?',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n rename: 'Rename…',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n makeACopy: 'Make a copy…',\n /**\n *@description Text to delete something\n */\n delete: 'Delete',\n /**\n *@description A button text to confirm an action to remove a folder. This is not the same as delete. It removes the folder from UI but do not delete them.\n */\n remove: 'Remove',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n areYouSureYouWantToDeleteFolder: 'Are you sure you want to delete this folder and its contents?',\n /**\n *@description Text in Navigator View of the Sources panel. A confirmation message on action to delete a folder.\n */\n actionCannotBeUndone: 'This action cannot be undone.',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n openFolder: 'Open folder',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n newFile: 'New file',\n /**\n *@description A context menu item in the Navigator View of the Sources panel to exclude a folder from workspace\n */\n excludeFolder: 'Exclude from workspace',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n removeFolderFromWorkspace: 'Remove from workspace',\n /**\n *@description Text in Navigator View of the Sources panel\n * @example {a-folder-name} PH1\n */\n areYouSureYouWantToRemoveThis: 'Remove ‘{PH1}’ from Workspace?',\n /**\n *@description Text in Navigator View of the Sources panel. Warning message when user remove a folder.\n */\n workspaceStopSyncing: 'This will stop syncing changes from DevTools to your sources.',\n /**\n *@description Name of an item from source map\n *@example {compile.html} PH1\n */\n sFromSourceMap: '{PH1} (from source map)',\n /**\n *@description Name of an item that is on the ignore list\n *@example {compile.html} PH1\n */\n sIgnoreListed: '{PH1} (ignore listed)',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/NavigatorView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport const Types = {\n Authored: 'authored',\n Deployed: 'deployed',\n Domain: 'domain',\n File: 'file',\n FileSystem: 'fs',\n FileSystemFolder: 'fs-folder',\n Frame: 'frame',\n NetworkFolder: 'nw-folder',\n Root: 'root',\n Worker: 'worker',\n};\n\nconst TYPE_ORDERS = new Map([\n [Types.Root, 1],\n [Types.Authored, 1],\n [Types.Deployed, 5],\n [Types.Domain, 10],\n [Types.FileSystemFolder, 1],\n [Types.NetworkFolder, 1],\n [Types.File, 10],\n [Types.Frame, 70],\n [Types.Worker, 90],\n [Types.FileSystem, 100],\n]);\n\nexport class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.Observer {\n private placeholder: UI.Widget.Widget|null;\n scriptsTree: UI.TreeOutline.TreeOutlineInShadow;\n private readonly uiSourceCodeNodes:\n Platform.MapUtilities.Multimap;\n private readonly subfolderNodes: Map;\n private readonly rootNode: NavigatorRootTreeNode;\n private readonly frameNodes: Map;\n private authoredNode?: NavigatorGroupTreeNode;\n private deployedNode?: NavigatorGroupTreeNode;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private navigatorGroupByFolderSetting: Common.Settings.Setting;\n private navigatorGroupByAuthoredExperiment?: string;\n private workspaceInternal!: Workspace.Workspace.WorkspaceImpl;\n private lastSelectedUISourceCode?: Workspace.UISourceCode.UISourceCode;\n private groupByFrame?: boolean;\n private groupByAuthored?: boolean;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private groupByDomain?: any;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private groupByFolder?: any;\n constructor(enableAuthoredGrouping?: boolean) {\n super(true);\n\n this.placeholder = null;\n this.scriptsTree = new UI.TreeOutline.TreeOutlineInShadow();\n\n this.scriptsTree.setComparator(NavigatorView.treeElementsCompare);\n this.scriptsTree.setFocusable(false);\n this.contentElement.appendChild(this.scriptsTree.element);\n this.setDefaultFocusedElement(this.scriptsTree.element);\n\n this.uiSourceCodeNodes = new Platform.MapUtilities.Multimap();\n this.subfolderNodes = new Map();\n\n this.rootNode = new NavigatorRootTreeNode(this);\n this.rootNode.populate();\n\n this.frameNodes = new Map();\n\n this.contentElement.addEventListener('contextmenu', this.handleContextMenu.bind(this), false);\n UI.ShortcutRegistry.ShortcutRegistry.instance().addShortcutListener(\n this.contentElement, {'sources.rename': this.renameShortcut.bind(this)});\n\n this.navigatorGroupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigatorGroupByFolder');\n this.navigatorGroupByFolderSetting.addChangeListener(this.groupingChanged.bind(this));\n if (enableAuthoredGrouping) {\n this.navigatorGroupByAuthoredExperiment = Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING;\n }\n\n Bindings.IgnoreListManager.IgnoreListManager.instance().addChangeListener(this.ignoreListChanged.bind(this));\n\n this.initGrouping();\n\n Persistence.Persistence.PersistenceImpl.instance().addEventListener(\n Persistence.Persistence.Events.BindingCreated, this.onBindingChanged, this);\n Persistence.Persistence.PersistenceImpl.instance().addEventListener(\n Persistence.Persistence.Events.BindingRemoved, this.onBindingChanged, this);\n Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(\n Persistence.NetworkPersistenceManager.Events.RequestsForHeaderOverridesFileChanged,\n this.#onRequestsForHeaderOverridesFileChanged, this);\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.NameChanged, this.targetNameChanged, this);\n\n SDK.TargetManager.TargetManager.instance().observeTargets(this);\n this.resetWorkspace(Workspace.Workspace.WorkspaceImpl.instance());\n this.workspaceInternal.uiSourceCodes().forEach(this.addUISourceCode.bind(this));\n Bindings.NetworkProject.NetworkProjectManager.instance().addEventListener(\n Bindings.NetworkProject.Events.FrameAttributionAdded, this.frameAttributionAdded, this);\n Bindings.NetworkProject.NetworkProjectManager.instance().addEventListener(\n Bindings.NetworkProject.Events.FrameAttributionRemoved, this.frameAttributionRemoved, this);\n }\n\n private static treeElementOrder(treeElement: UI.TreeOutline.TreeElement): number {\n if (boostOrderForNode.has(treeElement)) {\n return 0;\n }\n\n const actualElement = (treeElement as NavigatorSourceTreeElement);\n\n let order = TYPE_ORDERS.get(actualElement.nodeType) || 0;\n if (actualElement.uiSourceCode) {\n const contentType = actualElement.uiSourceCode.contentType();\n if (contentType.isDocument()) {\n order += 3;\n } else if (contentType.isScript()) {\n order += 5;\n } else if (contentType.isStyleSheet()) {\n order += 10;\n } else {\n order += 15;\n }\n }\n\n return order;\n }\n\n static appendSearchItem(contextMenu: UI.ContextMenu.ContextMenu, path?: Platform.DevToolsPath.EncodedPathString):\n void {\n let searchLabel = i18nString(UIStrings.searchInFolder);\n if (!path || !path.trim()) {\n path = '*' as Platform.DevToolsPath.EncodedPathString;\n searchLabel = i18nString(UIStrings.searchInAllFiles);\n }\n contextMenu.viewSection().appendItem(searchLabel, () => {\n if (path) {\n void SearchSourcesView.openSearch(`file:${path.trim()}`);\n }\n });\n }\n\n private static treeElementsCompare(\n treeElement1: UI.TreeOutline.TreeElement, treeElement2: UI.TreeOutline.TreeElement): number {\n const typeWeight1 = NavigatorView.treeElementOrder(treeElement1);\n const typeWeight2 = NavigatorView.treeElementOrder(treeElement2);\n\n if (typeWeight1 > typeWeight2) {\n return 1;\n }\n if (typeWeight1 < typeWeight2) {\n return -1;\n }\n return Platform.StringUtilities.naturalOrderComparator(treeElement1.titleAsText(), treeElement2.titleAsText());\n }\n\n setPlaceholder(placeholder: UI.Widget.Widget): void {\n console.assert(!this.placeholder, 'A placeholder widget was already set');\n this.placeholder = placeholder;\n placeholder.show(this.contentElement, this.contentElement.firstChild);\n updateVisibility.call(this);\n this.scriptsTree.addEventListener(UI.TreeOutline.Events.ElementAttached, updateVisibility.bind(this));\n this.scriptsTree.addEventListener(UI.TreeOutline.Events.ElementsDetached, updateVisibility.bind(this));\n\n function updateVisibility(this: NavigatorView): void {\n const showTree = this.scriptsTree.firstChild();\n if (showTree) {\n placeholder.hideWidget();\n } else {\n placeholder.showWidget();\n }\n this.scriptsTree.element.classList.toggle('hidden', !showTree);\n }\n }\n\n private onBindingChanged(event: Common.EventTarget.EventTargetEvent):\n void {\n const binding = event.data;\n\n let isFromSourceMap = false;\n // Update UISourceCode titles.\n const networkNodes = this.uiSourceCodeNodes.get(binding.network);\n for (const networkNode of networkNodes) {\n networkNode.updateTitle();\n isFromSourceMap ||= networkNode.uiSourceCode().contentType().isFromSourceMap();\n }\n const fileSystemNodes = this.uiSourceCodeNodes.get(binding.fileSystem);\n for (const fileSystemNode of fileSystemNodes) {\n fileSystemNode.updateTitle();\n isFromSourceMap ||= fileSystemNode.uiSourceCode().contentType().isFromSourceMap();\n }\n\n // Update folder titles.\n const pathTokens =\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(binding.fileSystem);\n let folderPath = Platform.DevToolsPath.EmptyEncodedPathString;\n for (let i = 0; i < pathTokens.length - 1; ++i) {\n folderPath = Common.ParsedURL.ParsedURL.concatenate(folderPath, pathTokens[i]);\n const folderId = this.folderNodeId(\n binding.fileSystem.project(), null, null, binding.fileSystem.origin(), isFromSourceMap, folderPath);\n const folderNode = this.subfolderNodes.get(folderId);\n if (folderNode) {\n folderNode.updateTitle();\n }\n folderPath = Common.ParsedURL.ParsedURL.concatenate(folderPath, '/');\n }\n\n // Update fileSystem root title.\n const fileSystemRoot = this.rootOrDeployedNode().child(binding.fileSystem.project().id());\n if (fileSystemRoot) {\n fileSystemRoot.updateTitle();\n }\n }\n\n #onRequestsForHeaderOverridesFileChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n const headersFileUiSourceCode = event.data;\n const networkNodes = this.uiSourceCodeNodes.get(headersFileUiSourceCode);\n for (const networkNode of networkNodes) {\n networkNode.updateTitle();\n }\n }\n\n override focus(): void {\n this.scriptsTree.focus();\n }\n\n /**\n * Central place to add elements to the tree to\n * enable focus if the tree has elements\n */\n appendChild(parent: UI.TreeOutline.TreeElement, child: UI.TreeOutline.TreeElement): void {\n this.scriptsTree.setFocusable(true);\n parent.appendChild(child);\n }\n\n /**\n * Central place to remove elements from the tree to\n * disable focus if the tree is empty\n */\n removeChild(parent: UI.TreeOutline.TreeElement, child: UI.TreeOutline.TreeElement): void {\n parent.removeChild(child);\n if (this.scriptsTree.rootElement().childCount() === 0) {\n this.scriptsTree.setFocusable(false);\n }\n }\n\n private resetWorkspace(workspace: Workspace.Workspace.WorkspaceImpl): void {\n // Clear old event listeners first.\n if (this.workspaceInternal) {\n this.workspaceInternal.removeEventListener(\n Workspace.Workspace.Events.UISourceCodeAdded, this.uiSourceCodeAddedCallback, this);\n this.workspaceInternal.removeEventListener(\n Workspace.Workspace.Events.UISourceCodeRemoved, this.uiSourceCodeRemovedCallback, this);\n this.workspaceInternal.removeEventListener(\n Workspace.Workspace.Events.ProjectAdded, this.projectAddedCallback, this);\n this.workspaceInternal.removeEventListener(\n Workspace.Workspace.Events.ProjectRemoved, this.projectRemovedCallback, this);\n }\n\n this.workspaceInternal = workspace;\n this.workspaceInternal.addEventListener(\n Workspace.Workspace.Events.UISourceCodeAdded, this.uiSourceCodeAddedCallback, this);\n this.workspaceInternal.addEventListener(\n Workspace.Workspace.Events.UISourceCodeRemoved, this.uiSourceCodeRemovedCallback, this);\n this.workspaceInternal.addEventListener(Workspace.Workspace.Events.ProjectAdded, this.projectAddedCallback, this);\n this.workspaceInternal.addEventListener(\n Workspace.Workspace.Events.ProjectRemoved, this.projectRemovedCallback, this);\n this.workspaceInternal.projects().forEach(this.projectAdded.bind(this));\n this.computeUniqueFileSystemProjectNames();\n }\n\n private projectAddedCallback(event: Common.EventTarget.EventTargetEvent): void {\n const project = event.data;\n this.projectAdded(project);\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n this.computeUniqueFileSystemProjectNames();\n }\n }\n\n private projectRemovedCallback(event: Common.EventTarget.EventTargetEvent): void {\n const project = event.data;\n this.removeProject(project);\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n this.computeUniqueFileSystemProjectNames();\n }\n }\n\n workspace(): Workspace.Workspace.WorkspaceImpl {\n return this.workspaceInternal;\n }\n\n acceptProject(project: Workspace.Workspace.Project): boolean {\n return !project.isServiceProject();\n }\n\n private frameAttributionAdded(\n event: Common.EventTarget.EventTargetEvent): void {\n const {uiSourceCode} = event.data;\n if (!this.acceptsUISourceCode(uiSourceCode)) {\n return;\n }\n\n const addedFrame = (event.data.frame as SDK.ResourceTreeModel.ResourceTreeFrame | null);\n // This event does not happen for UISourceCodes without initial attribution.\n this.addUISourceCodeNode(uiSourceCode, addedFrame);\n }\n\n private frameAttributionRemoved(\n event: Common.EventTarget.EventTargetEvent): void {\n const {uiSourceCode} = event.data;\n if (!this.acceptsUISourceCode(uiSourceCode)) {\n return;\n }\n\n const removedFrame = (event.data.frame as SDK.ResourceTreeModel.ResourceTreeFrame | null);\n const node = Array.from(this.uiSourceCodeNodes.get(uiSourceCode)).find(node => node.frame() === removedFrame);\n if (node) {\n this.removeUISourceCodeNode(node);\n }\n }\n\n private acceptsUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {\n return this.acceptProject(uiSourceCode.project());\n }\n\n private addUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE) &&\n Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n uiSourceCode)) {\n return;\n }\n\n if (!this.acceptsUISourceCode(uiSourceCode)) {\n return;\n }\n\n if (uiSourceCode.isFetchXHR()) {\n return;\n }\n\n const frames = Bindings.NetworkProject.NetworkProject.framesForUISourceCode(uiSourceCode);\n if (frames.length) {\n for (const frame of frames) {\n this.addUISourceCodeNode(uiSourceCode, frame);\n }\n } else {\n this.addUISourceCodeNode(uiSourceCode, null);\n }\n this.uiSourceCodeAdded(uiSourceCode);\n }\n\n private addUISourceCodeNode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, frame: SDK.ResourceTreeModel.ResourceTreeFrame|null): void {\n const isFromSourceMap = uiSourceCode.contentType().isFromSourceMap();\n let path;\n if (uiSourceCode.project().type() === Workspace.Workspace.projectTypes.FileSystem) {\n path =\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(uiSourceCode).slice(0, -1) as\n Platform.DevToolsPath.EncodedPathString[];\n } else {\n path = Common.ParsedURL.ParsedURL.extractPath(uiSourceCode.url()).split('/').slice(1, -1) as\n Platform.DevToolsPath.EncodedPathString[];\n }\n\n const project = uiSourceCode.project();\n const target = Bindings.NetworkProject.NetworkProject.targetForUISourceCode(uiSourceCode);\n const folderNode =\n this.folderNode(uiSourceCode, project, target, frame, uiSourceCode.origin(), path, isFromSourceMap);\n const uiSourceCodeNode = new NavigatorUISourceCodeTreeNode(this, uiSourceCode, frame);\n const existingNode = folderNode.child(uiSourceCodeNode.id);\n if (existingNode && existingNode instanceof NavigatorUISourceCodeTreeNode) {\n this.uiSourceCodeNodes.set(uiSourceCode, existingNode);\n } else {\n folderNode.appendChild(uiSourceCodeNode);\n this.uiSourceCodeNodes.set(uiSourceCode, uiSourceCodeNode);\n uiSourceCodeNode.updateTitleBubbleUp();\n }\n this.selectDefaultTreeNode();\n }\n\n uiSourceCodeAdded(_uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n }\n\n private uiSourceCodeAddedCallback(event: Common.EventTarget.EventTargetEvent):\n void {\n const uiSourceCode = event.data;\n this.addUISourceCode(uiSourceCode);\n }\n\n private uiSourceCodeRemovedCallback(event: Common.EventTarget.EventTargetEvent):\n void {\n this.removeUISourceCodes([event.data]);\n }\n\n tryAddProject(project: Workspace.Workspace.Project): void {\n this.projectAdded(project);\n for (const uiSourceCode of project.uiSourceCodes()) {\n this.addUISourceCode(uiSourceCode);\n }\n }\n\n private projectAdded(project: Workspace.Workspace.Project): void {\n const rootOrDeployed = this.rootOrDeployedNode();\n if (!this.acceptProject(project) || project.type() !== Workspace.Workspace.projectTypes.FileSystem ||\n Snippets.ScriptSnippetFileSystem.isSnippetsProject(project) || rootOrDeployed.child(project.id())) {\n return;\n }\n rootOrDeployed.appendChild(\n new NavigatorGroupTreeNode(this, project, project.id(), Types.FileSystem, project.displayName()));\n this.selectDefaultTreeNode();\n }\n\n // TODO(einbinder) remove this code after crbug.com/964075 is fixed\n private selectDefaultTreeNode(): void {\n const children = this.rootNode.children();\n if (children.length && !this.scriptsTree.selectedTreeElement) {\n children[0].treeNode().select(true /* omitFocus */, false /* selectedByUser */);\n }\n }\n\n private computeUniqueFileSystemProjectNames(): void {\n const fileSystemProjects = this.workspaceInternal.projectsForType(Workspace.Workspace.projectTypes.FileSystem);\n if (!fileSystemProjects.length) {\n return;\n }\n\n const reversedIndex = Common.Trie.Trie.newArrayTrie();\n const reversedPaths = [];\n for (const project of fileSystemProjects) {\n const fileSystem = (project as Persistence.FileSystemWorkspaceBinding.FileSystem);\n const reversedPathParts = fileSystem.fileSystemPath().split('/').reverse();\n reversedPaths.push(reversedPathParts);\n reversedIndex.add(reversedPathParts);\n }\n\n const rootOrDeployed = this.rootOrDeployedNode();\n\n for (let i = 0; i < fileSystemProjects.length; ++i) {\n const reversedPath = reversedPaths[i];\n const project = fileSystemProjects[i];\n reversedIndex.remove(reversedPath);\n const commonPrefix = reversedIndex.longestPrefix(reversedPath, false /* fullWordOnly */);\n reversedIndex.add(reversedPath);\n const prefixPath = reversedPath.slice(0, commonPrefix.length + 1);\n const path = Common.ParsedURL.ParsedURL.encodedPathToRawPathString(\n prefixPath.reverse().join('/') as Platform.DevToolsPath.EncodedPathString);\n\n const fileSystemNode = rootOrDeployed.child(project.id());\n if (fileSystemNode) {\n fileSystemNode.setTitle(path);\n }\n }\n }\n\n removeProject(project: Workspace.Workspace.Project): void {\n this.removeUISourceCodes(project.uiSourceCodes());\n if (project.type() !== Workspace.Workspace.projectTypes.FileSystem) {\n return;\n }\n const fileSystemNode = this.rootNode.child(project.id());\n if (!fileSystemNode) {\n return;\n }\n this.rootNode.removeChild(fileSystemNode);\n }\n\n private folderNodeId(\n project: Workspace.Workspace.Project, target: SDK.Target.Target|null,\n frame: SDK.ResourceTreeModel.ResourceTreeFrame|null, projectOrigin: string, isFromSourceMap: boolean,\n path: Platform.DevToolsPath.EncodedPathString): string {\n const projectId = project.type() === Workspace.Workspace.projectTypes.FileSystem ? project.id() : '';\n let targetId = target && !(this.groupByAuthored && isFromSourceMap) ? target.id() : '';\n let frameId = this.groupByFrame && frame ? frame.id : '';\n if (this.groupByAuthored) {\n if (isFromSourceMap) {\n targetId = 'Authored';\n frameId = '';\n } else {\n targetId = 'Deployed:' + targetId;\n }\n }\n return targetId + ':' + projectId + ':' + frameId + ':' + projectOrigin + ':' + path;\n }\n\n private folderNode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, project: Workspace.Workspace.Project,\n target: SDK.Target.Target|null, frame: SDK.ResourceTreeModel.ResourceTreeFrame|null,\n projectOrigin: Platform.DevToolsPath.UrlString, path: Platform.DevToolsPath.EncodedPathString[],\n fromSourceMap: boolean): NavigatorTreeNode {\n if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(uiSourceCode)) {\n return this.rootNode;\n }\n\n if (target && !this.groupByFolder && !fromSourceMap) {\n return this.domainNode(uiSourceCode, project, target, frame, projectOrigin);\n }\n\n const folderPath = Common.ParsedURL.ParsedURL.join(path, '/');\n const folderId = this.folderNodeId(project, target, frame, projectOrigin, fromSourceMap, folderPath);\n let folderNode = this.subfolderNodes.get(folderId);\n if (folderNode) {\n return folderNode;\n }\n\n if (!path.length) {\n if (target) {\n return this.domainNode(uiSourceCode, project, target, frame, projectOrigin);\n }\n return this.rootOrDeployedNode().child(project.id()) as NavigatorTreeNode;\n }\n\n const parentNode =\n this.folderNode(uiSourceCode, project, target, frame, projectOrigin, path.slice(0, -1), fromSourceMap);\n let type: string = Types.NetworkFolder;\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n type = Types.FileSystemFolder;\n }\n const name = Common.ParsedURL.ParsedURL.encodedPathToRawPathString(path[path.length - 1]);\n\n folderNode = new NavigatorFolderTreeNode(this, project, folderId, type, folderPath, name, projectOrigin);\n this.subfolderNodes.set(folderId, folderNode);\n parentNode.appendChild(folderNode);\n return folderNode;\n }\n\n private domainNode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, project: Workspace.Workspace.Project,\n target: SDK.Target.Target, frame: SDK.ResourceTreeModel.ResourceTreeFrame|null,\n projectOrigin: string): NavigatorTreeNode {\n const isAuthored = uiSourceCode.contentType().isFromSourceMap();\n const frameNode = this.frameNode(project, target, frame, isAuthored);\n if (!this.groupByDomain) {\n return frameNode;\n }\n let domainNode = frameNode.child(projectOrigin);\n if (domainNode) {\n return domainNode;\n }\n\n domainNode = new NavigatorGroupTreeNode(\n this, project, projectOrigin, Types.Domain, this.computeProjectDisplayName(target, projectOrigin));\n if (frame && projectOrigin === Common.ParsedURL.ParsedURL.extractOrigin(frame.url)) {\n boostOrderForNode.add(domainNode.treeNode());\n }\n frameNode.appendChild(domainNode);\n if (isAuthored && this.groupByAuthored) {\n domainNode.treeNode().expand();\n }\n return domainNode;\n }\n\n private frameNode(\n project: Workspace.Workspace.Project, target: SDK.Target.Target,\n frame: SDK.ResourceTreeModel.ResourceTreeFrame|null, isAuthored: boolean): NavigatorTreeNode {\n if (!this.groupByFrame || !frame || (this.groupByAuthored && isAuthored)) {\n return this.targetNode(project, target, isAuthored);\n }\n\n let frameNode = this.frameNodes.get(frame);\n if (frameNode) {\n return frameNode;\n }\n\n frameNode =\n new NavigatorGroupTreeNode(this, project, target.id() + ':' + frame.id, Types.Frame, frame.displayName());\n frameNode.setHoverCallback(hoverCallback);\n this.frameNodes.set(frame, frameNode);\n\n const parentFrame = frame.parentFrame();\n this.frameNode(project, parentFrame ? parentFrame.resourceTreeModel().target() : target, parentFrame, isAuthored)\n .appendChild(frameNode);\n if (!parentFrame) {\n boostOrderForNode.add(frameNode.treeNode());\n frameNode.treeNode().expand();\n }\n\n function hoverCallback(hovered: boolean): void {\n if (hovered) {\n const overlayModel = target.model(SDK.OverlayModel.OverlayModel);\n if (overlayModel && frame) {\n overlayModel.highlightFrame(frame.id);\n }\n } else {\n SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();\n }\n }\n return frameNode;\n }\n\n private targetNode(project: Workspace.Workspace.Project, target: SDK.Target.Target, isAuthored: boolean):\n NavigatorTreeNode {\n if (this.groupByAuthored && isAuthored) {\n if (!this.authoredNode) {\n this.authoredNode = new NavigatorGroupTreeNode(\n this, null, 'group:Authored', Types.Authored, i18nString(UIStrings.authored),\n i18nString(UIStrings.authoredTooltip));\n this.rootNode.appendChild(this.authoredNode);\n this.authoredNode.treeNode().expand();\n }\n return this.authoredNode;\n }\n\n const rootOrDeployed = this.rootOrDeployedNode();\n if (target === SDK.TargetManager.TargetManager.instance().scopeTarget()) {\n return rootOrDeployed;\n }\n\n let targetNode = rootOrDeployed.child('target:' + target.id());\n if (!targetNode) {\n targetNode = new NavigatorGroupTreeNode(\n this, project, 'target:' + target.id(), target.type() === SDK.Target.Type.Frame ? Types.Frame : Types.Worker,\n target.name());\n rootOrDeployed.appendChild(targetNode);\n }\n return targetNode;\n }\n\n private rootOrDeployedNode(): NavigatorTreeNode {\n if (this.groupByAuthored) {\n if (!this.deployedNode) {\n this.deployedNode = new NavigatorGroupTreeNode(\n this, null, 'group:Deployed', Types.Deployed, i18nString(UIStrings.deployed),\n i18nString(UIStrings.deployedTooltip));\n this.rootNode.appendChild(this.deployedNode);\n }\n return this.deployedNode;\n }\n return this.rootNode;\n }\n\n private computeProjectDisplayName(target: SDK.Target.Target, projectOrigin: string): string {\n const runtimeModel = target.model(SDK.RuntimeModel.RuntimeModel);\n const executionContexts = runtimeModel ? runtimeModel.executionContexts() : [];\n for (const context of executionContexts) {\n if (context.name && context.origin && projectOrigin.startsWith(context.origin)) {\n return context.name;\n }\n }\n\n if (!projectOrigin) {\n return i18nString(UIStrings.noDomain);\n }\n\n const parsedURL = new Common.ParsedURL.ParsedURL(projectOrigin);\n const prettyURL = parsedURL.isValid ? parsedURL.host + (parsedURL.port ? (':' + parsedURL.port) : '') : '';\n\n return (prettyURL || projectOrigin);\n }\n\n revealUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode, select?: boolean): NavigatorUISourceCodeTreeNode\n |null {\n const nodes = this.uiSourceCodeNodes.get(uiSourceCode);\n if (nodes.size === 0) {\n return null;\n }\n const node = nodes.values().next().value;\n if (!node) {\n return null;\n }\n if (this.scriptsTree.selectedTreeElement) {\n // If the tree outline is being marked as \"being edited\" (i.e. we're renaming a file\n // or chosing the name for a new snippet), we shall not proceed with revealing here,\n // as that will steal focus from the input widget and thus cancel editing. The\n // test/e2e/snippets/breakpoint_test.ts exercises this.\n if (UI.UIUtils.isBeingEdited(this.scriptsTree.selectedTreeElement.treeOutline?.element)) {\n return null;\n }\n this.scriptsTree.selectedTreeElement.deselect();\n }\n this.lastSelectedUISourceCode = uiSourceCode;\n // TODO(dgozman): figure out revealing multiple.\n node.reveal(select);\n return node;\n }\n\n sourceSelected(uiSourceCode: Workspace.UISourceCode.UISourceCode, focusSource: boolean): void {\n this.lastSelectedUISourceCode = uiSourceCode;\n void Common.Revealer.reveal(uiSourceCode, !focusSource);\n }\n\n #isUISourceCodeOrAnyAncestorSelected(node: NavigatorUISourceCodeTreeNode): boolean {\n const selectedTreeElement = (this.scriptsTree.selectedTreeElement as NavigatorSourceTreeElement | null);\n const selectedNode = selectedTreeElement && selectedTreeElement.node;\n let currentNode: NavigatorTreeNode|null = node;\n while (currentNode) {\n if (currentNode === selectedNode) {\n return true;\n }\n currentNode = currentNode.parent;\n if (!(node instanceof NavigatorGroupTreeNode || node instanceof NavigatorFolderTreeElement)) {\n break;\n }\n }\n return false;\n }\n\n private removeUISourceCodes(uiSourceCodes: Iterable): void {\n const nodesWithSelectionOnPath: NavigatorUISourceCodeTreeNode[] = [];\n // First we remove source codes without any selection on their path to root, and only then\n // the ones with selection. This to avoid layout work associated with moving the selection\n // around (crbug.com/1409025).\n for (const uiSourceCode of uiSourceCodes) {\n const nodes = this.uiSourceCodeNodes.get(uiSourceCode);\n for (const node of nodes) {\n if (this.#isUISourceCodeOrAnyAncestorSelected(node)) {\n nodesWithSelectionOnPath.push(node);\n } else {\n this.removeUISourceCodeNode(node);\n }\n }\n }\n nodesWithSelectionOnPath.forEach(this.removeUISourceCodeNode.bind(this));\n }\n\n private removeUISourceCodeNode(node: NavigatorUISourceCodeTreeNode): void {\n const uiSourceCode = node.uiSourceCode();\n this.uiSourceCodeNodes.delete(uiSourceCode, node);\n const project = uiSourceCode.project();\n const target = Bindings.NetworkProject.NetworkProject.targetForUISourceCode(uiSourceCode);\n let frame = node.frame();\n\n let parentNode: (NavigatorTreeNode|null) = node.parent;\n if (!parentNode) {\n return;\n }\n parentNode.removeChild(node);\n let currentNode: (NavigatorTreeNode|null) = parentNode;\n\n while (currentNode) {\n parentNode = currentNode.parent;\n if (!parentNode) {\n break;\n }\n if ((parentNode === this.rootNode || parentNode === this.deployedNode) &&\n project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n break;\n }\n if (!(currentNode instanceof NavigatorGroupTreeNode || currentNode instanceof NavigatorFolderTreeNode)) {\n break;\n }\n if (!currentNode.isEmpty()) {\n currentNode.updateTitleBubbleUp();\n break;\n }\n if (currentNode.type === Types.Frame) {\n this.discardFrame(\n frame as SDK.ResourceTreeModel.ResourceTreeFrame,\n Boolean(this.groupByAuthored) && uiSourceCode.contentType().isFromSourceMap());\n frame = (frame as SDK.ResourceTreeModel.ResourceTreeFrame).parentFrame();\n } else {\n const folderId = this.folderNodeId(\n project, target, frame, uiSourceCode.origin(), uiSourceCode.contentType().isFromSourceMap(),\n currentNode instanceof NavigatorFolderTreeNode && currentNode.folderPath ||\n Platform.DevToolsPath.EmptyEncodedPathString);\n this.subfolderNodes.delete(folderId);\n parentNode.removeChild(currentNode);\n }\n\n if (currentNode === this.authoredNode) {\n this.authoredNode = undefined;\n } else if (currentNode === this.deployedNode) {\n this.deployedNode = undefined;\n }\n\n currentNode = parentNode;\n }\n }\n\n reset(tearDownOnly?: boolean): void {\n for (const node of this.uiSourceCodeNodes.valuesArray()) {\n node.dispose();\n }\n\n this.scriptsTree.removeChildren();\n this.scriptsTree.setFocusable(false);\n this.uiSourceCodeNodes.clear();\n this.subfolderNodes.clear();\n this.frameNodes.clear();\n this.rootNode.reset();\n this.authoredNode = undefined;\n this.deployedNode = undefined;\n if (!tearDownOnly) {\n // Reset the workspace to repopulate filesystem folders.\n this.resetWorkspace(Workspace.Workspace.WorkspaceImpl.instance());\n }\n }\n\n handleContextMenu(_event: Event): void {\n }\n\n private async renameShortcut(): Promise {\n const selectedTreeElement = (this.scriptsTree.selectedTreeElement as NavigatorSourceTreeElement | null);\n const node = selectedTreeElement && selectedTreeElement.node;\n if (!node || !node.uiSourceCode() || !node.uiSourceCode().canRename()) {\n return false;\n }\n this.rename(node, false);\n return true;\n }\n\n private handleContextMenuCreate(\n project: Workspace.Workspace.Project, path: Platform.DevToolsPath.EncodedPathString,\n uiSourceCode?: Workspace.UISourceCode.UISourceCode): void {\n if (uiSourceCode) {\n const relativePath = Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(uiSourceCode);\n relativePath.pop();\n path = Common.ParsedURL.ParsedURL.join(relativePath, '/');\n }\n void this.create(project, path, uiSourceCode);\n }\n\n private handleContextMenuRename(node: NavigatorUISourceCodeTreeNode): void {\n this.rename(node, false);\n }\n\n private async handleContextMenuExclude(\n project: Workspace.Workspace.Project, path: Platform.DevToolsPath.EncodedPathString): Promise {\n const shouldExclude = await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.areYouSureYouWantToExcludeThis));\n if (shouldExclude) {\n UI.UIUtils.startBatchUpdate();\n project.excludeFolder(\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path));\n UI.UIUtils.endBatchUpdate();\n }\n }\n\n private async handleContextMenuDelete(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise {\n const shouldDelete = await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.areYouSureYouWantToDeleteThis));\n if (shouldDelete) {\n uiSourceCode.project().deleteFile(uiSourceCode);\n }\n }\n\n handleFileContextMenu(event: Event, node: NavigatorUISourceCodeTreeNode): void {\n const uiSourceCode = node.uiSourceCode();\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.appendApplicableItems(uiSourceCode);\n\n const project = uiSourceCode.project();\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n contextMenu.editSection().appendItem(i18nString(UIStrings.rename), this.handleContextMenuRename.bind(this, node));\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.makeACopy),\n this.handleContextMenuCreate.bind(this, project, Platform.DevToolsPath.EmptyEncodedPathString, uiSourceCode));\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.delete), this.handleContextMenuDelete.bind(this, uiSourceCode));\n }\n\n void contextMenu.show();\n }\n\n private async handleDeleteFolder(node: NavigatorTreeNode): Promise {\n const warningMsg =\n `${i18nString(UIStrings.areYouSureYouWantToDeleteFolder)}\\n${i18nString(UIStrings.actionCannotBeUndone)}`;\n const shouldRemove = await UI.UIUtils.ConfirmDialog.show(warningMsg);\n if (shouldRemove) {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.OverrideTabDeleteFolderContextMenu);\n const topNode = this.findTopNonMergedNode(node);\n await this.removeUISourceCodeFromProject(topNode);\n await this.deleteDirectoryRecursively(topNode);\n }\n }\n\n private async removeUISourceCodeFromProject(node: NavigatorTreeNode): Promise {\n node.children().forEach(async child => {\n await this.removeUISourceCodeFromProject(child);\n });\n\n if (node instanceof NavigatorUISourceCodeTreeNode) {\n node.uiSourceCode().project().removeUISourceCode(node.uiSourceCode().url());\n }\n }\n\n private async deleteDirectoryRecursively(node: NavigatorTreeNode): Promise {\n if (!(node instanceof NavigatorFolderTreeNode)) {\n return;\n }\n\n await Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance()\n .project()\n ?.deleteDirectoryRecursively(node.folderPath);\n }\n\n private findTopNonMergedNode(node: NavigatorTreeNode): NavigatorTreeNode {\n // multiple folder nodes can be merged into one if it only contains one file\n // e.g. the folder of \"abc.com/assets/css/button.css\" can be \"abc.com/assets/css\"\n // find the top non-merged node (abc.com) recursively\n\n if (!node.isMerged) {\n return node;\n }\n\n if (!(node.parent instanceof NavigatorFolderTreeNode)) {\n return node;\n }\n\n return this.findTopNonMergedNode(node.parent);\n }\n\n handleFolderContextMenu(event: Event, node: NavigatorFolderTreeNode): void {\n const path = node.folderPath || Platform.DevToolsPath.EmptyEncodedPathString;\n const project = node.project || null;\n\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n NavigatorView.appendSearchItem(contextMenu, path);\n\n if (!project) {\n return;\n }\n\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n const folderPath = Common.ParsedURL.ParsedURL.urlToRawPathString(\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path),\n Host.Platform.isWin());\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.openFolder),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.showItemInFolder(folderPath));\n if (project.canCreateFile()) {\n contextMenu.defaultSection().appendItem(i18nString(UIStrings.newFile), () => {\n this.handleContextMenuCreate(project, path, undefined);\n });\n }\n } else if (node.origin && node.folderPath) {\n const url = Common.ParsedURL.ParsedURL.concatenate(node.origin, '/', node.folderPath);\n const options = {\n isContentScript: node.recursiveProperties.exclusivelyContentScripts || false,\n isKnownThirdParty: node.recursiveProperties.exclusivelyThirdParty || false,\n isCurrentlyIgnoreListed: node.recursiveProperties.exclusivelyIgnored || false,\n };\n for (const {text, callback} of Bindings.IgnoreListManager.IgnoreListManager.instance()\n .getIgnoreListFolderContextMenuItems(url, options)) {\n contextMenu.defaultSection().appendItem(text, callback);\n }\n }\n\n if (project.canExcludeFolder(path)) {\n contextMenu.defaultSection().appendItem(\n i18nString(UIStrings.excludeFolder), this.handleContextMenuExclude.bind(this, project, path));\n }\n\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n const isFileOverrides =\n (project as Persistence.FileSystemWorkspaceBinding.FileSystem).fileSystem().type() === 'overrides';\n\n if (!isFileOverrides) {\n if (node instanceof NavigatorGroupTreeNode) {\n contextMenu.defaultSection().appendItem(i18nString(UIStrings.removeFolderFromWorkspace), async () => {\n const warningMessage = `${i18nString(UIStrings.areYouSureYouWantToRemoveThis, {\n PH1: (node as NavigatorGroupTreeNode).title,\n })}\\n${i18nString(UIStrings.workspaceStopSyncing)}`;\n const shouldRemove = await UI.UIUtils.ConfirmDialog.show(warningMessage, undefined, {\n okButtonLabel: i18nString(UIStrings.remove),\n });\n if (shouldRemove) {\n project.remove();\n }\n });\n }\n } else {\n if (!(node instanceof NavigatorGroupTreeNode)) {\n contextMenu.defaultSection().appendItem(\n i18nString(UIStrings.delete), this.handleDeleteFolder.bind(this, node));\n }\n }\n }\n\n void contextMenu.show();\n }\n\n rename(node: NavigatorUISourceCodeTreeNode, creatingNewUISourceCode: boolean): void {\n const uiSourceCode = node.uiSourceCode();\n node.rename(callback.bind(this));\n\n function callback(this: NavigatorView, committed: boolean): void {\n if (!creatingNewUISourceCode) {\n return;\n }\n if (!committed) {\n uiSourceCode.remove();\n } else if (node.treeElement && node.treeElement.listItemElement.hasFocus()) {\n this.sourceSelected(uiSourceCode, true);\n }\n }\n }\n\n async create(\n project: Workspace.Workspace.Project, path: Platform.DevToolsPath.EncodedPathString,\n uiSourceCodeToCopy?: Workspace.UISourceCode.UISourceCode): Promise {\n let content = '';\n if (uiSourceCodeToCopy) {\n content = (await uiSourceCodeToCopy.requestContent()).content || '';\n }\n const uiSourceCode = await project.createFile(path, null, content);\n if (!uiSourceCode) {\n return;\n }\n this.sourceSelected(uiSourceCode, false);\n const node = this.revealUISourceCode(uiSourceCode, true);\n if (node) {\n this.rename(node, true);\n }\n }\n\n private groupingChanged(): void {\n this.reset(true);\n this.initGrouping();\n // Reset the workspace to repopulate filesystem folders.\n this.resetWorkspace(Workspace.Workspace.WorkspaceImpl.instance());\n this.workspaceInternal.uiSourceCodes().forEach(this.addUISourceCode.bind(this));\n }\n\n private ignoreListChanged(): void {\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE)) {\n this.groupingChanged();\n } else {\n this.rootNode.updateTitleRecursive();\n }\n }\n\n private initGrouping(): void {\n this.groupByFrame = true;\n this.groupByDomain = this.navigatorGroupByFolderSetting.get();\n this.groupByFolder = this.groupByDomain;\n if (this.navigatorGroupByAuthoredExperiment) {\n this.groupByAuthored = Root.Runtime.experiments.isEnabled(this.navigatorGroupByAuthoredExperiment);\n } else {\n this.groupByAuthored = false;\n }\n }\n\n private resetForTest(): void {\n this.reset();\n this.workspaceInternal.uiSourceCodes().forEach(this.addUISourceCode.bind(this));\n }\n\n private discardFrame(frame: SDK.ResourceTreeModel.ResourceTreeFrame, isAuthored: boolean): void {\n if (isAuthored) {\n return;\n }\n const node = this.frameNodes.get(frame);\n if (!node) {\n return;\n }\n\n if (node.parent) {\n node.parent.removeChild(node);\n }\n this.frameNodes.delete(frame);\n for (const child of frame.childFrames) {\n this.discardFrame(child, isAuthored);\n }\n }\n\n targetAdded(_target: SDK.Target.Target): void {\n }\n\n targetRemoved(target: SDK.Target.Target): void {\n const rootOrDeployed = this.rootOrDeployedNode();\n const targetNode = rootOrDeployed.child('target:' + target.id());\n if (targetNode) {\n rootOrDeployed.removeChild(targetNode);\n }\n }\n\n private targetNameChanged(event: Common.EventTarget.EventTargetEvent): void {\n const target = event.data;\n const targetNode = this.rootOrDeployedNode().child('target:' + target.id());\n if (targetNode) {\n targetNode.setTitle(target.name());\n }\n }\n override wasShown(): void {\n super.wasShown();\n this.scriptsTree.registerCSSFiles([navigatorTreeStyles]);\n this.registerCSSFiles([navigatorViewStyles]);\n }\n}\n\nconst boostOrderForNode = new WeakSet();\n\nexport class NavigatorFolderTreeElement extends UI.TreeOutline.TreeElement {\n private readonly nodeType: string;\n private readonly navigatorView: NavigatorView;\n private hoverCallback: ((arg0: boolean) => void)|undefined;\n node!: NavigatorTreeNode;\n private hovered?: boolean;\n private isIgnoreListed?: boolean;\n private isFromSourceMap: boolean;\n\n constructor(navigatorView: NavigatorView, type: string, title: string, hoverCallback?: ((arg0: boolean) => void)) {\n super('', true, NavigatorFolderTreeElement.#contextForType(type));\n this.listItemElement.classList.add('navigator-' + type + '-tree-item', 'navigator-folder-tree-item');\n UI.ARIAUtils.setLabel(this.listItemElement, `${title}, ${type}`);\n this.nodeType = type;\n this.title = title;\n this.tooltip = title;\n this.navigatorView = navigatorView;\n this.hoverCallback = hoverCallback;\n this.isFromSourceMap = false;\n\n let iconType = 'folder';\n\n if (type === Types.Domain) {\n iconType = 'cloud';\n } else if (type === Types.Frame) {\n iconType = 'frame';\n } else if (type === Types.Worker) {\n iconType = 'gears';\n } else if (type === Types.Authored) {\n iconType = 'code';\n } else if (type === Types.Deployed) {\n iconType = 'deployed';\n }\n\n const icon = new IconButton.Icon.Icon();\n const iconPath = new URL(`../../Images/${iconType}.svg`, import.meta.url).toString();\n icon.data = {iconPath: iconPath, color: 'var(--override-folder-tree-item-color)', width: '20px', height: '20px'};\n this.setLeadingIcons([icon]);\n }\n\n override async onpopulate(): Promise {\n this.node.populate();\n }\n\n override onattach(): void {\n this.collapse();\n this.node.onattach();\n this.listItemElement.addEventListener('contextmenu', this.handleContextMenuEvent.bind(this), false);\n this.listItemElement.addEventListener('mousemove', this.mouseMove.bind(this), false);\n this.listItemElement.addEventListener('mouseleave', this.mouseLeave.bind(this), false);\n }\n\n setIgnoreListed(isIgnoreListed: boolean): void {\n if (this.isIgnoreListed !== isIgnoreListed) {\n this.isIgnoreListed = isIgnoreListed;\n this.listItemElement.classList.toggle('is-ignore-listed', isIgnoreListed);\n this.updateTooltip();\n }\n }\n\n setFromSourceMap(isFromSourceMap: boolean): void {\n this.isFromSourceMap = isFromSourceMap;\n this.listItemElement.classList.toggle('is-from-source-map', isFromSourceMap);\n }\n\n setNode(node: NavigatorTreeNode): void {\n this.node = node;\n this.updateTooltip();\n UI.ARIAUtils.setLabel(this.listItemElement, `${this.title}, ${this.nodeType}`);\n }\n\n private updateTooltip(): void {\n if (this.node.tooltip) {\n this.tooltip = this.node.tooltip;\n } else {\n const paths = [];\n let currentNode: NavigatorTreeNode|null = this.node;\n while (currentNode && !currentNode.isRoot() && currentNode.type === this.node.type) {\n paths.push(currentNode.title);\n currentNode = currentNode.parent;\n }\n paths.reverse();\n let tooltip = paths.join('/');\n if (this.isIgnoreListed) {\n tooltip = i18nString(UIStrings.sIgnoreListed, {PH1: tooltip});\n }\n this.tooltip = tooltip;\n }\n }\n\n private handleContextMenuEvent(event: Event): void {\n if (!this.node) {\n return;\n }\n this.select();\n this.navigatorView.handleFolderContextMenu(event, this.node as NavigatorFolderTreeNode);\n }\n\n private mouseMove(_event: Event): void {\n if (this.hovered || !this.hoverCallback) {\n return;\n }\n this.hovered = true;\n this.hoverCallback(true);\n }\n\n private mouseLeave(_event: Event): void {\n if (!this.hoverCallback) {\n return;\n }\n this.hovered = false;\n this.hoverCallback(false);\n }\n\n static #contextForType(type: string): string {\n switch (type) {\n case Types.Domain:\n return 'domain';\n case Types.Frame:\n return 'frame';\n case Types.Worker:\n return 'worker';\n case Types.Authored:\n return 'authored';\n case Types.Deployed:\n return 'deployed';\n }\n return 'folder';\n }\n}\n\nexport class NavigatorSourceTreeElement extends UI.TreeOutline.TreeElement {\n readonly nodeType: string;\n readonly node: NavigatorUISourceCodeTreeNode;\n private readonly navigatorView: NavigatorView;\n uiSourceCodeInternal: Workspace.UISourceCode.UISourceCode;\n\n constructor(\n navigatorView: NavigatorView, uiSourceCode: Workspace.UISourceCode.UISourceCode, title: string,\n node: NavigatorUISourceCodeTreeNode) {\n super('', false, uiSourceCode.contentType().name());\n this.nodeType = Types.File;\n this.node = node;\n this.title = title;\n this.listItemElement.classList.add(\n 'navigator-' + uiSourceCode.contentType().name() + '-tree-item', 'navigator-file-tree-item');\n this.tooltip = uiSourceCode.url();\n UI.ARIAUtils.setLabel(this.listItemElement, `${uiSourceCode.name()}, ${this.nodeType}`);\n Common.EventTarget.fireEvent('source-tree-file-added', uiSourceCode.fullDisplayName());\n this.navigatorView = navigatorView;\n this.uiSourceCodeInternal = uiSourceCode;\n this.updateIcon();\n }\n\n updateIcon(): void {\n const binding = Persistence.Persistence.PersistenceImpl.instance().binding(this.uiSourceCodeInternal);\n const networkPersistenceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();\n let iconType = 'document';\n let iconStyles: string[] = [];\n if (binding) {\n if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(binding.fileSystem)) {\n iconType = 'snippet';\n }\n const badgeIsPurple = networkPersistenceManager.project() === binding.fileSystem.project();\n iconStyles = badgeIsPurple ? ['dot', 'purple'] : ['dot', 'green'];\n } else if (networkPersistenceManager.isActiveHeaderOverrides(this.uiSourceCode)) {\n iconStyles = ['dot', 'purple'];\n } else {\n if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(this.uiSourceCodeInternal)) {\n iconType = 'snippet';\n }\n }\n\n const icon = new IconButton.Icon.Icon();\n const iconPath = new URL(`../../Images/${iconType}.svg`, import.meta.url).toString();\n icon.data = {iconPath: iconPath, color: 'var(--override-file-tree-item-color)', width: '20px', height: '20px'};\n for (const style of iconStyles) {\n icon.classList.add(style);\n }\n if (binding) {\n UI.Tooltip.Tooltip.install(\n icon, Persistence.PersistenceUtils.PersistenceUtils.tooltipForUISourceCode(this.uiSourceCodeInternal));\n }\n this.setLeadingIcons([icon]);\n }\n\n updateAccessibleName(): void {\n UI.ARIAUtils.setLabel(this.listItemElement, `${this.uiSourceCodeInternal.name()}, ${this.nodeType}`);\n }\n\n get uiSourceCode(): Workspace.UISourceCode.UISourceCode {\n return this.uiSourceCodeInternal;\n }\n\n override onattach(): void {\n this.listItemElement.draggable = true;\n this.listItemElement.addEventListener('click', this.onclick.bind(this), false);\n this.listItemElement.addEventListener('contextmenu', this.handleContextMenuEvent.bind(this), false);\n this.listItemElement.addEventListener('dragstart', this.ondragstart.bind(this), false);\n }\n\n private shouldRenameOnMouseDown(): boolean {\n if (!this.uiSourceCodeInternal.canRename()) {\n return false;\n }\n if (!this.treeOutline) {\n return false;\n }\n const isSelected = this === this.treeOutline.selectedTreeElement;\n return isSelected && this.treeOutline.element.hasFocus() && !UI.UIUtils.isBeingEdited(this.treeOutline.element);\n }\n\n override selectOnMouseDown(event: MouseEvent): void {\n if (event.which !== 1 || !this.shouldRenameOnMouseDown()) {\n super.selectOnMouseDown(event);\n return;\n }\n window.setTimeout(rename.bind(this), 300);\n\n function rename(this: NavigatorSourceTreeElement): void {\n if (this.shouldRenameOnMouseDown()) {\n this.navigatorView.rename(this.node, false);\n }\n }\n }\n\n private ondragstart(event: DragEvent): void {\n if (!event.dataTransfer) {\n return;\n }\n event.dataTransfer.setData('text/plain', this.uiSourceCodeInternal.url());\n event.dataTransfer.effectAllowed = 'copy';\n }\n\n override onspace(): boolean {\n this.navigatorView.sourceSelected(this.uiSourceCode, true);\n return true;\n }\n\n private onclick(_event: Event): void {\n this.navigatorView.sourceSelected(this.uiSourceCode, false);\n }\n\n override ondblclick(event: Event): boolean {\n const middleClick = (event as MouseEvent).button === 1;\n this.navigatorView.sourceSelected(this.uiSourceCode, !middleClick);\n return false;\n }\n\n override onenter(): boolean {\n this.navigatorView.sourceSelected(this.uiSourceCode, true);\n return true;\n }\n\n override ondelete(): boolean {\n return true;\n }\n\n private handleContextMenuEvent(event: Event): void {\n this.select();\n this.navigatorView.handleFileContextMenu(event, this.node);\n }\n}\n\nexport type NavigatorRecursiveTreeNodeProperties = {\n exclusivelySourceMapped: boolean|null,\n exclusivelyIgnored: boolean|null,\n exclusivelyThirdParty: boolean|null,\n exclusivelyContentScripts: boolean|null,\n};\n\nexport class NavigatorTreeNode {\n id: string;\n protected navigatorView: NavigatorView;\n type: string;\n childrenInternal: Map;\n private populated: boolean;\n isMerged: boolean;\n parent!: NavigatorTreeNode|null;\n title!: string;\n tooltip?: string;\n recursiveProperties: NavigatorRecursiveTreeNodeProperties;\n\n constructor(navigatorView: NavigatorView, id: string, type: string, tooltip?: string) {\n this.id = id;\n this.navigatorView = navigatorView;\n this.type = type;\n this.childrenInternal = new Map();\n this.tooltip = tooltip;\n\n this.populated = false;\n this.isMerged = false;\n this.recursiveProperties = {\n exclusivelySourceMapped: null,\n exclusivelyIgnored: null,\n exclusivelyContentScripts: null,\n exclusivelyThirdParty: null,\n };\n }\n\n treeNode(): UI.TreeOutline.TreeElement {\n throw 'Not implemented';\n }\n\n dispose(): void {\n }\n\n updateTitle(): void {\n }\n\n updateTitleRecursive(): void {\n for (const child of this.children()) {\n child.updateTitleRecursive();\n }\n this.updateTitle();\n }\n\n updateTitleBubbleUp(): void {\n this.updateTitle();\n if (this.parent) {\n this.parent.updateTitleBubbleUp();\n }\n }\n\n isRoot(): boolean {\n return false;\n }\n\n hasChildren(): boolean {\n return true;\n }\n\n onattach(): void {\n }\n\n setTitle(_title: string): void {\n throw 'Not implemented';\n }\n\n populate(): void {\n if (this.isPopulated()) {\n return;\n }\n if (this.parent) {\n this.parent.populate();\n }\n this.populated = true;\n this.wasPopulated();\n }\n\n wasPopulated(): void {\n const children = this.children();\n for (let i = 0; i < children.length; ++i) {\n this.navigatorView.appendChild(this.treeNode(), (children[i].treeNode() as UI.TreeOutline.TreeElement));\n }\n }\n\n didAddChild(node: NavigatorTreeNode): void {\n if (this.isPopulated()) {\n this.navigatorView.appendChild(this.treeNode(), (node.treeNode() as UI.TreeOutline.TreeElement));\n }\n }\n\n willRemoveChild(node: NavigatorTreeNode): void {\n if (this.isPopulated()) {\n this.navigatorView.removeChild(this.treeNode(), (node.treeNode() as UI.TreeOutline.TreeElement));\n }\n }\n\n isPopulated(): boolean {\n return this.populated;\n }\n\n isEmpty(): boolean {\n return !this.childrenInternal.size;\n }\n\n children(): NavigatorTreeNode[] {\n return [...this.childrenInternal.values()];\n }\n\n child(id: string): NavigatorTreeNode|null {\n return this.childrenInternal.get(id) || null;\n }\n\n appendChild(node: NavigatorTreeNode): void {\n this.childrenInternal.set(node.id, node);\n node.parent = this;\n this.didAddChild(node);\n }\n\n removeChild(node: NavigatorTreeNode): void {\n this.willRemoveChild(node);\n this.childrenInternal.delete(node.id);\n node.parent = null;\n node.dispose();\n }\n\n reset(): void {\n this.childrenInternal.clear();\n }\n}\n\nexport class NavigatorRootTreeNode extends NavigatorTreeNode {\n constructor(navigatorView: NavigatorView) {\n super(navigatorView, '', Types.Root);\n }\n\n override isRoot(): boolean {\n return true;\n }\n\n override treeNode(): UI.TreeOutline.TreeElement {\n return this.navigatorView.scriptsTree.rootElement();\n }\n}\n\nexport class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {\n uiSourceCodeInternal: Workspace.UISourceCode.UISourceCode;\n treeElement: NavigatorSourceTreeElement|null;\n private eventListeners: Common.EventTarget.EventDescriptor[];\n private readonly frameInternal: SDK.ResourceTreeModel.ResourceTreeFrame|null;\n constructor(\n navigatorView: NavigatorView, uiSourceCode: Workspace.UISourceCode.UISourceCode,\n frame: SDK.ResourceTreeModel.ResourceTreeFrame|null) {\n super(navigatorView, 'UISourceCode:' + uiSourceCode.canononicalScriptId(), Types.File);\n this.uiSourceCodeInternal = uiSourceCode;\n this.treeElement = null;\n this.eventListeners = [];\n this.frameInternal = frame;\n this.recursiveProperties.exclusivelySourceMapped = uiSourceCode.contentType().isFromSourceMap();\n if (uiSourceCode.contentType().isScript()) {\n // These properties affect ignore-listing menus and only matter when the UISourceCode is a script\n this.recursiveProperties.exclusivelyThirdParty = uiSourceCode.isKnownThirdParty();\n this.recursiveProperties.exclusivelyContentScripts =\n uiSourceCode.project().type() === Workspace.Workspace.projectTypes.ContentScripts;\n }\n }\n\n frame(): SDK.ResourceTreeModel.ResourceTreeFrame|null {\n return this.frameInternal;\n }\n\n uiSourceCode(): Workspace.UISourceCode.UISourceCode {\n return this.uiSourceCodeInternal;\n }\n\n override treeNode(): UI.TreeOutline.TreeElement {\n if (this.treeElement) {\n return this.treeElement;\n }\n\n this.treeElement = new NavigatorSourceTreeElement(this.navigatorView, this.uiSourceCodeInternal, '', this);\n this.updateTitle();\n\n const updateTitleBound = this.updateTitle.bind(this, undefined);\n this.eventListeners = [\n this.uiSourceCodeInternal.addEventListener(Workspace.UISourceCode.Events.TitleChanged, updateTitleBound),\n this.uiSourceCodeInternal.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, updateTitleBound),\n this.uiSourceCodeInternal.addEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted, updateTitleBound),\n ];\n return this.treeElement;\n }\n\n override updateTitle(ignoreIsDirty?: boolean): void {\n const isIgnoreListed =\n Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n this.uiSourceCodeInternal);\n if (this.uiSourceCodeInternal.contentType().isScript() || isIgnoreListed) {\n this.recursiveProperties.exclusivelyIgnored = isIgnoreListed;\n }\n\n if (!this.treeElement) {\n return;\n }\n\n let titleText = this.uiSourceCodeInternal.displayName();\n if (!ignoreIsDirty && this.uiSourceCodeInternal.isDirty()) {\n titleText = '*' + titleText;\n }\n\n this.treeElement.title = titleText;\n this.treeElement.updateIcon();\n\n this.treeElement.listItemElement.classList.toggle('is-ignore-listed', isIgnoreListed);\n\n let tooltip: string = this.uiSourceCodeInternal.url();\n if (this.uiSourceCodeInternal.contentType().isFromSourceMap()) {\n tooltip = i18nString(UIStrings.sFromSourceMap, {PH1: this.uiSourceCodeInternal.displayName()});\n }\n if (isIgnoreListed) {\n tooltip = i18nString(UIStrings.sIgnoreListed, {PH1: tooltip});\n }\n\n this.treeElement.tooltip = tooltip;\n this.treeElement.updateAccessibleName();\n\n this.parent?.childrenInternal.delete(this.id);\n this.id = 'UISourceCode:' + this.uiSourceCodeInternal.canononicalScriptId();\n this.parent?.childrenInternal.set(this.id, this);\n }\n\n override hasChildren(): boolean {\n return false;\n }\n\n override dispose(): void {\n Common.EventTarget.removeEventListeners(this.eventListeners);\n }\n\n reveal(select?: boolean): void {\n if (this.parent) {\n this.parent.populate();\n this.parent.treeNode().expand();\n }\n if (this.treeElement) {\n this.treeElement.reveal(true);\n if (select) {\n this.treeElement.select(true);\n }\n }\n }\n\n rename(callback?: ((arg0: boolean) => void)): void {\n if (!this.treeElement) {\n return;\n }\n\n this.treeElement.listItemElement.focus();\n\n if (!this.treeElement.treeOutline) {\n return;\n }\n\n // Tree outline should be marked as edited as well as the tree element to prevent search from starting.\n const treeOutlineElement = this.treeElement.treeOutline.element;\n UI.UIUtils.markBeingEdited(treeOutlineElement, true);\n\n function commitHandler(\n this: NavigatorUISourceCodeTreeNode, element: Element, newTitle: string, oldTitle: string): void {\n if (newTitle !== oldTitle) {\n if (this.treeElement) {\n this.treeElement.title = newTitle;\n }\n // necessary cast to RawPathString as alternative would be altering type of Config\n void this.uiSourceCodeInternal.rename(newTitle as Platform.DevToolsPath.RawPathString)\n .then(renameCallback.bind(this));\n return;\n }\n afterEditing.call(this, true);\n }\n\n function renameCallback(this: NavigatorUISourceCodeTreeNode, success: boolean): void {\n if (!success) {\n UI.UIUtils.markBeingEdited(treeOutlineElement, false);\n this.updateTitle();\n this.rename(callback);\n return;\n }\n if (this.treeElement) {\n const {parent} = this.treeElement;\n if (parent) {\n parent.removeChild(this.treeElement);\n parent.appendChild(this.treeElement);\n this.treeElement.select();\n }\n }\n afterEditing.call(this, true);\n }\n\n function afterEditing(this: NavigatorUISourceCodeTreeNode, committed: boolean): void {\n UI.UIUtils.markBeingEdited(treeOutlineElement, false);\n this.updateTitle();\n if (callback) {\n callback(committed);\n }\n }\n\n this.updateTitle(true);\n this.treeElement.startEditingTitle(\n new UI.InplaceEditor.Config(commitHandler.bind(this), afterEditing.bind(this, false)));\n }\n}\n\nexport class NavigatorFolderTreeNode extends NavigatorTreeNode {\n project: Workspace.Workspace.Project|null;\n readonly folderPath: Platform.DevToolsPath.EncodedPathString;\n readonly origin: Platform.DevToolsPath.UrlString;\n override title: string;\n treeElement!: NavigatorFolderTreeElement|null;\n constructor(\n navigatorView: NavigatorView, project: Workspace.Workspace.Project|null, id: string, type: string,\n folderPath: Platform.DevToolsPath.EncodedPathString, title: string, origin: Platform.DevToolsPath.UrlString) {\n super(navigatorView, id, type);\n this.project = project;\n this.folderPath = folderPath;\n this.title = title;\n this.origin = origin;\n }\n\n override treeNode(): UI.TreeOutline.TreeElement {\n if (this.treeElement) {\n return this.treeElement;\n }\n this.treeElement = this.createTreeElement(this.title, this);\n this.updateTitle();\n return this.treeElement;\n }\n\n override updateTitle(): void {\n let propName: keyof NavigatorRecursiveTreeNodeProperties;\n for (propName in this.recursiveProperties) {\n let propValue: boolean|null = null;\n for (const child of this.children()) {\n if (child.recursiveProperties[propName] === false) {\n propValue = false;\n break;\n } else if (child.recursiveProperties[propName]) {\n propValue = true;\n }\n }\n this.recursiveProperties[propName] = propValue;\n }\n\n if (!this.treeElement) {\n return;\n }\n\n this.treeElement.setFromSourceMap(this.recursiveProperties.exclusivelySourceMapped || false);\n this.treeElement.setIgnoreListed(this.recursiveProperties.exclusivelyIgnored || false);\n\n if (!this.project || this.project.type() !== Workspace.Workspace.projectTypes.FileSystem) {\n return;\n }\n\n const absoluteFileSystemPath = Common.ParsedURL.ParsedURL.concatenate(\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemPath(\n this.project.id() as Platform.DevToolsPath.UrlString),\n '/', this.folderPath);\n const hasMappedFiles =\n Persistence.Persistence.PersistenceImpl.instance().filePathHasBindings(absoluteFileSystemPath);\n this.treeElement.listItemElement.classList.toggle('has-mapped-files', hasMappedFiles);\n }\n\n private createTreeElement(title: string, node: NavigatorTreeNode): NavigatorFolderTreeElement {\n const treeElement = new NavigatorFolderTreeElement(this.navigatorView, this.type, title);\n treeElement.setNode(node);\n return treeElement;\n }\n\n override wasPopulated(): void {\n // @ts-ignore These types are invalid, but removing this check causes wrong behavior\n if (!this.treeElement || this.treeElement.node !== this) {\n return;\n }\n this.addChildrenRecursive();\n }\n\n private addChildrenRecursive(): void {\n const children = this.children();\n for (let i = 0; i < children.length; ++i) {\n const child = children[i];\n this.didAddChild(child);\n if (child instanceof NavigatorFolderTreeNode) {\n child.addChildrenRecursive();\n }\n }\n }\n\n private shouldMerge(node: NavigatorTreeNode): boolean {\n return this.type !== Types.Domain && node instanceof NavigatorFolderTreeNode;\n }\n\n override didAddChild(node: NavigatorTreeNode): void {\n if (!this.treeElement) {\n return;\n }\n\n let children = this.children();\n\n if (children.length === 1 && this.shouldMerge(node)) {\n node.isMerged = true;\n this.treeElement.title = this.treeElement.title + '/' + node.title;\n (node as NavigatorFolderTreeNode).treeElement = this.treeElement;\n node.updateTitle();\n this.treeElement.setNode(node);\n return;\n }\n\n let oldNode;\n if (children.length === 2) {\n oldNode = children[0] !== node ? children[0] : children[1];\n }\n if (oldNode && oldNode.isMerged) {\n oldNode.isMerged = false;\n const mergedToNodes = [];\n mergedToNodes.push(this);\n let treeNode: (NavigatorTreeNode|null)|NavigatorTreeNode|this = this;\n while (treeNode && treeNode.isMerged) {\n treeNode = treeNode.parent;\n if (treeNode) {\n mergedToNodes.push(treeNode);\n }\n }\n mergedToNodes.reverse();\n const titleText = mergedToNodes.map(node => node.title).join('/');\n\n const nodes = [];\n treeNode = oldNode;\n do {\n nodes.push(treeNode);\n children = treeNode.children();\n treeNode = children.length === 1 ? children[0] : null;\n } while (treeNode && treeNode.isMerged);\n\n if (!this.isPopulated()) {\n this.treeElement.title = titleText;\n this.treeElement.setNode(this);\n for (let i = 0; i < nodes.length; ++i) {\n (nodes[i] as NavigatorFolderTreeNode).treeElement = null;\n nodes[i].isMerged = false;\n }\n this.updateTitle();\n return;\n }\n const oldTreeElement = this.treeElement;\n const treeElement = this.createTreeElement(titleText, this);\n for (let i = 0; i < mergedToNodes.length; ++i) {\n (mergedToNodes[i] as NavigatorFolderTreeNode).treeElement = treeElement;\n mergedToNodes[i].updateTitle();\n }\n if (oldTreeElement.parent) {\n this.navigatorView.appendChild(oldTreeElement.parent, treeElement);\n }\n\n oldTreeElement.setNode(nodes[nodes.length - 1]);\n oldTreeElement.title = nodes.map(node => node.title).join('/');\n if (oldTreeElement.parent) {\n this.navigatorView.removeChild(oldTreeElement.parent, oldTreeElement);\n }\n this.navigatorView.appendChild(this.treeElement, oldTreeElement);\n if (oldTreeElement.expanded) {\n treeElement.expand();\n }\n this.updateTitle();\n }\n if (this.isPopulated()) {\n this.navigatorView.appendChild(this.treeElement, node.treeNode());\n }\n }\n\n override willRemoveChild(node: NavigatorTreeNode): void {\n const actualNode = (node as NavigatorFolderTreeNode);\n if (actualNode.isMerged || !this.isPopulated() || !this.treeElement || !actualNode.treeElement) {\n return;\n }\n this.navigatorView.removeChild(this.treeElement, actualNode.treeElement);\n }\n}\n\nexport class NavigatorGroupTreeNode extends NavigatorTreeNode {\n private readonly project: Workspace.Workspace.Project|null;\n override title: string;\n private hoverCallback?: ((arg0: boolean) => void);\n private treeElement?: NavigatorFolderTreeElement;\n constructor(\n navigatorView: NavigatorView, project: Workspace.Workspace.Project|null, id: string, type: string, title: string,\n tooltip?: string) {\n super(navigatorView, id, type, tooltip);\n this.project = project;\n this.title = title;\n this.populate();\n }\n\n setHoverCallback(hoverCallback: (arg0: boolean) => void): void {\n this.hoverCallback = hoverCallback;\n }\n\n override treeNode(): UI.TreeOutline.TreeElement {\n if (this.treeElement) {\n return this.treeElement;\n }\n this.treeElement = new NavigatorFolderTreeElement(this.navigatorView, this.type, this.title, this.hoverCallback);\n this.treeElement.setNode(this);\n return this.treeElement;\n }\n\n override onattach(): void {\n this.updateTitle();\n }\n\n override updateTitle(): void {\n if (!this.treeElement || !this.project || this.project.type() !== Workspace.Workspace.projectTypes.FileSystem) {\n return;\n }\n const fileSystemPath = Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemPath(\n this.project.id() as Platform.DevToolsPath.UrlString);\n const wasActive = this.treeElement.listItemElement.classList.contains('has-mapped-files');\n const isActive = Persistence.Persistence.PersistenceImpl.instance().filePathHasBindings(fileSystemPath);\n if (wasActive === isActive) {\n return;\n }\n this.treeElement.listItemElement.classList.toggle('has-mapped-files', isActive);\n if (this.treeElement.childrenListElement.hasFocus()) {\n return;\n }\n if (isActive) {\n this.treeElement.expand();\n } else {\n this.treeElement.collapse();\n }\n }\n\n override setTitle(title: string): void {\n this.title = title;\n if (this.treeElement) {\n this.treeElement.title = this.title;\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"NavigatorView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/NavigatorView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,yCAAy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W,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;QACxG,IAAI,SAAS,KAAK,QAAQ,EAAE;YAC1B,OAAO;SACR;QACD,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QAChF,IAAI,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,EAAE;YACnD,OAAO;SACR;QACD,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;SAC3B;aAAM;YACL,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;SAC7B;IACH,CAAC;IAEQ,QAAQ,CAAC,KAAa;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SACrC;IACH,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2012 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Persistence from '../../models/persistence/persistence.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport navigatorTreeStyles from './navigatorTree.css.js';\nimport navigatorViewStyles from './navigatorView.css.js';\nimport {SearchSources} from './SearchSourcesView.js';\n\nconst UIStrings = {\n /**\n *@description Text in Navigator View of the Sources panel\n */\n searchInFolder: 'Search in folder',\n /**\n *@description Search label in Navigator View of the Sources panel\n */\n searchInAllFiles: 'Search in all files',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n noDomain: '(no domain)',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n authored: 'Authored',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n authoredTooltip: 'Contains original sources',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n deployed: 'Deployed',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n deployedTooltip: 'Contains final sources the browser sees',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n areYouSureYouWantToExcludeThis: 'Are you sure you want to exclude this folder?',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n areYouSureYouWantToDeleteThis: 'Are you sure you want to delete this file?',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n rename: 'Rename…',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n makeACopy: 'Make a copy…',\n /**\n *@description Text to delete something\n */\n delete: 'Delete',\n /**\n *@description A button text to confirm an action to remove a folder. This is not the same as delete. It removes the folder from UI but do not delete them.\n */\n remove: 'Remove',\n /**\n *@description Text in Navigator View of the Sources panel\n */\n areYouSureYouWantToDeleteFolder: 'Are you sure you want to delete this folder and its contents?',\n /**\n *@description Text in Navigator View of the Sources panel. A confirmation message on action to delete a folder.\n */\n actionCannotBeUndone: 'This action cannot be undone.',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n openFolder: 'Open folder',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n newFile: 'New file',\n /**\n *@description A context menu item in the Navigator View of the Sources panel to exclude a folder from workspace\n */\n excludeFolder: 'Exclude from workspace',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n removeFolderFromWorkspace: 'Remove from workspace',\n /**\n *@description Text in Navigator View of the Sources panel\n * @example {a-folder-name} PH1\n */\n areYouSureYouWantToRemoveThis: 'Remove ‘{PH1}’ from Workspace?',\n /**\n *@description Text in Navigator View of the Sources panel. Warning message when user remove a folder.\n */\n workspaceStopSyncing: 'This will stop syncing changes from DevTools to your sources.',\n /**\n *@description Name of an item from source map\n *@example {compile.html} PH1\n */\n sFromSourceMap: '{PH1} (from source map)',\n /**\n *@description Name of an item that is on the ignore list\n *@example {compile.html} PH1\n */\n sIgnoreListed: '{PH1} (ignore listed)',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/NavigatorView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport const Types = {\n Authored: 'authored',\n Deployed: 'deployed',\n Domain: 'domain',\n File: 'file',\n FileSystem: 'fs',\n FileSystemFolder: 'fs-folder',\n Frame: 'frame',\n NetworkFolder: 'nw-folder',\n Root: 'root',\n Worker: 'worker',\n};\n\nconst TYPE_ORDERS = new Map([\n [Types.Root, 1],\n [Types.Authored, 1],\n [Types.Deployed, 5],\n [Types.Domain, 10],\n [Types.FileSystemFolder, 1],\n [Types.NetworkFolder, 1],\n [Types.File, 10],\n [Types.Frame, 70],\n [Types.Worker, 90],\n [Types.FileSystem, 100],\n]);\n\nexport class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.Observer {\n private placeholder: UI.Widget.Widget|null;\n scriptsTree: UI.TreeOutline.TreeOutlineInShadow;\n private readonly uiSourceCodeNodes:\n Platform.MapUtilities.Multimap;\n private readonly subfolderNodes: Map;\n private readonly rootNode: NavigatorRootTreeNode;\n private readonly frameNodes: Map;\n private authoredNode?: NavigatorGroupTreeNode;\n private deployedNode?: NavigatorGroupTreeNode;\n private navigatorGroupByFolderSetting: Common.Settings.Setting;\n private navigatorGroupByAuthoredExperiment?: string;\n private workspaceInternal!: Workspace.Workspace.WorkspaceImpl;\n private groupByFrame?: boolean;\n private groupByAuthored?: boolean;\n private groupByDomain?: boolean;\n private groupByFolder?: boolean;\n constructor(jslogContext: string, enableAuthoredGrouping?: boolean) {\n super(true);\n\n this.placeholder = null;\n this.scriptsTree = new UI.TreeOutline.TreeOutlineInShadow();\n\n this.scriptsTree.setComparator(NavigatorView.treeElementsCompare);\n this.scriptsTree.setFocusable(false);\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context(jslogContext)}`);\n this.contentElement.appendChild(this.scriptsTree.element);\n this.setDefaultFocusedElement(this.scriptsTree.element);\n\n this.uiSourceCodeNodes = new Platform.MapUtilities.Multimap();\n this.subfolderNodes = new Map();\n\n this.rootNode = new NavigatorRootTreeNode(this);\n this.rootNode.populate();\n\n this.frameNodes = new Map();\n\n this.contentElement.addEventListener('contextmenu', this.handleContextMenu.bind(this), false);\n UI.ShortcutRegistry.ShortcutRegistry.instance().addShortcutListener(\n this.contentElement, {'sources.rename': this.renameShortcut.bind(this)});\n\n this.navigatorGroupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigatorGroupByFolder');\n this.navigatorGroupByFolderSetting.addChangeListener(this.groupingChanged.bind(this));\n if (enableAuthoredGrouping) {\n this.navigatorGroupByAuthoredExperiment = Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING;\n }\n\n Bindings.IgnoreListManager.IgnoreListManager.instance().addChangeListener(this.ignoreListChanged.bind(this));\n\n this.initGrouping();\n\n Persistence.Persistence.PersistenceImpl.instance().addEventListener(\n Persistence.Persistence.Events.BindingCreated, this.onBindingChanged, this);\n Persistence.Persistence.PersistenceImpl.instance().addEventListener(\n Persistence.Persistence.Events.BindingRemoved, this.onBindingChanged, this);\n Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(\n Persistence.NetworkPersistenceManager.Events.RequestsForHeaderOverridesFileChanged,\n this.#onRequestsForHeaderOverridesFileChanged, this);\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.NameChanged, this.targetNameChanged, this);\n\n SDK.TargetManager.TargetManager.instance().observeTargets(this);\n this.resetWorkspace(Workspace.Workspace.WorkspaceImpl.instance());\n this.workspaceInternal.uiSourceCodes().forEach(this.addUISourceCode.bind(this));\n Bindings.NetworkProject.NetworkProjectManager.instance().addEventListener(\n Bindings.NetworkProject.Events.FrameAttributionAdded, this.frameAttributionAdded, this);\n Bindings.NetworkProject.NetworkProjectManager.instance().addEventListener(\n Bindings.NetworkProject.Events.FrameAttributionRemoved, this.frameAttributionRemoved, this);\n }\n\n private static treeElementOrder(treeElement: UI.TreeOutline.TreeElement): number {\n if (boostOrderForNode.has(treeElement)) {\n return 0;\n }\n\n const actualElement = (treeElement as NavigatorSourceTreeElement);\n\n let order = TYPE_ORDERS.get(actualElement.nodeType) || 0;\n if (actualElement.uiSourceCode) {\n const contentType = actualElement.uiSourceCode.contentType();\n if (contentType.isDocument()) {\n order += 3;\n } else if (contentType.isScript()) {\n order += 5;\n } else if (contentType.isStyleSheet()) {\n order += 10;\n } else {\n order += 15;\n }\n }\n\n return order;\n }\n\n static appendSearchItem(contextMenu: UI.ContextMenu.ContextMenu, path: string): void {\n const searchLabel = path ? i18nString(UIStrings.searchInFolder) : i18nString(UIStrings.searchInAllFiles);\n const searchSources = new SearchSources(path && `file:${path}`);\n contextMenu.viewSection().appendItem(searchLabel, () => Common.Revealer.reveal(searchSources));\n }\n\n private static treeElementsCompare(\n treeElement1: UI.TreeOutline.TreeElement, treeElement2: UI.TreeOutline.TreeElement): number {\n const typeWeight1 = NavigatorView.treeElementOrder(treeElement1);\n const typeWeight2 = NavigatorView.treeElementOrder(treeElement2);\n\n if (typeWeight1 > typeWeight2) {\n return 1;\n }\n if (typeWeight1 < typeWeight2) {\n return -1;\n }\n return Platform.StringUtilities.naturalOrderComparator(treeElement1.titleAsText(), treeElement2.titleAsText());\n }\n\n setPlaceholder(placeholder: UI.Widget.Widget): void {\n console.assert(!this.placeholder, 'A placeholder widget was already set');\n this.placeholder = placeholder;\n placeholder.show(this.contentElement, this.contentElement.firstChild);\n updateVisibility.call(this);\n this.scriptsTree.addEventListener(UI.TreeOutline.Events.ElementAttached, updateVisibility.bind(this));\n this.scriptsTree.addEventListener(UI.TreeOutline.Events.ElementsDetached, updateVisibility.bind(this));\n\n function updateVisibility(this: NavigatorView): void {\n const showTree = this.scriptsTree.firstChild();\n if (showTree) {\n placeholder.hideWidget();\n } else {\n placeholder.showWidget();\n }\n this.scriptsTree.element.classList.toggle('hidden', !showTree);\n }\n }\n\n private onBindingChanged(event: Common.EventTarget.EventTargetEvent):\n void {\n const binding = event.data;\n\n let isFromSourceMap = false;\n // Update UISourceCode titles.\n const networkNodes = this.uiSourceCodeNodes.get(binding.network);\n for (const networkNode of networkNodes) {\n networkNode.updateTitle();\n isFromSourceMap ||= networkNode.uiSourceCode().contentType().isFromSourceMap();\n }\n const fileSystemNodes = this.uiSourceCodeNodes.get(binding.fileSystem);\n for (const fileSystemNode of fileSystemNodes) {\n fileSystemNode.updateTitle();\n isFromSourceMap ||= fileSystemNode.uiSourceCode().contentType().isFromSourceMap();\n }\n\n // Update folder titles.\n const pathTokens =\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(binding.fileSystem);\n let folderPath = Platform.DevToolsPath.EmptyEncodedPathString;\n for (let i = 0; i < pathTokens.length - 1; ++i) {\n folderPath = Common.ParsedURL.ParsedURL.concatenate(folderPath, pathTokens[i]);\n const folderId = this.folderNodeId(\n binding.fileSystem.project(), null, null, binding.fileSystem.origin(), isFromSourceMap, folderPath);\n const folderNode = this.subfolderNodes.get(folderId);\n if (folderNode) {\n folderNode.updateTitle();\n }\n folderPath = Common.ParsedURL.ParsedURL.concatenate(folderPath, '/');\n }\n\n // Update fileSystem root title.\n const fileSystemRoot = this.rootOrDeployedNode().child(binding.fileSystem.project().id());\n if (fileSystemRoot) {\n fileSystemRoot.updateTitle();\n }\n }\n\n #onRequestsForHeaderOverridesFileChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n const headersFileUiSourceCode = event.data;\n const networkNodes = this.uiSourceCodeNodes.get(headersFileUiSourceCode);\n for (const networkNode of networkNodes) {\n networkNode.updateTitle();\n }\n }\n\n override focus(): void {\n this.scriptsTree.focus();\n }\n\n /**\n * Central place to add elements to the tree to\n * enable focus if the tree has elements\n */\n appendChild(parent: UI.TreeOutline.TreeElement, child: UI.TreeOutline.TreeElement): void {\n this.scriptsTree.setFocusable(true);\n parent.appendChild(child);\n }\n\n /**\n * Central place to remove elements from the tree to\n * disable focus if the tree is empty\n */\n removeChild(parent: UI.TreeOutline.TreeElement, child: UI.TreeOutline.TreeElement): void {\n parent.removeChild(child);\n if (this.scriptsTree.rootElement().childCount() === 0) {\n this.scriptsTree.setFocusable(false);\n }\n }\n\n private resetWorkspace(workspace: Workspace.Workspace.WorkspaceImpl): void {\n // Clear old event listeners first.\n if (this.workspaceInternal) {\n this.workspaceInternal.removeEventListener(\n Workspace.Workspace.Events.UISourceCodeAdded, this.uiSourceCodeAddedCallback, this);\n this.workspaceInternal.removeEventListener(\n Workspace.Workspace.Events.UISourceCodeRemoved, this.uiSourceCodeRemovedCallback, this);\n this.workspaceInternal.removeEventListener(\n Workspace.Workspace.Events.ProjectAdded, this.projectAddedCallback, this);\n this.workspaceInternal.removeEventListener(\n Workspace.Workspace.Events.ProjectRemoved, this.projectRemovedCallback, this);\n }\n\n this.workspaceInternal = workspace;\n this.workspaceInternal.addEventListener(\n Workspace.Workspace.Events.UISourceCodeAdded, this.uiSourceCodeAddedCallback, this);\n this.workspaceInternal.addEventListener(\n Workspace.Workspace.Events.UISourceCodeRemoved, this.uiSourceCodeRemovedCallback, this);\n this.workspaceInternal.addEventListener(Workspace.Workspace.Events.ProjectAdded, this.projectAddedCallback, this);\n this.workspaceInternal.addEventListener(\n Workspace.Workspace.Events.ProjectRemoved, this.projectRemovedCallback, this);\n this.workspaceInternal.projects().forEach(this.projectAdded.bind(this));\n this.computeUniqueFileSystemProjectNames();\n }\n\n private projectAddedCallback(event: Common.EventTarget.EventTargetEvent): void {\n const project = event.data;\n this.projectAdded(project);\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n this.computeUniqueFileSystemProjectNames();\n }\n }\n\n private projectRemovedCallback(event: Common.EventTarget.EventTargetEvent): void {\n const project = event.data;\n this.removeProject(project);\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n this.computeUniqueFileSystemProjectNames();\n }\n }\n\n workspace(): Workspace.Workspace.WorkspaceImpl {\n return this.workspaceInternal;\n }\n\n acceptProject(project: Workspace.Workspace.Project): boolean {\n return !project.isServiceProject();\n }\n\n private frameAttributionAdded(\n event: Common.EventTarget.EventTargetEvent): void {\n const {uiSourceCode} = event.data;\n if (!this.acceptsUISourceCode(uiSourceCode)) {\n return;\n }\n\n const addedFrame = (event.data.frame as SDK.ResourceTreeModel.ResourceTreeFrame | null);\n // This event does not happen for UISourceCodes without initial attribution.\n this.addUISourceCodeNode(uiSourceCode, addedFrame);\n }\n\n private frameAttributionRemoved(\n event: Common.EventTarget.EventTargetEvent): void {\n const {uiSourceCode} = event.data;\n if (!this.acceptsUISourceCode(uiSourceCode)) {\n return;\n }\n\n const removedFrame = (event.data.frame as SDK.ResourceTreeModel.ResourceTreeFrame | null);\n const node = Array.from(this.uiSourceCodeNodes.get(uiSourceCode)).find(node => node.frame() === removedFrame);\n if (node) {\n this.removeUISourceCodeNode(node);\n }\n }\n\n private acceptsUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {\n return this.acceptProject(uiSourceCode.project());\n }\n\n private addUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE) &&\n Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n uiSourceCode)) {\n return;\n }\n\n if (!this.acceptsUISourceCode(uiSourceCode)) {\n return;\n }\n\n if (uiSourceCode.isFetchXHR()) {\n return;\n }\n\n const frames = Bindings.NetworkProject.NetworkProject.framesForUISourceCode(uiSourceCode);\n if (frames.length) {\n for (const frame of frames) {\n this.addUISourceCodeNode(uiSourceCode, frame);\n }\n } else {\n this.addUISourceCodeNode(uiSourceCode, null);\n }\n this.uiSourceCodeAdded(uiSourceCode);\n }\n\n private addUISourceCodeNode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, frame: SDK.ResourceTreeModel.ResourceTreeFrame|null): void {\n const isFromSourceMap = uiSourceCode.contentType().isFromSourceMap();\n let path;\n if (uiSourceCode.project().type() === Workspace.Workspace.projectTypes.FileSystem) {\n path =\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(uiSourceCode).slice(0, -1) as\n Platform.DevToolsPath.EncodedPathString[];\n } else {\n path = Common.ParsedURL.ParsedURL.extractPath(uiSourceCode.url()).split('/').slice(1, -1) as\n Platform.DevToolsPath.EncodedPathString[];\n }\n\n const project = uiSourceCode.project();\n const target = Bindings.NetworkProject.NetworkProject.targetForUISourceCode(uiSourceCode);\n const folderNode =\n this.folderNode(uiSourceCode, project, target, frame, uiSourceCode.origin(), path, isFromSourceMap);\n const uiSourceCodeNode = new NavigatorUISourceCodeTreeNode(this, uiSourceCode, frame);\n const existingNode = folderNode.child(uiSourceCodeNode.id);\n if (existingNode && existingNode instanceof NavigatorUISourceCodeTreeNode) {\n this.uiSourceCodeNodes.set(uiSourceCode, existingNode);\n } else {\n folderNode.appendChild(uiSourceCodeNode);\n this.uiSourceCodeNodes.set(uiSourceCode, uiSourceCodeNode);\n uiSourceCodeNode.updateTitleBubbleUp();\n }\n this.selectDefaultTreeNode();\n }\n\n uiSourceCodeAdded(_uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n }\n\n private uiSourceCodeAddedCallback(event: Common.EventTarget.EventTargetEvent):\n void {\n const uiSourceCode = event.data;\n this.addUISourceCode(uiSourceCode);\n }\n\n private uiSourceCodeRemovedCallback(event: Common.EventTarget.EventTargetEvent):\n void {\n this.removeUISourceCodes([event.data]);\n }\n\n tryAddProject(project: Workspace.Workspace.Project): void {\n this.projectAdded(project);\n for (const uiSourceCode of project.uiSourceCodes()) {\n this.addUISourceCode(uiSourceCode);\n }\n }\n\n private projectAdded(project: Workspace.Workspace.Project): void {\n const rootOrDeployed = this.rootOrDeployedNode();\n if (!this.acceptProject(project) || project.type() !== Workspace.Workspace.projectTypes.FileSystem ||\n Snippets.ScriptSnippetFileSystem.isSnippetsProject(project) || rootOrDeployed.child(project.id())) {\n return;\n }\n rootOrDeployed.appendChild(\n new NavigatorGroupTreeNode(this, project, project.id(), Types.FileSystem, project.displayName()));\n this.selectDefaultTreeNode();\n }\n\n // TODO(einbinder) remove this code after crbug.com/964075 is fixed\n private selectDefaultTreeNode(): void {\n const children = this.rootNode.children();\n if (children.length && !this.scriptsTree.selectedTreeElement) {\n children[0].treeNode().select(true /* omitFocus */, false /* selectedByUser */);\n }\n }\n\n private computeUniqueFileSystemProjectNames(): void {\n const fileSystemProjects = this.workspaceInternal.projectsForType(Workspace.Workspace.projectTypes.FileSystem);\n if (!fileSystemProjects.length) {\n return;\n }\n\n const reversedIndex = Common.Trie.Trie.newArrayTrie();\n const reversedPaths = [];\n for (const project of fileSystemProjects) {\n const fileSystem = (project as Persistence.FileSystemWorkspaceBinding.FileSystem);\n const reversedPathParts = fileSystem.fileSystemPath().split('/').reverse();\n reversedPaths.push(reversedPathParts);\n reversedIndex.add(reversedPathParts);\n }\n\n const rootOrDeployed = this.rootOrDeployedNode();\n\n for (let i = 0; i < fileSystemProjects.length; ++i) {\n const reversedPath = reversedPaths[i];\n const project = fileSystemProjects[i];\n reversedIndex.remove(reversedPath);\n const commonPrefix = reversedIndex.longestPrefix(reversedPath, false /* fullWordOnly */);\n reversedIndex.add(reversedPath);\n const prefixPath = reversedPath.slice(0, commonPrefix.length + 1);\n const path = Common.ParsedURL.ParsedURL.encodedPathToRawPathString(\n prefixPath.reverse().join('/') as Platform.DevToolsPath.EncodedPathString);\n\n const fileSystemNode = rootOrDeployed.child(project.id());\n if (fileSystemNode) {\n fileSystemNode.setTitle(path);\n }\n }\n }\n\n removeProject(project: Workspace.Workspace.Project): void {\n this.removeUISourceCodes(project.uiSourceCodes());\n if (project.type() !== Workspace.Workspace.projectTypes.FileSystem) {\n return;\n }\n const fileSystemNode = this.rootNode.child(project.id());\n if (!fileSystemNode) {\n return;\n }\n this.rootNode.removeChild(fileSystemNode);\n }\n\n private folderNodeId(\n project: Workspace.Workspace.Project, target: SDK.Target.Target|null,\n frame: SDK.ResourceTreeModel.ResourceTreeFrame|null, projectOrigin: string, isFromSourceMap: boolean,\n path: Platform.DevToolsPath.EncodedPathString): string {\n const projectId = project.type() === Workspace.Workspace.projectTypes.FileSystem ? project.id() : '';\n let targetId = target && !(this.groupByAuthored && isFromSourceMap) ? target.id() : '';\n let frameId = this.groupByFrame && frame ? frame.id : '';\n if (this.groupByAuthored) {\n if (isFromSourceMap) {\n targetId = 'Authored';\n frameId = '';\n } else {\n targetId = 'Deployed:' + targetId;\n }\n }\n return targetId + ':' + projectId + ':' + frameId + ':' + projectOrigin + ':' + path;\n }\n\n private folderNode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, project: Workspace.Workspace.Project,\n target: SDK.Target.Target|null, frame: SDK.ResourceTreeModel.ResourceTreeFrame|null,\n projectOrigin: Platform.DevToolsPath.UrlString, path: Platform.DevToolsPath.EncodedPathString[],\n fromSourceMap: boolean): NavigatorTreeNode {\n if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(uiSourceCode)) {\n return this.rootNode;\n }\n\n if (target && !this.groupByFolder && !fromSourceMap) {\n return this.domainNode(uiSourceCode, project, target, frame, projectOrigin);\n }\n\n const folderPath = Common.ParsedURL.ParsedURL.join(path, '/');\n const folderId = this.folderNodeId(project, target, frame, projectOrigin, fromSourceMap, folderPath);\n let folderNode = this.subfolderNodes.get(folderId);\n if (folderNode) {\n return folderNode;\n }\n\n if (!path.length) {\n if (target) {\n return this.domainNode(uiSourceCode, project, target, frame, projectOrigin);\n }\n return this.rootOrDeployedNode().child(project.id()) as NavigatorTreeNode;\n }\n\n const parentNode =\n this.folderNode(uiSourceCode, project, target, frame, projectOrigin, path.slice(0, -1), fromSourceMap);\n let type: string = Types.NetworkFolder;\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n type = Types.FileSystemFolder;\n }\n const name = Common.ParsedURL.ParsedURL.encodedPathToRawPathString(path[path.length - 1]);\n\n folderNode = new NavigatorFolderTreeNode(this, project, folderId, type, folderPath, name, projectOrigin);\n this.subfolderNodes.set(folderId, folderNode);\n parentNode.appendChild(folderNode);\n return folderNode;\n }\n\n private domainNode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, project: Workspace.Workspace.Project,\n target: SDK.Target.Target, frame: SDK.ResourceTreeModel.ResourceTreeFrame|null,\n projectOrigin: string): NavigatorTreeNode {\n const isAuthored = uiSourceCode.contentType().isFromSourceMap();\n const frameNode = this.frameNode(project, target, frame, isAuthored);\n if (!this.groupByDomain) {\n return frameNode;\n }\n let domainNode = frameNode.child(projectOrigin);\n if (domainNode) {\n return domainNode;\n }\n\n domainNode = new NavigatorGroupTreeNode(\n this, project, projectOrigin, Types.Domain, this.computeProjectDisplayName(target, projectOrigin));\n if (frame && projectOrigin === Common.ParsedURL.ParsedURL.extractOrigin(frame.url)) {\n boostOrderForNode.add(domainNode.treeNode());\n }\n frameNode.appendChild(domainNode);\n if (isAuthored && this.groupByAuthored) {\n domainNode.treeNode().expand();\n }\n return domainNode;\n }\n\n private frameNode(\n project: Workspace.Workspace.Project, target: SDK.Target.Target,\n frame: SDK.ResourceTreeModel.ResourceTreeFrame|null, isAuthored: boolean): NavigatorTreeNode {\n if (!this.groupByFrame || !frame || (this.groupByAuthored && isAuthored)) {\n return this.targetNode(project, target, isAuthored);\n }\n\n let frameNode = this.frameNodes.get(frame);\n if (frameNode) {\n return frameNode;\n }\n\n frameNode =\n new NavigatorGroupTreeNode(this, project, target.id() + ':' + frame.id, Types.Frame, frame.displayName());\n frameNode.setHoverCallback(hoverCallback);\n this.frameNodes.set(frame, frameNode);\n\n const parentFrame = frame.parentFrame();\n this.frameNode(project, parentFrame ? parentFrame.resourceTreeModel().target() : target, parentFrame, isAuthored)\n .appendChild(frameNode);\n if (!parentFrame) {\n boostOrderForNode.add(frameNode.treeNode());\n frameNode.treeNode().expand();\n }\n\n function hoverCallback(hovered: boolean): void {\n if (hovered) {\n const overlayModel = target.model(SDK.OverlayModel.OverlayModel);\n if (overlayModel && frame) {\n overlayModel.highlightFrame(frame.id);\n }\n } else {\n SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();\n }\n }\n return frameNode;\n }\n\n private targetNode(project: Workspace.Workspace.Project, target: SDK.Target.Target, isAuthored: boolean):\n NavigatorTreeNode {\n if (this.groupByAuthored && isAuthored) {\n if (!this.authoredNode) {\n this.authoredNode = new NavigatorGroupTreeNode(\n this, null, 'group:Authored', Types.Authored, i18nString(UIStrings.authored),\n i18nString(UIStrings.authoredTooltip));\n this.rootNode.appendChild(this.authoredNode);\n this.authoredNode.treeNode().expand();\n }\n return this.authoredNode;\n }\n\n const rootOrDeployed = this.rootOrDeployedNode();\n if (target === SDK.TargetManager.TargetManager.instance().scopeTarget()) {\n return rootOrDeployed;\n }\n\n let targetNode = rootOrDeployed.child('target:' + target.id());\n if (!targetNode) {\n targetNode = new NavigatorGroupTreeNode(\n this, project, 'target:' + target.id(), target.type() === SDK.Target.Type.Frame ? Types.Frame : Types.Worker,\n target.name());\n rootOrDeployed.appendChild(targetNode);\n }\n return targetNode;\n }\n\n private rootOrDeployedNode(): NavigatorTreeNode {\n if (this.groupByAuthored) {\n if (!this.deployedNode) {\n this.deployedNode = new NavigatorGroupTreeNode(\n this, null, 'group:Deployed', Types.Deployed, i18nString(UIStrings.deployed),\n i18nString(UIStrings.deployedTooltip));\n this.rootNode.appendChild(this.deployedNode);\n }\n return this.deployedNode;\n }\n return this.rootNode;\n }\n\n private computeProjectDisplayName(target: SDK.Target.Target, projectOrigin: string): string {\n const runtimeModel = target.model(SDK.RuntimeModel.RuntimeModel);\n const executionContexts = runtimeModel ? runtimeModel.executionContexts() : [];\n for (const context of executionContexts) {\n if (context.name && context.origin && projectOrigin.startsWith(context.origin)) {\n return context.name;\n }\n }\n\n if (!projectOrigin) {\n return i18nString(UIStrings.noDomain);\n }\n\n const parsedURL = new Common.ParsedURL.ParsedURL(projectOrigin);\n const prettyURL = parsedURL.isValid ? parsedURL.host + (parsedURL.port ? (':' + parsedURL.port) : '') : '';\n\n return (prettyURL || projectOrigin);\n }\n\n revealUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode, select?: boolean): NavigatorUISourceCodeTreeNode\n |null {\n const nodes = this.uiSourceCodeNodes.get(uiSourceCode);\n if (nodes.size === 0) {\n return null;\n }\n const node = nodes.values().next().value;\n if (!node) {\n return null;\n }\n if (this.scriptsTree.selectedTreeElement) {\n // If the tree outline is being marked as \"being edited\" (i.e. we're renaming a file\n // or chosing the name for a new snippet), we shall not proceed with revealing here,\n // as that will steal focus from the input widget and thus cancel editing. The\n // test/e2e/snippets/breakpoint_test.ts exercises this.\n if (UI.UIUtils.isBeingEdited(this.scriptsTree.selectedTreeElement.treeOutline?.element)) {\n return null;\n }\n this.scriptsTree.selectedTreeElement.deselect();\n }\n // TODO(dgozman): figure out revealing multiple.\n node.reveal(select);\n return node;\n }\n\n sourceSelected(uiSourceCode: Workspace.UISourceCode.UISourceCode, focusSource: boolean): void {\n void Common.Revealer.reveal(uiSourceCode, !focusSource);\n }\n\n #isUISourceCodeOrAnyAncestorSelected(node: NavigatorUISourceCodeTreeNode): boolean {\n const selectedTreeElement = (this.scriptsTree.selectedTreeElement as NavigatorSourceTreeElement | null);\n const selectedNode = selectedTreeElement && selectedTreeElement.node;\n let currentNode: NavigatorTreeNode|null = node;\n while (currentNode) {\n if (currentNode === selectedNode) {\n return true;\n }\n currentNode = currentNode.parent;\n if (!(node instanceof NavigatorGroupTreeNode || node instanceof NavigatorFolderTreeElement)) {\n break;\n }\n }\n return false;\n }\n\n private removeUISourceCodes(uiSourceCodes: Iterable): void {\n const nodesWithSelectionOnPath: NavigatorUISourceCodeTreeNode[] = [];\n // First we remove source codes without any selection on their path to root, and only then\n // the ones with selection. This to avoid layout work associated with moving the selection\n // around (crbug.com/1409025).\n for (const uiSourceCode of uiSourceCodes) {\n const nodes = this.uiSourceCodeNodes.get(uiSourceCode);\n for (const node of nodes) {\n if (this.#isUISourceCodeOrAnyAncestorSelected(node)) {\n nodesWithSelectionOnPath.push(node);\n } else {\n this.removeUISourceCodeNode(node);\n }\n }\n }\n nodesWithSelectionOnPath.forEach(this.removeUISourceCodeNode.bind(this));\n }\n\n private removeUISourceCodeNode(node: NavigatorUISourceCodeTreeNode): void {\n const uiSourceCode = node.uiSourceCode();\n this.uiSourceCodeNodes.delete(uiSourceCode, node);\n const project = uiSourceCode.project();\n const target = Bindings.NetworkProject.NetworkProject.targetForUISourceCode(uiSourceCode);\n let frame = node.frame();\n\n let parentNode: (NavigatorTreeNode|null) = node.parent;\n if (!parentNode) {\n return;\n }\n parentNode.removeChild(node);\n let currentNode: (NavigatorTreeNode|null) = parentNode;\n\n while (currentNode) {\n parentNode = currentNode.parent;\n if (!parentNode) {\n break;\n }\n if ((parentNode === this.rootNode || parentNode === this.deployedNode) &&\n project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n break;\n }\n if (!(currentNode instanceof NavigatorGroupTreeNode || currentNode instanceof NavigatorFolderTreeNode)) {\n break;\n }\n if (!currentNode.isEmpty()) {\n currentNode.updateTitleBubbleUp();\n break;\n }\n if (currentNode.type === Types.Frame) {\n this.discardFrame(\n frame as SDK.ResourceTreeModel.ResourceTreeFrame,\n Boolean(this.groupByAuthored) && uiSourceCode.contentType().isFromSourceMap());\n frame = (frame as SDK.ResourceTreeModel.ResourceTreeFrame).parentFrame();\n } else {\n const folderId = this.folderNodeId(\n project, target, frame, uiSourceCode.origin(), uiSourceCode.contentType().isFromSourceMap(),\n currentNode instanceof NavigatorFolderTreeNode && currentNode.folderPath ||\n Platform.DevToolsPath.EmptyEncodedPathString);\n this.subfolderNodes.delete(folderId);\n parentNode.removeChild(currentNode);\n }\n\n if (currentNode === this.authoredNode) {\n this.authoredNode = undefined;\n } else if (currentNode === this.deployedNode) {\n this.deployedNode = undefined;\n }\n\n currentNode = parentNode;\n }\n }\n\n reset(tearDownOnly?: boolean): void {\n for (const node of this.uiSourceCodeNodes.valuesArray()) {\n node.dispose();\n }\n\n this.scriptsTree.removeChildren();\n this.scriptsTree.setFocusable(false);\n this.uiSourceCodeNodes.clear();\n this.subfolderNodes.clear();\n this.frameNodes.clear();\n this.rootNode.reset();\n this.authoredNode = undefined;\n this.deployedNode = undefined;\n if (!tearDownOnly) {\n // Reset the workspace to repopulate filesystem folders.\n this.resetWorkspace(Workspace.Workspace.WorkspaceImpl.instance());\n }\n }\n\n handleContextMenu(_event: Event): void {\n }\n\n private async renameShortcut(): Promise {\n const selectedTreeElement = (this.scriptsTree.selectedTreeElement as NavigatorSourceTreeElement | null);\n const node = selectedTreeElement && selectedTreeElement.node;\n if (!node || !node.uiSourceCode() || !node.uiSourceCode().canRename()) {\n return false;\n }\n this.rename(node, false);\n return true;\n }\n\n private handleContextMenuCreate(\n project: Workspace.Workspace.Project, path: Platform.DevToolsPath.EncodedPathString,\n uiSourceCode?: Workspace.UISourceCode.UISourceCode): void {\n if (uiSourceCode) {\n const relativePath = Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(uiSourceCode);\n relativePath.pop();\n path = Common.ParsedURL.ParsedURL.join(relativePath, '/');\n }\n void this.create(project, path, uiSourceCode);\n }\n\n private handleContextMenuRename(node: NavigatorUISourceCodeTreeNode): void {\n this.rename(node, false);\n }\n\n private async handleContextMenuExclude(\n project: Workspace.Workspace.Project, path: Platform.DevToolsPath.EncodedPathString): Promise {\n const shouldExclude = await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.areYouSureYouWantToExcludeThis));\n if (shouldExclude) {\n UI.UIUtils.startBatchUpdate();\n project.excludeFolder(\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path));\n UI.UIUtils.endBatchUpdate();\n }\n }\n\n private async handleContextMenuDelete(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise {\n const shouldDelete = await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.areYouSureYouWantToDeleteThis));\n if (shouldDelete) {\n uiSourceCode.project().deleteFile(uiSourceCode);\n }\n }\n\n handleFileContextMenu(event: Event, node: NavigatorUISourceCodeTreeNode): void {\n const uiSourceCode = node.uiSourceCode();\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.appendApplicableItems(uiSourceCode);\n\n const project = uiSourceCode.project();\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n contextMenu.editSection().appendItem(i18nString(UIStrings.rename), this.handleContextMenuRename.bind(this, node));\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.makeACopy),\n this.handleContextMenuCreate.bind(this, project, Platform.DevToolsPath.EmptyEncodedPathString, uiSourceCode));\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.delete), this.handleContextMenuDelete.bind(this, uiSourceCode));\n }\n\n void contextMenu.show();\n }\n\n private async handleDeleteFolder(node: NavigatorTreeNode): Promise {\n const warningMsg =\n `${i18nString(UIStrings.areYouSureYouWantToDeleteFolder)}\\n${i18nString(UIStrings.actionCannotBeUndone)}`;\n const shouldRemove = await UI.UIUtils.ConfirmDialog.show(warningMsg);\n if (shouldRemove) {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.OverrideTabDeleteFolderContextMenu);\n const topNode = this.findTopNonMergedNode(node);\n await this.removeUISourceCodeFromProject(topNode);\n await this.deleteDirectoryRecursively(topNode);\n }\n }\n\n private async removeUISourceCodeFromProject(node: NavigatorTreeNode): Promise {\n node.children().forEach(async child => {\n await this.removeUISourceCodeFromProject(child);\n });\n\n if (node instanceof NavigatorUISourceCodeTreeNode) {\n node.uiSourceCode().project().removeUISourceCode(node.uiSourceCode().url());\n }\n }\n\n private async deleteDirectoryRecursively(node: NavigatorTreeNode): Promise {\n if (!(node instanceof NavigatorFolderTreeNode)) {\n return;\n }\n\n await Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance()\n .project()\n ?.deleteDirectoryRecursively(node.folderPath);\n }\n\n private findTopNonMergedNode(node: NavigatorTreeNode): NavigatorTreeNode {\n // multiple folder nodes can be merged into one if it only contains one file\n // e.g. the folder of \"abc.com/assets/css/button.css\" can be \"abc.com/assets/css\"\n // find the top non-merged node (abc.com) recursively\n\n if (!node.isMerged) {\n return node;\n }\n\n if (!(node.parent instanceof NavigatorFolderTreeNode)) {\n return node;\n }\n\n return this.findTopNonMergedNode(node.parent);\n }\n\n handleFolderContextMenu(event: Event, node: NavigatorFolderTreeNode): void {\n const path = node.folderPath || Platform.DevToolsPath.EmptyEncodedPathString;\n const project = node.project || null;\n\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n NavigatorView.appendSearchItem(contextMenu, path);\n\n if (!project) {\n return;\n }\n\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n const folderPath = Common.ParsedURL.ParsedURL.urlToRawPathString(\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path),\n Host.Platform.isWin());\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.openFolder),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.showItemInFolder(folderPath));\n if (project.canCreateFile()) {\n contextMenu.defaultSection().appendItem(i18nString(UIStrings.newFile), () => {\n this.handleContextMenuCreate(project, path, undefined);\n });\n }\n } else if (node.origin && node.folderPath) {\n const url = Common.ParsedURL.ParsedURL.concatenate(node.origin, '/', node.folderPath);\n const options = {\n isContentScript: node.recursiveProperties.exclusivelyContentScripts || false,\n isKnownThirdParty: node.recursiveProperties.exclusivelyThirdParty || false,\n isCurrentlyIgnoreListed: node.recursiveProperties.exclusivelyIgnored || false,\n };\n for (const {text, callback} of Bindings.IgnoreListManager.IgnoreListManager.instance()\n .getIgnoreListFolderContextMenuItems(url, options)) {\n contextMenu.defaultSection().appendItem(text, callback);\n }\n }\n\n if (project.canExcludeFolder(path)) {\n contextMenu.defaultSection().appendItem(\n i18nString(UIStrings.excludeFolder), this.handleContextMenuExclude.bind(this, project, path));\n }\n\n if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {\n const isFileOverrides =\n (project as Persistence.FileSystemWorkspaceBinding.FileSystem).fileSystem().type() === 'overrides';\n\n if (!isFileOverrides) {\n if (node instanceof NavigatorGroupTreeNode) {\n contextMenu.defaultSection().appendItem(i18nString(UIStrings.removeFolderFromWorkspace), async () => {\n const warningMessage = `${i18nString(UIStrings.areYouSureYouWantToRemoveThis, {\n PH1: (node as NavigatorGroupTreeNode).title,\n })}\\n${i18nString(UIStrings.workspaceStopSyncing)}`;\n const shouldRemove = await UI.UIUtils.ConfirmDialog.show(warningMessage, undefined, {\n okButtonLabel: i18nString(UIStrings.remove),\n });\n if (shouldRemove) {\n project.remove();\n }\n });\n }\n } else {\n if (!(node instanceof NavigatorGroupTreeNode)) {\n contextMenu.defaultSection().appendItem(\n i18nString(UIStrings.delete), this.handleDeleteFolder.bind(this, node));\n }\n }\n }\n\n void contextMenu.show();\n }\n\n rename(node: NavigatorUISourceCodeTreeNode, creatingNewUISourceCode: boolean): void {\n const uiSourceCode = node.uiSourceCode();\n node.rename(callback.bind(this));\n\n function callback(this: NavigatorView, committed: boolean): void {\n if (!creatingNewUISourceCode) {\n return;\n }\n if (!committed) {\n uiSourceCode.remove();\n } else if (node.treeElement && node.treeElement.listItemElement.hasFocus()) {\n this.sourceSelected(uiSourceCode, true);\n }\n }\n }\n\n async create(\n project: Workspace.Workspace.Project, path: Platform.DevToolsPath.EncodedPathString,\n uiSourceCodeToCopy?: Workspace.UISourceCode.UISourceCode): Promise {\n let content = '';\n if (uiSourceCodeToCopy) {\n content = (await uiSourceCodeToCopy.requestContent()).content || '';\n }\n const uiSourceCode = await project.createFile(path, null, content);\n if (!uiSourceCode) {\n return;\n }\n this.sourceSelected(uiSourceCode, false);\n const node = this.revealUISourceCode(uiSourceCode, true);\n if (node) {\n this.rename(node, true);\n }\n }\n\n private groupingChanged(): void {\n this.reset(true);\n this.initGrouping();\n // Reset the workspace to repopulate filesystem folders.\n this.resetWorkspace(Workspace.Workspace.WorkspaceImpl.instance());\n this.workspaceInternal.uiSourceCodes().forEach(this.addUISourceCode.bind(this));\n }\n\n private ignoreListChanged(): void {\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE)) {\n this.groupingChanged();\n } else {\n this.rootNode.updateTitleRecursive();\n }\n }\n\n private initGrouping(): void {\n this.groupByFrame = true;\n this.groupByDomain = this.navigatorGroupByFolderSetting.get();\n this.groupByFolder = this.groupByDomain;\n if (this.navigatorGroupByAuthoredExperiment) {\n this.groupByAuthored = Root.Runtime.experiments.isEnabled(this.navigatorGroupByAuthoredExperiment);\n } else {\n this.groupByAuthored = false;\n }\n }\n\n private resetForTest(): void {\n this.reset();\n this.workspaceInternal.uiSourceCodes().forEach(this.addUISourceCode.bind(this));\n }\n\n private discardFrame(frame: SDK.ResourceTreeModel.ResourceTreeFrame, isAuthored: boolean): void {\n if (isAuthored) {\n return;\n }\n const node = this.frameNodes.get(frame);\n if (!node) {\n return;\n }\n\n if (node.parent) {\n node.parent.removeChild(node);\n }\n this.frameNodes.delete(frame);\n for (const child of frame.childFrames) {\n this.discardFrame(child, isAuthored);\n }\n }\n\n targetAdded(_target: SDK.Target.Target): void {\n }\n\n targetRemoved(target: SDK.Target.Target): void {\n const rootOrDeployed = this.rootOrDeployedNode();\n const targetNode = rootOrDeployed.child('target:' + target.id());\n if (targetNode) {\n rootOrDeployed.removeChild(targetNode);\n }\n }\n\n private targetNameChanged(event: Common.EventTarget.EventTargetEvent): void {\n const target = event.data;\n const targetNode = this.rootOrDeployedNode().child('target:' + target.id());\n if (targetNode) {\n targetNode.setTitle(target.name());\n }\n }\n override wasShown(): void {\n super.wasShown();\n this.scriptsTree.registerCSSFiles([navigatorTreeStyles]);\n this.registerCSSFiles([navigatorViewStyles]);\n }\n}\n\nconst boostOrderForNode = new WeakSet();\n\nexport class NavigatorFolderTreeElement extends UI.TreeOutline.TreeElement {\n private readonly nodeType: string;\n private readonly navigatorView: NavigatorView;\n private hoverCallback: ((arg0: boolean) => void)|undefined;\n node!: NavigatorTreeNode;\n private hovered?: boolean;\n private isIgnoreListed?: boolean;\n private isFromSourceMap: boolean;\n\n constructor(navigatorView: NavigatorView, type: string, title: string, hoverCallback?: ((arg0: boolean) => void)) {\n super('', true, NavigatorFolderTreeElement.#contextForType(type));\n this.listItemElement.classList.add('navigator-' + type + '-tree-item', 'navigator-folder-tree-item');\n UI.ARIAUtils.setLabel(this.listItemElement, `${title}, ${type}`);\n this.nodeType = type;\n this.title = title;\n this.tooltip = title;\n this.navigatorView = navigatorView;\n this.hoverCallback = hoverCallback;\n this.isFromSourceMap = false;\n\n let iconType = 'folder';\n\n if (type === Types.Domain) {\n iconType = 'cloud';\n } else if (type === Types.Frame) {\n iconType = 'frame';\n } else if (type === Types.Worker) {\n iconType = 'gears';\n } else if (type === Types.Authored) {\n iconType = 'code';\n } else if (type === Types.Deployed) {\n iconType = 'deployed';\n }\n\n const icon = new IconButton.Icon.Icon();\n const iconPath = new URL(`../../Images/${iconType}.svg`, import.meta.url).toString();\n icon.data = {iconPath: iconPath, color: 'var(--override-folder-tree-item-color)', width: '20px', height: '20px'};\n this.setLeadingIcons([icon]);\n }\n\n override async onpopulate(): Promise {\n this.node.populate();\n }\n\n override onattach(): void {\n this.collapse();\n this.node.onattach();\n this.listItemElement.addEventListener('contextmenu', this.handleContextMenuEvent.bind(this), false);\n this.listItemElement.addEventListener('mousemove', this.mouseMove.bind(this), false);\n this.listItemElement.addEventListener('mouseleave', this.mouseLeave.bind(this), false);\n }\n\n setIgnoreListed(isIgnoreListed: boolean): void {\n if (this.isIgnoreListed !== isIgnoreListed) {\n this.isIgnoreListed = isIgnoreListed;\n this.listItemElement.classList.toggle('is-ignore-listed', isIgnoreListed);\n this.updateTooltip();\n }\n }\n\n setFromSourceMap(isFromSourceMap: boolean): void {\n this.isFromSourceMap = isFromSourceMap;\n this.listItemElement.classList.toggle('is-from-source-map', isFromSourceMap);\n }\n\n setNode(node: NavigatorTreeNode): void {\n this.node = node;\n this.updateTooltip();\n UI.ARIAUtils.setLabel(this.listItemElement, `${this.title}, ${this.nodeType}`);\n }\n\n private updateTooltip(): void {\n if (this.node.tooltip) {\n this.tooltip = this.node.tooltip;\n } else {\n const paths = [];\n let currentNode: NavigatorTreeNode|null = this.node;\n while (currentNode && !currentNode.isRoot() && currentNode.type === this.node.type) {\n paths.push(currentNode.title);\n currentNode = currentNode.parent;\n }\n paths.reverse();\n let tooltip = paths.join('/');\n if (this.isIgnoreListed) {\n tooltip = i18nString(UIStrings.sIgnoreListed, {PH1: tooltip});\n }\n this.tooltip = tooltip;\n }\n }\n\n private handleContextMenuEvent(event: Event): void {\n if (!this.node) {\n return;\n }\n this.select();\n this.navigatorView.handleFolderContextMenu(event, this.node as NavigatorFolderTreeNode);\n }\n\n private mouseMove(_event: Event): void {\n if (this.hovered || !this.hoverCallback) {\n return;\n }\n this.hovered = true;\n this.hoverCallback(true);\n }\n\n private mouseLeave(_event: Event): void {\n if (!this.hoverCallback) {\n return;\n }\n this.hovered = false;\n this.hoverCallback(false);\n }\n\n static #contextForType(type: string): string {\n switch (type) {\n case Types.Domain:\n return 'domain';\n case Types.Frame:\n return 'frame';\n case Types.Worker:\n return 'worker';\n case Types.Authored:\n return 'authored';\n case Types.Deployed:\n return 'deployed';\n }\n return 'folder';\n }\n}\n\nexport class NavigatorSourceTreeElement extends UI.TreeOutline.TreeElement {\n readonly nodeType: string;\n readonly node: NavigatorUISourceCodeTreeNode;\n private readonly navigatorView: NavigatorView;\n uiSourceCodeInternal: Workspace.UISourceCode.UISourceCode;\n\n constructor(\n navigatorView: NavigatorView, uiSourceCode: Workspace.UISourceCode.UISourceCode, title: string,\n node: NavigatorUISourceCodeTreeNode) {\n super('', false, uiSourceCode.contentType().name());\n this.nodeType = Types.File;\n this.node = node;\n this.title = title;\n this.listItemElement.classList.add(\n 'navigator-' + uiSourceCode.contentType().name() + '-tree-item', 'navigator-file-tree-item');\n this.tooltip = uiSourceCode.url();\n UI.ARIAUtils.setLabel(this.listItemElement, `${uiSourceCode.name()}, ${this.nodeType}`);\n Common.EventTarget.fireEvent('source-tree-file-added', uiSourceCode.fullDisplayName());\n this.navigatorView = navigatorView;\n this.uiSourceCodeInternal = uiSourceCode;\n this.updateIcon();\n }\n\n updateIcon(): void {\n const binding = Persistence.Persistence.PersistenceImpl.instance().binding(this.uiSourceCodeInternal);\n const networkPersistenceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();\n let iconType = 'document';\n let iconStyles: string[] = [];\n if (binding) {\n if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(binding.fileSystem)) {\n iconType = 'snippet';\n }\n const badgeIsPurple = networkPersistenceManager.project() === binding.fileSystem.project();\n iconStyles = badgeIsPurple ? ['dot', 'purple'] : ['dot', 'green'];\n } else if (networkPersistenceManager.isActiveHeaderOverrides(this.uiSourceCode)) {\n iconStyles = ['dot', 'purple'];\n } else {\n if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(this.uiSourceCodeInternal)) {\n iconType = 'snippet';\n }\n }\n\n const icon = new IconButton.Icon.Icon();\n const iconPath = new URL(`../../Images/${iconType}.svg`, import.meta.url).toString();\n icon.data = {iconPath: iconPath, color: 'var(--override-file-tree-item-color)', width: '20px', height: '20px'};\n for (const style of iconStyles) {\n icon.classList.add(style);\n }\n if (binding) {\n UI.Tooltip.Tooltip.install(\n icon, Persistence.PersistenceUtils.PersistenceUtils.tooltipForUISourceCode(this.uiSourceCodeInternal));\n }\n this.setLeadingIcons([icon]);\n }\n\n updateAccessibleName(): void {\n UI.ARIAUtils.setLabel(this.listItemElement, `${this.uiSourceCodeInternal.name()}, ${this.nodeType}`);\n }\n\n get uiSourceCode(): Workspace.UISourceCode.UISourceCode {\n return this.uiSourceCodeInternal;\n }\n\n override onattach(): void {\n this.listItemElement.draggable = true;\n this.listItemElement.addEventListener('click', this.onclick.bind(this), false);\n this.listItemElement.addEventListener('contextmenu', this.handleContextMenuEvent.bind(this), false);\n this.listItemElement.addEventListener('dragstart', this.ondragstart.bind(this), false);\n }\n\n private shouldRenameOnMouseDown(): boolean {\n if (!this.uiSourceCodeInternal.canRename()) {\n return false;\n }\n if (!this.treeOutline) {\n return false;\n }\n const isSelected = this === this.treeOutline.selectedTreeElement;\n return isSelected && this.treeOutline.element.hasFocus() && !UI.UIUtils.isBeingEdited(this.treeOutline.element);\n }\n\n override selectOnMouseDown(event: MouseEvent): void {\n if (event.which !== 1 || !this.shouldRenameOnMouseDown()) {\n super.selectOnMouseDown(event);\n return;\n }\n window.setTimeout(rename.bind(this), 300);\n\n function rename(this: NavigatorSourceTreeElement): void {\n if (this.shouldRenameOnMouseDown()) {\n this.navigatorView.rename(this.node, false);\n }\n }\n }\n\n private ondragstart(event: DragEvent): void {\n if (!event.dataTransfer) {\n return;\n }\n event.dataTransfer.setData('text/plain', this.uiSourceCodeInternal.url());\n event.dataTransfer.effectAllowed = 'copy';\n }\n\n override onspace(): boolean {\n this.navigatorView.sourceSelected(this.uiSourceCode, true);\n return true;\n }\n\n private onclick(_event: Event): void {\n this.navigatorView.sourceSelected(this.uiSourceCode, false);\n }\n\n override ondblclick(event: Event): boolean {\n const middleClick = (event as MouseEvent).button === 1;\n this.navigatorView.sourceSelected(this.uiSourceCode, !middleClick);\n return false;\n }\n\n override onenter(): boolean {\n this.navigatorView.sourceSelected(this.uiSourceCode, true);\n return true;\n }\n\n override ondelete(): boolean {\n return true;\n }\n\n private handleContextMenuEvent(event: Event): void {\n this.select();\n this.navigatorView.handleFileContextMenu(event, this.node);\n }\n}\n\nexport type NavigatorRecursiveTreeNodeProperties = {\n exclusivelySourceMapped: boolean|null,\n exclusivelyIgnored: boolean|null,\n exclusivelyThirdParty: boolean|null,\n exclusivelyContentScripts: boolean|null,\n};\n\nexport class NavigatorTreeNode {\n id: string;\n protected navigatorView: NavigatorView;\n type: string;\n childrenInternal: Map;\n private populated: boolean;\n isMerged: boolean;\n parent!: NavigatorTreeNode|null;\n title!: string;\n tooltip?: string;\n recursiveProperties: NavigatorRecursiveTreeNodeProperties;\n\n constructor(navigatorView: NavigatorView, id: string, type: string, tooltip?: string) {\n this.id = id;\n this.navigatorView = navigatorView;\n this.type = type;\n this.childrenInternal = new Map();\n this.tooltip = tooltip;\n\n this.populated = false;\n this.isMerged = false;\n this.recursiveProperties = {\n exclusivelySourceMapped: null,\n exclusivelyIgnored: null,\n exclusivelyContentScripts: null,\n exclusivelyThirdParty: null,\n };\n }\n\n treeNode(): UI.TreeOutline.TreeElement {\n throw 'Not implemented';\n }\n\n dispose(): void {\n }\n\n updateTitle(): void {\n }\n\n updateTitleRecursive(): void {\n for (const child of this.children()) {\n child.updateTitleRecursive();\n }\n this.updateTitle();\n }\n\n updateTitleBubbleUp(): void {\n this.updateTitle();\n if (this.parent) {\n this.parent.updateTitleBubbleUp();\n }\n }\n\n isRoot(): boolean {\n return false;\n }\n\n hasChildren(): boolean {\n return true;\n }\n\n onattach(): void {\n }\n\n setTitle(_title: string): void {\n throw 'Not implemented';\n }\n\n populate(): void {\n if (this.isPopulated()) {\n return;\n }\n if (this.parent) {\n this.parent.populate();\n }\n this.populated = true;\n this.wasPopulated();\n }\n\n wasPopulated(): void {\n const children = this.children();\n for (let i = 0; i < children.length; ++i) {\n this.navigatorView.appendChild(this.treeNode(), (children[i].treeNode() as UI.TreeOutline.TreeElement));\n }\n }\n\n didAddChild(node: NavigatorTreeNode): void {\n if (this.isPopulated()) {\n this.navigatorView.appendChild(this.treeNode(), (node.treeNode() as UI.TreeOutline.TreeElement));\n }\n }\n\n willRemoveChild(node: NavigatorTreeNode): void {\n if (this.isPopulated()) {\n this.navigatorView.removeChild(this.treeNode(), (node.treeNode() as UI.TreeOutline.TreeElement));\n }\n }\n\n isPopulated(): boolean {\n return this.populated;\n }\n\n isEmpty(): boolean {\n return !this.childrenInternal.size;\n }\n\n children(): NavigatorTreeNode[] {\n return [...this.childrenInternal.values()];\n }\n\n child(id: string): NavigatorTreeNode|null {\n return this.childrenInternal.get(id) || null;\n }\n\n appendChild(node: NavigatorTreeNode): void {\n this.childrenInternal.set(node.id, node);\n node.parent = this;\n this.didAddChild(node);\n }\n\n removeChild(node: NavigatorTreeNode): void {\n this.willRemoveChild(node);\n this.childrenInternal.delete(node.id);\n node.parent = null;\n node.dispose();\n }\n\n reset(): void {\n this.childrenInternal.clear();\n }\n}\n\nexport class NavigatorRootTreeNode extends NavigatorTreeNode {\n constructor(navigatorView: NavigatorView) {\n super(navigatorView, '', Types.Root);\n }\n\n override isRoot(): boolean {\n return true;\n }\n\n override treeNode(): UI.TreeOutline.TreeElement {\n return this.navigatorView.scriptsTree.rootElement();\n }\n}\n\nexport class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {\n uiSourceCodeInternal: Workspace.UISourceCode.UISourceCode;\n treeElement: NavigatorSourceTreeElement|null;\n private eventListeners: Common.EventTarget.EventDescriptor[];\n private readonly frameInternal: SDK.ResourceTreeModel.ResourceTreeFrame|null;\n constructor(\n navigatorView: NavigatorView, uiSourceCode: Workspace.UISourceCode.UISourceCode,\n frame: SDK.ResourceTreeModel.ResourceTreeFrame|null) {\n super(navigatorView, 'UISourceCode:' + uiSourceCode.canononicalScriptId(), Types.File);\n this.uiSourceCodeInternal = uiSourceCode;\n this.treeElement = null;\n this.eventListeners = [];\n this.frameInternal = frame;\n this.recursiveProperties.exclusivelySourceMapped = uiSourceCode.contentType().isFromSourceMap();\n if (uiSourceCode.contentType().isScript()) {\n // These properties affect ignore-listing menus and only matter when the UISourceCode is a script\n this.recursiveProperties.exclusivelyThirdParty = uiSourceCode.isKnownThirdParty();\n this.recursiveProperties.exclusivelyContentScripts =\n uiSourceCode.project().type() === Workspace.Workspace.projectTypes.ContentScripts;\n }\n }\n\n frame(): SDK.ResourceTreeModel.ResourceTreeFrame|null {\n return this.frameInternal;\n }\n\n uiSourceCode(): Workspace.UISourceCode.UISourceCode {\n return this.uiSourceCodeInternal;\n }\n\n override treeNode(): UI.TreeOutline.TreeElement {\n if (this.treeElement) {\n return this.treeElement;\n }\n\n this.treeElement = new NavigatorSourceTreeElement(this.navigatorView, this.uiSourceCodeInternal, '', this);\n this.updateTitle();\n\n const updateTitleBound = this.updateTitle.bind(this, undefined);\n this.eventListeners = [\n this.uiSourceCodeInternal.addEventListener(Workspace.UISourceCode.Events.TitleChanged, updateTitleBound),\n this.uiSourceCodeInternal.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, updateTitleBound),\n this.uiSourceCodeInternal.addEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted, updateTitleBound),\n ];\n return this.treeElement;\n }\n\n override updateTitle(ignoreIsDirty?: boolean): void {\n const isIgnoreListed =\n Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n this.uiSourceCodeInternal);\n if (this.uiSourceCodeInternal.contentType().isScript() || isIgnoreListed) {\n this.recursiveProperties.exclusivelyIgnored = isIgnoreListed;\n }\n\n if (!this.treeElement) {\n return;\n }\n\n let titleText = this.uiSourceCodeInternal.displayName();\n if (!ignoreIsDirty && this.uiSourceCodeInternal.isDirty()) {\n titleText = '*' + titleText;\n }\n\n this.treeElement.title = titleText;\n this.treeElement.updateIcon();\n\n this.treeElement.listItemElement.classList.toggle('is-ignore-listed', isIgnoreListed);\n\n let tooltip: string = this.uiSourceCodeInternal.url();\n if (this.uiSourceCodeInternal.contentType().isFromSourceMap()) {\n tooltip = i18nString(UIStrings.sFromSourceMap, {PH1: this.uiSourceCodeInternal.displayName()});\n }\n if (isIgnoreListed) {\n tooltip = i18nString(UIStrings.sIgnoreListed, {PH1: tooltip});\n }\n\n this.treeElement.tooltip = tooltip;\n this.treeElement.updateAccessibleName();\n\n this.parent?.childrenInternal.delete(this.id);\n this.id = 'UISourceCode:' + this.uiSourceCodeInternal.canononicalScriptId();\n this.parent?.childrenInternal.set(this.id, this);\n }\n\n override hasChildren(): boolean {\n return false;\n }\n\n override dispose(): void {\n Common.EventTarget.removeEventListeners(this.eventListeners);\n }\n\n reveal(select?: boolean): void {\n if (this.parent) {\n this.parent.populate();\n this.parent.treeNode().expand();\n }\n if (this.treeElement) {\n this.treeElement.reveal(true);\n if (select) {\n this.treeElement.select(true);\n }\n }\n }\n\n rename(callback?: ((arg0: boolean) => void)): void {\n if (!this.treeElement) {\n return;\n }\n\n this.treeElement.listItemElement.focus();\n\n if (!this.treeElement.treeOutline) {\n return;\n }\n\n // Tree outline should be marked as edited as well as the tree element to prevent search from starting.\n const treeOutlineElement = this.treeElement.treeOutline.element;\n UI.UIUtils.markBeingEdited(treeOutlineElement, true);\n\n function commitHandler(\n this: NavigatorUISourceCodeTreeNode, element: Element, newTitle: string, oldTitle: string): void {\n if (newTitle !== oldTitle) {\n if (this.treeElement) {\n this.treeElement.title = newTitle;\n }\n // necessary cast to RawPathString as alternative would be altering type of Config\n void this.uiSourceCodeInternal.rename(newTitle as Platform.DevToolsPath.RawPathString)\n .then(renameCallback.bind(this));\n return;\n }\n afterEditing.call(this, true);\n }\n\n function renameCallback(this: NavigatorUISourceCodeTreeNode, success: boolean): void {\n if (!success) {\n UI.UIUtils.markBeingEdited(treeOutlineElement, false);\n this.updateTitle();\n this.rename(callback);\n return;\n }\n if (this.treeElement) {\n const {parent} = this.treeElement;\n if (parent) {\n parent.removeChild(this.treeElement);\n parent.appendChild(this.treeElement);\n this.treeElement.select();\n }\n }\n afterEditing.call(this, true);\n }\n\n function afterEditing(this: NavigatorUISourceCodeTreeNode, committed: boolean): void {\n UI.UIUtils.markBeingEdited(treeOutlineElement, false);\n this.updateTitle();\n if (callback) {\n callback(committed);\n }\n }\n\n this.updateTitle(true);\n this.treeElement.startEditingTitle(\n new UI.InplaceEditor.Config(commitHandler.bind(this), afterEditing.bind(this, false)));\n }\n}\n\nexport class NavigatorFolderTreeNode extends NavigatorTreeNode {\n project: Workspace.Workspace.Project|null;\n readonly folderPath: Platform.DevToolsPath.EncodedPathString;\n readonly origin: Platform.DevToolsPath.UrlString;\n override title: string;\n treeElement!: NavigatorFolderTreeElement|null;\n constructor(\n navigatorView: NavigatorView, project: Workspace.Workspace.Project|null, id: string, type: string,\n folderPath: Platform.DevToolsPath.EncodedPathString, title: string, origin: Platform.DevToolsPath.UrlString) {\n super(navigatorView, id, type);\n this.project = project;\n this.folderPath = folderPath;\n this.title = title;\n this.origin = origin;\n }\n\n override treeNode(): UI.TreeOutline.TreeElement {\n if (this.treeElement) {\n return this.treeElement;\n }\n this.treeElement = this.createTreeElement(this.title, this);\n this.updateTitle();\n return this.treeElement;\n }\n\n override updateTitle(): void {\n let propName: keyof NavigatorRecursiveTreeNodeProperties;\n for (propName in this.recursiveProperties) {\n let propValue: boolean|null = null;\n for (const child of this.children()) {\n if (child.recursiveProperties[propName] === false) {\n propValue = false;\n break;\n } else if (child.recursiveProperties[propName]) {\n propValue = true;\n }\n }\n this.recursiveProperties[propName] = propValue;\n }\n\n if (!this.treeElement) {\n return;\n }\n\n this.treeElement.setFromSourceMap(this.recursiveProperties.exclusivelySourceMapped || false);\n this.treeElement.setIgnoreListed(this.recursiveProperties.exclusivelyIgnored || false);\n\n if (!this.project || this.project.type() !== Workspace.Workspace.projectTypes.FileSystem) {\n return;\n }\n\n const absoluteFileSystemPath = Common.ParsedURL.ParsedURL.concatenate(\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemPath(\n this.project.id() as Platform.DevToolsPath.UrlString),\n '/', this.folderPath);\n const hasMappedFiles =\n Persistence.Persistence.PersistenceImpl.instance().filePathHasBindings(absoluteFileSystemPath);\n this.treeElement.listItemElement.classList.toggle('has-mapped-files', hasMappedFiles);\n }\n\n private createTreeElement(title: string, node: NavigatorTreeNode): NavigatorFolderTreeElement {\n const treeElement = new NavigatorFolderTreeElement(this.navigatorView, this.type, title);\n treeElement.setNode(node);\n return treeElement;\n }\n\n override wasPopulated(): void {\n // @ts-ignore These types are invalid, but removing this check causes wrong behavior\n if (!this.treeElement || this.treeElement.node !== this) {\n return;\n }\n this.addChildrenRecursive();\n }\n\n private addChildrenRecursive(): void {\n const children = this.children();\n for (let i = 0; i < children.length; ++i) {\n const child = children[i];\n this.didAddChild(child);\n if (child instanceof NavigatorFolderTreeNode) {\n child.addChildrenRecursive();\n }\n }\n }\n\n private shouldMerge(node: NavigatorTreeNode): boolean {\n return this.type !== Types.Domain && node instanceof NavigatorFolderTreeNode;\n }\n\n override didAddChild(node: NavigatorTreeNode): void {\n if (!this.treeElement) {\n return;\n }\n\n let children = this.children();\n\n if (children.length === 1 && this.shouldMerge(node)) {\n node.isMerged = true;\n this.treeElement.title = this.treeElement.title + '/' + node.title;\n (node as NavigatorFolderTreeNode).treeElement = this.treeElement;\n node.updateTitle();\n this.treeElement.setNode(node);\n return;\n }\n\n let oldNode;\n if (children.length === 2) {\n oldNode = children[0] !== node ? children[0] : children[1];\n }\n if (oldNode && oldNode.isMerged) {\n oldNode.isMerged = false;\n const mergedToNodes = [];\n mergedToNodes.push(this);\n let treeNode: (NavigatorTreeNode|null)|NavigatorTreeNode|this = this;\n while (treeNode && treeNode.isMerged) {\n treeNode = treeNode.parent;\n if (treeNode) {\n mergedToNodes.push(treeNode);\n }\n }\n mergedToNodes.reverse();\n const titleText = mergedToNodes.map(node => node.title).join('/');\n\n const nodes = [];\n treeNode = oldNode;\n do {\n nodes.push(treeNode);\n children = treeNode.children();\n treeNode = children.length === 1 ? children[0] : null;\n } while (treeNode && treeNode.isMerged);\n\n if (!this.isPopulated()) {\n this.treeElement.title = titleText;\n this.treeElement.setNode(this);\n for (let i = 0; i < nodes.length; ++i) {\n (nodes[i] as NavigatorFolderTreeNode).treeElement = null;\n nodes[i].isMerged = false;\n }\n this.updateTitle();\n return;\n }\n const oldTreeElement = this.treeElement;\n const treeElement = this.createTreeElement(titleText, this);\n for (let i = 0; i < mergedToNodes.length; ++i) {\n (mergedToNodes[i] as NavigatorFolderTreeNode).treeElement = treeElement;\n mergedToNodes[i].updateTitle();\n }\n if (oldTreeElement.parent) {\n this.navigatorView.appendChild(oldTreeElement.parent, treeElement);\n }\n\n oldTreeElement.setNode(nodes[nodes.length - 1]);\n oldTreeElement.title = nodes.map(node => node.title).join('/');\n if (oldTreeElement.parent) {\n this.navigatorView.removeChild(oldTreeElement.parent, oldTreeElement);\n }\n this.navigatorView.appendChild(this.treeElement, oldTreeElement);\n if (oldTreeElement.expanded) {\n treeElement.expand();\n }\n this.updateTitle();\n }\n if (this.isPopulated()) {\n this.navigatorView.appendChild(this.treeElement, node.treeNode());\n }\n }\n\n override willRemoveChild(node: NavigatorTreeNode): void {\n const actualNode = (node as NavigatorFolderTreeNode);\n if (actualNode.isMerged || !this.isPopulated() || !this.treeElement || !actualNode.treeElement) {\n return;\n }\n this.navigatorView.removeChild(this.treeElement, actualNode.treeElement);\n }\n}\n\nexport class NavigatorGroupTreeNode extends NavigatorTreeNode {\n private readonly project: Workspace.Workspace.Project|null;\n override title: string;\n private hoverCallback?: ((arg0: boolean) => void);\n private treeElement?: NavigatorFolderTreeElement;\n constructor(\n navigatorView: NavigatorView, project: Workspace.Workspace.Project|null, id: string, type: string, title: string,\n tooltip?: string) {\n super(navigatorView, id, type, tooltip);\n this.project = project;\n this.title = title;\n this.populate();\n }\n\n setHoverCallback(hoverCallback: (arg0: boolean) => void): void {\n this.hoverCallback = hoverCallback;\n }\n\n override treeNode(): UI.TreeOutline.TreeElement {\n if (this.treeElement) {\n return this.treeElement;\n }\n this.treeElement = new NavigatorFolderTreeElement(this.navigatorView, this.type, this.title, this.hoverCallback);\n this.treeElement.setNode(this);\n return this.treeElement;\n }\n\n override onattach(): void {\n this.updateTitle();\n }\n\n override updateTitle(): void {\n if (!this.treeElement || !this.project || this.project.type() !== Workspace.Workspace.projectTypes.FileSystem) {\n return;\n }\n const fileSystemPath = Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemPath(\n this.project.id() as Platform.DevToolsPath.UrlString);\n const wasActive = this.treeElement.listItemElement.classList.contains('has-mapped-files');\n const isActive = Persistence.Persistence.PersistenceImpl.instance().filePathHasBindings(fileSystemPath);\n if (wasActive === isActive) {\n return;\n }\n this.treeElement.listItemElement.classList.toggle('has-mapped-files', isActive);\n if (this.treeElement.childrenListElement.hasFocus()) {\n return;\n }\n if (isActive) {\n this.treeElement.expand();\n } else {\n this.treeElement.collapse();\n }\n }\n\n override setTitle(title: string): void {\n this.title = title;\n if (this.treeElement) {\n this.treeElement.title = this.title;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/ScopeChainSidebarPane.js b/public/panels/sources/ScopeChainSidebarPane.js index 6971ed45c..bd45b750d 100644 --- a/public/panels/sources/ScopeChainSidebarPane.js +++ b/public/panels/sources/ScopeChainSidebarPane.js @@ -53,6 +53,7 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox { super(true); this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('debugger-scope')}`); this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline(); + this.treeOutline.hideOverflow(); this.treeOutline.setShowSelectionOnKeyboardFocus(/* show */ true); this.expandController = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController(this.treeOutline); diff --git a/public/panels/sources/ScopeChainSidebarPane.js.map b/public/panels/sources/ScopeChainSidebarPane.js.map index 65eca657d..a45556677 100644 --- a/public/panels/sources/ScopeChainSidebarPane.js.map +++ b/public/panels/sources/ScopeChainSidebarPane.js.map @@ -1 +1 @@ -{"version":3,"file":"ScopeChainSidebarPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/ScopeChainSidebarPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AA6B7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,eAAe,MAAM,qDAAqD,CAAC;AACvF,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AAEzE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,YAAY;IACrB;;OAEG;IACH,SAA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;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC;QACjE,IAAI,CAAC,gBAAgB,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC;IACvD,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport scopeChainSidebarPaneStyles from './scopeChainSidebarPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Loading indicator in Scope Sidebar Pane of the Sources panel\n */\n loading: 'Loading...',\n /**\n *@description Not paused message element text content in Call Stack Sidebar Pane of the Sources panel\n */\n notPaused: 'Not paused',\n /**\n *@description Empty placeholder in Scope Chain Sidebar Pane of the Sources panel\n */\n noVariables: 'No variables',\n /**\n *@description Text in the Sources panel Scope pane describing a closure scope.\n *@example {func} PH1\n */\n closureS: 'Closure ({PH1})',\n /**\n *@description Text that refers to closure as a programming term\n */\n closure: 'Closure',\n /**\n *@description Text in Scope Chain Sidebar Pane of the Sources panel\n */\n exception: 'Exception',\n /**\n *@description Text in Scope Chain Sidebar Pane of the Sources panel\n */\n returnValue: 'Return value',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/ScopeChainSidebarPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet scopeChainSidebarPaneInstance: ScopeChainSidebarPane;\n\nexport class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextFlavorListener.ContextFlavorListener {\n private readonly treeOutline: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline;\n private readonly expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController;\n private readonly linkifier: Components.Linkifier.Linkifier;\n private infoElement: HTMLDivElement;\n #scopesScript: SDK.Script.Script|null = null;\n\n private constructor() {\n super(true);\n\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('debugger-scope')}`);\n this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline();\n\n this.treeOutline.setShowSelectionOnKeyboardFocus(/* show */ true);\n this.expandController =\n new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController(this.treeOutline);\n this.linkifier = new Components.Linkifier.Linkifier();\n this.infoElement = document.createElement('div');\n this.infoElement.className = 'gray-info-message';\n this.infoElement.tabIndex = -1;\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebugInfoAttached, this.debugInfoAttached, this);\n void this.update();\n }\n\n static instance(): ScopeChainSidebarPane {\n if (!scopeChainSidebarPaneInstance) {\n scopeChainSidebarPaneInstance = new ScopeChainSidebarPane();\n }\n return scopeChainSidebarPaneInstance;\n }\n\n flavorChanged(_object: Object|null): void {\n void this.update();\n }\n\n override focus(): void {\n if (this.hasFocus()) {\n return;\n }\n\n if (UI.Context.Context.instance().flavor(SDK.DebuggerModel.DebuggerPausedDetails)) {\n this.treeOutline.forceSelect();\n }\n }\n\n private sourceMapAttached(\n event: Common.EventTarget.EventTargetEvent<{client: SDK.Script.Script, sourceMap: SDK.SourceMap.SourceMap}>):\n void {\n if (event.data.client === this.#scopesScript) {\n void this.update();\n }\n }\n\n private setScopeSourceMapSubscription(callFrame: SDK.DebuggerModel.CallFrame|null): void {\n const oldScript = this.#scopesScript;\n this.#scopesScript = callFrame?.script ?? null;\n\n // Shortcut for the case when we are listening to the same model.\n if (oldScript?.debuggerModel === this.#scopesScript?.debuggerModel) {\n return;\n }\n\n if (oldScript) {\n oldScript.debuggerModel.sourceMapManager().removeEventListener(\n SDK.SourceMapManager.Events.SourceMapAttached, this.sourceMapAttached, this);\n }\n\n if (this.#scopesScript) {\n this.#scopesScript.debuggerModel.sourceMapManager().addEventListener(\n SDK.SourceMapManager.Events.SourceMapAttached, this.sourceMapAttached, this);\n }\n }\n\n private debugInfoAttached(event: Common.EventTarget.EventTargetEvent): void {\n if (event.data === this.#scopesScript) {\n void this.update();\n }\n }\n\n private async update(): Promise {\n // The `resolveThisObject(callFrame)` and `resolveScopeChain(callFrame)` calls\n // below may take a while to complete, so indicate to the user that something\n // is happening (see https://crbug.com/1162416).\n this.infoElement.textContent = i18nString(UIStrings.loading);\n this.contentElement.removeChildren();\n this.contentElement.appendChild(this.infoElement);\n\n this.linkifier.reset();\n\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n this.setScopeSourceMapSubscription(callFrame);\n const [thisObject, scopeChain] = await Promise.all([\n SourceMapScopes.NamesResolver.resolveThisObject(callFrame),\n SourceMapScopes.NamesResolver.resolveScopeChain(callFrame),\n ]);\n // By now the developer might have moved on, and we don't want to show stale\n // scope information, so check again that we're still on the same CallFrame.\n if (callFrame === UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame)) {\n const details = UI.Context.Context.instance().flavor(SDK.DebuggerModel.DebuggerPausedDetails);\n this.treeOutline.removeChildren();\n\n if (!details || !callFrame || !scopeChain) {\n this.infoElement.textContent = i18nString(UIStrings.notPaused);\n return;\n }\n\n this.contentElement.removeChildren();\n this.contentElement.appendChild(this.treeOutline.element);\n let foundLocalScope = false;\n for (let i = 0; i < scopeChain.length; ++i) {\n const scope = scopeChain[i];\n const extraProperties = this.extraPropertiesForScope(scope, details, callFrame, thisObject, i === 0);\n\n if (scope.type() === Protocol.Debugger.ScopeType.Local) {\n foundLocalScope = true;\n }\n\n const section = this.createScopeSectionTreeElement(scope, extraProperties);\n if (scope.type() === Protocol.Debugger.ScopeType.Global) {\n section.collapse();\n } else if (!foundLocalScope || scope.type() === Protocol.Debugger.ScopeType.Local) {\n section.expand();\n }\n\n this.treeOutline.appendChild(section);\n if (i === 0) {\n section.select(/* omitFocus */ true);\n }\n }\n this.sidebarPaneUpdatedForTest();\n }\n }\n\n private createScopeSectionTreeElement(\n scope: SDK.DebuggerModel.ScopeChainEntry,\n extraProperties: SDK.RemoteObject.RemoteObjectProperty[]): ObjectUI.ObjectPropertiesSection.RootElement {\n let emptyPlaceholder: Common.UIString.LocalizedString|null = null;\n if (scope.type() === Protocol.Debugger.ScopeType.Local || Protocol.Debugger.ScopeType.Closure) {\n emptyPlaceholder = i18nString(UIStrings.noVariables);\n }\n\n let title = scope.typeName();\n if (scope.type() === Protocol.Debugger.ScopeType.Closure) {\n const scopeName = scope.name();\n if (scopeName) {\n title = i18nString(UIStrings.closureS, {PH1: UI.UIUtils.beautifyFunctionName(scopeName)});\n } else {\n title = i18nString(UIStrings.closure);\n }\n }\n let subtitle: string|null = scope.description();\n if (!title || title === subtitle) {\n subtitle = null;\n }\n const icon = scope.icon();\n\n const titleElement = document.createElement('div');\n titleElement.classList.add('scope-chain-sidebar-pane-section-header');\n titleElement.classList.add('tree-element-title');\n if (icon) {\n const iconElement = document.createElement('img');\n iconElement.classList.add('scope-chain-sidebar-pane-section-icon');\n iconElement.src = icon;\n titleElement.appendChild(iconElement);\n }\n titleElement.createChild('div', 'scope-chain-sidebar-pane-section-subtitle').textContent = subtitle;\n titleElement.createChild('div', 'scope-chain-sidebar-pane-section-title').textContent = title;\n\n const section = new ObjectUI.ObjectPropertiesSection.RootElement(\n SourceMapScopes.NamesResolver.resolveScopeInObject(scope), this.linkifier, emptyPlaceholder,\n ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.All, extraProperties);\n section.title = titleElement;\n section.listItemElement.classList.add('scope-chain-sidebar-pane-section');\n section.listItemElement.setAttribute('aria-label', title);\n this.expandController.watchSection(title + (subtitle ? ':' + subtitle : ''), section);\n\n return section;\n }\n\n private extraPropertiesForScope(\n scope: SDK.DebuggerModel.ScopeChainEntry, details: SDK.DebuggerModel.DebuggerPausedDetails,\n callFrame: SDK.DebuggerModel.CallFrame, thisObject: SDK.RemoteObject.RemoteObject|null,\n isFirstScope: boolean): SDK.RemoteObject.RemoteObjectProperty[] {\n if (scope.type() !== Protocol.Debugger.ScopeType.Local || callFrame.script.isWasm()) {\n return [];\n }\n\n const extraProperties = [];\n if (thisObject) {\n extraProperties.push(new SDK.RemoteObject.RemoteObjectProperty(\n 'this', thisObject, undefined, undefined, undefined, undefined, undefined, /* synthetic */ true));\n }\n if (isFirstScope) {\n const exception = details.exception();\n if (exception) {\n extraProperties.push(new SDK.RemoteObject.RemoteObjectProperty(\n i18nString(UIStrings.exception), exception, undefined, undefined, undefined, undefined, undefined,\n /* synthetic */ true));\n }\n const returnValue = callFrame.returnValue();\n if (returnValue) {\n extraProperties.push(new SDK.RemoteObject.RemoteObjectProperty(\n i18nString(UIStrings.returnValue), returnValue, undefined, undefined, undefined, undefined, undefined,\n /* synthetic */ true, callFrame.setReturnValue.bind(callFrame)));\n }\n }\n\n return extraProperties;\n }\n\n private sidebarPaneUpdatedForTest(): void {\n }\n override wasShown(): void {\n super.wasShown();\n this.treeOutline.registerCSSFiles([scopeChainSidebarPaneStyles]);\n this.registerCSSFiles([scopeChainSidebarPaneStyles]);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"ScopeChainSidebarPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/ScopeChainSidebarPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AA6B7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,eAAe,MAAM,qDAAqD,CAAC;AACvF,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,2BAA2B,MAAM,gCAAgC,CAAC;AAEzE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,YAAY;IACrB;;OAEG;IACH,SAAS,EAAE,YAAY;IACvB;;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AyB;IACjC,CAAC;IACQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC;QACjE,IAAI,CAAC,gBAAgB,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC;IACvD,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport scopeChainSidebarPaneStyles from './scopeChainSidebarPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Loading indicator in Scope Sidebar Pane of the Sources panel\n */\n loading: 'Loading...',\n /**\n *@description Not paused message element text content in Call Stack Sidebar Pane of the Sources panel\n */\n notPaused: 'Not paused',\n /**\n *@description Empty placeholder in Scope Chain Sidebar Pane of the Sources panel\n */\n noVariables: 'No variables',\n /**\n *@description Text in the Sources panel Scope pane describing a closure scope.\n *@example {func} PH1\n */\n closureS: 'Closure ({PH1})',\n /**\n *@description Text that refers to closure as a programming term\n */\n closure: 'Closure',\n /**\n *@description Text in Scope Chain Sidebar Pane of the Sources panel\n */\n exception: 'Exception',\n /**\n *@description Text in Scope Chain Sidebar Pane of the Sources panel\n */\n returnValue: 'Return value',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/ScopeChainSidebarPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet scopeChainSidebarPaneInstance: ScopeChainSidebarPane;\n\nexport class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextFlavorListener.ContextFlavorListener {\n private readonly treeOutline: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline;\n private readonly expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController;\n private readonly linkifier: Components.Linkifier.Linkifier;\n private infoElement: HTMLDivElement;\n #scopesScript: SDK.Script.Script|null = null;\n\n private constructor() {\n super(true);\n\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('debugger-scope')}`);\n this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline();\n this.treeOutline.hideOverflow();\n\n this.treeOutline.setShowSelectionOnKeyboardFocus(/* show */ true);\n this.expandController =\n new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController(this.treeOutline);\n this.linkifier = new Components.Linkifier.Linkifier();\n this.infoElement = document.createElement('div');\n this.infoElement.className = 'gray-info-message';\n this.infoElement.tabIndex = -1;\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebugInfoAttached, this.debugInfoAttached, this);\n void this.update();\n }\n\n static instance(): ScopeChainSidebarPane {\n if (!scopeChainSidebarPaneInstance) {\n scopeChainSidebarPaneInstance = new ScopeChainSidebarPane();\n }\n return scopeChainSidebarPaneInstance;\n }\n\n flavorChanged(_object: Object|null): void {\n void this.update();\n }\n\n override focus(): void {\n if (this.hasFocus()) {\n return;\n }\n\n if (UI.Context.Context.instance().flavor(SDK.DebuggerModel.DebuggerPausedDetails)) {\n this.treeOutline.forceSelect();\n }\n }\n\n private sourceMapAttached(\n event: Common.EventTarget.EventTargetEvent<{client: SDK.Script.Script, sourceMap: SDK.SourceMap.SourceMap}>):\n void {\n if (event.data.client === this.#scopesScript) {\n void this.update();\n }\n }\n\n private setScopeSourceMapSubscription(callFrame: SDK.DebuggerModel.CallFrame|null): void {\n const oldScript = this.#scopesScript;\n this.#scopesScript = callFrame?.script ?? null;\n\n // Shortcut for the case when we are listening to the same model.\n if (oldScript?.debuggerModel === this.#scopesScript?.debuggerModel) {\n return;\n }\n\n if (oldScript) {\n oldScript.debuggerModel.sourceMapManager().removeEventListener(\n SDK.SourceMapManager.Events.SourceMapAttached, this.sourceMapAttached, this);\n }\n\n if (this.#scopesScript) {\n this.#scopesScript.debuggerModel.sourceMapManager().addEventListener(\n SDK.SourceMapManager.Events.SourceMapAttached, this.sourceMapAttached, this);\n }\n }\n\n private debugInfoAttached(event: Common.EventTarget.EventTargetEvent): void {\n if (event.data === this.#scopesScript) {\n void this.update();\n }\n }\n\n private async update(): Promise {\n // The `resolveThisObject(callFrame)` and `resolveScopeChain(callFrame)` calls\n // below may take a while to complete, so indicate to the user that something\n // is happening (see https://crbug.com/1162416).\n this.infoElement.textContent = i18nString(UIStrings.loading);\n this.contentElement.removeChildren();\n this.contentElement.appendChild(this.infoElement);\n\n this.linkifier.reset();\n\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n this.setScopeSourceMapSubscription(callFrame);\n const [thisObject, scopeChain] = await Promise.all([\n SourceMapScopes.NamesResolver.resolveThisObject(callFrame),\n SourceMapScopes.NamesResolver.resolveScopeChain(callFrame),\n ]);\n // By now the developer might have moved on, and we don't want to show stale\n // scope information, so check again that we're still on the same CallFrame.\n if (callFrame === UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame)) {\n const details = UI.Context.Context.instance().flavor(SDK.DebuggerModel.DebuggerPausedDetails);\n this.treeOutline.removeChildren();\n\n if (!details || !callFrame || !scopeChain) {\n this.infoElement.textContent = i18nString(UIStrings.notPaused);\n return;\n }\n\n this.contentElement.removeChildren();\n this.contentElement.appendChild(this.treeOutline.element);\n let foundLocalScope = false;\n for (let i = 0; i < scopeChain.length; ++i) {\n const scope = scopeChain[i];\n const extraProperties = this.extraPropertiesForScope(scope, details, callFrame, thisObject, i === 0);\n\n if (scope.type() === Protocol.Debugger.ScopeType.Local) {\n foundLocalScope = true;\n }\n\n const section = this.createScopeSectionTreeElement(scope, extraProperties);\n if (scope.type() === Protocol.Debugger.ScopeType.Global) {\n section.collapse();\n } else if (!foundLocalScope || scope.type() === Protocol.Debugger.ScopeType.Local) {\n section.expand();\n }\n\n this.treeOutline.appendChild(section);\n if (i === 0) {\n section.select(/* omitFocus */ true);\n }\n }\n this.sidebarPaneUpdatedForTest();\n }\n }\n\n private createScopeSectionTreeElement(\n scope: SDK.DebuggerModel.ScopeChainEntry,\n extraProperties: SDK.RemoteObject.RemoteObjectProperty[]): ObjectUI.ObjectPropertiesSection.RootElement {\n let emptyPlaceholder: Common.UIString.LocalizedString|null = null;\n if (scope.type() === Protocol.Debugger.ScopeType.Local || Protocol.Debugger.ScopeType.Closure) {\n emptyPlaceholder = i18nString(UIStrings.noVariables);\n }\n\n let title = scope.typeName();\n if (scope.type() === Protocol.Debugger.ScopeType.Closure) {\n const scopeName = scope.name();\n if (scopeName) {\n title = i18nString(UIStrings.closureS, {PH1: UI.UIUtils.beautifyFunctionName(scopeName)});\n } else {\n title = i18nString(UIStrings.closure);\n }\n }\n let subtitle: string|null = scope.description();\n if (!title || title === subtitle) {\n subtitle = null;\n }\n const icon = scope.icon();\n\n const titleElement = document.createElement('div');\n titleElement.classList.add('scope-chain-sidebar-pane-section-header');\n titleElement.classList.add('tree-element-title');\n if (icon) {\n const iconElement = document.createElement('img');\n iconElement.classList.add('scope-chain-sidebar-pane-section-icon');\n iconElement.src = icon;\n titleElement.appendChild(iconElement);\n }\n titleElement.createChild('div', 'scope-chain-sidebar-pane-section-subtitle').textContent = subtitle;\n titleElement.createChild('div', 'scope-chain-sidebar-pane-section-title').textContent = title;\n\n const section = new ObjectUI.ObjectPropertiesSection.RootElement(\n SourceMapScopes.NamesResolver.resolveScopeInObject(scope), this.linkifier, emptyPlaceholder,\n ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.All, extraProperties);\n section.title = titleElement;\n section.listItemElement.classList.add('scope-chain-sidebar-pane-section');\n section.listItemElement.setAttribute('aria-label', title);\n this.expandController.watchSection(title + (subtitle ? ':' + subtitle : ''), section);\n\n return section;\n }\n\n private extraPropertiesForScope(\n scope: SDK.DebuggerModel.ScopeChainEntry, details: SDK.DebuggerModel.DebuggerPausedDetails,\n callFrame: SDK.DebuggerModel.CallFrame, thisObject: SDK.RemoteObject.RemoteObject|null,\n isFirstScope: boolean): SDK.RemoteObject.RemoteObjectProperty[] {\n if (scope.type() !== Protocol.Debugger.ScopeType.Local || callFrame.script.isWasm()) {\n return [];\n }\n\n const extraProperties = [];\n if (thisObject) {\n extraProperties.push(new SDK.RemoteObject.RemoteObjectProperty(\n 'this', thisObject, undefined, undefined, undefined, undefined, undefined, /* synthetic */ true));\n }\n if (isFirstScope) {\n const exception = details.exception();\n if (exception) {\n extraProperties.push(new SDK.RemoteObject.RemoteObjectProperty(\n i18nString(UIStrings.exception), exception, undefined, undefined, undefined, undefined, undefined,\n /* synthetic */ true));\n }\n const returnValue = callFrame.returnValue();\n if (returnValue) {\n extraProperties.push(new SDK.RemoteObject.RemoteObjectProperty(\n i18nString(UIStrings.returnValue), returnValue, undefined, undefined, undefined, undefined, undefined,\n /* synthetic */ true, callFrame.setReturnValue.bind(callFrame)));\n }\n }\n\n return extraProperties;\n }\n\n private sidebarPaneUpdatedForTest(): void {\n }\n override wasShown(): void {\n super.wasShown();\n this.treeOutline.registerCSSFiles([scopeChainSidebarPaneStyles]);\n this.registerCSSFiles([scopeChainSidebarPaneStyles]);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/SearchSourcesView.d.ts b/public/panels/sources/SearchSourcesView.d.ts index 4b332d384..de6482634 100644 --- a/public/panels/sources/SearchSourcesView.d.ts +++ b/public/panels/sources/SearchSourcesView.d.ts @@ -1,12 +1,17 @@ +import * as Common from '../../core/common/common.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as Search from '../search/search.js'; +export declare class SearchSources { + readonly query: string; + constructor(query: string); +} export declare class SearchSourcesView extends Search.SearchView.SearchView { - private constructor(); - static instance(): SearchSourcesView; - static openSearch(query: string, searchImmediately?: boolean): Promise; + constructor(); createScope(): Search.SearchScope.SearchScope; } export declare class ActionDelegate implements UI.ActionRegistration.ActionDelegate { - handleAction(_context: UI.Context.Context, _actionId: string): boolean; - private showSearch; + handleAction(_context: UI.Context.Context, actionId: string): boolean; +} +export declare class Revealer implements Common.Revealer.Revealer { + reveal({ query }: SearchSources, omitFocus?: boolean | undefined): Promise; } diff --git a/public/panels/sources/SearchSourcesView.js b/public/panels/sources/SearchSourcesView.js index 78dfbc935..c1c0e9667 100644 --- a/public/panels/sources/SearchSourcesView.js +++ b/public/panels/sources/SearchSourcesView.js @@ -5,46 +5,41 @@ import * as Common from '../../core/common/common.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as Search from '../search/search.js'; import { SourcesSearchScope } from './SourcesSearchScope.js'; -let searchSourcesViewInstance; +export class SearchSources { + query; + constructor(query) { + this.query = query; + } +} export class SearchSourcesView extends Search.SearchView.SearchView { constructor() { super('sources', new Common.Throttler.Throttler(/* timeoutMs */ 200)); } - static instance() { - if (!searchSourcesViewInstance) { - searchSourcesViewInstance = new SearchSourcesView(); - } - return searchSourcesViewInstance; - } - static async openSearch(query, searchImmediately) { - const view = UI.ViewManager.ViewManager.instance().view('sources.search-sources-tab'); - // Deliberately use target location name so that it could be changed - // based on the setting later. - // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration) - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const location = await UI.ViewManager.ViewManager.instance().resolveLocation('drawer-view'); - location.appendView(view); - await UI.ViewManager.ViewManager.instance().revealView(view); - const widget = await view.widget(); - widget.toggle(query, Boolean(searchImmediately)); - return widget; - } createScope() { return new SourcesSearchScope(); } } export class ActionDelegate { - handleAction(_context, _actionId) { - void this.showSearch(); - return true; + handleAction(_context, actionId) { + switch (actionId) { + case 'sources.search': { + const selection = UI.InspectorView.InspectorView.instance().element.window().getSelection(); + const query = selection ? selection.toString().replace(/\r?\n.*/, '') : ''; + void Common.Revealer.reveal(new SearchSources(query)); + return true; + } + } + return false; } - showSearch() { - const selection = UI.InspectorView.InspectorView.instance().element.window().getSelection(); - let queryCandidate = ''; - if (selection && selection.rangeCount) { - queryCandidate = selection.toString().replace(/\r?\n.*/, ''); +} +export class Revealer { + async reveal({ query }, omitFocus) { + const viewManager = UI.ViewManager.ViewManager.instance(); + await viewManager.showView('sources.search-sources-tab', true, omitFocus); + const searchSourcesView = viewManager.materializedWidget('sources.search-sources-tab'); + if (searchSourcesView instanceof SearchSourcesView) { + searchSourcesView.toggle(query); } - return SearchSourcesView.openSearch(queryCandidate); } } //# sourceMappingURL=SearchSourcesView.js.map \ No newline at end of file diff --git a/public/panels/sources/SearchSourcesView.js.map b/public/panels/sources/SearchSourcesView.js.map index 6d0af6503..3c6a1b866 100644 --- a/public/panels/sources/SearchSourcesView.js.map +++ b/public/panels/sources/SearchSourcesView.js.map @@ -1 +1 @@ -{"version":3,"file":"SearchSourcesView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/SearchSourcesView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAE3D,IAAI,yBAA4C,CAAC;AAEjD,MAAM,OAAO,iBAAkB,SAAQ,MAAM,CAAC,UAAU,CAAC,UAAU;IACjE;QACE,KAAK,CAAC,SAAS,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,CAAC,QAAQ;QACb,IAAI,CAAC,yBAAyB,EAAE;YAC9B,yBAAyB,GAAG,IAAI,iBAAiB,EAAE,CAAC;SACrD;QACD,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAa,EAAE,iBAA2B;QAChE,MAAM,IAAI,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACtF,oEAAoE;QACpE,8BAA8B;QAC9B,oEAAoE;QACpE,8DAA8D;QAC9D,MAAM,QAAQ,GAAI,MAAM,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,aAAa,CAAS,CAAC;QACrG,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1B,MAAM,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAI,MAAM,IAAI,CAAC,MAAM,EAAmC,CAAC;QACrE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACjD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEQ,WAAW;QAClB,OAAO,IAAI,kBAAkB,EAAE,CAAC;IAClC,CAAC;CACF;AAED,MAAM,OAAO,cAAc;IACzB,YAAY,CAAC,QAA4B,EAAE,SAAiB;QAC1D,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,UAAU;QAChB,MAAM,SAAS,GAAG,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,CAAC;QAC5F,IAAI,cAAc,GAAG,EAAE,CAAC;QACxB,IAAI,SAAS,IAAI,SAAS,CAAC,UAAU,EAAE;YACrC,cAAc,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;SAC9D;QAED,OAAO,iBAAiB,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["// Copyright 2018 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as Search from '../search/search.js';\n\nimport {SourcesSearchScope} from './SourcesSearchScope.js';\n\nlet searchSourcesViewInstance: SearchSourcesView;\n\nexport class SearchSourcesView extends Search.SearchView.SearchView {\n private constructor() {\n super('sources', new Common.Throttler.Throttler(/* timeoutMs */ 200));\n }\n\n static instance(): SearchSourcesView {\n if (!searchSourcesViewInstance) {\n searchSourcesViewInstance = new SearchSourcesView();\n }\n return searchSourcesViewInstance;\n }\n\n static async openSearch(query: string, searchImmediately?: boolean): Promise {\n const view = UI.ViewManager.ViewManager.instance().view('sources.search-sources-tab');\n // Deliberately use target location name so that it could be changed\n // based on the setting later.\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const location = (await UI.ViewManager.ViewManager.instance().resolveLocation('drawer-view') as any);\n location.appendView(view);\n await UI.ViewManager.ViewManager.instance().revealView(view);\n const widget = (await view.widget() as Search.SearchView.SearchView);\n widget.toggle(query, Boolean(searchImmediately));\n return widget;\n }\n\n override createScope(): Search.SearchScope.SearchScope {\n return new SourcesSearchScope();\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n void this.showSearch();\n return true;\n }\n\n private showSearch(): Promise {\n const selection = UI.InspectorView.InspectorView.instance().element.window().getSelection();\n let queryCandidate = '';\n if (selection && selection.rangeCount) {\n queryCandidate = selection.toString().replace(/\\r?\\n.*/, '');\n }\n\n return SearchSourcesView.openSearch(queryCandidate);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"SearchSourcesView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/SearchSourcesView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAC,kBA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,iBAAiB,GAAG,WAAW,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,CAAC;QACvF,IAAI,iBAAiB,YAAY,iBAAiB,EAAE;YAClD,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACjC;IACH,CAAC;CACF","sourcesContent":["// Copyright 2018 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as Search from '../search/search.js';\n\nimport {SourcesSearchScope} from './SourcesSearchScope.js';\n\nexport class SearchSources {\n readonly query: string;\n constructor(query: string) {\n this.query = query;\n }\n}\n\nexport class SearchSourcesView extends Search.SearchView.SearchView {\n constructor() {\n super('sources', new Common.Throttler.Throttler(/* timeoutMs */ 200));\n }\n\n override createScope(): Search.SearchScope.SearchScope {\n return new SourcesSearchScope();\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(_context: UI.Context.Context, actionId: string): boolean {\n switch (actionId) {\n case 'sources.search': {\n const selection = UI.InspectorView.InspectorView.instance().element.window().getSelection();\n const query = selection ? selection.toString().replace(/\\r?\\n.*/, '') : '';\n void Common.Revealer.reveal(new SearchSources(query));\n return true;\n }\n }\n return false;\n }\n}\n\nexport class Revealer implements Common.Revealer.Revealer {\n async reveal({query}: SearchSources, omitFocus?: boolean|undefined): Promise {\n const viewManager = UI.ViewManager.ViewManager.instance();\n await viewManager.showView('sources.search-sources-tab', true, omitFocus);\n const searchSourcesView = viewManager.materializedWidget('sources.search-sources-tab');\n if (searchSourcesView instanceof SearchSourcesView) {\n searchSourcesView.toggle(query);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/SourcesNavigator.d.ts b/public/panels/sources/SourcesNavigator.d.ts index f2368766b..759051e5d 100644 --- a/public/panels/sources/SourcesNavigator.d.ts +++ b/public/panels/sources/SourcesNavigator.d.ts @@ -13,8 +13,7 @@ export declare class NetworkNavigatorView extends NavigatorView { uiSourceCodeAdded(uiSourceCode: Workspace.UISourceCode.UISourceCode): void; } export declare class FilesNavigatorView extends NavigatorView { - private constructor(); - static instance(): FilesNavigatorView; + constructor(); sourceSelected(uiSourceCode: Workspace.UISourceCode.UISourceCode, focusSource: boolean): void; acceptProject(project: Workspace.Workspace.Project): boolean; handleContextMenu(event: Event): void; @@ -33,15 +32,11 @@ export declare class OverridesNavigatorView extends NavigatorView { acceptProject(project: Workspace.Workspace.Project): boolean; } export declare class ContentScriptsNavigatorView extends NavigatorView { - private constructor(); - static instance(opts?: { - forceNew: boolean | null; - }): ContentScriptsNavigatorView; + constructor(); acceptProject(project: Workspace.Workspace.Project): boolean; } export declare class SnippetsNavigatorView extends NavigatorView { constructor(); - static instance(): SnippetsNavigatorView; acceptProject(project: Workspace.Workspace.Project): boolean; handleContextMenu(event: Event): void; handleFileContextMenu(event: Event, node: NavigatorUISourceCodeTreeNode): void; diff --git a/public/panels/sources/SourcesNavigator.js b/public/panels/sources/SourcesNavigator.js index 0409e0e1c..270ba5f60 100644 --- a/public/panels/sources/SourcesNavigator.js +++ b/public/panels/sources/SourcesNavigator.js @@ -36,7 +36,6 @@ import * as Bindings from '../../models/bindings/bindings.js'; import * as Persistence from '../../models/persistence/persistence.js'; import * as Workspace from '../../models/workspace/workspace.js'; import * as UI from '../../ui/legacy/legacy.js'; -import * as VisualLogging from '../../ui/visual_logging/visual_logging.js'; import * as Snippets from '../snippets/snippets.js'; import { NavigatorView } from './NavigatorView.js'; import sourcesNavigatorStyles from './sourcesNavigator.css.js'; @@ -99,12 +98,11 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); let networkNavigatorViewInstance; export class NetworkNavigatorView extends NavigatorView { constructor() { - super(true); + super('navigator-network', true); SDK.TargetManager.TargetManager.instance().addEventListener(SDK.TargetManager.Events.InspectedURLChanged, this.inspectedURLChanged, this); // Record the sources tool load time after the file navigator has loaded. Host.userMetrics.panelLoaded('sources', 'DevTools.Launch.Sources'); SDK.TargetManager.TargetManager.instance().addScopeChangeListener(this.onScopeChange.bind(this)); - this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-network')}`); } wasShown() { this.registerCSSFiles([sourcesNavigatorStyles]); @@ -157,10 +155,9 @@ export class NetworkNavigatorView extends NavigatorView { } } } -let filesNavigatorViewInstance; export class FilesNavigatorView extends NavigatorView { constructor() { - super(); + super('navigator-files'); const placeholder = new UI.EmptyWidget.EmptyWidget(''); this.setPlaceholder(placeholder); placeholder.appendParagraph().appendChild(UI.Fragment.html ` @@ -173,13 +170,6 @@ export class FilesNavigatorView extends NavigatorView { this.contentElement.insertBefore(toolbar.element, this.contentElement.firstChild); } }); - this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-files')}`); - } - static instance() { - if (!filesNavigatorViewInstance) { - filesNavigatorViewInstance = new FilesNavigatorView(); - } - return filesNavigatorViewInstance; } sourceSelected(uiSourceCode, focusSource) { Host.userMetrics.actionTaken(Host.UserMetrics.Action.WorkspaceSourceSelected); @@ -200,7 +190,7 @@ let overridesNavigatorViewInstance; export class OverridesNavigatorView extends NavigatorView { toolbar; constructor() { - super(); + super('navigator-overrides'); const placeholder = new UI.EmptyWidget.EmptyWidget(''); this.setPlaceholder(placeholder); placeholder.appendParagraph().appendChild(UI.Fragment.html ` @@ -209,7 +199,6 @@ export class OverridesNavigatorView extends NavigatorView { `); this.toolbar = new UI.Toolbar.Toolbar('navigator-toolbar'); this.contentElement.insertBefore(this.toolbar.element, this.contentElement.firstChild); - this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-overrides')}`); Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(Persistence.NetworkPersistenceManager.Events.ProjectChanged, this.updateProjectAndUI, this); this.workspace().addEventListener(Workspace.Workspace.Events.ProjectAdded, this.onProjectAddOrRemoved, this); this.workspace().addEventListener(Workspace.Workspace.Events.ProjectRemoved, this.onProjectAddOrRemoved, this); @@ -275,33 +264,23 @@ export class OverridesNavigatorView extends NavigatorView { return project === Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project(); } } -let contentScriptsNavigatorViewInstance; export class ContentScriptsNavigatorView extends NavigatorView { constructor() { - super(); + super('navigator-contentScripts'); const placeholder = new UI.EmptyWidget.EmptyWidget(''); this.setPlaceholder(placeholder); placeholder.appendParagraph().appendChild(UI.Fragment.html `
${i18nString(UIStrings.explainContentScripts)}

${UI.XLink.XLink.create('https://developer.chrome.com/extensions/content_scripts', i18nString(UIStrings.learnMore))} `); - this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-contentScripts')}`); - } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!contentScriptsNavigatorViewInstance || forceNew) { - contentScriptsNavigatorViewInstance = new ContentScriptsNavigatorView(); - } - return contentScriptsNavigatorViewInstance; } acceptProject(project) { return project.type() === Workspace.Workspace.projectTypes.ContentScripts; } } -let snippetsNavigatorViewInstance; export class SnippetsNavigatorView extends NavigatorView { constructor() { - super(); + super('navigator-snippets'); const placeholder = new UI.EmptyWidget.EmptyWidget(''); this.setPlaceholder(placeholder); placeholder.appendParagraph().appendChild(UI.Fragment.html ` @@ -314,15 +293,8 @@ export class SnippetsNavigatorView extends NavigatorView { void this.create(Snippets.ScriptSnippetFileSystem.findSnippetsProject(), ''); }); toolbar.appendToolbarItem(newButton); - this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-snippets')}`); this.contentElement.insertBefore(toolbar.element, this.contentElement.firstChild); } - static instance() { - if (!snippetsNavigatorViewInstance) { - snippetsNavigatorViewInstance = new SnippetsNavigatorView(); - } - return snippetsNavigatorViewInstance; - } acceptProject(project) { return Snippets.ScriptSnippetFileSystem.isSnippetsProject(project); } diff --git a/public/panels/sources/SourcesNavigator.js.map b/public/panels/sources/SourcesNavigator.js.map index c8550cf74..72a24f7bc 100644 --- a/public/panels/sources/SourcesNavigator.js.map +++ b/public/panels/sources/SourcesNavigator.js.map @@ -1 +1 @@ -{"version":3,"file":"SourcesNavigator.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/SourcesNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAC3E,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAqC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACrF,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAE/D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,gBAAgB,EAAE,oEAAoE;IACtF;;OAEG;IACH,qBAAqB,EAAE,4EAA4E;IACnG;;OAEG;IACH,SAAS,EAAE,YAAY;IACvB;;OAEG;IACH,kBAAkB,EAAE,qBAAqB;IACzC;;OAEG;IACH,wBAAwB,EAAE,6BAA6B;IACvD;;OAEG;IACH,qBAAqB,EAAE,2CAA2C;IAClE;;OAEG;IACH,eAAe,EAAE,gEAAgE;IACjF;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;OAEG;IACH,gBAAgB,EAAE,oBAAoB;IACtC;;OAEG;IACH,GAAG,EAAE,KAAK;IACV;;OAEG;IACH,MAAM,EAAE,SAAS;IACjB;;OAEG;IACH,MAAM,EAAE,QAAQ;IACh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D,CAAC;CACF;AAED,MAAM,OAAO,cAAc;IACzB,YAAY,CAAC,OAA2B,EAAE,QAAgB;QACxD,QAAQ,QAAQ,EAAE;YAChB,KAAK,wBAAwB;gBAC3B,KAAK,QAAQ,CAAC,uBAAuB,CAAC,mBAAmB,EAAE;qBACtD,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAAE,IAAI,EAAE,EAAE,CAAC;qBAClE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;gBAChE,OAAO,IAAI,CAAC;YACd,KAAK,iCAAiC;gBACpC,KAAK,WAAW,CAAC,yBAAyB,CAAC,yBAAyB,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE,CAAC;gBAChG,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Persistence from '../../models/persistence/persistence.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport {type NavigatorUISourceCodeTreeNode, NavigatorView} from './NavigatorView.js';\nimport sourcesNavigatorStyles from './sourcesNavigator.css.js';\n\nconst UIStrings = {\n /**\n *@description Text to explain the Workspace feature in the Sources panel. https://goo.gle/devtools-workspace\n */\n explainWorkspace: 'Set up workspace to sync edits directly to the sources you develop',\n /**\n *@description Text to explain the Local Overrides feature. https://goo.gle/devtools-overrides\n */\n explainLocalOverrides: 'Override network requests and web content locally to mock remote resources',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Tooltip text that appears when hovering over the largeicon clear button in the Sources Navigator of the Sources panel\n */\n clearConfiguration: 'Clear configuration',\n /**\n *@description Text in Sources Navigator of the Sources panel\n */\n selectFolderForOverrides: 'Select folder for overrides',\n /**\n *@description Text to explain the content scripts pane in the Sources panel\n */\n explainContentScripts: 'View content scripts served by extensions',\n /**\n *@description Text to explain the Snippets feature in the Sources panel https://goo.gle/devtools-snippets\n */\n explainSnippets: 'Save the JavaScript code you run often to run it again anytime',\n /**\n *@description Text in Sources Navigator of the Sources panel\n */\n newSnippet: 'New snippet',\n /**\n *@description Title of an action in the sources tool to create snippet\n */\n createNewSnippet: 'Create new snippet',\n /**\n *@description A context menu item in the Sources Navigator of the Sources panel\n */\n run: 'Run',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n rename: 'Rename…',\n /**\n *@description Label for an item to remove something\n */\n remove: 'Remove',\n /**\n *@description Text to save content as a specific file type\n */\n saveAs: 'Save as...',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesNavigator.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet networkNavigatorViewInstance: NetworkNavigatorView;\n\nexport class NetworkNavigatorView extends NavigatorView {\n private constructor() {\n super(true);\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.InspectedURLChanged, this.inspectedURLChanged, this);\n\n // Record the sources tool load time after the file navigator has loaded.\n Host.userMetrics.panelLoaded('sources', 'DevTools.Launch.Sources');\n SDK.TargetManager.TargetManager.instance().addScopeChangeListener(this.onScopeChange.bind(this));\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-network')}`);\n }\n\n override wasShown(): void {\n this.registerCSSFiles([sourcesNavigatorStyles]);\n super.wasShown();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): NetworkNavigatorView {\n const {forceNew} = opts;\n if (!networkNavigatorViewInstance || forceNew) {\n networkNavigatorViewInstance = new NetworkNavigatorView();\n }\n\n return networkNavigatorViewInstance;\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return project.type() === Workspace.Workspace.projectTypes.Network &&\n SDK.TargetManager.TargetManager.instance().isInScope(\n Bindings.NetworkProject.NetworkProject.getTargetForProject(project));\n }\n\n onScopeChange(): void {\n for (const project of Workspace.Workspace.WorkspaceImpl.instance().projects()) {\n if (!this.acceptProject(project)) {\n this.removeProject(project);\n } else {\n this.tryAddProject(project);\n }\n }\n }\n\n private inspectedURLChanged(event: Common.EventTarget.EventTargetEvent): void {\n const mainTarget = SDK.TargetManager.TargetManager.instance().scopeTarget();\n if (event.data !== mainTarget) {\n return;\n }\n const inspectedURL = mainTarget && mainTarget.inspectedURL();\n if (!inspectedURL) {\n return;\n }\n for (const uiSourceCode of this.workspace().uiSourceCodes()) {\n if (this.acceptProject(uiSourceCode.project()) && uiSourceCode.url() === inspectedURL) {\n this.revealUISourceCode(uiSourceCode, true);\n }\n }\n }\n\n override uiSourceCodeAdded(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const mainTarget = SDK.TargetManager.TargetManager.instance().scopeTarget();\n const inspectedURL = mainTarget && mainTarget.inspectedURL();\n if (!inspectedURL) {\n return;\n }\n if (uiSourceCode.url() === inspectedURL) {\n this.revealUISourceCode(uiSourceCode, true);\n }\n }\n}\n\nlet filesNavigatorViewInstance: FilesNavigatorView;\n\nexport class FilesNavigatorView extends NavigatorView {\n private constructor() {\n super();\n const placeholder = new UI.EmptyWidget.EmptyWidget('');\n this.setPlaceholder(placeholder);\n placeholder.appendParagraph().appendChild(UI.Fragment.html`\n
${i18nString(UIStrings.explainWorkspace)}

\n ${UI.XLink.XLink.create('https://goo.gle/devtools-workspace', i18nString(UIStrings.learnMore))}\n `);\n\n const toolbar = new UI.Toolbar.Toolbar('navigator-toolbar');\n void toolbar.appendItemsAtLocation('files-navigator-toolbar').then(() => {\n if (!toolbar.empty()) {\n this.contentElement.insertBefore(toolbar.element, this.contentElement.firstChild);\n }\n });\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-files')}`);\n }\n\n static instance(): FilesNavigatorView {\n if (!filesNavigatorViewInstance) {\n filesNavigatorViewInstance = new FilesNavigatorView();\n }\n return filesNavigatorViewInstance;\n }\n\n override sourceSelected(uiSourceCode: Workspace.UISourceCode.UISourceCode, focusSource: boolean): void {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.WorkspaceSourceSelected);\n super.sourceSelected(uiSourceCode, focusSource);\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return project.type() === Workspace.Workspace.projectTypes.FileSystem &&\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemType(project) !== 'overrides' &&\n !Snippets.ScriptSnippetFileSystem.isSnippetsProject(project);\n }\n\n override handleContextMenu(event: Event): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.defaultSection().appendAction('sources.add-folder-to-workspace', undefined, true);\n void contextMenu.show();\n }\n}\n\nlet overridesNavigatorViewInstance: OverridesNavigatorView;\n\nexport class OverridesNavigatorView extends NavigatorView {\n private readonly toolbar: UI.Toolbar.Toolbar;\n private constructor() {\n super();\n const placeholder = new UI.EmptyWidget.EmptyWidget('');\n this.setPlaceholder(placeholder);\n placeholder.appendParagraph().appendChild(UI.Fragment.html`\n
${i18nString(UIStrings.explainLocalOverrides)}

\n ${UI.XLink.XLink.create('https://goo.gle/devtools-overrides', i18nString(UIStrings.learnMore))}\n `);\n\n this.toolbar = new UI.Toolbar.Toolbar('navigator-toolbar');\n\n this.contentElement.insertBefore(this.toolbar.element, this.contentElement.firstChild);\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-overrides')}`);\n\n Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(\n Persistence.NetworkPersistenceManager.Events.ProjectChanged, this.updateProjectAndUI, this);\n this.workspace().addEventListener(Workspace.Workspace.Events.ProjectAdded, this.onProjectAddOrRemoved, this);\n this.workspace().addEventListener(Workspace.Workspace.Events.ProjectRemoved, this.onProjectAddOrRemoved, this);\n this.updateProjectAndUI();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): OverridesNavigatorView {\n const {forceNew} = opts;\n if (!overridesNavigatorViewInstance || forceNew) {\n overridesNavigatorViewInstance = new OverridesNavigatorView();\n }\n\n return overridesNavigatorViewInstance;\n }\n\n private onProjectAddOrRemoved(event: Common.EventTarget.EventTargetEvent): void {\n const project = event.data;\n if (project && project.type() === Workspace.Workspace.projectTypes.FileSystem &&\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemType(project) !== 'overrides') {\n return;\n }\n this.updateUI();\n }\n\n private updateProjectAndUI(): void {\n this.reset();\n const project = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project();\n if (project) {\n this.tryAddProject(project);\n }\n this.updateUI();\n }\n\n private updateUI(): void {\n this.toolbar.removeToolbarItems();\n const project = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project();\n if (project) {\n const enableCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled'));\n this.toolbar.appendToolbarItem(enableCheckbox);\n\n this.toolbar.appendToolbarItem(new UI.Toolbar.ToolbarSeparator(true));\n const clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clearConfiguration), 'clear');\n clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled').set(false);\n project.remove();\n });\n this.toolbar.appendToolbarItem(clearButton);\n return;\n }\n const title = i18nString(UIStrings.selectFolderForOverrides);\n const setupButton = new UI.Toolbar.ToolbarButton(title, 'plus', title);\n setupButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n void this.setupNewWorkspace();\n }, this);\n this.toolbar.appendToolbarItem(setupButton);\n }\n\n async setupNewWorkspace(): Promise {\n const fileSystem =\n await Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addFileSystem('overrides');\n if (!fileSystem) {\n return;\n }\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled').set(true);\n }\n\n override sourceSelected(uiSourceCode: Workspace.UISourceCode.UISourceCode, focusSource: boolean): void {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.OverridesSourceSelected);\n super.sourceSelected(uiSourceCode, focusSource);\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return project === Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project();\n }\n}\n\nlet contentScriptsNavigatorViewInstance: ContentScriptsNavigatorView;\n\nexport class ContentScriptsNavigatorView extends NavigatorView {\n private constructor() {\n super();\n const placeholder = new UI.EmptyWidget.EmptyWidget('');\n this.setPlaceholder(placeholder);\n placeholder.appendParagraph().appendChild(UI.Fragment.html`\n
${i18nString(UIStrings.explainContentScripts)}

\n ${UI.XLink.XLink.create('https://developer.chrome.com/extensions/content_scripts', i18nString(UIStrings.learnMore))}\n `);\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-contentScripts')}`);\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): ContentScriptsNavigatorView {\n const {forceNew} = opts;\n if (!contentScriptsNavigatorViewInstance || forceNew) {\n contentScriptsNavigatorViewInstance = new ContentScriptsNavigatorView();\n }\n\n return contentScriptsNavigatorViewInstance;\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return project.type() === Workspace.Workspace.projectTypes.ContentScripts;\n }\n}\n\nlet snippetsNavigatorViewInstance: SnippetsNavigatorView;\n\nexport class SnippetsNavigatorView extends NavigatorView {\n constructor() {\n super();\n const placeholder = new UI.EmptyWidget.EmptyWidget('');\n this.setPlaceholder(placeholder);\n placeholder.appendParagraph().appendChild(UI.Fragment.html`\n
${i18nString(UIStrings.explainSnippets)}

\n ${UI.XLink.XLink.create('https://goo.gle/devtools-snippets', i18nString(UIStrings.learnMore))}\n `);\n\n const toolbar = new UI.Toolbar.Toolbar('navigator-toolbar');\n const newButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.newSnippet), 'plus', i18nString(UIStrings.newSnippet));\n newButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n void this.create(\n Snippets.ScriptSnippetFileSystem.findSnippetsProject(), '' as Platform.DevToolsPath.EncodedPathString);\n });\n toolbar.appendToolbarItem(newButton);\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('navigator-snippets')}`);\n this.contentElement.insertBefore(toolbar.element, this.contentElement.firstChild);\n }\n\n static instance(): SnippetsNavigatorView {\n if (!snippetsNavigatorViewInstance) {\n snippetsNavigatorViewInstance = new SnippetsNavigatorView();\n }\n return snippetsNavigatorViewInstance;\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return Snippets.ScriptSnippetFileSystem.isSnippetsProject(project);\n }\n\n override handleContextMenu(event: Event): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.headerSection().appendItem(\n i18nString(UIStrings.createNewSnippet),\n () => this.create(\n Snippets.ScriptSnippetFileSystem.findSnippetsProject(), '' as Platform.DevToolsPath.EncodedPathString));\n void contextMenu.show();\n }\n\n override handleFileContextMenu(event: Event, node: NavigatorUISourceCodeTreeNode): void {\n const uiSourceCode = node.uiSourceCode();\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.headerSection().appendItem(\n i18nString(UIStrings.run), () => Snippets.ScriptSnippetFileSystem.evaluateScriptSnippet(uiSourceCode));\n contextMenu.editSection().appendItem(i18nString(UIStrings.rename), () => this.rename(node, false));\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.remove), () => uiSourceCode.project().deleteFile(uiSourceCode));\n contextMenu.saveSection().appendItem(i18nString(UIStrings.saveAs), this.handleSaveAs.bind(this, uiSourceCode));\n void contextMenu.show();\n }\n\n private async handleSaveAs(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise {\n uiSourceCode.commitWorkingCopy();\n const {content} = await uiSourceCode.requestContent();\n void Workspace.FileManager.FileManager.instance().save(\n this.addJSExtension(uiSourceCode.url()), content || '', true);\n Workspace.FileManager.FileManager.instance().close(uiSourceCode.url());\n }\n\n private addJSExtension(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {\n return Common.ParsedURL.ParsedURL.concatenate(url, '.js');\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n switch (actionId) {\n case 'sources.create-snippet':\n void Snippets.ScriptSnippetFileSystem.findSnippetsProject()\n .createFile(Platform.DevToolsPath.EmptyEncodedPathString, null, '')\n .then(uiSourceCode => Common.Revealer.reveal(uiSourceCode));\n return true;\n case 'sources.add-folder-to-workspace':\n void Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addFileSystem();\n return true;\n }\n return false;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"SourcesNavigator.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/SourcesNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAqC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACrF,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAE/D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,gBAAgB,EAAE,oEAAoE;IACtF;;OAEG;IACH,qBAAqB,EAAE,4EAA4E;IACnG;;OAEG;IACH,SAAS,EAAE,YAAY;IACvB;;OAEG;IACH,kB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AC,cAAc,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,EAAE,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;QAClE,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC;IACzE,CAAC;IAEO,cAAc,CAAC,GAAoC;QACzD,OAAO,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC;CACF;AAED,MAAM,OAAO,cAAc;IACzB,YAAY,CAAC,OAA2B,EAAE,QAAgB;QACxD,QAAQ,QAAQ,EAAE;YAChB,KAAK,wBAAwB;gBAC3B,KAAK,QAAQ,CAAC,uBAAuB,CAAC,mBAAmB,EAAE;qBACtD,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,sBAAsB,EAAE,IAAI,EAAE,EAAE,CAAC;qBAClE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;gBAChE,OAAO,IAAI,CAAC;YACd,KAAK,iCAAiC;gBACpC,KAAK,WAAW,CAAC,yBAAyB,CAAC,yBAAyB,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE,CAAC;gBAChG,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Persistence from '../../models/persistence/persistence.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport {type NavigatorUISourceCodeTreeNode, NavigatorView} from './NavigatorView.js';\nimport sourcesNavigatorStyles from './sourcesNavigator.css.js';\n\nconst UIStrings = {\n /**\n *@description Text to explain the Workspace feature in the Sources panel. https://goo.gle/devtools-workspace\n */\n explainWorkspace: 'Set up workspace to sync edits directly to the sources you develop',\n /**\n *@description Text to explain the Local Overrides feature. https://goo.gle/devtools-overrides\n */\n explainLocalOverrides: 'Override network requests and web content locally to mock remote resources',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Tooltip text that appears when hovering over the largeicon clear button in the Sources Navigator of the Sources panel\n */\n clearConfiguration: 'Clear configuration',\n /**\n *@description Text in Sources Navigator of the Sources panel\n */\n selectFolderForOverrides: 'Select folder for overrides',\n /**\n *@description Text to explain the content scripts pane in the Sources panel\n */\n explainContentScripts: 'View content scripts served by extensions',\n /**\n *@description Text to explain the Snippets feature in the Sources panel https://goo.gle/devtools-snippets\n */\n explainSnippets: 'Save the JavaScript code you run often to run it again anytime',\n /**\n *@description Text in Sources Navigator of the Sources panel\n */\n newSnippet: 'New snippet',\n /**\n *@description Title of an action in the sources tool to create snippet\n */\n createNewSnippet: 'Create new snippet',\n /**\n *@description A context menu item in the Sources Navigator of the Sources panel\n */\n run: 'Run',\n /**\n *@description A context menu item in the Navigator View of the Sources panel\n */\n rename: 'Rename…',\n /**\n *@description Label for an item to remove something\n */\n remove: 'Remove',\n /**\n *@description Text to save content as a specific file type\n */\n saveAs: 'Save as...',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesNavigator.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet networkNavigatorViewInstance: NetworkNavigatorView;\n\nexport class NetworkNavigatorView extends NavigatorView {\n private constructor() {\n super('navigator-network', true);\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.InspectedURLChanged, this.inspectedURLChanged, this);\n\n // Record the sources tool load time after the file navigator has loaded.\n Host.userMetrics.panelLoaded('sources', 'DevTools.Launch.Sources');\n SDK.TargetManager.TargetManager.instance().addScopeChangeListener(this.onScopeChange.bind(this));\n }\n\n override wasShown(): void {\n this.registerCSSFiles([sourcesNavigatorStyles]);\n super.wasShown();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): NetworkNavigatorView {\n const {forceNew} = opts;\n if (!networkNavigatorViewInstance || forceNew) {\n networkNavigatorViewInstance = new NetworkNavigatorView();\n }\n\n return networkNavigatorViewInstance;\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return project.type() === Workspace.Workspace.projectTypes.Network &&\n SDK.TargetManager.TargetManager.instance().isInScope(\n Bindings.NetworkProject.NetworkProject.getTargetForProject(project));\n }\n\n onScopeChange(): void {\n for (const project of Workspace.Workspace.WorkspaceImpl.instance().projects()) {\n if (!this.acceptProject(project)) {\n this.removeProject(project);\n } else {\n this.tryAddProject(project);\n }\n }\n }\n\n private inspectedURLChanged(event: Common.EventTarget.EventTargetEvent): void {\n const mainTarget = SDK.TargetManager.TargetManager.instance().scopeTarget();\n if (event.data !== mainTarget) {\n return;\n }\n const inspectedURL = mainTarget && mainTarget.inspectedURL();\n if (!inspectedURL) {\n return;\n }\n for (const uiSourceCode of this.workspace().uiSourceCodes()) {\n if (this.acceptProject(uiSourceCode.project()) && uiSourceCode.url() === inspectedURL) {\n this.revealUISourceCode(uiSourceCode, true);\n }\n }\n }\n\n override uiSourceCodeAdded(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const mainTarget = SDK.TargetManager.TargetManager.instance().scopeTarget();\n const inspectedURL = mainTarget && mainTarget.inspectedURL();\n if (!inspectedURL) {\n return;\n }\n if (uiSourceCode.url() === inspectedURL) {\n this.revealUISourceCode(uiSourceCode, true);\n }\n }\n}\n\nexport class FilesNavigatorView extends NavigatorView {\n constructor() {\n super('navigator-files');\n const placeholder = new UI.EmptyWidget.EmptyWidget('');\n this.setPlaceholder(placeholder);\n placeholder.appendParagraph().appendChild(UI.Fragment.html`\n
${i18nString(UIStrings.explainWorkspace)}

\n ${UI.XLink.XLink.create('https://goo.gle/devtools-workspace', i18nString(UIStrings.learnMore))}\n `);\n\n const toolbar = new UI.Toolbar.Toolbar('navigator-toolbar');\n void toolbar.appendItemsAtLocation('files-navigator-toolbar').then(() => {\n if (!toolbar.empty()) {\n this.contentElement.insertBefore(toolbar.element, this.contentElement.firstChild);\n }\n });\n }\n\n override sourceSelected(uiSourceCode: Workspace.UISourceCode.UISourceCode, focusSource: boolean): void {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.WorkspaceSourceSelected);\n super.sourceSelected(uiSourceCode, focusSource);\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return project.type() === Workspace.Workspace.projectTypes.FileSystem &&\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemType(project) !== 'overrides' &&\n !Snippets.ScriptSnippetFileSystem.isSnippetsProject(project);\n }\n\n override handleContextMenu(event: Event): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.defaultSection().appendAction('sources.add-folder-to-workspace', undefined, true);\n void contextMenu.show();\n }\n}\n\nlet overridesNavigatorViewInstance: OverridesNavigatorView;\n\nexport class OverridesNavigatorView extends NavigatorView {\n private readonly toolbar: UI.Toolbar.Toolbar;\n private constructor() {\n super('navigator-overrides');\n const placeholder = new UI.EmptyWidget.EmptyWidget('');\n this.setPlaceholder(placeholder);\n placeholder.appendParagraph().appendChild(UI.Fragment.html`\n
${i18nString(UIStrings.explainLocalOverrides)}

\n ${UI.XLink.XLink.create('https://goo.gle/devtools-overrides', i18nString(UIStrings.learnMore))}\n `);\n\n this.toolbar = new UI.Toolbar.Toolbar('navigator-toolbar');\n\n this.contentElement.insertBefore(this.toolbar.element, this.contentElement.firstChild);\n\n Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(\n Persistence.NetworkPersistenceManager.Events.ProjectChanged, this.updateProjectAndUI, this);\n this.workspace().addEventListener(Workspace.Workspace.Events.ProjectAdded, this.onProjectAddOrRemoved, this);\n this.workspace().addEventListener(Workspace.Workspace.Events.ProjectRemoved, this.onProjectAddOrRemoved, this);\n this.updateProjectAndUI();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): OverridesNavigatorView {\n const {forceNew} = opts;\n if (!overridesNavigatorViewInstance || forceNew) {\n overridesNavigatorViewInstance = new OverridesNavigatorView();\n }\n\n return overridesNavigatorViewInstance;\n }\n\n private onProjectAddOrRemoved(event: Common.EventTarget.EventTargetEvent): void {\n const project = event.data;\n if (project && project.type() === Workspace.Workspace.projectTypes.FileSystem &&\n Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemType(project) !== 'overrides') {\n return;\n }\n this.updateUI();\n }\n\n private updateProjectAndUI(): void {\n this.reset();\n const project = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project();\n if (project) {\n this.tryAddProject(project);\n }\n this.updateUI();\n }\n\n private updateUI(): void {\n this.toolbar.removeToolbarItems();\n const project = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project();\n if (project) {\n const enableCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled'));\n this.toolbar.appendToolbarItem(enableCheckbox);\n\n this.toolbar.appendToolbarItem(new UI.Toolbar.ToolbarSeparator(true));\n const clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clearConfiguration), 'clear');\n clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled').set(false);\n project.remove();\n });\n this.toolbar.appendToolbarItem(clearButton);\n return;\n }\n const title = i18nString(UIStrings.selectFolderForOverrides);\n const setupButton = new UI.Toolbar.ToolbarButton(title, 'plus', title);\n setupButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n void this.setupNewWorkspace();\n }, this);\n this.toolbar.appendToolbarItem(setupButton);\n }\n\n async setupNewWorkspace(): Promise {\n const fileSystem =\n await Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addFileSystem('overrides');\n if (!fileSystem) {\n return;\n }\n Common.Settings.Settings.instance().moduleSetting('persistenceNetworkOverridesEnabled').set(true);\n }\n\n override sourceSelected(uiSourceCode: Workspace.UISourceCode.UISourceCode, focusSource: boolean): void {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.OverridesSourceSelected);\n super.sourceSelected(uiSourceCode, focusSource);\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return project === Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project();\n }\n}\n\nexport class ContentScriptsNavigatorView extends NavigatorView {\n constructor() {\n super('navigator-contentScripts');\n const placeholder = new UI.EmptyWidget.EmptyWidget('');\n this.setPlaceholder(placeholder);\n placeholder.appendParagraph().appendChild(UI.Fragment.html`\n
${i18nString(UIStrings.explainContentScripts)}

\n ${UI.XLink.XLink.create('https://developer.chrome.com/extensions/content_scripts', i18nString(UIStrings.learnMore))}\n `);\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return project.type() === Workspace.Workspace.projectTypes.ContentScripts;\n }\n}\n\nexport class SnippetsNavigatorView extends NavigatorView {\n constructor() {\n super('navigator-snippets');\n const placeholder = new UI.EmptyWidget.EmptyWidget('');\n this.setPlaceholder(placeholder);\n placeholder.appendParagraph().appendChild(UI.Fragment.html`\n
${i18nString(UIStrings.explainSnippets)}

\n ${UI.XLink.XLink.create('https://goo.gle/devtools-snippets', i18nString(UIStrings.learnMore))}\n `);\n\n const toolbar = new UI.Toolbar.Toolbar('navigator-toolbar');\n const newButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.newSnippet), 'plus', i18nString(UIStrings.newSnippet));\n newButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n void this.create(\n Snippets.ScriptSnippetFileSystem.findSnippetsProject(), '' as Platform.DevToolsPath.EncodedPathString);\n });\n toolbar.appendToolbarItem(newButton);\n this.contentElement.insertBefore(toolbar.element, this.contentElement.firstChild);\n }\n\n override acceptProject(project: Workspace.Workspace.Project): boolean {\n return Snippets.ScriptSnippetFileSystem.isSnippetsProject(project);\n }\n\n override handleContextMenu(event: Event): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.headerSection().appendItem(\n i18nString(UIStrings.createNewSnippet),\n () => this.create(\n Snippets.ScriptSnippetFileSystem.findSnippetsProject(), '' as Platform.DevToolsPath.EncodedPathString));\n void contextMenu.show();\n }\n\n override handleFileContextMenu(event: Event, node: NavigatorUISourceCodeTreeNode): void {\n const uiSourceCode = node.uiSourceCode();\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.headerSection().appendItem(\n i18nString(UIStrings.run), () => Snippets.ScriptSnippetFileSystem.evaluateScriptSnippet(uiSourceCode));\n contextMenu.editSection().appendItem(i18nString(UIStrings.rename), () => this.rename(node, false));\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.remove), () => uiSourceCode.project().deleteFile(uiSourceCode));\n contextMenu.saveSection().appendItem(i18nString(UIStrings.saveAs), this.handleSaveAs.bind(this, uiSourceCode));\n void contextMenu.show();\n }\n\n private async handleSaveAs(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise {\n uiSourceCode.commitWorkingCopy();\n const {content} = await uiSourceCode.requestContent();\n void Workspace.FileManager.FileManager.instance().save(\n this.addJSExtension(uiSourceCode.url()), content || '', true);\n Workspace.FileManager.FileManager.instance().close(uiSourceCode.url());\n }\n\n private addJSExtension(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {\n return Common.ParsedURL.ParsedURL.concatenate(url, '.js');\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n switch (actionId) {\n case 'sources.create-snippet':\n void Snippets.ScriptSnippetFileSystem.findSnippetsProject()\n .createFile(Platform.DevToolsPath.EmptyEncodedPathString, null, '')\n .then(uiSourceCode => Common.Revealer.reveal(uiSourceCode));\n return true;\n case 'sources.add-folder-to-workspace':\n void Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addFileSystem();\n return true;\n }\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/SourcesPanel.d.ts b/public/panels/sources/SourcesPanel.d.ts index 2a96d6373..106ef384c 100644 --- a/public/panels/sources/SourcesPanel.d.ts +++ b/public/panels/sources/SourcesPanel.d.ts @@ -3,7 +3,6 @@ import * as SDK from '../../core/sdk/sdk.js'; import * as Workspace from '../../models/workspace/workspace.js'; import type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js'; import * as UI from '../../ui/legacy/legacy.js'; -import { type NavigatorView } from './NavigatorView.js'; import { SourcesView } from './SourcesView.js'; import { UISourceCodeFrame } from './UISourceCodeFrame.js'; export declare class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provider, SDK.TargetManager.Observer, UI.View.ViewLocationResolver { @@ -65,7 +64,7 @@ export declare class SourcesPanel extends UI.Panel.Panel implements UI.ContextMe showUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode, location?: SourceFrame.SourceFrame.RevealPosition, omitFocus?: boolean): void; private showEditor; showUILocation(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): void; - revealInNavigator(uiSourceCode: Workspace.UISourceCode.UISourceCode, skipReveal?: boolean): void; + revealInNavigator(uiSourceCode: Workspace.UISourceCode.UISourceCode, skipReveal?: boolean): Promise; private addExperimentMenuItem; private populateNavigatorMenu; setIgnoreExecutionLineEvents(ignoreExecutionLineEvents: boolean): void; @@ -97,7 +96,6 @@ export declare class SourcesPanel extends UI.Panel.Panel implements UI.ContextMe private appendUISourceCodeItems; private appendUISourceCodeFrameItems; appendUILocationItems(contextMenu: UI.ContextMenu.ContextMenu, uiLocation: Workspace.UISourceCode.UILocation): void; - private handleContextMenuReveal; private appendRemoteObjectItems; private appendNetworkRequestItems; private showFunctionDefinition; @@ -147,8 +145,3 @@ export declare class WrapperView extends UI.Widget.VBox { willHide(): void; showViewInWrapper(): void; } -export interface NavigatorViewRegistration { - navigatorView: () => NavigatorView; - viewId: string; - experiment?: string; -} diff --git a/public/panels/sources/SourcesPanel.js b/public/panels/sources/SourcesPanel.js index 79cf2fbd8..5bc0d4ef8 100644 --- a/public/panels/sources/SourcesPanel.js +++ b/public/panels/sources/SourcesPanel.js @@ -42,7 +42,7 @@ import * as UI from '../../ui/legacy/legacy.js'; import * as Snippets from '../snippets/snippets.js'; import { CallStackSidebarPane } from './CallStackSidebarPane.js'; import { DebuggerPausedMessage } from './DebuggerPausedMessage.js'; -import { ContentScriptsNavigatorView, FilesNavigatorView, NetworkNavigatorView, OverridesNavigatorView, SnippetsNavigatorView, } from './SourcesNavigator.js'; +import { NavigatorView } from './NavigatorView.js'; import sourcesPanelStyles from './sourcesPanel.css.js'; import { Events, SourcesView } from './SourcesView.js'; import { ThreadsSidebarPane } from './ThreadsSidebarPane.js'; @@ -119,7 +119,7 @@ const UIStrings = { /** *@description A context menu item in the Sources Panel of the Sources panel */ - revealInSidebar: 'Reveal in sidebar', + revealInSidebar: 'Reveal in navigator sidebar', /** *@description A context menu item in the Sources Panel of the Sources panel when debugging JS code. * When clicked, the execution is resumed until it reaches the line specified by the right-click that @@ -461,18 +461,18 @@ export class SourcesPanel extends UI.Panel.Panel { const { uiSourceCode, lineNumber, columnNumber } = uiLocation; this.showUISourceCode(uiSourceCode, { lineNumber, columnNumber }, omitFocus); } - revealInNavigator(uiSourceCode, skipReveal) { - for (const navigator of registeredNavigatorViews) { - const navigatorView = navigator.navigatorView(); - const viewId = navigator.viewId; - if (viewId && navigatorView.acceptProject(uiSourceCode.project())) { + async revealInNavigator(uiSourceCode, skipReveal) { + const viewManager = UI.ViewManager.ViewManager.instance(); + for (const view of viewManager.viewsForLocation("navigator-view" /* UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW */)) { + const navigatorView = await view.widget(); + if (navigatorView instanceof NavigatorView && navigatorView.acceptProject(uiSourceCode.project())) { navigatorView.revealUISourceCode(uiSourceCode, true); - if (skipReveal) { - this.navigatorTabbedLocation.tabbedPane().selectTab(viewId); - } - else { - void UI.ViewManager.ViewManager.instance().showView(viewId); + this.navigatorTabbedLocation.tabbedPane().selectTab(view.viewId(), true); + if (!skipReveal) { + this.editorView.showBoth(true); + navigatorView.focus(); } + break; } } } @@ -608,7 +608,7 @@ export class SourcesPanel extends UI.Panel.Panel { const uiSourceCode = event.data; if (this.editorView.mainWidget() && Common.Settings.Settings.instance().moduleSetting('autoRevealInNavigator').get()) { - this.revealInNavigator(uiSourceCode, true); + void this.revealInNavigator(uiSourceCode, true); } } togglePause() { @@ -755,7 +755,9 @@ export class SourcesPanel extends UI.Panel.Panel { !eventTarget.isSelfOrDescendant(this.navigatorTabbedLocation.widget().element) && !(Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE) && Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(uiSourceCode))) { - contextMenu.revealSection().appendItem(i18nString(UIStrings.revealInSidebar), this.handleContextMenuReveal.bind(this, uiSourceCode)); + contextMenu.revealSection().appendItem(i18nString(UIStrings.revealInSidebar), this.revealInNavigator.bind(this, uiSourceCode), { + jslogContext: 'sources.reveal-in-navigator-sidebar', + }); } // Ignore list only works for JavaScript debugging. if (uiSourceCode.contentType().hasScripts() && @@ -789,10 +791,6 @@ export class SourcesPanel extends UI.Panel.Panel { this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode); } } - handleContextMenuReveal(uiSourceCode) { - this.editorView.showBoth(); - this.revealInNavigator(uiSourceCode); - } appendRemoteObjectItems(contextMenu, remoteObject) { const indent = Common.Settings.Settings.instance().moduleSetting('textEditorIndent').get(); const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext); @@ -1143,6 +1141,14 @@ export class ActionDelegate { } return true; } + case 'sources.reveal-in-navigator-sidebar': { + const uiSourceCode = panel.sourcesView().currentUISourceCode(); + if (uiSourceCode === null) { + return false; + } + void panel.revealInNavigator(uiSourceCode); + return true; + } case 'sources.toggle-navigator-sidebar': { panel.toggleNavigatorSidebar(); return true; @@ -1190,31 +1196,4 @@ export class WrapperView extends UI.Widget.VBox { this.view.show(this.element); } } -const registeredNavigatorViews = [ - { - viewId: 'navigator-network', - navigatorView: NetworkNavigatorView.instance, - experiment: undefined, - }, - { - viewId: 'navigator-files', - navigatorView: FilesNavigatorView.instance, - experiment: undefined, - }, - { - viewId: 'navigator-snippets', - navigatorView: SnippetsNavigatorView.instance, - experiment: undefined, - }, - { - viewId: 'navigator-overrides', - navigatorView: OverridesNavigatorView.instance, - experiment: undefined, - }, - { - viewId: 'navigator-contentScripts', - navigatorView: ContentScriptsNavigatorView.instance, - experiment: undefined, - }, -]; //# sourceMappingURL=SourcesPanel.js.map \ No newline at end of file diff --git a/public/panels/sources/SourcesPanel.js.map b/public/panels/sources/SourcesPanel.js.map index 399aa99f5..337e5503d 100644 --- a/public/panels/sources/SourcesPanel.js.map +++ b/public/panels/sources/SourcesPanel.js.map @@ -1 +1 @@ -{"version":3,"file":"SourcesPanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/SourcesPanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAE9E,OAAO,KAAK,E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CAAC,SAAS,EAAE,EAAE;YACxC,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC1B;aAAM;YACL,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;SACpE;QACD,YAAY,CAAC,8BAA8B,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC;IAEQ,QAAQ;QACf,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpE,cAAc,CAAC,GAAG,EAAE;YAClB,YAAY,CAAC,8BAA8B,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,wBAAwB,GAAgC;IAC5D;QACE,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE,oBAAoB,CAAC,QAAQ;QAC5C,UAAU,EAAE,SAAS;KACtB;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,aAAa,EAAE,kBAAkB,CAAC,QAAQ;QAC1C,UAAU,EAAE,SAAS;KACtB;IACD;QACE,MAAM,EAAE,oBAAoB;QAC5B,aAAa,EAAE,qBAAqB,CAAC,QAAQ;QAC7C,UAAU,EAAE,SAAS;KACtB;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,sBAAsB,CAAC,QAAQ;QAC9C,UAAU,EAAE,SAAS;KACtB;IACD;QACE,MAAM,EAAE,0BAA0B;QAClC,aAAa,EAAE,2BAA2B,CAAC,QAAQ;QACnD,UAAU,EAAE,SAAS;KACtB;CACF,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Breakpoints from '../../models/breakpoints/breakpoints.js';\nimport * as Extensions from '../../models/extensions/extensions.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport {CallStackSidebarPane} from './CallStackSidebarPane.js';\nimport {DebuggerPausedMessage} from './DebuggerPausedMessage.js';\nimport {type NavigatorView} from './NavigatorView.js';\nimport {\n ContentScriptsNavigatorView,\n FilesNavigatorView,\n NetworkNavigatorView,\n OverridesNavigatorView,\n SnippetsNavigatorView,\n} from './SourcesNavigator.js';\nimport sourcesPanelStyles from './sourcesPanel.css.js';\nimport {Events, SourcesView} from './SourcesView.js';\nimport {ThreadsSidebarPane} from './ThreadsSidebarPane.js';\nimport {UISourceCodeFrame} from './UISourceCodeFrame.js';\n\nconst UIStrings = {\n /**\n *@description Text that appears when user drag and drop something (for example, a file) in Sources Panel of the Sources panel\n */\n dropWorkspaceFolderHere: 'Drop workspace folder here',\n /**\n *@description Text to show more options\n */\n moreOptions: 'More options',\n /**\n * @description Tooltip for the the navigator toggle in the Sources panel. Command to open/show the\n * sidebar containing the navigator tool.\n */\n showNavigator: 'Show navigator',\n /**\n * @description Tooltip for the the navigator toggle in the Sources panel. Command to close/hide\n * the sidebar containing the navigator tool.\n */\n hideNavigator: 'Hide navigator',\n /**\n * @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.\n */\n navigatorShown: 'Navigator sidebar shown',\n /**\n * @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.\n */\n navigatorHidden: 'Navigator sidebar hidden',\n /**\n * @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.\n */\n debuggerShown: 'Debugger sidebar shown',\n /**\n * @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.\n */\n debuggerHidden: 'Debugger sidebar hidden',\n /**\n * @description Tooltip for the the debugger toggle in the Sources panel. Command to open/show the\n * sidebar containing the debugger tool.\n */\n showDebugger: 'Show debugger',\n /**\n * @description Tooltip for the the debugger toggle in the Sources panel. Command to close/hide the\n * sidebar containing the debugger tool.\n */\n hideDebugger: 'Hide debugger',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n groupByFolder: 'Group by folder',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n groupByAuthored: 'Group by Authored/Deployed',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n hideIgnoreListed: 'Hide ignore-listed sources',\n /**\n *@description Tooltip text that appears when hovering over the largeicon play button in the Sources Panel of the Sources panel\n */\n resumeWithAllPausesBlockedForMs: 'Resume with all pauses blocked for 500 ms',\n /**\n *@description Tooltip text that appears when hovering over the largeicon terminate execution button in the Sources Panel of the Sources panel\n */\n terminateCurrentJavascriptCall: 'Terminate current JavaScript call',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n pauseOnCaughtExceptions: 'Pause on caught exceptions',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel\n */\n revealInSidebar: 'Reveal in sidebar',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel when debugging JS code.\n * When clicked, the execution is resumed until it reaches the line specified by the right-click that\n * opened the context menu.\n */\n continueToHere: 'Continue to here',\n /**\n *@description A context menu item in the Console that stores selection as a temporary global variable\n */\n storeAsGlobalVariable: 'Store as global variable',\n /**\n *@description A context menu item in the Console, Sources, and Network panel\n *@example {string} PH1\n */\n copyS: 'Copy {PH1}',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the raw contents of the string is copied to the clipboard.\n */\n copyStringContents: 'Copy string contents',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the string is copied to the clipboard as a valid JavaScript literal.\n */\n copyStringAsJSLiteral: 'Copy string as JavaScript literal',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the string is copied to the clipboard as a valid JSON literal.\n */\n copyStringAsJSONLiteral: 'Copy string as JSON literal',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel\n */\n showFunctionDefinition: 'Show function definition',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n openInSourcesPanel: 'Open in Sources panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesPanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst primitiveRemoteObjectTypes = new Set(['number', 'boolean', 'bigint', 'undefined']);\nlet sourcesPanelInstance: SourcesPanel;\nlet wrapperViewInstance: WrapperView;\n\nexport class SourcesPanel extends UI.Panel.Panel implements\n UI.ContextMenu.Provider,\n SDK.TargetManager.Observer, UI.View.ViewLocationResolver {\n private readonly workspace: Workspace.Workspace.WorkspaceImpl;\n private readonly togglePauseAction: UI.ActionRegistration.Action;\n private readonly stepOverAction: UI.ActionRegistration.Action;\n private readonly stepIntoAction: UI.ActionRegistration.Action;\n private readonly stepOutAction: UI.ActionRegistration.Action;\n private readonly stepAction: UI.ActionRegistration.Action;\n private readonly toggleBreakpointsActiveAction: UI.ActionRegistration.Action;\n private readonly debugToolbar: UI.Toolbar.Toolbar;\n private readonly debugToolbarDrawer: HTMLDivElement;\n private readonly debuggerPausedMessage: DebuggerPausedMessage;\n private splitWidget: UI.SplitWidget.SplitWidget;\n editorView: UI.SplitWidget.SplitWidget;\n private navigatorTabbedLocation: UI.View.TabbedViewLocation;\n sourcesViewInternal: SourcesView;\n private readonly toggleNavigatorSidebarButton: UI.Toolbar.ToolbarButton;\n private readonly toggleDebuggerSidebarButton: UI.Toolbar.ToolbarButton;\n private threadsSidebarPane: UI.View.View|null;\n private readonly watchSidebarPane: UI.View.View;\n private readonly callstackPane: CallStackSidebarPane;\n private liveLocationPool: Bindings.LiveLocation.LiveLocationPool;\n private lastModificationTime: number;\n private pausedInternal?: boolean;\n private switchToPausedTargetTimeout?: number;\n private ignoreExecutionLineEvents?: boolean;\n private executionLineLocation?: Bindings.DebuggerWorkspaceBinding.Location|null;\n private pauseOnExceptionButton?: UI.Toolbar.ToolbarToggle;\n private sidebarPaneStack?: UI.View.ViewLocation;\n private tabbedLocationHeader?: Element|null;\n private extensionSidebarPanesContainer?: UI.View.ViewLocation;\n sidebarPaneView?: UI.Widget.VBox|UI.SplitWidget.SplitWidget;\n constructor() {\n super('sources');\n\n new UI.DropTarget.DropTarget(\n this.element, [UI.DropTarget.Type.Folder], i18nString(UIStrings.dropWorkspaceFolderHere),\n this.handleDrop.bind(this));\n\n this.workspace = Workspace.Workspace.WorkspaceImpl.instance();\n this.togglePauseAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.toggle-pause');\n this.stepOverAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-over');\n this.stepIntoAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-into');\n this.stepOutAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-out');\n this.stepAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step');\n this.toggleBreakpointsActiveAction =\n UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.toggle-breakpoints-active');\n\n this.debugToolbar = this.createDebugToolbar();\n this.debugToolbarDrawer = this.createDebugToolbarDrawer();\n this.debuggerPausedMessage = new DebuggerPausedMessage();\n\n const initialDebugSidebarWidth = 225;\n this.splitWidget =\n new UI.SplitWidget.SplitWidget(true, true, 'sourcesPanelSplitViewState', initialDebugSidebarWidth);\n this.splitWidget.enableShowModeSaving();\n this.splitWidget.show(this.element);\n\n // Create scripts navigator\n const initialNavigatorWidth = 225;\n this.editorView =\n new UI.SplitWidget.SplitWidget(true, false, 'sourcesPanelNavigatorSplitViewState', initialNavigatorWidth);\n this.editorView.enableShowModeSaving();\n this.splitWidget.setMainWidget(this.editorView);\n\n // Create navigator tabbed pane with toolbar.\n this.navigatorTabbedLocation = UI.ViewManager.ViewManager.instance().createTabbedLocation(\n this.revealNavigatorSidebar.bind(this), 'navigator-view', true, true);\n const tabbedPane = this.navigatorTabbedLocation.tabbedPane();\n tabbedPane.setMinimumSize(100, 25);\n tabbedPane.element.classList.add('navigator-tabbed-pane');\n const navigatorMenuButton = new UI.Toolbar.ToolbarMenuButton(this.populateNavigatorMenu.bind(this), true);\n navigatorMenuButton.setTitle(i18nString(UIStrings.moreOptions));\n tabbedPane.rightToolbar().appendToolbarItem(navigatorMenuButton);\n tabbedPane.addEventListener(\n UI.TabbedPane.Events.TabSelected,\n ({data: {tabId}}: Common.EventTarget.EventTargetEvent): void =>\n Host.userMetrics.sourcesSidebarTabShown(tabId));\n\n if (UI.ViewManager.ViewManager.instance().hasViewsForLocation('run-view-sidebar')) {\n const navigatorSplitWidget =\n new UI.SplitWidget.SplitWidget(false, true, 'sourcePanelNavigatorSidebarSplitViewState');\n navigatorSplitWidget.setMainWidget(tabbedPane);\n const runViewTabbedPane = UI.ViewManager.ViewManager.instance()\n .createTabbedLocation(this.revealNavigatorSidebar.bind(this), 'run-view-sidebar')\n .tabbedPane();\n navigatorSplitWidget.setSidebarWidget(runViewTabbedPane);\n navigatorSplitWidget.installResizer(runViewTabbedPane.headerElement());\n this.editorView.setSidebarWidget(navigatorSplitWidget);\n } else {\n this.editorView.setSidebarWidget(tabbedPane);\n }\n\n this.sourcesViewInternal = new SourcesView();\n this.sourcesViewInternal.addEventListener(Events.EditorSelected, this.editorSelected.bind(this));\n\n this.toggleNavigatorSidebarButton = this.editorView.createShowHideSidebarButton(\n i18nString(UIStrings.showNavigator), i18nString(UIStrings.hideNavigator), i18nString(UIStrings.navigatorShown),\n i18nString(UIStrings.navigatorHidden));\n this.toggleDebuggerSidebarButton = this.splitWidget.createShowHideSidebarButton(\n i18nString(UIStrings.showDebugger), i18nString(UIStrings.hideDebugger), i18nString(UIStrings.debuggerShown),\n i18nString(UIStrings.debuggerHidden));\n this.editorView.setMainWidget(this.sourcesViewInternal);\n\n this.threadsSidebarPane = null;\n this.watchSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.watch');\n this.callstackPane = CallStackSidebarPane.instance();\n\n Common.Settings.Settings.instance()\n .moduleSetting('sidebarPosition')\n .addChangeListener(this.updateSidebarPosition.bind(this));\n this.updateSidebarPosition();\n\n void this.updateDebuggerButtonsAndStatus();\n\n this.liveLocationPool = new Bindings.LiveLocation.LiveLocationPool();\n\n this.setTarget(UI.Context.Context.instance().flavor(SDK.Target.Target));\n Common.Settings.Settings.instance()\n .moduleSetting('breakpointsActive')\n .addChangeListener(this.breakpointsActiveStateChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this.onCurrentTargetChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerWasEnabled, this.debuggerWasEnabled, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerPaused, this.debuggerPaused, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebugInfoAttached, this.debugInfoAttached, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerResumed,\n event => this.debuggerResumed(event.data));\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared,\n event => this.debuggerResumed(event.data));\n Extensions.ExtensionServer.ExtensionServer.instance().addEventListener(\n Extensions.ExtensionServer.Events.SidebarPaneAdded, this.extensionSidebarPaneAdded, this);\n SDK.TargetManager.TargetManager.instance().observeTargets(this);\n this.lastModificationTime = -Infinity;\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n }|undefined = {forceNew: null}): SourcesPanel {\n const {forceNew} = opts;\n if (!sourcesPanelInstance || forceNew) {\n sourcesPanelInstance = new SourcesPanel();\n }\n\n return sourcesPanelInstance;\n }\n\n static updateResizerAndSidebarButtons(panel: SourcesPanel): void {\n panel.sourcesViewInternal.leftToolbar().removeToolbarItems();\n panel.sourcesViewInternal.rightToolbar().removeToolbarItems();\n panel.sourcesViewInternal.bottomToolbar().removeToolbarItems();\n const isInWrapper = WrapperView.isShowing() && !UI.InspectorView.InspectorView.instance().isDrawerMinimized();\n if (panel.splitWidget.isVertical() || isInWrapper) {\n panel.splitWidget.uninstallResizer(panel.sourcesViewInternal.toolbarContainerElement());\n } else {\n panel.splitWidget.installResizer(panel.sourcesViewInternal.toolbarContainerElement());\n }\n if (!isInWrapper) {\n panel.sourcesViewInternal.leftToolbar().appendToolbarItem(panel.toggleNavigatorSidebarButton);\n if (panel.splitWidget.isVertical()) {\n panel.sourcesViewInternal.rightToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton);\n } else {\n panel.sourcesViewInternal.bottomToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton);\n }\n }\n }\n\n targetAdded(_target: SDK.Target.Target): void {\n this.showThreadsIfNeeded();\n }\n\n targetRemoved(_target: SDK.Target.Target): void {\n }\n\n private showThreadsIfNeeded(): void {\n if (ThreadsSidebarPane.shouldBeShown() && !this.threadsSidebarPane) {\n this.threadsSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.threads');\n if (this.sidebarPaneStack && this.threadsSidebarPane) {\n this.sidebarPaneStack.appendView(\n this.threadsSidebarPane, this.splitWidget.isVertical() ? this.watchSidebarPane : this.callstackPane);\n }\n }\n }\n\n private setTarget(target: SDK.Target.Target|null): void {\n if (!target) {\n return;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return;\n }\n\n if (debuggerModel.isPaused()) {\n this.showDebuggerPausedDetails(\n (debuggerModel.debuggerPausedDetails() as SDK.DebuggerModel.DebuggerPausedDetails));\n } else {\n this.pausedInternal = false;\n this.clearInterface();\n this.toggleDebuggerSidebarButton.setEnabled(true);\n }\n }\n\n private onCurrentTargetChanged({data: target}: Common.EventTarget.EventTargetEvent): void {\n this.setTarget(target);\n }\n paused(): boolean {\n return this.pausedInternal || false;\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(SourcesPanel, this);\n this.registerCSSFiles([sourcesPanelStyles]);\n super.wasShown();\n const wrapper = WrapperView.instance();\n if (wrapper && wrapper.isShowing()) {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(true);\n SourcesPanel.updateResizerAndSidebarButtons(this);\n }\n this.editorView.setMainWidget(this.sourcesViewInternal);\n }\n\n override willHide(): void {\n super.willHide();\n UI.Context.Context.instance().setFlavor(SourcesPanel, null);\n if (WrapperView.isShowing()) {\n WrapperView.instance().showViewInWrapper();\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(false);\n SourcesPanel.updateResizerAndSidebarButtons(this);\n }\n }\n\n resolveLocation(locationName: string): UI.View.ViewLocation|null {\n if (locationName === 'sources.sidebar-top' || locationName === 'sources.sidebar-bottom' ||\n locationName === 'sources.sidebar-tabs') {\n return this.sidebarPaneStack || null;\n }\n return this.navigatorTabbedLocation;\n }\n\n ensureSourcesViewVisible(): boolean {\n if (WrapperView.isShowing()) {\n return true;\n }\n if (!UI.InspectorView.InspectorView.instance().canSelectPanel('sources')) {\n return false;\n }\n void UI.ViewManager.ViewManager.instance().showView('sources');\n return true;\n }\n\n override onResize(): void {\n if (Common.Settings.Settings.instance().moduleSetting('sidebarPosition').get() === 'auto') {\n this.element.window().requestAnimationFrame(this.updateSidebarPosition.bind(this));\n } // Do not force layout.\n }\n\n override searchableView(): UI.SearchableView.SearchableView {\n return this.sourcesViewInternal.searchableView();\n }\n\n toggleNavigatorSidebar(): void {\n this.editorView.toggleSidebar();\n }\n\n toggleDebuggerSidebar(): void {\n this.splitWidget.toggleSidebar();\n }\n\n private debuggerPaused(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n const details = debuggerModel.debuggerPausedDetails();\n if (!this.pausedInternal &&\n Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {\n void this.setAsCurrentPanel();\n }\n\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target()) {\n this.showDebuggerPausedDetails((details as SDK.DebuggerModel.DebuggerPausedDetails));\n } else if (!this.pausedInternal) {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n }\n }\n\n private debugInfoAttached(event: Common.EventTarget.EventTargetEvent): void {\n const {debuggerModel} = event.data;\n if (!debuggerModel.isPaused()) {\n return;\n }\n\n const details = debuggerModel.debuggerPausedDetails();\n if (details && UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target()) {\n this.showDebuggerPausedDetails(details);\n }\n }\n\n private showDebuggerPausedDetails(details: SDK.DebuggerModel.DebuggerPausedDetails): void {\n this.pausedInternal = true;\n void this.updateDebuggerButtonsAndStatus();\n UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.DebuggerPausedDetails, details);\n this.toggleDebuggerSidebarButton.setEnabled(false);\n this.revealDebuggerSidebar();\n window.focus();\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n }\n\n private debuggerResumed(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n const target = debuggerModel.target();\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) !== target) {\n return;\n }\n this.pausedInternal = false;\n this.clearInterface();\n this.toggleDebuggerSidebarButton.setEnabled(true);\n this.switchToPausedTargetTimeout = window.setTimeout(this.switchToPausedTarget.bind(this, debuggerModel), 500);\n }\n\n private debuggerWasEnabled(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) !== debuggerModel.target()) {\n return;\n }\n\n void this.updateDebuggerButtonsAndStatus();\n }\n\n get visibleView(): UI.Widget.Widget|null {\n return this.sourcesViewInternal.visibleView();\n }\n\n showUISourceCode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, location?: SourceFrame.SourceFrame.RevealPosition,\n omitFocus?: boolean): void {\n if (omitFocus) {\n const wrapperShowing = WrapperView.isShowing();\n if (!this.isShowing() && !wrapperShowing) {\n return;\n }\n } else {\n this.showEditor();\n }\n this.sourcesViewInternal.showSourceLocation(uiSourceCode, location, omitFocus);\n }\n\n private showEditor(): void {\n if (WrapperView.isShowing()) {\n return;\n }\n void this.setAsCurrentPanel();\n }\n\n showUILocation(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): void {\n const {uiSourceCode, lineNumber, columnNumber} = uiLocation;\n this.showUISourceCode(uiSourceCode, {lineNumber, columnNumber}, omitFocus);\n }\n\n revealInNavigator(uiSourceCode: Workspace.UISourceCode.UISourceCode, skipReveal?: boolean): void {\n for (const navigator of registeredNavigatorViews) {\n const navigatorView = navigator.navigatorView();\n const viewId = navigator.viewId;\n if (viewId && navigatorView.acceptProject(uiSourceCode.project())) {\n navigatorView.revealUISourceCode(uiSourceCode, true);\n if (skipReveal) {\n this.navigatorTabbedLocation.tabbedPane().selectTab(viewId);\n } else {\n void UI.ViewManager.ViewManager.instance().showView(viewId);\n }\n }\n }\n }\n\n private addExperimentMenuItem(\n menuSection: UI.ContextMenu.Section, experiment: string, menuItem: Common.UIString.LocalizedString): void {\n // menu handler\n function toggleExperiment(): void {\n const checked = Root.Runtime.experiments.isEnabled(experiment);\n Root.Runtime.experiments.setEnabled(experiment, !checked);\n Host.userMetrics.experimentChanged(experiment, checked);\n // Need to signal to the NavigatorView that grouping has changed. Unfortunately,\n // it can't listen to an experiment, and this class doesn't directly interact\n // with it, so we will convince it a different grouping setting changed. When we switch\n // from using an experiment to a setting, it will listen to that setting and we\n // won't need to do this.\n const groupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigatorGroupByFolder');\n groupByFolderSetting.set(groupByFolderSetting.get());\n }\n\n const previewIcon = new IconButton.Icon.Icon();\n previewIcon.data = {\n iconName: 'experiment',\n color: 'var(--icon-default)',\n width: '16px',\n };\n // collapses to 0 width, wrong height otherwise, throwing off alignment and size calculation.\n previewIcon.style.minHeight = '16px';\n previewIcon.style.minWidth = '16px';\n menuSection.appendCheckboxItem(\n menuItem, toggleExperiment, Root.Runtime.experiments.isEnabled(experiment), false, previewIcon);\n }\n\n private populateNavigatorMenu(contextMenu: UI.ContextMenu.ContextMenu): void {\n const groupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigatorGroupByFolder');\n contextMenu.appendItemsAtLocation('navigatorMenu');\n contextMenu.viewSection().appendCheckboxItem(\n i18nString(UIStrings.groupByFolder), () => groupByFolderSetting.set(!groupByFolderSetting.get()),\n groupByFolderSetting.get());\n\n this.addExperimentMenuItem(\n contextMenu.viewSection(), Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,\n i18nString(UIStrings.groupByAuthored));\n this.addExperimentMenuItem(\n contextMenu.viewSection(), Root.Runtime.ExperimentName.JUST_MY_CODE, i18nString(UIStrings.hideIgnoreListed));\n }\n\n setIgnoreExecutionLineEvents(ignoreExecutionLineEvents: boolean): void {\n this.ignoreExecutionLineEvents = ignoreExecutionLineEvents;\n }\n\n updateLastModificationTime(): void {\n this.lastModificationTime = window.performance.now();\n }\n\n private async executionLineChanged(liveLocation: Bindings.LiveLocation.LiveLocation): Promise {\n const uiLocation = await liveLocation.uiLocation();\n if (liveLocation.isDisposed()) {\n return;\n }\n if (!uiLocation) {\n return;\n }\n if (window.performance.now() - this.lastModificationTime < lastModificationTimeout) {\n return;\n }\n this.sourcesViewInternal.showSourceLocation(uiLocation.uiSourceCode, uiLocation, undefined, true);\n }\n\n private lastModificationTimeoutPassedForTest(): void {\n lastModificationTimeout = Number.MIN_VALUE;\n }\n\n private updateLastModificationTimeForTest(): void {\n lastModificationTimeout = Number.MAX_VALUE;\n }\n\n private async callFrameChanged(): Promise {\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n return;\n }\n if (this.executionLineLocation) {\n this.executionLineLocation.dispose();\n }\n this.executionLineLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createCallFrameLiveLocation(\n callFrame.location(), this.executionLineChanged.bind(this), this.liveLocationPool);\n }\n\n private async updateDebuggerButtonsAndStatus(): Promise {\n const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const currentDebuggerModel = currentTarget ? currentTarget.model(SDK.DebuggerModel.DebuggerModel) : null;\n if (!currentDebuggerModel) {\n this.togglePauseAction.setEnabled(false);\n this.stepOverAction.setEnabled(false);\n this.stepIntoAction.setEnabled(false);\n this.stepOutAction.setEnabled(false);\n this.stepAction.setEnabled(false);\n } else if (this.pausedInternal) {\n this.togglePauseAction.setToggled(true);\n this.togglePauseAction.setEnabled(true);\n this.stepOverAction.setEnabled(true);\n this.stepIntoAction.setEnabled(true);\n this.stepOutAction.setEnabled(true);\n this.stepAction.setEnabled(true);\n } else {\n this.togglePauseAction.setToggled(false);\n this.togglePauseAction.setEnabled(!currentDebuggerModel.isPausing());\n this.stepOverAction.setEnabled(false);\n this.stepIntoAction.setEnabled(false);\n this.stepOutAction.setEnabled(false);\n this.stepAction.setEnabled(false);\n }\n\n const details = currentDebuggerModel ? currentDebuggerModel.debuggerPausedDetails() : null;\n await this.debuggerPausedMessage.render(\n details, Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),\n Breakpoints.BreakpointManager.BreakpointManager.instance());\n if (details) {\n this.updateDebuggerButtonsAndStatusForTest();\n }\n }\n\n private updateDebuggerButtonsAndStatusForTest(): void {\n }\n\n private clearInterface(): void {\n void this.updateDebuggerButtonsAndStatus();\n UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.DebuggerPausedDetails, null);\n\n if (this.switchToPausedTargetTimeout) {\n clearTimeout(this.switchToPausedTargetTimeout);\n }\n this.liveLocationPool.disposeAll();\n }\n\n private switchToPausedTarget(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n delete this.switchToPausedTargetTimeout;\n if (this.pausedInternal || debuggerModel.isPaused()) {\n return;\n }\n\n for (const debuggerModel of SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)) {\n if (debuggerModel.isPaused()) {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n break;\n }\n }\n }\n\n runSnippet(): void {\n const uiSourceCode = this.sourcesViewInternal.currentUISourceCode();\n if (uiSourceCode) {\n void Snippets.ScriptSnippetFileSystem.evaluateScriptSnippet(uiSourceCode);\n }\n }\n\n private editorSelected(event: Common.EventTarget.EventTargetEvent): void {\n const uiSourceCode = event.data;\n if (this.editorView.mainWidget() &&\n Common.Settings.Settings.instance().moduleSetting('autoRevealInNavigator').get()) {\n this.revealInNavigator(uiSourceCode, true);\n }\n }\n\n togglePause(): boolean {\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n if (!target) {\n return true;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return true;\n }\n\n if (this.pausedInternal) {\n this.pausedInternal = false;\n debuggerModel.resume();\n } else {\n // Make sure pauses didn't stick skipped.\n debuggerModel.pause();\n }\n\n this.clearInterface();\n return true;\n }\n\n private prepareToResume(): SDK.DebuggerModel.DebuggerModel|null {\n if (!this.pausedInternal) {\n return null;\n }\n\n this.pausedInternal = false;\n\n this.clearInterface();\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n return target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n }\n\n private longResume(): void {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n debuggerModel.skipAllPausesUntilReloadOrTimeout(500);\n debuggerModel.resume();\n }\n }\n\n private terminateExecution(): void {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.runtimeModel().terminateExecution();\n debuggerModel.resume();\n }\n }\n\n stepOver(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepOver();\n }\n return true;\n }\n\n stepInto(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepInto();\n }\n return true;\n }\n\n stepIntoAsync(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n debuggerModel.scheduleStepIntoAsync();\n }\n return true;\n }\n\n stepOut(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepOut();\n }\n return true;\n }\n\n private async continueToLocation(uiLocation: Workspace.UISourceCode.UILocation): Promise {\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (!executionContext) {\n return;\n }\n // Always use 0 column.\n const rawLocations =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().uiLocationToRawLocations(\n uiLocation.uiSourceCode, uiLocation.lineNumber, 0);\n const rawLocation = rawLocations.find(location => location.debuggerModel === executionContext.debuggerModel);\n if (rawLocation && this.prepareToResume()) {\n rawLocation.continueToLocation();\n }\n }\n\n toggleBreakpointsActive(): void {\n Common.Settings.Settings.instance()\n .moduleSetting('breakpointsActive')\n .set(!Common.Settings.Settings.instance().moduleSetting('breakpointsActive').get());\n }\n\n private breakpointsActiveStateChanged(): void {\n const active = Common.Settings.Settings.instance().moduleSetting('breakpointsActive').get();\n this.toggleBreakpointsActiveAction.setToggled(!active);\n this.sourcesViewInternal.toggleBreakpointsActiveState(active);\n }\n\n private createDebugToolbar(): UI.Toolbar.Toolbar {\n const debugToolbar = new UI.Toolbar.Toolbar('scripts-debug-toolbar');\n\n const longResumeButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.resumeWithAllPausesBlockedForMs), 'play');\n longResumeButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.longResume, this);\n const terminateExecutionButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.terminateCurrentJavascriptCall), 'stop');\n terminateExecutionButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.terminateExecution, this);\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createLongPressActionButton(\n this.togglePauseAction, [terminateExecutionButton, longResumeButton], []));\n\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepOverAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepIntoAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepOutAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepAction));\n\n debugToolbar.appendSeparator();\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleBreakpointsActiveAction));\n\n return debugToolbar;\n }\n\n private createDebugToolbarDrawer(): HTMLDivElement {\n const debugToolbarDrawer = document.createElement('div');\n debugToolbarDrawer.classList.add('scripts-debug-toolbar-drawer');\n\n const label = i18nString(UIStrings.pauseOnCaughtExceptions);\n const setting = Common.Settings.Settings.instance().moduleSetting('pauseOnCaughtException');\n debugToolbarDrawer.appendChild(UI.SettingsUI.createSettingCheckbox(label, setting, true));\n\n return debugToolbarDrawer;\n }\n\n appendApplicableItems(\n event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: Workspace.UISourceCode.UISourceCode|Workspace.UISourceCode.UILocation|SDK.RemoteObject.RemoteObject|\n SDK.NetworkRequest.NetworkRequest|UISourceCodeFrame): void {\n if (target instanceof Workspace.UISourceCode.UISourceCode) {\n this.appendUISourceCodeItems(event, contextMenu, target);\n return;\n }\n if (target instanceof UISourceCodeFrame) {\n this.appendUISourceCodeFrameItems(contextMenu, target);\n return;\n }\n if (target instanceof Workspace.UISourceCode.UILocation) {\n this.appendUILocationItems(contextMenu, target);\n return;\n }\n if (target instanceof SDK.RemoteObject.RemoteObject) {\n this.appendRemoteObjectItems(contextMenu, target);\n return;\n }\n this.appendNetworkRequestItems(contextMenu, target);\n }\n\n private appendUISourceCodeItems(\n event: Event, contextMenu: UI.ContextMenu.ContextMenu, uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n if (!event.target) {\n return;\n }\n\n const eventTarget = (event.target as Node);\n if (!uiSourceCode.project().isServiceProject() &&\n !eventTarget.isSelfOrDescendant(this.navigatorTabbedLocation.widget().element) &&\n !(Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE) &&\n Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n uiSourceCode))) {\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.revealInSidebar), this.handleContextMenuReveal.bind(this, uiSourceCode));\n }\n // Ignore list only works for JavaScript debugging.\n if (uiSourceCode.contentType().hasScripts() &&\n Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .scriptsForUISourceCode(uiSourceCode)\n .every(script => script.isJavaScript())) {\n this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode);\n }\n }\n\n private appendUISourceCodeFrameItems(contextMenu: UI.ContextMenu.ContextMenu, target: UISourceCodeFrame): void {\n if (target.uiSourceCode().contentType().isFromSourceMap() || target.textEditor.state.selection.main.empty) {\n return;\n }\n contextMenu.debugSection().appendAction('debugger.evaluate-selection');\n }\n\n appendUILocationItems(contextMenu: UI.ContextMenu.ContextMenu, uiLocation: Workspace.UISourceCode.UILocation): void {\n const uiSourceCode = uiLocation.uiSourceCode;\n\n if (!Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .scriptsForUISourceCode(uiSourceCode)\n .every(script => script.isJavaScript())) {\n // Ignore List and 'Continue to here' currently only works for JavaScript debugging.\n return;\n }\n const contentType = uiSourceCode.contentType();\n if (contentType.hasScripts()) {\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n if (debuggerModel && debuggerModel.isPaused()) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.continueToHere), this.continueToLocation.bind(this, uiLocation));\n }\n\n this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode);\n }\n }\n\n private handleContextMenuReveal(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n this.editorView.showBoth();\n this.revealInNavigator(uiSourceCode);\n }\n\n private appendRemoteObjectItems(contextMenu: UI.ContextMenu.ContextMenu, remoteObject: SDK.RemoteObject.RemoteObject):\n void {\n const indent = Common.Settings.Settings.instance().moduleSetting('textEditorIndent').get();\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n\n function getObjectTitle(): string|undefined {\n if (remoteObject.type === 'wasm') {\n return remoteObject.subtype;\n }\n if (remoteObject.subtype === 'node') {\n return 'outerHTML';\n }\n return remoteObject.type;\n }\n const copyContextMenuTitle = getObjectTitle();\n\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.storeAsGlobalVariable),\n () => executionContext?.target()\n .model(SDK.ConsoleModel.ConsoleModel)\n ?.saveToTempVariable(executionContext, remoteObject));\n\n const ctxMenuClipboardSection = contextMenu.clipboardSection();\n const inspectorFrontendHost = Host.InspectorFrontendHost.InspectorFrontendHostInstance;\n\n if (remoteObject.type === 'string') {\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringContents), () => {\n inspectorFrontendHost.copyText(remoteObject.value);\n });\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringAsJSLiteral), () => {\n inspectorFrontendHost.copyText(Platform.StringUtilities.formatAsJSLiteral(remoteObject.value));\n });\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringAsJSONLiteral), () => {\n inspectorFrontendHost.copyText(JSON.stringify(remoteObject.value));\n });\n }\n // We are trying to copy a primitive value.\n else if (primitiveRemoteObjectTypes.has(remoteObject.type)) {\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyS, {PH1: String(copyContextMenuTitle)}), () => {\n inspectorFrontendHost.copyText(remoteObject.description);\n });\n }\n // We are trying to copy a remote object.\n else if (remoteObject.type === 'object') {\n const copyDecodedValueHandler = async(): Promise => {\n const result = await remoteObject.callFunctionJSON(toStringForClipboard, [{\n value: {\n subtype: remoteObject.subtype,\n indent: indent,\n },\n }]);\n inspectorFrontendHost.copyText(result);\n };\n\n ctxMenuClipboardSection.appendItem(\n i18nString(UIStrings.copyS, {PH1: String(copyContextMenuTitle)}), copyDecodedValueHandler);\n }\n\n else if (remoteObject.type === 'function') {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.showFunctionDefinition), this.showFunctionDefinition.bind(this, remoteObject));\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function toStringForClipboard(this: Object, data: any): string|undefined {\n const subtype = data.subtype;\n const indent = data.indent;\n\n if (subtype === 'map') {\n if (this instanceof Map) {\n const elements = Array.from(this.entries());\n const literal = elements.length === 0 ? '' : JSON.stringify(elements, null, indent);\n return `new Map(${literal})`;\n }\n return undefined;\n }\n if (subtype === 'set') {\n if (this instanceof Set) {\n const values = Array.from(this.values());\n const literal = values.length === 0 ? '' : JSON.stringify(values, null, indent);\n return `new Set(${literal})`;\n }\n return undefined;\n }\n if (subtype === 'node') {\n return this instanceof Element ? this.outerHTML : undefined;\n }\n if (subtype && typeof this === 'undefined') {\n return String(subtype);\n }\n try {\n return JSON.stringify(this, null, indent);\n } catch (error) {\n return String(this);\n }\n }\n }\n\n private appendNetworkRequestItems(\n contextMenu: UI.ContextMenu.ContextMenu, request: SDK.NetworkRequest.NetworkRequest): void {\n const uiSourceCode = this.workspace.uiSourceCodeForURL(request.url());\n if (!uiSourceCode) {\n return;\n }\n const openText = i18nString(UIStrings.openInSourcesPanel);\n const callback: () => void = this.showUILocation.bind(this, uiSourceCode.uiLocation(0, 0));\n contextMenu.revealSection().appendItem(openText, callback);\n }\n\n private showFunctionDefinition(remoteObject: SDK.RemoteObject.RemoteObject): void {\n void SDK.RemoteObject.RemoteFunction.objectAsFunction(remoteObject)\n .targetFunction()\n .then(\n targetFunction => targetFunction.debuggerModel()\n .functionDetailsPromise(targetFunction)\n .then(this.didGetFunctionDetails.bind(this)));\n }\n\n private async didGetFunctionDetails(response: {\n location: SDK.DebuggerModel.Location|null,\n }|null): Promise {\n if (!response || !response.location) {\n return;\n }\n\n const uiLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n response.location);\n if (uiLocation) {\n this.showUILocation(uiLocation);\n }\n }\n\n private revealNavigatorSidebar(): void {\n void this.setAsCurrentPanel();\n this.editorView.showBoth(true);\n }\n\n private revealDebuggerSidebar(): void {\n if (!Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {\n return;\n }\n void this.setAsCurrentPanel();\n this.splitWidget.showBoth(true);\n }\n\n private updateSidebarPosition(): void {\n let vertically;\n const position = Common.Settings.Settings.instance().moduleSetting('sidebarPosition').get();\n if (position === 'right') {\n vertically = false;\n } else if (position === 'bottom') {\n vertically = true;\n } else {\n vertically = UI.InspectorView.InspectorView.instance().element.offsetWidth < 680;\n }\n\n if (this.sidebarPaneView && vertically === !this.splitWidget.isVertical()) {\n return;\n }\n\n if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach()) {\n return;\n } // We can't reparent extension iframes.\n\n if (this.sidebarPaneView) {\n this.sidebarPaneView.detach();\n }\n\n this.splitWidget.setVertical(!vertically);\n this.splitWidget.element.classList.toggle('sources-split-view-vertical', vertically);\n\n SourcesPanel.updateResizerAndSidebarButtons(this);\n\n // Create vertical box with stack.\n const vbox = new UI.Widget.VBox();\n vbox.element.appendChild(this.debugToolbar.element);\n vbox.element.appendChild(this.debugToolbarDrawer);\n\n vbox.setMinimumAndPreferredSizes(minToolbarWidth, 25, minToolbarWidth, 100);\n this.sidebarPaneStack =\n UI.ViewManager.ViewManager.instance().createStackLocation(this.revealDebuggerSidebar.bind(this));\n this.sidebarPaneStack.widget().element.classList.add('overflow-auto');\n this.sidebarPaneStack.widget().show(vbox.element);\n this.sidebarPaneStack.widget().element.appendChild(this.debuggerPausedMessage.element());\n this.sidebarPaneStack.appendApplicableItems('sources.sidebar-top');\n\n if (this.threadsSidebarPane) {\n this.sidebarPaneStack.appendView(this.threadsSidebarPane);\n }\n\n const jsBreakpoints = UI.ViewManager.ViewManager.instance().view('sources.jsBreakpoints');\n const scopeChainView = UI.ViewManager.ViewManager.instance().view('sources.scopeChain');\n\n if (this.tabbedLocationHeader) {\n this.splitWidget.uninstallResizer(this.tabbedLocationHeader);\n this.tabbedLocationHeader = null;\n }\n\n if (!vertically) {\n // Populate the rest of the stack.\n this.sidebarPaneStack.appendView(this.watchSidebarPane);\n void this.sidebarPaneStack.showView(jsBreakpoints);\n void this.sidebarPaneStack.showView(scopeChainView);\n void this.sidebarPaneStack.showView(this.callstackPane);\n this.extensionSidebarPanesContainer = this.sidebarPaneStack;\n this.sidebarPaneView = vbox;\n this.splitWidget.uninstallResizer(this.debugToolbar.gripElementForResize());\n } else {\n const splitWidget = new UI.SplitWidget.SplitWidget(true, true, 'sourcesPanelDebuggerSidebarSplitViewState', 0.5);\n splitWidget.setMainWidget(vbox);\n\n // Populate the left stack.\n void this.sidebarPaneStack.showView(jsBreakpoints);\n void this.sidebarPaneStack.showView(this.callstackPane);\n\n const tabbedLocation =\n UI.ViewManager.ViewManager.instance().createTabbedLocation(this.revealDebuggerSidebar.bind(this));\n splitWidget.setSidebarWidget(tabbedLocation.tabbedPane());\n this.tabbedLocationHeader = tabbedLocation.tabbedPane().headerElement();\n this.splitWidget.installResizer(this.tabbedLocationHeader);\n this.splitWidget.installResizer(this.debugToolbar.gripElementForResize());\n tabbedLocation.appendView(scopeChainView);\n tabbedLocation.appendView(this.watchSidebarPane);\n tabbedLocation.appendApplicableItems('sources.sidebar-tabs');\n this.extensionSidebarPanesContainer = tabbedLocation;\n this.sidebarPaneView = splitWidget;\n }\n\n this.sidebarPaneStack.appendApplicableItems('sources.sidebar-bottom');\n const extensionSidebarPanes = Extensions.ExtensionServer.ExtensionServer.instance().sidebarPanes();\n for (let i = 0; i < extensionSidebarPanes.length; ++i) {\n this.addExtensionSidebarPane(extensionSidebarPanes[i]);\n }\n\n this.splitWidget.setSidebarWidget(this.sidebarPaneView);\n }\n\n setAsCurrentPanel(): Promise {\n return UI.ViewManager.ViewManager.instance().showView('sources');\n }\n\n private extensionSidebarPaneAdded(\n event: Common.EventTarget.EventTargetEvent): void {\n this.addExtensionSidebarPane(event.data);\n }\n\n private addExtensionSidebarPane(pane: Extensions.ExtensionPanel.ExtensionSidebarPane): void {\n if (pane.panelName() === this.name) {\n (this.extensionSidebarPanesContainer as UI.View.ViewLocation).appendView(pane);\n }\n }\n\n sourcesView(): SourcesView {\n return this.sourcesViewInternal;\n }\n\n private handleDrop(dataTransfer: DataTransfer): void {\n const items = dataTransfer.items;\n if (!items.length) {\n return;\n }\n const entry = items[0].webkitGetAsEntry();\n if (entry && entry.isDirectory) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.upgradeDraggedFileSystemPermissions(entry.filesystem);\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.WorkspaceDropFolder);\n void UI.ViewManager.ViewManager.instance().showView('navigator-files');\n }\n }\n}\n\nexport let lastModificationTimeout = 200;\nexport const minToolbarWidth = 215;\n\nexport class UILocationRevealer implements Common.Revealer.Revealer {\n async reveal(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): Promise {\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n }\n}\n\nexport class UILocationRangeRevealer implements Common.Revealer.Revealer {\n static #instance?: UILocationRangeRevealer;\n static instance(opts: {forceNew: boolean} = {forceNew: false}): UILocationRangeRevealer {\n if (!UILocationRangeRevealer.#instance || opts.forceNew) {\n UILocationRangeRevealer.#instance = new UILocationRangeRevealer();\n }\n return UILocationRangeRevealer.#instance;\n }\n\n async reveal(uiLocationRange: Workspace.UISourceCode.UILocationRange, omitFocus?: boolean): Promise {\n const {uiSourceCode, range: {start: from, end: to}} = uiLocationRange;\n SourcesPanel.instance().showUISourceCode(uiSourceCode, {from, to}, omitFocus);\n }\n}\n\nexport class DebuggerLocationRevealer implements Common.Revealer.Revealer {\n async reveal(rawLocation: SDK.DebuggerModel.Location, omitFocus?: boolean): Promise {\n const uiLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n rawLocation);\n if (uiLocation) {\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n }\n }\n}\n\nexport class UISourceCodeRevealer implements Common.Revealer.Revealer {\n async reveal(uiSourceCode: Workspace.UISourceCode.UISourceCode, omitFocus?: boolean): Promise {\n SourcesPanel.instance().showUISourceCode(uiSourceCode, undefined, omitFocus);\n }\n}\n\nexport class DebuggerPausedDetailsRevealer implements\n Common.Revealer.Revealer {\n async reveal(_object: SDK.DebuggerModel.DebuggerPausedDetails): Promise {\n if (Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {\n return SourcesPanel.instance().setAsCurrentPanel();\n }\n }\n}\n\nexport class RevealingActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = SourcesPanel.instance();\n if (!panel.ensureSourcesViewVisible()) {\n return false;\n }\n switch (actionId) {\n case 'debugger.toggle-pause': {\n // This action can be triggered both on the DevTools front-end itself,\n // or on the inspected target. If triggered on the DevTools front-end,\n // it will take care of resuming.\n //\n // If triggered on the target, NOT in hosted mode:\n // * ..and the paused overlay is enabled:\n // => do not take any action here, as the paused overlay will resume\n // * ..and the paused overlay is disabled:\n // => take care of the resume here\n // If triggered on the target in hosted mode:\n // * ..and the paused overlay is enabled:\n // => execution will not reach here, as shortcuts are not forwarded\n // and the paused overlay will resume\n // * ..and the paused overlay is disabled:\n // => overlay will not take care of resume, and neither will\n // DevTools as no shortcuts are forwarded from the target\n\n // Do not trigger a resume action, if: the shortcut was forwarded and the\n // paused overlay is enabled.\n const actionHandledInPausedOverlay = context.flavor(UI.ShortcutRegistry.ForwardedShortcut) &&\n !Common.Settings.Settings.instance().moduleSetting('disablePausedStateOverlay').get();\n if (actionHandledInPausedOverlay) {\n // Taken care of by inspector overlay: handled set to true to\n // register user metric.\n return true;\n }\n panel.togglePause();\n return true;\n }\n }\n return false;\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = SourcesPanel.instance();\n switch (actionId) {\n case 'debugger.step-over': {\n panel.stepOver();\n return true;\n }\n case 'debugger.step-into': {\n panel.stepIntoAsync();\n return true;\n }\n case 'debugger.step': {\n panel.stepInto();\n return true;\n }\n case 'debugger.step-out': {\n panel.stepOut();\n return true;\n }\n case 'debugger.run-snippet': {\n panel.runSnippet();\n return true;\n }\n case 'debugger.toggle-breakpoints-active': {\n panel.toggleBreakpointsActive();\n return true;\n }\n case 'debugger.evaluate-selection': {\n const frame = context.flavor(UISourceCodeFrame);\n if (frame) {\n const {state: editorState} = frame.textEditor;\n let text = editorState.sliceDoc(editorState.selection.main.from, editorState.selection.main.to);\n const executionContext = context.flavor(SDK.RuntimeModel.ExecutionContext);\n const consoleModel = executionContext?.target().model(SDK.ConsoleModel.ConsoleModel);\n if (executionContext && consoleModel) {\n const message = consoleModel.addCommandMessage(executionContext, text);\n text = ObjectUI.JavaScriptREPL.JavaScriptREPL.wrapObjectLiteral(text);\n void consoleModel.evaluateCommandInConsole(executionContext, message, text, /* useCommandLineAPI */ true);\n }\n }\n return true;\n }\n case 'sources.toggle-navigator-sidebar': {\n panel.toggleNavigatorSidebar();\n return true;\n }\n case 'sources.toggle-debugger-sidebar': {\n panel.toggleDebuggerSidebar();\n return true;\n }\n }\n return false;\n }\n}\n\nexport class WrapperView extends UI.Widget.VBox {\n private readonly view: SourcesView;\n constructor() {\n super();\n this.element.classList.add('sources-view-wrapper');\n this.view = SourcesPanel.instance().sourcesView();\n }\n\n static instance(): WrapperView {\n if (!wrapperViewInstance) {\n wrapperViewInstance = new WrapperView();\n }\n\n return wrapperViewInstance;\n }\n\n static isShowing(): boolean {\n return Boolean(wrapperViewInstance) && wrapperViewInstance.isShowing();\n }\n\n override wasShown(): void {\n if (!SourcesPanel.instance().isShowing()) {\n this.showViewInWrapper();\n } else {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(true);\n }\n SourcesPanel.updateResizerAndSidebarButtons(SourcesPanel.instance());\n }\n\n override willHide(): void {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(false);\n queueMicrotask(() => {\n SourcesPanel.updateResizerAndSidebarButtons(SourcesPanel.instance());\n });\n }\n\n showViewInWrapper(): void {\n this.view.show(this.element);\n }\n}\n\nconst registeredNavigatorViews: NavigatorViewRegistration[] = [\n {\n viewId: 'navigator-network',\n navigatorView: NetworkNavigatorView.instance,\n experiment: undefined,\n },\n {\n viewId: 'navigator-files',\n navigatorView: FilesNavigatorView.instance,\n experiment: undefined,\n },\n {\n viewId: 'navigator-snippets',\n navigatorView: SnippetsNavigatorView.instance,\n experiment: undefined,\n },\n {\n viewId: 'navigator-overrides',\n navigatorView: OverridesNavigatorView.instance,\n experiment: undefined,\n },\n {\n viewId: 'navigator-contentScripts',\n navigatorView: ContentScriptsNavigatorView.instance,\n experiment: undefined,\n },\n];\nexport interface NavigatorViewRegistration {\n navigatorView: () => NavigatorView;\n viewId: string;\n experiment?: string;\n}\n"]} \ No newline at end of file +{"version":3,"file":"SourcesPanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/SourcesPanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,O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AAc;IACnC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,QAAQ;QACb,IAAI,CAAC,mBAAmB,EAAE;YACxB,mBAAmB,GAAG,IAAI,WAAW,EAAE,CAAC;SACzC;QAED,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,SAAS;QACd,OAAO,OAAO,CAAC,mBAAmB,CAAC,IAAI,mBAAmB,CAAC,SAAS,EAAE,CAAC;IACzE,CAAC;IAEQ,QAAQ;QACf,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE;YACxC,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC1B;aAAM;YACL,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;SACpE;QACD,YAAY,CAAC,8BAA8B,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC;IAEQ,QAAQ;QACf,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpE,cAAc,CAAC,GAAG,EAAE;YAClB,YAAY,CAAC,8BAA8B,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Breakpoints from '../../models/breakpoints/breakpoints.js';\nimport * as Extensions from '../../models/extensions/extensions.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport {CallStackSidebarPane} from './CallStackSidebarPane.js';\nimport {DebuggerPausedMessage} from './DebuggerPausedMessage.js';\nimport {NavigatorView} from './NavigatorView.js';\nimport sourcesPanelStyles from './sourcesPanel.css.js';\nimport {Events, SourcesView} from './SourcesView.js';\nimport {ThreadsSidebarPane} from './ThreadsSidebarPane.js';\nimport {UISourceCodeFrame} from './UISourceCodeFrame.js';\n\nconst UIStrings = {\n /**\n *@description Text that appears when user drag and drop something (for example, a file) in Sources Panel of the Sources panel\n */\n dropWorkspaceFolderHere: 'Drop workspace folder here',\n /**\n *@description Text to show more options\n */\n moreOptions: 'More options',\n /**\n * @description Tooltip for the the navigator toggle in the Sources panel. Command to open/show the\n * sidebar containing the navigator tool.\n */\n showNavigator: 'Show navigator',\n /**\n * @description Tooltip for the the navigator toggle in the Sources panel. Command to close/hide\n * the sidebar containing the navigator tool.\n */\n hideNavigator: 'Hide navigator',\n /**\n * @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.\n */\n navigatorShown: 'Navigator sidebar shown',\n /**\n * @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.\n */\n navigatorHidden: 'Navigator sidebar hidden',\n /**\n * @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.\n */\n debuggerShown: 'Debugger sidebar shown',\n /**\n * @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.\n */\n debuggerHidden: 'Debugger sidebar hidden',\n /**\n * @description Tooltip for the the debugger toggle in the Sources panel. Command to open/show the\n * sidebar containing the debugger tool.\n */\n showDebugger: 'Show debugger',\n /**\n * @description Tooltip for the the debugger toggle in the Sources panel. Command to close/hide the\n * sidebar containing the debugger tool.\n */\n hideDebugger: 'Hide debugger',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n groupByFolder: 'Group by folder',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n groupByAuthored: 'Group by Authored/Deployed',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n hideIgnoreListed: 'Hide ignore-listed sources',\n /**\n *@description Tooltip text that appears when hovering over the largeicon play button in the Sources Panel of the Sources panel\n */\n resumeWithAllPausesBlockedForMs: 'Resume with all pauses blocked for 500 ms',\n /**\n *@description Tooltip text that appears when hovering over the largeicon terminate execution button in the Sources Panel of the Sources panel\n */\n terminateCurrentJavascriptCall: 'Terminate current JavaScript call',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n pauseOnCaughtExceptions: 'Pause on caught exceptions',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel\n */\n revealInSidebar: 'Reveal in navigator sidebar',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel when debugging JS code.\n * When clicked, the execution is resumed until it reaches the line specified by the right-click that\n * opened the context menu.\n */\n continueToHere: 'Continue to here',\n /**\n *@description A context menu item in the Console that stores selection as a temporary global variable\n */\n storeAsGlobalVariable: 'Store as global variable',\n /**\n *@description A context menu item in the Console, Sources, and Network panel\n *@example {string} PH1\n */\n copyS: 'Copy {PH1}',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the raw contents of the string is copied to the clipboard.\n */\n copyStringContents: 'Copy string contents',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the string is copied to the clipboard as a valid JavaScript literal.\n */\n copyStringAsJSLiteral: 'Copy string as JavaScript literal',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the string is copied to the clipboard as a valid JSON literal.\n */\n copyStringAsJSONLiteral: 'Copy string as JSON literal',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel\n */\n showFunctionDefinition: 'Show function definition',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n openInSourcesPanel: 'Open in Sources panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesPanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst primitiveRemoteObjectTypes = new Set(['number', 'boolean', 'bigint', 'undefined']);\nlet sourcesPanelInstance: SourcesPanel;\nlet wrapperViewInstance: WrapperView;\n\nexport class SourcesPanel extends UI.Panel.Panel implements\n UI.ContextMenu.Provider,\n SDK.TargetManager.Observer, UI.View.ViewLocationResolver {\n private readonly workspace: Workspace.Workspace.WorkspaceImpl;\n private readonly togglePauseAction: UI.ActionRegistration.Action;\n private readonly stepOverAction: UI.ActionRegistration.Action;\n private readonly stepIntoAction: UI.ActionRegistration.Action;\n private readonly stepOutAction: UI.ActionRegistration.Action;\n private readonly stepAction: UI.ActionRegistration.Action;\n private readonly toggleBreakpointsActiveAction: UI.ActionRegistration.Action;\n private readonly debugToolbar: UI.Toolbar.Toolbar;\n private readonly debugToolbarDrawer: HTMLDivElement;\n private readonly debuggerPausedMessage: DebuggerPausedMessage;\n private splitWidget: UI.SplitWidget.SplitWidget;\n editorView: UI.SplitWidget.SplitWidget;\n private navigatorTabbedLocation: UI.View.TabbedViewLocation;\n sourcesViewInternal: SourcesView;\n private readonly toggleNavigatorSidebarButton: UI.Toolbar.ToolbarButton;\n private readonly toggleDebuggerSidebarButton: UI.Toolbar.ToolbarButton;\n private threadsSidebarPane: UI.View.View|null;\n private readonly watchSidebarPane: UI.View.View;\n private readonly callstackPane: CallStackSidebarPane;\n private liveLocationPool: Bindings.LiveLocation.LiveLocationPool;\n private lastModificationTime: number;\n private pausedInternal?: boolean;\n private switchToPausedTargetTimeout?: number;\n private ignoreExecutionLineEvents?: boolean;\n private executionLineLocation?: Bindings.DebuggerWorkspaceBinding.Location|null;\n private pauseOnExceptionButton?: UI.Toolbar.ToolbarToggle;\n private sidebarPaneStack?: UI.View.ViewLocation;\n private tabbedLocationHeader?: Element|null;\n private extensionSidebarPanesContainer?: UI.View.ViewLocation;\n sidebarPaneView?: UI.Widget.VBox|UI.SplitWidget.SplitWidget;\n constructor() {\n super('sources');\n\n new UI.DropTarget.DropTarget(\n this.element, [UI.DropTarget.Type.Folder], i18nString(UIStrings.dropWorkspaceFolderHere),\n this.handleDrop.bind(this));\n\n this.workspace = Workspace.Workspace.WorkspaceImpl.instance();\n this.togglePauseAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.toggle-pause');\n this.stepOverAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-over');\n this.stepIntoAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-into');\n this.stepOutAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-out');\n this.stepAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step');\n this.toggleBreakpointsActiveAction =\n UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.toggle-breakpoints-active');\n\n this.debugToolbar = this.createDebugToolbar();\n this.debugToolbarDrawer = this.createDebugToolbarDrawer();\n this.debuggerPausedMessage = new DebuggerPausedMessage();\n\n const initialDebugSidebarWidth = 225;\n this.splitWidget =\n new UI.SplitWidget.SplitWidget(true, true, 'sourcesPanelSplitViewState', initialDebugSidebarWidth);\n this.splitWidget.enableShowModeSaving();\n this.splitWidget.show(this.element);\n\n // Create scripts navigator\n const initialNavigatorWidth = 225;\n this.editorView =\n new UI.SplitWidget.SplitWidget(true, false, 'sourcesPanelNavigatorSplitViewState', initialNavigatorWidth);\n this.editorView.enableShowModeSaving();\n this.splitWidget.setMainWidget(this.editorView);\n\n // Create navigator tabbed pane with toolbar.\n this.navigatorTabbedLocation = UI.ViewManager.ViewManager.instance().createTabbedLocation(\n this.revealNavigatorSidebar.bind(this), 'navigator-view', true, true);\n const tabbedPane = this.navigatorTabbedLocation.tabbedPane();\n tabbedPane.setMinimumSize(100, 25);\n tabbedPane.element.classList.add('navigator-tabbed-pane');\n const navigatorMenuButton = new UI.Toolbar.ToolbarMenuButton(this.populateNavigatorMenu.bind(this), true);\n navigatorMenuButton.setTitle(i18nString(UIStrings.moreOptions));\n tabbedPane.rightToolbar().appendToolbarItem(navigatorMenuButton);\n tabbedPane.addEventListener(\n UI.TabbedPane.Events.TabSelected,\n ({data: {tabId}}: Common.EventTarget.EventTargetEvent): void =>\n Host.userMetrics.sourcesSidebarTabShown(tabId));\n\n if (UI.ViewManager.ViewManager.instance().hasViewsForLocation('run-view-sidebar')) {\n const navigatorSplitWidget =\n new UI.SplitWidget.SplitWidget(false, true, 'sourcePanelNavigatorSidebarSplitViewState');\n navigatorSplitWidget.setMainWidget(tabbedPane);\n const runViewTabbedPane = UI.ViewManager.ViewManager.instance()\n .createTabbedLocation(this.revealNavigatorSidebar.bind(this), 'run-view-sidebar')\n .tabbedPane();\n navigatorSplitWidget.setSidebarWidget(runViewTabbedPane);\n navigatorSplitWidget.installResizer(runViewTabbedPane.headerElement());\n this.editorView.setSidebarWidget(navigatorSplitWidget);\n } else {\n this.editorView.setSidebarWidget(tabbedPane);\n }\n\n this.sourcesViewInternal = new SourcesView();\n this.sourcesViewInternal.addEventListener(Events.EditorSelected, this.editorSelected.bind(this));\n\n this.toggleNavigatorSidebarButton = this.editorView.createShowHideSidebarButton(\n i18nString(UIStrings.showNavigator), i18nString(UIStrings.hideNavigator), i18nString(UIStrings.navigatorShown),\n i18nString(UIStrings.navigatorHidden));\n this.toggleDebuggerSidebarButton = this.splitWidget.createShowHideSidebarButton(\n i18nString(UIStrings.showDebugger), i18nString(UIStrings.hideDebugger), i18nString(UIStrings.debuggerShown),\n i18nString(UIStrings.debuggerHidden));\n this.editorView.setMainWidget(this.sourcesViewInternal);\n\n this.threadsSidebarPane = null;\n this.watchSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.watch');\n this.callstackPane = CallStackSidebarPane.instance();\n\n Common.Settings.Settings.instance()\n .moduleSetting('sidebarPosition')\n .addChangeListener(this.updateSidebarPosition.bind(this));\n this.updateSidebarPosition();\n\n void this.updateDebuggerButtonsAndStatus();\n\n this.liveLocationPool = new Bindings.LiveLocation.LiveLocationPool();\n\n this.setTarget(UI.Context.Context.instance().flavor(SDK.Target.Target));\n Common.Settings.Settings.instance()\n .moduleSetting('breakpointsActive')\n .addChangeListener(this.breakpointsActiveStateChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this.onCurrentTargetChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerWasEnabled, this.debuggerWasEnabled, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerPaused, this.debuggerPaused, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebugInfoAttached, this.debugInfoAttached, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerResumed,\n event => this.debuggerResumed(event.data));\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared,\n event => this.debuggerResumed(event.data));\n Extensions.ExtensionServer.ExtensionServer.instance().addEventListener(\n Extensions.ExtensionServer.Events.SidebarPaneAdded, this.extensionSidebarPaneAdded, this);\n SDK.TargetManager.TargetManager.instance().observeTargets(this);\n this.lastModificationTime = -Infinity;\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n }|undefined = {forceNew: null}): SourcesPanel {\n const {forceNew} = opts;\n if (!sourcesPanelInstance || forceNew) {\n sourcesPanelInstance = new SourcesPanel();\n }\n\n return sourcesPanelInstance;\n }\n\n static updateResizerAndSidebarButtons(panel: SourcesPanel): void {\n panel.sourcesViewInternal.leftToolbar().removeToolbarItems();\n panel.sourcesViewInternal.rightToolbar().removeToolbarItems();\n panel.sourcesViewInternal.bottomToolbar().removeToolbarItems();\n const isInWrapper = WrapperView.isShowing() && !UI.InspectorView.InspectorView.instance().isDrawerMinimized();\n if (panel.splitWidget.isVertical() || isInWrapper) {\n panel.splitWidget.uninstallResizer(panel.sourcesViewInternal.toolbarContainerElement());\n } else {\n panel.splitWidget.installResizer(panel.sourcesViewInternal.toolbarContainerElement());\n }\n if (!isInWrapper) {\n panel.sourcesViewInternal.leftToolbar().appendToolbarItem(panel.toggleNavigatorSidebarButton);\n if (panel.splitWidget.isVertical()) {\n panel.sourcesViewInternal.rightToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton);\n } else {\n panel.sourcesViewInternal.bottomToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton);\n }\n }\n }\n\n targetAdded(_target: SDK.Target.Target): void {\n this.showThreadsIfNeeded();\n }\n\n targetRemoved(_target: SDK.Target.Target): void {\n }\n\n private showThreadsIfNeeded(): void {\n if (ThreadsSidebarPane.shouldBeShown() && !this.threadsSidebarPane) {\n this.threadsSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.threads');\n if (this.sidebarPaneStack && this.threadsSidebarPane) {\n this.sidebarPaneStack.appendView(\n this.threadsSidebarPane, this.splitWidget.isVertical() ? this.watchSidebarPane : this.callstackPane);\n }\n }\n }\n\n private setTarget(target: SDK.Target.Target|null): void {\n if (!target) {\n return;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return;\n }\n\n if (debuggerModel.isPaused()) {\n this.showDebuggerPausedDetails(\n (debuggerModel.debuggerPausedDetails() as SDK.DebuggerModel.DebuggerPausedDetails));\n } else {\n this.pausedInternal = false;\n this.clearInterface();\n this.toggleDebuggerSidebarButton.setEnabled(true);\n }\n }\n\n private onCurrentTargetChanged({data: target}: Common.EventTarget.EventTargetEvent): void {\n this.setTarget(target);\n }\n paused(): boolean {\n return this.pausedInternal || false;\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(SourcesPanel, this);\n this.registerCSSFiles([sourcesPanelStyles]);\n super.wasShown();\n const wrapper = WrapperView.instance();\n if (wrapper && wrapper.isShowing()) {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(true);\n SourcesPanel.updateResizerAndSidebarButtons(this);\n }\n this.editorView.setMainWidget(this.sourcesViewInternal);\n }\n\n override willHide(): void {\n super.willHide();\n UI.Context.Context.instance().setFlavor(SourcesPanel, null);\n if (WrapperView.isShowing()) {\n WrapperView.instance().showViewInWrapper();\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(false);\n SourcesPanel.updateResizerAndSidebarButtons(this);\n }\n }\n\n resolveLocation(locationName: string): UI.View.ViewLocation|null {\n if (locationName === 'sources.sidebar-top' || locationName === 'sources.sidebar-bottom' ||\n locationName === 'sources.sidebar-tabs') {\n return this.sidebarPaneStack || null;\n }\n return this.navigatorTabbedLocation;\n }\n\n ensureSourcesViewVisible(): boolean {\n if (WrapperView.isShowing()) {\n return true;\n }\n if (!UI.InspectorView.InspectorView.instance().canSelectPanel('sources')) {\n return false;\n }\n void UI.ViewManager.ViewManager.instance().showView('sources');\n return true;\n }\n\n override onResize(): void {\n if (Common.Settings.Settings.instance().moduleSetting('sidebarPosition').get() === 'auto') {\n this.element.window().requestAnimationFrame(this.updateSidebarPosition.bind(this));\n } // Do not force layout.\n }\n\n override searchableView(): UI.SearchableView.SearchableView {\n return this.sourcesViewInternal.searchableView();\n }\n\n toggleNavigatorSidebar(): void {\n this.editorView.toggleSidebar();\n }\n\n toggleDebuggerSidebar(): void {\n this.splitWidget.toggleSidebar();\n }\n\n private debuggerPaused(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n const details = debuggerModel.debuggerPausedDetails();\n if (!this.pausedInternal &&\n Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {\n void this.setAsCurrentPanel();\n }\n\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target()) {\n this.showDebuggerPausedDetails((details as SDK.DebuggerModel.DebuggerPausedDetails));\n } else if (!this.pausedInternal) {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n }\n }\n\n private debugInfoAttached(event: Common.EventTarget.EventTargetEvent): void {\n const {debuggerModel} = event.data;\n if (!debuggerModel.isPaused()) {\n return;\n }\n\n const details = debuggerModel.debuggerPausedDetails();\n if (details && UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target()) {\n this.showDebuggerPausedDetails(details);\n }\n }\n\n private showDebuggerPausedDetails(details: SDK.DebuggerModel.DebuggerPausedDetails): void {\n this.pausedInternal = true;\n void this.updateDebuggerButtonsAndStatus();\n UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.DebuggerPausedDetails, details);\n this.toggleDebuggerSidebarButton.setEnabled(false);\n this.revealDebuggerSidebar();\n window.focus();\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n }\n\n private debuggerResumed(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n const target = debuggerModel.target();\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) !== target) {\n return;\n }\n this.pausedInternal = false;\n this.clearInterface();\n this.toggleDebuggerSidebarButton.setEnabled(true);\n this.switchToPausedTargetTimeout = window.setTimeout(this.switchToPausedTarget.bind(this, debuggerModel), 500);\n }\n\n private debuggerWasEnabled(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) !== debuggerModel.target()) {\n return;\n }\n\n void this.updateDebuggerButtonsAndStatus();\n }\n\n get visibleView(): UI.Widget.Widget|null {\n return this.sourcesViewInternal.visibleView();\n }\n\n showUISourceCode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, location?: SourceFrame.SourceFrame.RevealPosition,\n omitFocus?: boolean): void {\n if (omitFocus) {\n const wrapperShowing = WrapperView.isShowing();\n if (!this.isShowing() && !wrapperShowing) {\n return;\n }\n } else {\n this.showEditor();\n }\n this.sourcesViewInternal.showSourceLocation(uiSourceCode, location, omitFocus);\n }\n\n private showEditor(): void {\n if (WrapperView.isShowing()) {\n return;\n }\n void this.setAsCurrentPanel();\n }\n\n showUILocation(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): void {\n const {uiSourceCode, lineNumber, columnNumber} = uiLocation;\n this.showUISourceCode(uiSourceCode, {lineNumber, columnNumber}, omitFocus);\n }\n\n async revealInNavigator(uiSourceCode: Workspace.UISourceCode.UISourceCode, skipReveal?: boolean): Promise {\n const viewManager = UI.ViewManager.ViewManager.instance();\n for (const view of viewManager.viewsForLocation(UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW)) {\n const navigatorView = await view.widget();\n if (navigatorView instanceof NavigatorView && navigatorView.acceptProject(uiSourceCode.project())) {\n navigatorView.revealUISourceCode(uiSourceCode, true);\n this.navigatorTabbedLocation.tabbedPane().selectTab(view.viewId(), true);\n if (!skipReveal) {\n this.editorView.showBoth(true);\n navigatorView.focus();\n }\n break;\n }\n }\n }\n\n private addExperimentMenuItem(\n menuSection: UI.ContextMenu.Section, experiment: string, menuItem: Common.UIString.LocalizedString): void {\n // menu handler\n function toggleExperiment(): void {\n const checked = Root.Runtime.experiments.isEnabled(experiment);\n Root.Runtime.experiments.setEnabled(experiment, !checked);\n Host.userMetrics.experimentChanged(experiment, checked);\n // Need to signal to the NavigatorView that grouping has changed. Unfortunately,\n // it can't listen to an experiment, and this class doesn't directly interact\n // with it, so we will convince it a different grouping setting changed. When we switch\n // from using an experiment to a setting, it will listen to that setting and we\n // won't need to do this.\n const groupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigatorGroupByFolder');\n groupByFolderSetting.set(groupByFolderSetting.get());\n }\n\n const previewIcon = new IconButton.Icon.Icon();\n previewIcon.data = {\n iconName: 'experiment',\n color: 'var(--icon-default)',\n width: '16px',\n };\n // collapses to 0 width, wrong height otherwise, throwing off alignment and size calculation.\n previewIcon.style.minHeight = '16px';\n previewIcon.style.minWidth = '16px';\n menuSection.appendCheckboxItem(\n menuItem, toggleExperiment, Root.Runtime.experiments.isEnabled(experiment), false, previewIcon);\n }\n\n private populateNavigatorMenu(contextMenu: UI.ContextMenu.ContextMenu): void {\n const groupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigatorGroupByFolder');\n contextMenu.appendItemsAtLocation('navigatorMenu');\n contextMenu.viewSection().appendCheckboxItem(\n i18nString(UIStrings.groupByFolder), () => groupByFolderSetting.set(!groupByFolderSetting.get()),\n groupByFolderSetting.get());\n\n this.addExperimentMenuItem(\n contextMenu.viewSection(), Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,\n i18nString(UIStrings.groupByAuthored));\n this.addExperimentMenuItem(\n contextMenu.viewSection(), Root.Runtime.ExperimentName.JUST_MY_CODE, i18nString(UIStrings.hideIgnoreListed));\n }\n\n setIgnoreExecutionLineEvents(ignoreExecutionLineEvents: boolean): void {\n this.ignoreExecutionLineEvents = ignoreExecutionLineEvents;\n }\n\n updateLastModificationTime(): void {\n this.lastModificationTime = window.performance.now();\n }\n\n private async executionLineChanged(liveLocation: Bindings.LiveLocation.LiveLocation): Promise {\n const uiLocation = await liveLocation.uiLocation();\n if (liveLocation.isDisposed()) {\n return;\n }\n if (!uiLocation) {\n return;\n }\n if (window.performance.now() - this.lastModificationTime < lastModificationTimeout) {\n return;\n }\n this.sourcesViewInternal.showSourceLocation(uiLocation.uiSourceCode, uiLocation, undefined, true);\n }\n\n private lastModificationTimeoutPassedForTest(): void {\n lastModificationTimeout = Number.MIN_VALUE;\n }\n\n private updateLastModificationTimeForTest(): void {\n lastModificationTimeout = Number.MAX_VALUE;\n }\n\n private async callFrameChanged(): Promise {\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n return;\n }\n if (this.executionLineLocation) {\n this.executionLineLocation.dispose();\n }\n this.executionLineLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createCallFrameLiveLocation(\n callFrame.location(), this.executionLineChanged.bind(this), this.liveLocationPool);\n }\n\n private async updateDebuggerButtonsAndStatus(): Promise {\n const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const currentDebuggerModel = currentTarget ? currentTarget.model(SDK.DebuggerModel.DebuggerModel) : null;\n if (!currentDebuggerModel) {\n this.togglePauseAction.setEnabled(false);\n this.stepOverAction.setEnabled(false);\n this.stepIntoAction.setEnabled(false);\n this.stepOutAction.setEnabled(false);\n this.stepAction.setEnabled(false);\n } else if (this.pausedInternal) {\n this.togglePauseAction.setToggled(true);\n this.togglePauseAction.setEnabled(true);\n this.stepOverAction.setEnabled(true);\n this.stepIntoAction.setEnabled(true);\n this.stepOutAction.setEnabled(true);\n this.stepAction.setEnabled(true);\n } else {\n this.togglePauseAction.setToggled(false);\n this.togglePauseAction.setEnabled(!currentDebuggerModel.isPausing());\n this.stepOverAction.setEnabled(false);\n this.stepIntoAction.setEnabled(false);\n this.stepOutAction.setEnabled(false);\n this.stepAction.setEnabled(false);\n }\n\n const details = currentDebuggerModel ? currentDebuggerModel.debuggerPausedDetails() : null;\n await this.debuggerPausedMessage.render(\n details, Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),\n Breakpoints.BreakpointManager.BreakpointManager.instance());\n if (details) {\n this.updateDebuggerButtonsAndStatusForTest();\n }\n }\n\n private updateDebuggerButtonsAndStatusForTest(): void {\n }\n\n private clearInterface(): void {\n void this.updateDebuggerButtonsAndStatus();\n UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.DebuggerPausedDetails, null);\n\n if (this.switchToPausedTargetTimeout) {\n clearTimeout(this.switchToPausedTargetTimeout);\n }\n this.liveLocationPool.disposeAll();\n }\n\n private switchToPausedTarget(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n delete this.switchToPausedTargetTimeout;\n if (this.pausedInternal || debuggerModel.isPaused()) {\n return;\n }\n\n for (const debuggerModel of SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)) {\n if (debuggerModel.isPaused()) {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n break;\n }\n }\n }\n\n runSnippet(): void {\n const uiSourceCode = this.sourcesViewInternal.currentUISourceCode();\n if (uiSourceCode) {\n void Snippets.ScriptSnippetFileSystem.evaluateScriptSnippet(uiSourceCode);\n }\n }\n\n private editorSelected(event: Common.EventTarget.EventTargetEvent): void {\n const uiSourceCode = event.data;\n if (this.editorView.mainWidget() &&\n Common.Settings.Settings.instance().moduleSetting('autoRevealInNavigator').get()) {\n void this.revealInNavigator(uiSourceCode, true);\n }\n }\n\n togglePause(): boolean {\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n if (!target) {\n return true;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return true;\n }\n\n if (this.pausedInternal) {\n this.pausedInternal = false;\n debuggerModel.resume();\n } else {\n // Make sure pauses didn't stick skipped.\n debuggerModel.pause();\n }\n\n this.clearInterface();\n return true;\n }\n\n private prepareToResume(): SDK.DebuggerModel.DebuggerModel|null {\n if (!this.pausedInternal) {\n return null;\n }\n\n this.pausedInternal = false;\n\n this.clearInterface();\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n return target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n }\n\n private longResume(): void {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n debuggerModel.skipAllPausesUntilReloadOrTimeout(500);\n debuggerModel.resume();\n }\n }\n\n private terminateExecution(): void {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.runtimeModel().terminateExecution();\n debuggerModel.resume();\n }\n }\n\n stepOver(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepOver();\n }\n return true;\n }\n\n stepInto(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepInto();\n }\n return true;\n }\n\n stepIntoAsync(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n debuggerModel.scheduleStepIntoAsync();\n }\n return true;\n }\n\n stepOut(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepOut();\n }\n return true;\n }\n\n private async continueToLocation(uiLocation: Workspace.UISourceCode.UILocation): Promise {\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (!executionContext) {\n return;\n }\n // Always use 0 column.\n const rawLocations =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().uiLocationToRawLocations(\n uiLocation.uiSourceCode, uiLocation.lineNumber, 0);\n const rawLocation = rawLocations.find(location => location.debuggerModel === executionContext.debuggerModel);\n if (rawLocation && this.prepareToResume()) {\n rawLocation.continueToLocation();\n }\n }\n\n toggleBreakpointsActive(): void {\n Common.Settings.Settings.instance()\n .moduleSetting('breakpointsActive')\n .set(!Common.Settings.Settings.instance().moduleSetting('breakpointsActive').get());\n }\n\n private breakpointsActiveStateChanged(): void {\n const active = Common.Settings.Settings.instance().moduleSetting('breakpointsActive').get();\n this.toggleBreakpointsActiveAction.setToggled(!active);\n this.sourcesViewInternal.toggleBreakpointsActiveState(active);\n }\n\n private createDebugToolbar(): UI.Toolbar.Toolbar {\n const debugToolbar = new UI.Toolbar.Toolbar('scripts-debug-toolbar');\n\n const longResumeButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.resumeWithAllPausesBlockedForMs), 'play');\n longResumeButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.longResume, this);\n const terminateExecutionButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.terminateCurrentJavascriptCall), 'stop');\n terminateExecutionButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.terminateExecution, this);\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createLongPressActionButton(\n this.togglePauseAction, [terminateExecutionButton, longResumeButton], []));\n\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepOverAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepIntoAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepOutAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepAction));\n\n debugToolbar.appendSeparator();\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleBreakpointsActiveAction));\n\n return debugToolbar;\n }\n\n private createDebugToolbarDrawer(): HTMLDivElement {\n const debugToolbarDrawer = document.createElement('div');\n debugToolbarDrawer.classList.add('scripts-debug-toolbar-drawer');\n\n const label = i18nString(UIStrings.pauseOnCaughtExceptions);\n const setting = Common.Settings.Settings.instance().moduleSetting('pauseOnCaughtException');\n debugToolbarDrawer.appendChild(UI.SettingsUI.createSettingCheckbox(label, setting, true));\n\n return debugToolbarDrawer;\n }\n\n appendApplicableItems(\n event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: Workspace.UISourceCode.UISourceCode|Workspace.UISourceCode.UILocation|SDK.RemoteObject.RemoteObject|\n SDK.NetworkRequest.NetworkRequest|UISourceCodeFrame): void {\n if (target instanceof Workspace.UISourceCode.UISourceCode) {\n this.appendUISourceCodeItems(event, contextMenu, target);\n return;\n }\n if (target instanceof UISourceCodeFrame) {\n this.appendUISourceCodeFrameItems(contextMenu, target);\n return;\n }\n if (target instanceof Workspace.UISourceCode.UILocation) {\n this.appendUILocationItems(contextMenu, target);\n return;\n }\n if (target instanceof SDK.RemoteObject.RemoteObject) {\n this.appendRemoteObjectItems(contextMenu, target);\n return;\n }\n this.appendNetworkRequestItems(contextMenu, target);\n }\n\n private appendUISourceCodeItems(\n event: Event, contextMenu: UI.ContextMenu.ContextMenu, uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n if (!event.target) {\n return;\n }\n\n const eventTarget = (event.target as Node);\n if (!uiSourceCode.project().isServiceProject() &&\n !eventTarget.isSelfOrDescendant(this.navigatorTabbedLocation.widget().element) &&\n !(Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE) &&\n Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n uiSourceCode))) {\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.revealInSidebar), this.revealInNavigator.bind(this, uiSourceCode), {\n jslogContext: 'sources.reveal-in-navigator-sidebar',\n });\n }\n // Ignore list only works for JavaScript debugging.\n if (uiSourceCode.contentType().hasScripts() &&\n Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .scriptsForUISourceCode(uiSourceCode)\n .every(script => script.isJavaScript())) {\n this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode);\n }\n }\n\n private appendUISourceCodeFrameItems(contextMenu: UI.ContextMenu.ContextMenu, target: UISourceCodeFrame): void {\n if (target.uiSourceCode().contentType().isFromSourceMap() || target.textEditor.state.selection.main.empty) {\n return;\n }\n contextMenu.debugSection().appendAction('debugger.evaluate-selection');\n }\n\n appendUILocationItems(contextMenu: UI.ContextMenu.ContextMenu, uiLocation: Workspace.UISourceCode.UILocation): void {\n const uiSourceCode = uiLocation.uiSourceCode;\n\n if (!Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .scriptsForUISourceCode(uiSourceCode)\n .every(script => script.isJavaScript())) {\n // Ignore List and 'Continue to here' currently only works for JavaScript debugging.\n return;\n }\n const contentType = uiSourceCode.contentType();\n if (contentType.hasScripts()) {\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n if (debuggerModel && debuggerModel.isPaused()) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.continueToHere), this.continueToLocation.bind(this, uiLocation));\n }\n\n this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode);\n }\n }\n\n private appendRemoteObjectItems(contextMenu: UI.ContextMenu.ContextMenu, remoteObject: SDK.RemoteObject.RemoteObject):\n void {\n const indent = Common.Settings.Settings.instance().moduleSetting('textEditorIndent').get();\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n\n function getObjectTitle(): string|undefined {\n if (remoteObject.type === 'wasm') {\n return remoteObject.subtype;\n }\n if (remoteObject.subtype === 'node') {\n return 'outerHTML';\n }\n return remoteObject.type;\n }\n const copyContextMenuTitle = getObjectTitle();\n\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.storeAsGlobalVariable),\n () => executionContext?.target()\n .model(SDK.ConsoleModel.ConsoleModel)\n ?.saveToTempVariable(executionContext, remoteObject));\n\n const ctxMenuClipboardSection = contextMenu.clipboardSection();\n const inspectorFrontendHost = Host.InspectorFrontendHost.InspectorFrontendHostInstance;\n\n if (remoteObject.type === 'string') {\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringContents), () => {\n inspectorFrontendHost.copyText(remoteObject.value);\n });\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringAsJSLiteral), () => {\n inspectorFrontendHost.copyText(Platform.StringUtilities.formatAsJSLiteral(remoteObject.value));\n });\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringAsJSONLiteral), () => {\n inspectorFrontendHost.copyText(JSON.stringify(remoteObject.value));\n });\n }\n // We are trying to copy a primitive value.\n else if (primitiveRemoteObjectTypes.has(remoteObject.type)) {\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyS, {PH1: String(copyContextMenuTitle)}), () => {\n inspectorFrontendHost.copyText(remoteObject.description);\n });\n }\n // We are trying to copy a remote object.\n else if (remoteObject.type === 'object') {\n const copyDecodedValueHandler = async(): Promise => {\n const result = await remoteObject.callFunctionJSON(toStringForClipboard, [{\n value: {\n subtype: remoteObject.subtype,\n indent: indent,\n },\n }]);\n inspectorFrontendHost.copyText(result);\n };\n\n ctxMenuClipboardSection.appendItem(\n i18nString(UIStrings.copyS, {PH1: String(copyContextMenuTitle)}), copyDecodedValueHandler);\n }\n\n else if (remoteObject.type === 'function') {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.showFunctionDefinition), this.showFunctionDefinition.bind(this, remoteObject));\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function toStringForClipboard(this: Object, data: any): string|undefined {\n const subtype = data.subtype;\n const indent = data.indent;\n\n if (subtype === 'map') {\n if (this instanceof Map) {\n const elements = Array.from(this.entries());\n const literal = elements.length === 0 ? '' : JSON.stringify(elements, null, indent);\n return `new Map(${literal})`;\n }\n return undefined;\n }\n if (subtype === 'set') {\n if (this instanceof Set) {\n const values = Array.from(this.values());\n const literal = values.length === 0 ? '' : JSON.stringify(values, null, indent);\n return `new Set(${literal})`;\n }\n return undefined;\n }\n if (subtype === 'node') {\n return this instanceof Element ? this.outerHTML : undefined;\n }\n if (subtype && typeof this === 'undefined') {\n return String(subtype);\n }\n try {\n return JSON.stringify(this, null, indent);\n } catch (error) {\n return String(this);\n }\n }\n }\n\n private appendNetworkRequestItems(\n contextMenu: UI.ContextMenu.ContextMenu, request: SDK.NetworkRequest.NetworkRequest): void {\n const uiSourceCode = this.workspace.uiSourceCodeForURL(request.url());\n if (!uiSourceCode) {\n return;\n }\n const openText = i18nString(UIStrings.openInSourcesPanel);\n const callback: () => void = this.showUILocation.bind(this, uiSourceCode.uiLocation(0, 0));\n contextMenu.revealSection().appendItem(openText, callback);\n }\n\n private showFunctionDefinition(remoteObject: SDK.RemoteObject.RemoteObject): void {\n void SDK.RemoteObject.RemoteFunction.objectAsFunction(remoteObject)\n .targetFunction()\n .then(\n targetFunction => targetFunction.debuggerModel()\n .functionDetailsPromise(targetFunction)\n .then(this.didGetFunctionDetails.bind(this)));\n }\n\n private async didGetFunctionDetails(response: {\n location: SDK.DebuggerModel.Location|null,\n }|null): Promise {\n if (!response || !response.location) {\n return;\n }\n\n const uiLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n response.location);\n if (uiLocation) {\n this.showUILocation(uiLocation);\n }\n }\n\n private revealNavigatorSidebar(): void {\n void this.setAsCurrentPanel();\n this.editorView.showBoth(true);\n }\n\n private revealDebuggerSidebar(): void {\n if (!Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {\n return;\n }\n void this.setAsCurrentPanel();\n this.splitWidget.showBoth(true);\n }\n\n private updateSidebarPosition(): void {\n let vertically;\n const position = Common.Settings.Settings.instance().moduleSetting('sidebarPosition').get();\n if (position === 'right') {\n vertically = false;\n } else if (position === 'bottom') {\n vertically = true;\n } else {\n vertically = UI.InspectorView.InspectorView.instance().element.offsetWidth < 680;\n }\n\n if (this.sidebarPaneView && vertically === !this.splitWidget.isVertical()) {\n return;\n }\n\n if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach()) {\n return;\n } // We can't reparent extension iframes.\n\n if (this.sidebarPaneView) {\n this.sidebarPaneView.detach();\n }\n\n this.splitWidget.setVertical(!vertically);\n this.splitWidget.element.classList.toggle('sources-split-view-vertical', vertically);\n\n SourcesPanel.updateResizerAndSidebarButtons(this);\n\n // Create vertical box with stack.\n const vbox = new UI.Widget.VBox();\n vbox.element.appendChild(this.debugToolbar.element);\n vbox.element.appendChild(this.debugToolbarDrawer);\n\n vbox.setMinimumAndPreferredSizes(minToolbarWidth, 25, minToolbarWidth, 100);\n this.sidebarPaneStack =\n UI.ViewManager.ViewManager.instance().createStackLocation(this.revealDebuggerSidebar.bind(this));\n this.sidebarPaneStack.widget().element.classList.add('overflow-auto');\n this.sidebarPaneStack.widget().show(vbox.element);\n this.sidebarPaneStack.widget().element.appendChild(this.debuggerPausedMessage.element());\n this.sidebarPaneStack.appendApplicableItems('sources.sidebar-top');\n\n if (this.threadsSidebarPane) {\n this.sidebarPaneStack.appendView(this.threadsSidebarPane);\n }\n\n const jsBreakpoints = UI.ViewManager.ViewManager.instance().view('sources.jsBreakpoints');\n const scopeChainView = UI.ViewManager.ViewManager.instance().view('sources.scopeChain');\n\n if (this.tabbedLocationHeader) {\n this.splitWidget.uninstallResizer(this.tabbedLocationHeader);\n this.tabbedLocationHeader = null;\n }\n\n if (!vertically) {\n // Populate the rest of the stack.\n this.sidebarPaneStack.appendView(this.watchSidebarPane);\n void this.sidebarPaneStack.showView(jsBreakpoints);\n void this.sidebarPaneStack.showView(scopeChainView);\n void this.sidebarPaneStack.showView(this.callstackPane);\n this.extensionSidebarPanesContainer = this.sidebarPaneStack;\n this.sidebarPaneView = vbox;\n this.splitWidget.uninstallResizer(this.debugToolbar.gripElementForResize());\n } else {\n const splitWidget = new UI.SplitWidget.SplitWidget(true, true, 'sourcesPanelDebuggerSidebarSplitViewState', 0.5);\n splitWidget.setMainWidget(vbox);\n\n // Populate the left stack.\n void this.sidebarPaneStack.showView(jsBreakpoints);\n void this.sidebarPaneStack.showView(this.callstackPane);\n\n const tabbedLocation =\n UI.ViewManager.ViewManager.instance().createTabbedLocation(this.revealDebuggerSidebar.bind(this));\n splitWidget.setSidebarWidget(tabbedLocation.tabbedPane());\n this.tabbedLocationHeader = tabbedLocation.tabbedPane().headerElement();\n this.splitWidget.installResizer(this.tabbedLocationHeader);\n this.splitWidget.installResizer(this.debugToolbar.gripElementForResize());\n tabbedLocation.appendView(scopeChainView);\n tabbedLocation.appendView(this.watchSidebarPane);\n tabbedLocation.appendApplicableItems('sources.sidebar-tabs');\n this.extensionSidebarPanesContainer = tabbedLocation;\n this.sidebarPaneView = splitWidget;\n }\n\n this.sidebarPaneStack.appendApplicableItems('sources.sidebar-bottom');\n const extensionSidebarPanes = Extensions.ExtensionServer.ExtensionServer.instance().sidebarPanes();\n for (let i = 0; i < extensionSidebarPanes.length; ++i) {\n this.addExtensionSidebarPane(extensionSidebarPanes[i]);\n }\n\n this.splitWidget.setSidebarWidget(this.sidebarPaneView);\n }\n\n setAsCurrentPanel(): Promise {\n return UI.ViewManager.ViewManager.instance().showView('sources');\n }\n\n private extensionSidebarPaneAdded(\n event: Common.EventTarget.EventTargetEvent): void {\n this.addExtensionSidebarPane(event.data);\n }\n\n private addExtensionSidebarPane(pane: Extensions.ExtensionPanel.ExtensionSidebarPane): void {\n if (pane.panelName() === this.name) {\n (this.extensionSidebarPanesContainer as UI.View.ViewLocation).appendView(pane);\n }\n }\n\n sourcesView(): SourcesView {\n return this.sourcesViewInternal;\n }\n\n private handleDrop(dataTransfer: DataTransfer): void {\n const items = dataTransfer.items;\n if (!items.length) {\n return;\n }\n const entry = items[0].webkitGetAsEntry();\n if (entry && entry.isDirectory) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.upgradeDraggedFileSystemPermissions(entry.filesystem);\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.WorkspaceDropFolder);\n void UI.ViewManager.ViewManager.instance().showView('navigator-files');\n }\n }\n}\n\nexport let lastModificationTimeout = 200;\nexport const minToolbarWidth = 215;\n\nexport class UILocationRevealer implements Common.Revealer.Revealer {\n async reveal(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): Promise {\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n }\n}\n\nexport class UILocationRangeRevealer implements Common.Revealer.Revealer {\n static #instance?: UILocationRangeRevealer;\n static instance(opts: {forceNew: boolean} = {forceNew: false}): UILocationRangeRevealer {\n if (!UILocationRangeRevealer.#instance || opts.forceNew) {\n UILocationRangeRevealer.#instance = new UILocationRangeRevealer();\n }\n return UILocationRangeRevealer.#instance;\n }\n\n async reveal(uiLocationRange: Workspace.UISourceCode.UILocationRange, omitFocus?: boolean): Promise {\n const {uiSourceCode, range: {start: from, end: to}} = uiLocationRange;\n SourcesPanel.instance().showUISourceCode(uiSourceCode, {from, to}, omitFocus);\n }\n}\n\nexport class DebuggerLocationRevealer implements Common.Revealer.Revealer {\n async reveal(rawLocation: SDK.DebuggerModel.Location, omitFocus?: boolean): Promise {\n const uiLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n rawLocation);\n if (uiLocation) {\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n }\n }\n}\n\nexport class UISourceCodeRevealer implements Common.Revealer.Revealer {\n async reveal(uiSourceCode: Workspace.UISourceCode.UISourceCode, omitFocus?: boolean): Promise {\n SourcesPanel.instance().showUISourceCode(uiSourceCode, undefined, omitFocus);\n }\n}\n\nexport class DebuggerPausedDetailsRevealer implements\n Common.Revealer.Revealer {\n async reveal(_object: SDK.DebuggerModel.DebuggerPausedDetails): Promise {\n if (Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {\n return SourcesPanel.instance().setAsCurrentPanel();\n }\n }\n}\n\nexport class RevealingActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = SourcesPanel.instance();\n if (!panel.ensureSourcesViewVisible()) {\n return false;\n }\n switch (actionId) {\n case 'debugger.toggle-pause': {\n // This action can be triggered both on the DevTools front-end itself,\n // or on the inspected target. If triggered on the DevTools front-end,\n // it will take care of resuming.\n //\n // If triggered on the target, NOT in hosted mode:\n // * ..and the paused overlay is enabled:\n // => do not take any action here, as the paused overlay will resume\n // * ..and the paused overlay is disabled:\n // => take care of the resume here\n // If triggered on the target in hosted mode:\n // * ..and the paused overlay is enabled:\n // => execution will not reach here, as shortcuts are not forwarded\n // and the paused overlay will resume\n // * ..and the paused overlay is disabled:\n // => overlay will not take care of resume, and neither will\n // DevTools as no shortcuts are forwarded from the target\n\n // Do not trigger a resume action, if: the shortcut was forwarded and the\n // paused overlay is enabled.\n const actionHandledInPausedOverlay = context.flavor(UI.ShortcutRegistry.ForwardedShortcut) &&\n !Common.Settings.Settings.instance().moduleSetting('disablePausedStateOverlay').get();\n if (actionHandledInPausedOverlay) {\n // Taken care of by inspector overlay: handled set to true to\n // register user metric.\n return true;\n }\n panel.togglePause();\n return true;\n }\n }\n return false;\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = SourcesPanel.instance();\n switch (actionId) {\n case 'debugger.step-over': {\n panel.stepOver();\n return true;\n }\n case 'debugger.step-into': {\n panel.stepIntoAsync();\n return true;\n }\n case 'debugger.step': {\n panel.stepInto();\n return true;\n }\n case 'debugger.step-out': {\n panel.stepOut();\n return true;\n }\n case 'debugger.run-snippet': {\n panel.runSnippet();\n return true;\n }\n case 'debugger.toggle-breakpoints-active': {\n panel.toggleBreakpointsActive();\n return true;\n }\n case 'debugger.evaluate-selection': {\n const frame = context.flavor(UISourceCodeFrame);\n if (frame) {\n const {state: editorState} = frame.textEditor;\n let text = editorState.sliceDoc(editorState.selection.main.from, editorState.selection.main.to);\n const executionContext = context.flavor(SDK.RuntimeModel.ExecutionContext);\n const consoleModel = executionContext?.target().model(SDK.ConsoleModel.ConsoleModel);\n if (executionContext && consoleModel) {\n const message = consoleModel.addCommandMessage(executionContext, text);\n text = ObjectUI.JavaScriptREPL.JavaScriptREPL.wrapObjectLiteral(text);\n void consoleModel.evaluateCommandInConsole(executionContext, message, text, /* useCommandLineAPI */ true);\n }\n }\n return true;\n }\n case 'sources.reveal-in-navigator-sidebar': {\n const uiSourceCode = panel.sourcesView().currentUISourceCode();\n if (uiSourceCode === null) {\n return false;\n }\n void panel.revealInNavigator(uiSourceCode);\n return true;\n }\n case 'sources.toggle-navigator-sidebar': {\n panel.toggleNavigatorSidebar();\n return true;\n }\n case 'sources.toggle-debugger-sidebar': {\n panel.toggleDebuggerSidebar();\n return true;\n }\n }\n return false;\n }\n}\n\nexport class WrapperView extends UI.Widget.VBox {\n private readonly view: SourcesView;\n constructor() {\n super();\n this.element.classList.add('sources-view-wrapper');\n this.view = SourcesPanel.instance().sourcesView();\n }\n\n static instance(): WrapperView {\n if (!wrapperViewInstance) {\n wrapperViewInstance = new WrapperView();\n }\n\n return wrapperViewInstance;\n }\n\n static isShowing(): boolean {\n return Boolean(wrapperViewInstance) && wrapperViewInstance.isShowing();\n }\n\n override wasShown(): void {\n if (!SourcesPanel.instance().isShowing()) {\n this.showViewInWrapper();\n } else {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(true);\n }\n SourcesPanel.updateResizerAndSidebarButtons(SourcesPanel.instance());\n }\n\n override willHide(): void {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(false);\n queueMicrotask(() => {\n SourcesPanel.updateResizerAndSidebarButtons(SourcesPanel.instance());\n });\n }\n\n showViewInWrapper(): void {\n this.view.show(this.element);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/ThreadsSidebarPane.d.ts b/public/panels/sources/ThreadsSidebarPane.d.ts index 5181cd305..f7e913437 100644 --- a/public/panels/sources/ThreadsSidebarPane.d.ts +++ b/public/panels/sources/ThreadsSidebarPane.d.ts @@ -4,8 +4,7 @@ export declare class ThreadsSidebarPane extends UI.Widget.VBox implements SDK.Ta private readonly items; private readonly list; private selectedModel; - private constructor(); - static instance(): ThreadsSidebarPane; + constructor(); static shouldBeShown(): boolean; createElementForItem(debuggerModel: SDK.DebuggerModel.DebuggerModel): Element; heightForItem(_debuggerModel: SDK.DebuggerModel.DebuggerModel): number; diff --git a/public/panels/sources/ThreadsSidebarPane.js b/public/panels/sources/ThreadsSidebarPane.js index 5e3827545..65ab37ac2 100644 --- a/public/panels/sources/ThreadsSidebarPane.js +++ b/public/panels/sources/ThreadsSidebarPane.js @@ -14,7 +14,6 @@ const UIStrings = { }; const str_ = i18n.i18n.registerUIStrings('panels/sources/ThreadsSidebarPane.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -let threadsSidebarPaneInstance; export class ThreadsSidebarPane extends UI.Widget.VBox { items; list; @@ -29,12 +28,6 @@ export class ThreadsSidebarPane extends UI.Widget.VBox { UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this.targetFlavorChanged, this); SDK.TargetManager.TargetManager.instance().observeModels(SDK.DebuggerModel.DebuggerModel, this); } - static instance() { - if (!threadsSidebarPaneInstance) { - threadsSidebarPaneInstance = new ThreadsSidebarPane(); - } - return threadsSidebarPaneInstance; - } static shouldBeShown() { return SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel).length >= 2; } diff --git a/public/panels/sources/ThreadsSidebarPane.js.map b/public/panels/sources/ThreadsSidebarPane.js.map index b60483842..494b929c1 100644 --- a/public/panels/sources/ThreadsSidebarPane.js.map +++ b/public/panels/sources/ThreadsSidebarPane.js.map @@ -1 +1 @@ -{"version":3,"file":"ThreadsSidebarPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/ThreadsSidebarPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ;CACjB,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,sCAAsC,EAAE,SAAS,CAAC,CAAC;AAC5F,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACtE,IAAI,0BAA8C,CAAC;AAEnD,MAAM,OAAO,kBAAmB,SAAQ,EAAE,CAAC,MAAM,CAAC,IAAI;IAGnC,KAAK,CAA0D;IAC/D,IAAI,CAA8D;IAC3E,aAAa,CAAuC;IAE5D;QACE,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QAC1C,IAAI,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AAC,QAAQ,EAAE,CAAC;QACjC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QACpC,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;SACtC;QACD,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,EAAE;YAC/B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAC3C;QACD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,KAAK,EAAE,CAAC;SACd;IACH,CAAC;IACQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["// Copyright 2014 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport threadsSidebarPaneStyles from './threadsSidebarPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Text in Threads Sidebar Pane of the Sources panel\n */\n paused: 'paused',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/ThreadsSidebarPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet threadsSidebarPaneInstance: ThreadsSidebarPane;\n\nexport class ThreadsSidebarPane extends UI.Widget.VBox implements\n SDK.TargetManager.SDKModelObserver,\n UI.ListControl.ListDelegate {\n private readonly items: UI.ListModel.ListModel;\n private readonly list: UI.ListControl.ListControl;\n private selectedModel: SDK.DebuggerModel.DebuggerModel|null;\n\n private constructor() {\n super(true);\n\n this.items = new UI.ListModel.ListModel();\n this.list = new UI.ListControl.ListControl(this.items, this, UI.ListControl.ListMode.NonViewport);\n const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);\n this.selectedModel = currentTarget !== null ? currentTarget.model(SDK.DebuggerModel.DebuggerModel) : null;\n this.contentElement.appendChild(this.list.element);\n\n UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this.targetFlavorChanged, this);\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.DebuggerModel.DebuggerModel, this);\n }\n\n static instance(): ThreadsSidebarPane {\n if (!threadsSidebarPaneInstance) {\n threadsSidebarPaneInstance = new ThreadsSidebarPane();\n }\n return threadsSidebarPaneInstance;\n }\n\n static shouldBeShown(): boolean {\n return SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel).length >= 2;\n }\n\n createElementForItem(debuggerModel: SDK.DebuggerModel.DebuggerModel): Element {\n const element = document.createElement('div');\n element.classList.add('thread-item');\n const title = element.createChild('div', 'thread-item-title');\n const pausedState = element.createChild('div', 'thread-item-paused-state');\n const icon = new IconButton.Icon.Icon();\n icon.data = {\n iconName: 'large-arrow-right-filled',\n color: 'var(--icon-arrow-main-thread)',\n width: '14px',\n height: '14px',\n };\n icon.classList.add('selected-thread-icon');\n element.appendChild(icon);\n element.tabIndex = -1;\n self.onInvokeElement(element, event => {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n event.consume(true);\n });\n const isSelected = UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target();\n element.classList.toggle('selected', isSelected);\n UI.ARIAUtils.setSelected(element, isSelected);\n\n function updateTitle(): void {\n const executionContext = debuggerModel.runtimeModel().defaultExecutionContext();\n title.textContent =\n executionContext && executionContext.label() ? executionContext.label() : debuggerModel.target().name();\n }\n\n function updatePausedState(): void {\n pausedState.textContent = debuggerModel.isPaused() ? i18nString(UIStrings.paused) : '';\n }\n\n function targetNameChanged(event: Common.EventTarget.EventTargetEvent): void {\n const target = event.data;\n if (target === debuggerModel.target()) {\n updateTitle();\n }\n }\n\n debuggerModel.addEventListener(SDK.DebuggerModel.Events.DebuggerPaused, updatePausedState);\n debuggerModel.addEventListener(SDK.DebuggerModel.Events.DebuggerResumed, updatePausedState);\n debuggerModel.runtimeModel().addEventListener(SDK.RuntimeModel.Events.ExecutionContextChanged, updateTitle);\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.NameChanged, targetNameChanged);\n\n updatePausedState();\n updateTitle();\n return element;\n }\n\n heightForItem(_debuggerModel: SDK.DebuggerModel.DebuggerModel): number {\n console.assert(false); // Should not be called.\n return 0;\n }\n\n isItemSelectable(_debuggerModel: SDK.DebuggerModel.DebuggerModel): boolean {\n return true;\n }\n\n selectedItemChanged(\n _from: SDK.DebuggerModel.DebuggerModel|null, _to: SDK.DebuggerModel.DebuggerModel|null, fromElement: Element|null,\n toElement: Element|null): void {\n const fromEle = (fromElement as HTMLElement | null);\n if (fromEle) {\n fromEle.tabIndex = -1;\n }\n const toEle = (toElement as HTMLElement | null);\n if (toEle) {\n this.setDefaultFocusedElement(toEle);\n toEle.tabIndex = 0;\n if (this.hasFocus()) {\n toEle.focus();\n }\n }\n }\n\n updateSelectedItemARIA(_fromElement: Element|null, _toElement: Element|null): boolean {\n return false;\n }\n\n modelAdded(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n this.items.insert(this.items.length, debuggerModel);\n const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);\n if (currentTarget === debuggerModel.target()) {\n this.list.selectItem(debuggerModel);\n }\n }\n\n modelRemoved(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n this.items.remove(this.items.indexOf(debuggerModel));\n }\n\n private targetFlavorChanged({data: target}: Common.EventTarget.EventTargetEvent): void {\n const hadFocus = this.hasFocus();\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n this.list.selectItem(debuggerModel);\n if (debuggerModel) {\n this.list.refreshItem(debuggerModel);\n }\n if (this.selectedModel !== null) {\n this.list.refreshItem(this.selectedModel);\n }\n this.selectedModel = debuggerModel;\n if (hadFocus) {\n this.focus();\n }\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([threadsSidebarPaneStyles]);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"ThreadsSidebarPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/ThreadsSidebarPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAEnE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ;CACjB,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,sCAAsC,EAAE,SAAS,CAAC,CAAC;AAC5F,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,MAAM,OAAO,kBAAmB,SAAQ,EAAE,CAAC,MAAM,CAAC,IAAI;IAGnC,KAAK,CAA0D;IAC/D,IAAI,CAA8D;IAC3E,aAAa,CAAuC;IAE5D;QACE,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,WAAW,CAAC,WAA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YACjB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;SACtC;QACD,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,EAAE;YAC/B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAC3C;QACD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,KAAK,EAAE,CAAC;SACd;IACH,CAAC;IACQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["// Copyright 2014 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport threadsSidebarPaneStyles from './threadsSidebarPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Text in Threads Sidebar Pane of the Sources panel\n */\n paused: 'paused',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/ThreadsSidebarPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class ThreadsSidebarPane extends UI.Widget.VBox implements\n SDK.TargetManager.SDKModelObserver,\n UI.ListControl.ListDelegate {\n private readonly items: UI.ListModel.ListModel;\n private readonly list: UI.ListControl.ListControl;\n private selectedModel: SDK.DebuggerModel.DebuggerModel|null;\n\n constructor() {\n super(true);\n\n this.items = new UI.ListModel.ListModel();\n this.list = new UI.ListControl.ListControl(this.items, this, UI.ListControl.ListMode.NonViewport);\n const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);\n this.selectedModel = currentTarget !== null ? currentTarget.model(SDK.DebuggerModel.DebuggerModel) : null;\n this.contentElement.appendChild(this.list.element);\n\n UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this.targetFlavorChanged, this);\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.DebuggerModel.DebuggerModel, this);\n }\n\n static shouldBeShown(): boolean {\n return SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel).length >= 2;\n }\n\n createElementForItem(debuggerModel: SDK.DebuggerModel.DebuggerModel): Element {\n const element = document.createElement('div');\n element.classList.add('thread-item');\n const title = element.createChild('div', 'thread-item-title');\n const pausedState = element.createChild('div', 'thread-item-paused-state');\n const icon = new IconButton.Icon.Icon();\n icon.data = {\n iconName: 'large-arrow-right-filled',\n color: 'var(--icon-arrow-main-thread)',\n width: '14px',\n height: '14px',\n };\n icon.classList.add('selected-thread-icon');\n element.appendChild(icon);\n element.tabIndex = -1;\n self.onInvokeElement(element, event => {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n event.consume(true);\n });\n const isSelected = UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target();\n element.classList.toggle('selected', isSelected);\n UI.ARIAUtils.setSelected(element, isSelected);\n\n function updateTitle(): void {\n const executionContext = debuggerModel.runtimeModel().defaultExecutionContext();\n title.textContent =\n executionContext && executionContext.label() ? executionContext.label() : debuggerModel.target().name();\n }\n\n function updatePausedState(): void {\n pausedState.textContent = debuggerModel.isPaused() ? i18nString(UIStrings.paused) : '';\n }\n\n function targetNameChanged(event: Common.EventTarget.EventTargetEvent): void {\n const target = event.data;\n if (target === debuggerModel.target()) {\n updateTitle();\n }\n }\n\n debuggerModel.addEventListener(SDK.DebuggerModel.Events.DebuggerPaused, updatePausedState);\n debuggerModel.addEventListener(SDK.DebuggerModel.Events.DebuggerResumed, updatePausedState);\n debuggerModel.runtimeModel().addEventListener(SDK.RuntimeModel.Events.ExecutionContextChanged, updateTitle);\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.NameChanged, targetNameChanged);\n\n updatePausedState();\n updateTitle();\n return element;\n }\n\n heightForItem(_debuggerModel: SDK.DebuggerModel.DebuggerModel): number {\n console.assert(false); // Should not be called.\n return 0;\n }\n\n isItemSelectable(_debuggerModel: SDK.DebuggerModel.DebuggerModel): boolean {\n return true;\n }\n\n selectedItemChanged(\n _from: SDK.DebuggerModel.DebuggerModel|null, _to: SDK.DebuggerModel.DebuggerModel|null, fromElement: Element|null,\n toElement: Element|null): void {\n const fromEle = (fromElement as HTMLElement | null);\n if (fromEle) {\n fromEle.tabIndex = -1;\n }\n const toEle = (toElement as HTMLElement | null);\n if (toEle) {\n this.setDefaultFocusedElement(toEle);\n toEle.tabIndex = 0;\n if (this.hasFocus()) {\n toEle.focus();\n }\n }\n }\n\n updateSelectedItemARIA(_fromElement: Element|null, _toElement: Element|null): boolean {\n return false;\n }\n\n modelAdded(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n this.items.insert(this.items.length, debuggerModel);\n const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);\n if (currentTarget === debuggerModel.target()) {\n this.list.selectItem(debuggerModel);\n }\n }\n\n modelRemoved(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n this.items.remove(this.items.indexOf(debuggerModel));\n }\n\n private targetFlavorChanged({data: target}: Common.EventTarget.EventTargetEvent): void {\n const hadFocus = this.hasFocus();\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n this.list.selectItem(debuggerModel);\n if (debuggerModel) {\n this.list.refreshItem(debuggerModel);\n }\n if (this.selectedModel !== null) {\n this.list.refreshItem(this.selectedModel);\n }\n this.selectedModel = debuggerModel;\n if (hadFocus) {\n this.focus();\n }\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([threadsSidebarPaneStyles]);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/WatchExpressionsSidebarPane.js b/public/panels/sources/WatchExpressionsSidebarPane.js index 6d8b57e9e..674c14257 100644 --- a/public/panels/sources/WatchExpressionsSidebarPane.js +++ b/public/panels/sources/WatchExpressionsSidebarPane.js @@ -110,6 +110,7 @@ export class WatchExpressionsSidebarPane extends UI.ThrottledWidget.ThrottledWid this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('debugger-watch')}`); this.contentElement.addEventListener('contextmenu', this.contextMenu.bind(this), false); this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline(); + this.treeOutline.hideOverflow(); this.treeOutline.setShowSelectionOnKeyboardFocus(/* show */ true); this.expandController = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController(this.treeOutline); diff --git a/public/panels/sources/WatchExpressionsSidebarPane.js.map b/public/panels/sources/WatchExpressionsSidebarPane.js.map index c368a9851..adadfd1d3 100644 --- a/public/panels/sources/WatchExpressionsSidebarPane.js.map +++ b/public/panels/sources/WatchExpressionsSidebarPane.js.map @@ -1 +1 @@ -{"version":3,"file":"WatchExpressionsSidebarPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/WatchExpressionsSidebarPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qDAAqD,CAAC;AACvF,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,sDAAsD;A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AAY,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE;YACvE,WAAW,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAChD;IACH,CAAC;IAEO,sBAAsB;QAC5B,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IACnG,CAAC;IAEO,MAAM,CAAU,kBAAkB,GAAG,aAAa,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) IBM Corp. 2009 All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of IBM Corp. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Formatter from '../../models/formatter/formatter.js';\nimport * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\n// eslint-disable-next-line rulesdir/es_modules_import\nimport objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {UISourceCodeFrame} from './UISourceCodeFrame.js';\nimport watchExpressionsSidebarPaneStyles from './watchExpressionsSidebarPane.css.js';\n\nconst UIStrings = {\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel\n */\n addWatchExpression: 'Add watch expression',\n /**\n *@description Tooltip/screen reader label of a button in the Sources panel that refreshes all watch expressions.\n */\n refreshWatchExpressions: 'Refresh watch expressions',\n /**\n *@description Empty element text content in Watch Expressions Sidebar Pane of the Sources panel\n */\n noWatchExpressions: 'No watch expressions',\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel\n */\n deleteAllWatchExpressions: 'Delete all watch expressions',\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel\n */\n addPropertyPathToWatch: 'Add property path to watch',\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel\n */\n deleteWatchExpression: 'Delete watch expression',\n /**\n *@description Value element text content in Watch Expressions Sidebar Pane of the Sources panel\n */\n notAvailable: '',\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel and Network pane request.\n */\n copyValue: 'Copy value',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/WatchExpressionsSidebarPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet watchExpressionsSidebarPaneInstance: WatchExpressionsSidebarPane;\n\nexport class WatchExpressionsSidebarPane extends UI.ThrottledWidget.ThrottledWidget implements\n UI.ActionRegistration.ActionDelegate, UI.Toolbar.ItemsProvider,\n UI.ContextMenu.Provider {\n private watchExpressions: WatchExpression[];\n private emptyElement!: HTMLElement;\n private readonly watchExpressionsSetting: Common.Settings.Setting;\n private readonly addButton: UI.Toolbar.ToolbarButton;\n private readonly refreshButton: UI.Toolbar.ToolbarButton;\n private readonly treeOutline: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline;\n private readonly expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController;\n private readonly linkifier: Components.Linkifier.Linkifier;\n private constructor() {\n super(true);\n\n // TODO(szuend): Replace with a Set once the web test\n // panels/sources/debugger-ui/watch-expressions-preserve-expansion.js is either converted\n // to an e2e test or no longer accesses this variable directly.\n this.watchExpressions = [];\n this.watchExpressionsSetting =\n Common.Settings.Settings.instance().createLocalSetting('watchExpressions', []);\n\n this.addButton = new UI.Toolbar.ToolbarButton(\n i18nString(UIStrings.addWatchExpression), 'plus', undefined, 'add-watch-expression');\n this.addButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n void this.addButtonClicked();\n });\n this.refreshButton = new UI.Toolbar.ToolbarButton(\n i18nString(UIStrings.refreshWatchExpressions), 'refresh', undefined, 'refresh-watch-expressions');\n this.refreshButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.update, this);\n\n this.contentElement.classList.add('watch-expressions');\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('debugger-watch')}`);\n this.contentElement.addEventListener('contextmenu', this.contextMenu.bind(this), false);\n this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline();\n\n this.treeOutline.setShowSelectionOnKeyboardFocus(/* show */ true);\n this.expandController =\n new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController(this.treeOutline);\n\n UI.Context.Context.instance().addFlavorChangeListener(SDK.RuntimeModel.ExecutionContext, this.update, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.update, this);\n this.linkifier = new Components.Linkifier.Linkifier();\n this.update();\n }\n\n static instance(): WatchExpressionsSidebarPane {\n if (!watchExpressionsSidebarPaneInstance) {\n watchExpressionsSidebarPaneInstance = new WatchExpressionsSidebarPane();\n }\n return watchExpressionsSidebarPaneInstance;\n }\n\n toolbarItems(): UI.Toolbar.ToolbarItem[] {\n return [this.addButton, this.refreshButton];\n }\n\n override focus(): void {\n if (this.hasFocus()) {\n return;\n }\n if (this.watchExpressions.length > 0) {\n this.treeOutline.forceSelect();\n }\n }\n\n hasExpressions(): boolean {\n return Boolean(this.watchExpressionsSetting.get().length);\n }\n\n private saveExpressions(): void {\n const toSave = [];\n for (let i = 0; i < this.watchExpressions.length; i++) {\n const expression = this.watchExpressions[i].expression();\n if (expression) {\n toSave.push(expression);\n }\n }\n\n this.watchExpressionsSetting.set(toSave);\n }\n\n private async addButtonClicked(): Promise {\n await UI.ViewManager.ViewManager.instance().showView('sources.watch');\n this.emptyElement.classList.add('hidden');\n this.createWatchExpression(null).startEditing();\n }\n\n override async doUpdate(): Promise {\n this.linkifier.reset();\n this.contentElement.removeChildren();\n this.treeOutline.removeChildren();\n this.watchExpressions = [];\n this.emptyElement = (this.contentElement.createChild('div', 'gray-info-message') as HTMLElement);\n this.emptyElement.textContent = i18nString(UIStrings.noWatchExpressions);\n this.emptyElement.tabIndex = -1;\n const watchExpressionStrings = this.watchExpressionsSetting.get();\n if (watchExpressionStrings.length) {\n this.emptyElement.classList.add('hidden');\n }\n for (let i = 0; i < watchExpressionStrings.length; ++i) {\n const expression = watchExpressionStrings[i];\n if (!expression) {\n continue;\n }\n\n this.createWatchExpression(expression);\n }\n }\n\n private createWatchExpression(expression: string|null): WatchExpression {\n this.contentElement.appendChild(this.treeOutline.element);\n const watchExpression = new WatchExpression(expression, this.expandController, this.linkifier);\n watchExpression.addEventListener(Events.ExpressionUpdated, this.watchExpressionUpdated, this);\n this.treeOutline.appendChild(watchExpression.treeElement());\n this.watchExpressions.push(watchExpression);\n return watchExpression;\n }\n\n private watchExpressionUpdated({data: watchExpression}: Common.EventTarget.EventTargetEvent): void {\n if (!watchExpression.expression()) {\n Platform.ArrayUtilities.removeElement(this.watchExpressions, watchExpression);\n this.treeOutline.removeChild(watchExpression.treeElement());\n this.emptyElement.classList.toggle('hidden', Boolean(this.watchExpressions.length));\n if (this.watchExpressions.length === 0) {\n this.treeOutline.element.remove();\n }\n }\n\n this.saveExpressions();\n }\n\n private contextMenu(event: MouseEvent): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n this.populateContextMenu(contextMenu, event);\n void contextMenu.show();\n }\n\n private populateContextMenu(contextMenu: UI.ContextMenu.ContextMenu, event: MouseEvent): void {\n let isEditing = false;\n for (const watchExpression of this.watchExpressions) {\n isEditing = isEditing || watchExpression.isEditing();\n }\n\n if (!isEditing) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.addWatchExpression), this.addButtonClicked.bind(this),\n {jslogContext: 'add-watch-expression'});\n }\n\n if (this.watchExpressions.length > 1) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.deleteAllWatchExpressions), this.deleteAllButtonClicked.bind(this),\n {jslogContext: 'delete-all-watch-expressions'});\n }\n\n const treeElement = this.treeOutline.treeElementFromEvent(event);\n if (!treeElement) {\n return;\n }\n const currentWatchExpression =\n this.watchExpressions.find(watchExpression => treeElement.hasAncestorOrSelf(watchExpression.treeElement()));\n if (currentWatchExpression) {\n currentWatchExpression.populateContextMenu(contextMenu, event);\n }\n }\n\n private deleteAllButtonClicked(): void {\n this.watchExpressions = [];\n this.saveExpressions();\n this.update();\n }\n\n private async focusAndAddExpressionToWatch(expression: string): Promise {\n await UI.ViewManager.ViewManager.instance().showView('sources.watch');\n this.createWatchExpression(expression);\n this.saveExpressions();\n this.update();\n }\n\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n const frame = UI.Context.Context.instance().flavor(UISourceCodeFrame);\n if (!frame) {\n return false;\n }\n const {state} = frame.textEditor;\n const text = state.sliceDoc(state.selection.main.from, state.selection.main.to);\n void this.focusAndAddExpressionToWatch(text);\n return true;\n }\n\n appendApplicableItems(\n _event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement|UISourceCodeFrame): void {\n if (target instanceof ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement) {\n if (!target.property.synthetic) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.addPropertyPathToWatch), () => this.focusAndAddExpressionToWatch(target.path()));\n }\n return;\n }\n\n if (target.textEditor.state.selection.main.empty) {\n return;\n }\n\n contextMenu.debugSection().appendAction('sources.add-to-watch');\n }\n\n override wasShown(): void {\n super.wasShown();\n this.treeOutline.registerCSSFiles([watchExpressionsSidebarPaneStyles]);\n this.registerCSSFiles([watchExpressionsSidebarPaneStyles, objectValueStyles]);\n }\n}\n\nexport class WatchExpression extends Common.ObjectWrapper.ObjectWrapper {\n private treeElementInternal!: UI.TreeOutline.TreeElement;\n private nameElement!: Element;\n private valueElement!: Element;\n private expressionInternal: string|null;\n private readonly expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController;\n private element: HTMLDivElement;\n private editing: boolean;\n private linkifier: Components.Linkifier.Linkifier;\n private textPrompt?: ObjectUI.ObjectPropertiesSection.ObjectPropertyPrompt;\n private result?: SDK.RemoteObject.RemoteObject|null;\n private preventClickTimeout?: number;\n private resizeObserver?: ResizeObserver;\n constructor(\n expression: string|null,\n expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController,\n linkifier: Components.Linkifier.Linkifier) {\n super();\n\n this.expressionInternal = expression;\n this.expandController = expandController;\n this.element = document.createElement('div');\n this.element.classList.add('watch-expression');\n this.element.classList.add('monospace');\n this.editing = false;\n this.linkifier = linkifier;\n\n this.createWatchExpression();\n this.update();\n }\n\n treeElement(): UI.TreeOutline.TreeElement {\n return this.treeElementInternal;\n }\n\n expression(): string|null {\n return this.expressionInternal;\n }\n\n async #evaluateExpression(executionContext: SDK.RuntimeModel.ExecutionContext, expression: string):\n Promise {\n if (Root.Runtime.experiments.isEnabled('evaluateExpressionsWithSourceMaps')) {\n const callFrame = executionContext.debuggerModel.selectedCallFrame();\n if (callFrame) {\n const nameMap = await SourceMapScopes.NamesResolver.allVariablesInCallFrame(callFrame);\n try {\n expression =\n await Formatter.FormatterWorkerPool.formatterWorkerPool().javaScriptSubstitute(expression, nameMap);\n } catch {\n }\n }\n }\n\n return executionContext.evaluate(\n {\n expression,\n objectGroup: WatchExpression.watchObjectGroupId,\n includeCommandLineAPI: false,\n silent: true,\n returnByValue: false,\n generatePreview: false,\n },\n /* userGesture */ false,\n /* awaitPromise */ false);\n }\n\n update(): void {\n const currentExecutionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (currentExecutionContext && this.expressionInternal) {\n void this.#evaluateExpression(currentExecutionContext, this.expressionInternal).then(result => {\n if ('object' in result) {\n this.createWatchExpression(result.object, result.exceptionDetails);\n } else {\n this.createWatchExpression();\n }\n });\n } else {\n this.createWatchExpression();\n }\n }\n\n startEditing(): void {\n this.editing = true;\n this.treeElementInternal.setDisableSelectFocus(true);\n this.element.removeChildren();\n const newDiv = this.element.createChild('div');\n newDiv.textContent = this.nameElement.textContent;\n this.textPrompt = new ObjectUI.ObjectPropertiesSection.ObjectPropertyPrompt();\n this.textPrompt.renderAsBlock();\n const proxyElement = (this.textPrompt.attachAndStartEditing(newDiv, this.finishEditing.bind(this)) as HTMLElement);\n this.treeElementInternal.listItemElement.classList.add('watch-expression-editing');\n this.treeElementInternal.collapse();\n proxyElement.classList.add('watch-expression-text-prompt-proxy');\n proxyElement.addEventListener('keydown', this.promptKeyDown.bind(this), false);\n const selection = this.element.getComponentSelection();\n if (selection) {\n selection.selectAllChildren(newDiv);\n }\n }\n\n isEditing(): boolean {\n return Boolean(this.editing);\n }\n\n private finishEditing(event: Event, canceled?: boolean): void {\n if (event) {\n event.consume(canceled);\n }\n\n this.editing = false;\n this.treeElementInternal.setDisableSelectFocus(false);\n this.treeElementInternal.listItemElement.classList.remove('watch-expression-editing');\n if (this.textPrompt) {\n this.textPrompt.detach();\n const newExpression = canceled ? this.expressionInternal : this.textPrompt.text();\n this.textPrompt = undefined;\n this.element.removeChildren();\n this.updateExpression(newExpression);\n }\n }\n\n private dblClickOnWatchExpression(event: Event): void {\n event.consume();\n if (!this.isEditing()) {\n this.startEditing();\n }\n }\n\n private updateExpression(newExpression: string|null): void {\n if (this.expressionInternal) {\n this.expandController.stopWatchSectionsWithId(this.expressionInternal);\n }\n this.resizeObserver?.disconnect();\n this.expressionInternal = newExpression;\n this.update();\n this.dispatchEventToListeners(Events.ExpressionUpdated, this);\n }\n\n private deleteWatchExpression(event: Event): void {\n event.consume(true);\n this.updateExpression(null);\n }\n\n private createWatchExpression(\n result?: SDK.RemoteObject.RemoteObject, exceptionDetails?: Protocol.Runtime.ExceptionDetails): void {\n this.result = result || null;\n\n this.element.removeChildren();\n const oldTreeElement = this.treeElementInternal;\n this.createWatchExpressionTreeElement(result, exceptionDetails);\n if (oldTreeElement && oldTreeElement.parent) {\n const root = oldTreeElement.parent;\n const index = root.indexOfChild(oldTreeElement);\n root.removeChild(oldTreeElement);\n root.insertChild(this.treeElementInternal, index);\n }\n this.treeElementInternal.select();\n }\n\n private createWatchExpressionHeader(\n expressionValue?: SDK.RemoteObject.RemoteObject, exceptionDetails?: Protocol.Runtime.ExceptionDetails): Element {\n const headerElement = this.element.createChild('div', 'watch-expression-header');\n const deleteButton = UI.Icon.Icon.create('cross', 'watch-expression-delete-button');\n deleteButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('delete-watch-expression')}`);\n this.resizeObserver = new ResizeObserver(entries => {\n entries.forEach(entry => {\n // 55 serves as a width threshold here (in px)\n if (entry.contentRect.width < 55) {\n deleteButton.classList.remove('right-aligned');\n deleteButton.classList.add('left-aligned');\n } else {\n deleteButton.classList.remove('left-aligned');\n deleteButton.classList.add('right-aligned');\n }\n });\n });\n this.resizeObserver.observe(headerElement);\n UI.Tooltip.Tooltip.install(deleteButton, i18nString(UIStrings.deleteWatchExpression));\n deleteButton.addEventListener('click', this.deleteWatchExpression.bind(this), false);\n\n const titleElement = headerElement.createChild('div', 'watch-expression-title tree-element-title');\n titleElement.appendChild(deleteButton);\n this.nameElement =\n ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.createNameElement(this.expressionInternal);\n if (Boolean(exceptionDetails) || !expressionValue) {\n this.valueElement = document.createElement('span');\n this.valueElement.classList.add('watch-expression-error');\n this.valueElement.classList.add('value');\n titleElement.classList.add('dimmed');\n this.valueElement.textContent = i18nString(UIStrings.notAvailable);\n if (exceptionDetails !== undefined && exceptionDetails.exception !== undefined &&\n exceptionDetails.exception.description !== undefined) {\n UI.Tooltip.Tooltip.install(this.valueElement as HTMLElement, exceptionDetails.exception.description);\n }\n } else {\n const propertyValue =\n ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.createPropertyValueWithCustomSupport(\n expressionValue, Boolean(exceptionDetails), false /* showPreview */, titleElement, this.linkifier);\n this.valueElement = propertyValue.element;\n }\n const separatorElement = document.createElement('span');\n separatorElement.classList.add('watch-expressions-separator');\n separatorElement.textContent = ': ';\n titleElement.append(this.nameElement, separatorElement, this.valueElement);\n\n return headerElement;\n }\n\n private createWatchExpressionTreeElement(\n expressionValue?: SDK.RemoteObject.RemoteObject, exceptionDetails?: Protocol.Runtime.ExceptionDetails): void {\n const headerElement = this.createWatchExpressionHeader(expressionValue, exceptionDetails);\n\n if (!exceptionDetails && expressionValue && expressionValue.hasChildren && !expressionValue.customPreview()) {\n headerElement.classList.add('watch-expression-object-header');\n this.treeElementInternal = new ObjectUI.ObjectPropertiesSection.RootElement(expressionValue, this.linkifier);\n this.expandController.watchSection(\n (this.expressionInternal as string),\n (this.treeElementInternal as ObjectUI.ObjectPropertiesSection.RootElement));\n this.treeElementInternal.toggleOnClick = false;\n this.treeElementInternal.listItemElement.addEventListener('click', this.onSectionClick.bind(this), false);\n this.treeElementInternal.listItemElement.addEventListener('dblclick', this.dblClickOnWatchExpression.bind(this));\n } else {\n headerElement.addEventListener('dblclick', this.dblClickOnWatchExpression.bind(this));\n this.treeElementInternal = new UI.TreeOutline.TreeElement();\n }\n this.treeElementInternal.title = this.element;\n this.treeElementInternal.listItemElement.classList.add('watch-expression-tree-item');\n this.treeElementInternal.listItemElement.addEventListener('keydown', event => {\n if (event.key === 'Enter' && !this.isEditing()) {\n this.startEditing();\n event.consume(true);\n } else if (event.key === 'Delete' && !this.isEditing()) {\n this.deleteWatchExpression(event);\n }\n });\n }\n\n private onSectionClick(event: Event): void {\n event.consume(true);\n const mouseEvent = (event as MouseEvent);\n if (mouseEvent.detail === 1) {\n this.preventClickTimeout = window.setTimeout(handleClick.bind(this), 333);\n } else if (this.preventClickTimeout !== undefined) {\n window.clearTimeout(this.preventClickTimeout);\n this.preventClickTimeout = undefined;\n }\n\n function handleClick(this: WatchExpression): void {\n if (!this.treeElementInternal) {\n return;\n }\n\n if (this.treeElementInternal.expanded) {\n this.treeElementInternal.collapse();\n } else if (!this.editing) {\n this.treeElementInternal.expand();\n }\n }\n }\n\n private promptKeyDown(event: KeyboardEvent): void {\n const isEscapeKey = Platform.KeyboardUtilities.isEscKey(event);\n if (event.key === 'Enter' || isEscapeKey) {\n this.finishEditing(event, isEscapeKey);\n }\n }\n\n populateContextMenu(contextMenu: UI.ContextMenu.ContextMenu, event: Event): void {\n if (!this.isEditing()) {\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.deleteWatchExpression), this.updateExpression.bind(this, null),\n {jslogContext: 'delete-watch-expression'});\n }\n\n if (!this.isEditing() && this.result && (this.result.type === 'number' || this.result.type === 'string')) {\n contextMenu.clipboardSection().appendItem(\n i18nString(UIStrings.copyValue), this.copyValueButtonClicked.bind(this),\n {jslogContext: 'copy-watch-expression-value'});\n }\n\n const target = UI.UIUtils.deepElementFromEvent(event);\n if (target && this.valueElement.isSelfOrAncestor(target) && this.result) {\n contextMenu.appendApplicableItems(this.result);\n }\n }\n\n private copyValueButtonClicked(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.valueElement.textContent);\n }\n\n private static readonly watchObjectGroupId = 'watch-group';\n}\n\nconst enum Events {\n ExpressionUpdated = 'ExpressionUpdated',\n}\n\ntype EventTypes = {\n [Events.ExpressionUpdated]: WatchExpression,\n};\n"]} \ No newline at end of file +{"version":3,"file":"WatchExpressionsSidebarPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/WatchExpressionsSidebarPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qDAAqD,CAAC;AACvF,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;A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oB,CAAC,KAAK,CAAC,CAAC;QACtD,IAAI,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE;YACvE,WAAW,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAChD;IACH,CAAC;IAEO,sBAAsB;QAC5B,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IACnG,CAAC;IAEO,MAAM,CAAU,kBAAkB,GAAG,aAAa,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) IBM Corp. 2009 All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of IBM Corp. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Formatter from '../../models/formatter/formatter.js';\nimport * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\n// eslint-disable-next-line rulesdir/es_modules_import\nimport objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {UISourceCodeFrame} from './UISourceCodeFrame.js';\nimport watchExpressionsSidebarPaneStyles from './watchExpressionsSidebarPane.css.js';\n\nconst UIStrings = {\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel\n */\n addWatchExpression: 'Add watch expression',\n /**\n *@description Tooltip/screen reader label of a button in the Sources panel that refreshes all watch expressions.\n */\n refreshWatchExpressions: 'Refresh watch expressions',\n /**\n *@description Empty element text content in Watch Expressions Sidebar Pane of the Sources panel\n */\n noWatchExpressions: 'No watch expressions',\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel\n */\n deleteAllWatchExpressions: 'Delete all watch expressions',\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel\n */\n addPropertyPathToWatch: 'Add property path to watch',\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel\n */\n deleteWatchExpression: 'Delete watch expression',\n /**\n *@description Value element text content in Watch Expressions Sidebar Pane of the Sources panel\n */\n notAvailable: '',\n /**\n *@description A context menu item in the Watch Expressions Sidebar Pane of the Sources panel and Network pane request.\n */\n copyValue: 'Copy value',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/WatchExpressionsSidebarPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet watchExpressionsSidebarPaneInstance: WatchExpressionsSidebarPane;\n\nexport class WatchExpressionsSidebarPane extends UI.ThrottledWidget.ThrottledWidget implements\n UI.ActionRegistration.ActionDelegate, UI.Toolbar.ItemsProvider,\n UI.ContextMenu.Provider {\n private watchExpressions: WatchExpression[];\n private emptyElement!: HTMLElement;\n private readonly watchExpressionsSetting: Common.Settings.Setting;\n private readonly addButton: UI.Toolbar.ToolbarButton;\n private readonly refreshButton: UI.Toolbar.ToolbarButton;\n private readonly treeOutline: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline;\n private readonly expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController;\n private readonly linkifier: Components.Linkifier.Linkifier;\n private constructor() {\n super(true);\n\n // TODO(szuend): Replace with a Set once the web test\n // panels/sources/debugger-ui/watch-expressions-preserve-expansion.js is either converted\n // to an e2e test or no longer accesses this variable directly.\n this.watchExpressions = [];\n this.watchExpressionsSetting =\n Common.Settings.Settings.instance().createLocalSetting('watchExpressions', []);\n\n this.addButton = new UI.Toolbar.ToolbarButton(\n i18nString(UIStrings.addWatchExpression), 'plus', undefined, 'add-watch-expression');\n this.addButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n void this.addButtonClicked();\n });\n this.refreshButton = new UI.Toolbar.ToolbarButton(\n i18nString(UIStrings.refreshWatchExpressions), 'refresh', undefined, 'refresh-watch-expressions');\n this.refreshButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.update, this);\n\n this.contentElement.classList.add('watch-expressions');\n this.contentElement.setAttribute('jslog', `${VisualLogging.pane().context('debugger-watch')}`);\n this.contentElement.addEventListener('contextmenu', this.contextMenu.bind(this), false);\n this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline();\n this.treeOutline.hideOverflow();\n\n this.treeOutline.setShowSelectionOnKeyboardFocus(/* show */ true);\n this.expandController =\n new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController(this.treeOutline);\n\n UI.Context.Context.instance().addFlavorChangeListener(SDK.RuntimeModel.ExecutionContext, this.update, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.update, this);\n this.linkifier = new Components.Linkifier.Linkifier();\n this.update();\n }\n\n static instance(): WatchExpressionsSidebarPane {\n if (!watchExpressionsSidebarPaneInstance) {\n watchExpressionsSidebarPaneInstance = new WatchExpressionsSidebarPane();\n }\n return watchExpressionsSidebarPaneInstance;\n }\n\n toolbarItems(): UI.Toolbar.ToolbarItem[] {\n return [this.addButton, this.refreshButton];\n }\n\n override focus(): void {\n if (this.hasFocus()) {\n return;\n }\n if (this.watchExpressions.length > 0) {\n this.treeOutline.forceSelect();\n }\n }\n\n hasExpressions(): boolean {\n return Boolean(this.watchExpressionsSetting.get().length);\n }\n\n private saveExpressions(): void {\n const toSave = [];\n for (let i = 0; i < this.watchExpressions.length; i++) {\n const expression = this.watchExpressions[i].expression();\n if (expression) {\n toSave.push(expression);\n }\n }\n\n this.watchExpressionsSetting.set(toSave);\n }\n\n private async addButtonClicked(): Promise {\n await UI.ViewManager.ViewManager.instance().showView('sources.watch');\n this.emptyElement.classList.add('hidden');\n this.createWatchExpression(null).startEditing();\n }\n\n override async doUpdate(): Promise {\n this.linkifier.reset();\n this.contentElement.removeChildren();\n this.treeOutline.removeChildren();\n this.watchExpressions = [];\n this.emptyElement = (this.contentElement.createChild('div', 'gray-info-message') as HTMLElement);\n this.emptyElement.textContent = i18nString(UIStrings.noWatchExpressions);\n this.emptyElement.tabIndex = -1;\n const watchExpressionStrings = this.watchExpressionsSetting.get();\n if (watchExpressionStrings.length) {\n this.emptyElement.classList.add('hidden');\n }\n for (let i = 0; i < watchExpressionStrings.length; ++i) {\n const expression = watchExpressionStrings[i];\n if (!expression) {\n continue;\n }\n\n this.createWatchExpression(expression);\n }\n }\n\n private createWatchExpression(expression: string|null): WatchExpression {\n this.contentElement.appendChild(this.treeOutline.element);\n const watchExpression = new WatchExpression(expression, this.expandController, this.linkifier);\n watchExpression.addEventListener(Events.ExpressionUpdated, this.watchExpressionUpdated, this);\n this.treeOutline.appendChild(watchExpression.treeElement());\n this.watchExpressions.push(watchExpression);\n return watchExpression;\n }\n\n private watchExpressionUpdated({data: watchExpression}: Common.EventTarget.EventTargetEvent): void {\n if (!watchExpression.expression()) {\n Platform.ArrayUtilities.removeElement(this.watchExpressions, watchExpression);\n this.treeOutline.removeChild(watchExpression.treeElement());\n this.emptyElement.classList.toggle('hidden', Boolean(this.watchExpressions.length));\n if (this.watchExpressions.length === 0) {\n this.treeOutline.element.remove();\n }\n }\n\n this.saveExpressions();\n }\n\n private contextMenu(event: MouseEvent): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n this.populateContextMenu(contextMenu, event);\n void contextMenu.show();\n }\n\n private populateContextMenu(contextMenu: UI.ContextMenu.ContextMenu, event: MouseEvent): void {\n let isEditing = false;\n for (const watchExpression of this.watchExpressions) {\n isEditing = isEditing || watchExpression.isEditing();\n }\n\n if (!isEditing) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.addWatchExpression), this.addButtonClicked.bind(this),\n {jslogContext: 'add-watch-expression'});\n }\n\n if (this.watchExpressions.length > 1) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.deleteAllWatchExpressions), this.deleteAllButtonClicked.bind(this),\n {jslogContext: 'delete-all-watch-expressions'});\n }\n\n const treeElement = this.treeOutline.treeElementFromEvent(event);\n if (!treeElement) {\n return;\n }\n const currentWatchExpression =\n this.watchExpressions.find(watchExpression => treeElement.hasAncestorOrSelf(watchExpression.treeElement()));\n if (currentWatchExpression) {\n currentWatchExpression.populateContextMenu(contextMenu, event);\n }\n }\n\n private deleteAllButtonClicked(): void {\n this.watchExpressions = [];\n this.saveExpressions();\n this.update();\n }\n\n private async focusAndAddExpressionToWatch(expression: string): Promise {\n await UI.ViewManager.ViewManager.instance().showView('sources.watch');\n this.createWatchExpression(expression);\n this.saveExpressions();\n this.update();\n }\n\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n const frame = UI.Context.Context.instance().flavor(UISourceCodeFrame);\n if (!frame) {\n return false;\n }\n const {state} = frame.textEditor;\n const text = state.sliceDoc(state.selection.main.from, state.selection.main.to);\n void this.focusAndAddExpressionToWatch(text);\n return true;\n }\n\n appendApplicableItems(\n _event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement|UISourceCodeFrame): void {\n if (target instanceof ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement) {\n if (!target.property.synthetic) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.addPropertyPathToWatch), () => this.focusAndAddExpressionToWatch(target.path()));\n }\n return;\n }\n\n if (target.textEditor.state.selection.main.empty) {\n return;\n }\n\n contextMenu.debugSection().appendAction('sources.add-to-watch');\n }\n\n override wasShown(): void {\n super.wasShown();\n this.treeOutline.registerCSSFiles([watchExpressionsSidebarPaneStyles]);\n this.registerCSSFiles([watchExpressionsSidebarPaneStyles, objectValueStyles]);\n }\n}\n\nexport class WatchExpression extends Common.ObjectWrapper.ObjectWrapper {\n private treeElementInternal!: UI.TreeOutline.TreeElement;\n private nameElement!: Element;\n private valueElement!: Element;\n private expressionInternal: string|null;\n private readonly expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController;\n private element: HTMLDivElement;\n private editing: boolean;\n private linkifier: Components.Linkifier.Linkifier;\n private textPrompt?: ObjectUI.ObjectPropertiesSection.ObjectPropertyPrompt;\n private result?: SDK.RemoteObject.RemoteObject|null;\n private preventClickTimeout?: number;\n private resizeObserver?: ResizeObserver;\n constructor(\n expression: string|null,\n expandController: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController,\n linkifier: Components.Linkifier.Linkifier) {\n super();\n\n this.expressionInternal = expression;\n this.expandController = expandController;\n this.element = document.createElement('div');\n this.element.classList.add('watch-expression');\n this.element.classList.add('monospace');\n this.editing = false;\n this.linkifier = linkifier;\n\n this.createWatchExpression();\n this.update();\n }\n\n treeElement(): UI.TreeOutline.TreeElement {\n return this.treeElementInternal;\n }\n\n expression(): string|null {\n return this.expressionInternal;\n }\n\n async #evaluateExpression(executionContext: SDK.RuntimeModel.ExecutionContext, expression: string):\n Promise {\n if (Root.Runtime.experiments.isEnabled('evaluateExpressionsWithSourceMaps')) {\n const callFrame = executionContext.debuggerModel.selectedCallFrame();\n if (callFrame) {\n const nameMap = await SourceMapScopes.NamesResolver.allVariablesInCallFrame(callFrame);\n try {\n expression =\n await Formatter.FormatterWorkerPool.formatterWorkerPool().javaScriptSubstitute(expression, nameMap);\n } catch {\n }\n }\n }\n\n return executionContext.evaluate(\n {\n expression,\n objectGroup: WatchExpression.watchObjectGroupId,\n includeCommandLineAPI: false,\n silent: true,\n returnByValue: false,\n generatePreview: false,\n },\n /* userGesture */ false,\n /* awaitPromise */ false);\n }\n\n update(): void {\n const currentExecutionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (currentExecutionContext && this.expressionInternal) {\n void this.#evaluateExpression(currentExecutionContext, this.expressionInternal).then(result => {\n if ('object' in result) {\n this.createWatchExpression(result.object, result.exceptionDetails);\n } else {\n this.createWatchExpression();\n }\n });\n } else {\n this.createWatchExpression();\n }\n }\n\n startEditing(): void {\n this.editing = true;\n this.treeElementInternal.setDisableSelectFocus(true);\n this.element.removeChildren();\n const newDiv = this.element.createChild('div');\n newDiv.textContent = this.nameElement.textContent;\n this.textPrompt = new ObjectUI.ObjectPropertiesSection.ObjectPropertyPrompt();\n this.textPrompt.renderAsBlock();\n const proxyElement = (this.textPrompt.attachAndStartEditing(newDiv, this.finishEditing.bind(this)) as HTMLElement);\n this.treeElementInternal.listItemElement.classList.add('watch-expression-editing');\n this.treeElementInternal.collapse();\n proxyElement.classList.add('watch-expression-text-prompt-proxy');\n proxyElement.addEventListener('keydown', this.promptKeyDown.bind(this), false);\n const selection = this.element.getComponentSelection();\n if (selection) {\n selection.selectAllChildren(newDiv);\n }\n }\n\n isEditing(): boolean {\n return Boolean(this.editing);\n }\n\n private finishEditing(event: Event, canceled?: boolean): void {\n if (event) {\n event.consume(canceled);\n }\n\n this.editing = false;\n this.treeElementInternal.setDisableSelectFocus(false);\n this.treeElementInternal.listItemElement.classList.remove('watch-expression-editing');\n if (this.textPrompt) {\n this.textPrompt.detach();\n const newExpression = canceled ? this.expressionInternal : this.textPrompt.text();\n this.textPrompt = undefined;\n this.element.removeChildren();\n this.updateExpression(newExpression);\n }\n }\n\n private dblClickOnWatchExpression(event: Event): void {\n event.consume();\n if (!this.isEditing()) {\n this.startEditing();\n }\n }\n\n private updateExpression(newExpression: string|null): void {\n if (this.expressionInternal) {\n this.expandController.stopWatchSectionsWithId(this.expressionInternal);\n }\n this.resizeObserver?.disconnect();\n this.expressionInternal = newExpression;\n this.update();\n this.dispatchEventToListeners(Events.ExpressionUpdated, this);\n }\n\n private deleteWatchExpression(event: Event): void {\n event.consume(true);\n this.updateExpression(null);\n }\n\n private createWatchExpression(\n result?: SDK.RemoteObject.RemoteObject, exceptionDetails?: Protocol.Runtime.ExceptionDetails): void {\n this.result = result || null;\n\n this.element.removeChildren();\n const oldTreeElement = this.treeElementInternal;\n this.createWatchExpressionTreeElement(result, exceptionDetails);\n if (oldTreeElement && oldTreeElement.parent) {\n const root = oldTreeElement.parent;\n const index = root.indexOfChild(oldTreeElement);\n root.removeChild(oldTreeElement);\n root.insertChild(this.treeElementInternal, index);\n }\n this.treeElementInternal.select();\n }\n\n private createWatchExpressionHeader(\n expressionValue?: SDK.RemoteObject.RemoteObject, exceptionDetails?: Protocol.Runtime.ExceptionDetails): Element {\n const headerElement = this.element.createChild('div', 'watch-expression-header');\n const deleteButton = UI.Icon.Icon.create('cross', 'watch-expression-delete-button');\n deleteButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('delete-watch-expression')}`);\n this.resizeObserver = new ResizeObserver(entries => {\n entries.forEach(entry => {\n // 55 serves as a width threshold here (in px)\n if (entry.contentRect.width < 55) {\n deleteButton.classList.remove('right-aligned');\n deleteButton.classList.add('left-aligned');\n } else {\n deleteButton.classList.remove('left-aligned');\n deleteButton.classList.add('right-aligned');\n }\n });\n });\n this.resizeObserver.observe(headerElement);\n UI.Tooltip.Tooltip.install(deleteButton, i18nString(UIStrings.deleteWatchExpression));\n deleteButton.addEventListener('click', this.deleteWatchExpression.bind(this), false);\n\n const titleElement = headerElement.createChild('div', 'watch-expression-title tree-element-title');\n titleElement.appendChild(deleteButton);\n this.nameElement =\n ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.createNameElement(this.expressionInternal);\n if (Boolean(exceptionDetails) || !expressionValue) {\n this.valueElement = document.createElement('span');\n this.valueElement.classList.add('watch-expression-error');\n this.valueElement.classList.add('value');\n titleElement.classList.add('dimmed');\n this.valueElement.textContent = i18nString(UIStrings.notAvailable);\n if (exceptionDetails !== undefined && exceptionDetails.exception !== undefined &&\n exceptionDetails.exception.description !== undefined) {\n UI.Tooltip.Tooltip.install(this.valueElement as HTMLElement, exceptionDetails.exception.description);\n }\n } else {\n const propertyValue =\n ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.createPropertyValueWithCustomSupport(\n expressionValue, Boolean(exceptionDetails), false /* showPreview */, titleElement, this.linkifier);\n this.valueElement = propertyValue.element;\n }\n const separatorElement = document.createElement('span');\n separatorElement.classList.add('watch-expressions-separator');\n separatorElement.textContent = ': ';\n titleElement.append(this.nameElement, separatorElement, this.valueElement);\n\n return headerElement;\n }\n\n private createWatchExpressionTreeElement(\n expressionValue?: SDK.RemoteObject.RemoteObject, exceptionDetails?: Protocol.Runtime.ExceptionDetails): void {\n const headerElement = this.createWatchExpressionHeader(expressionValue, exceptionDetails);\n\n if (!exceptionDetails && expressionValue && expressionValue.hasChildren && !expressionValue.customPreview()) {\n headerElement.classList.add('watch-expression-object-header');\n this.treeElementInternal = new ObjectUI.ObjectPropertiesSection.RootElement(expressionValue, this.linkifier);\n this.expandController.watchSection(\n (this.expressionInternal as string),\n (this.treeElementInternal as ObjectUI.ObjectPropertiesSection.RootElement));\n this.treeElementInternal.toggleOnClick = false;\n this.treeElementInternal.listItemElement.addEventListener('click', this.onSectionClick.bind(this), false);\n this.treeElementInternal.listItemElement.addEventListener('dblclick', this.dblClickOnWatchExpression.bind(this));\n } else {\n headerElement.addEventListener('dblclick', this.dblClickOnWatchExpression.bind(this));\n this.treeElementInternal = new UI.TreeOutline.TreeElement();\n }\n this.treeElementInternal.title = this.element;\n this.treeElementInternal.listItemElement.classList.add('watch-expression-tree-item');\n this.treeElementInternal.listItemElement.addEventListener('keydown', event => {\n if (event.key === 'Enter' && !this.isEditing()) {\n this.startEditing();\n event.consume(true);\n } else if (event.key === 'Delete' && !this.isEditing()) {\n this.deleteWatchExpression(event);\n }\n });\n }\n\n private onSectionClick(event: Event): void {\n event.consume(true);\n const mouseEvent = (event as MouseEvent);\n if (mouseEvent.detail === 1) {\n this.preventClickTimeout = window.setTimeout(handleClick.bind(this), 333);\n } else if (this.preventClickTimeout !== undefined) {\n window.clearTimeout(this.preventClickTimeout);\n this.preventClickTimeout = undefined;\n }\n\n function handleClick(this: WatchExpression): void {\n if (!this.treeElementInternal) {\n return;\n }\n\n if (this.treeElementInternal.expanded) {\n this.treeElementInternal.collapse();\n } else if (!this.editing) {\n this.treeElementInternal.expand();\n }\n }\n }\n\n private promptKeyDown(event: KeyboardEvent): void {\n const isEscapeKey = Platform.KeyboardUtilities.isEscKey(event);\n if (event.key === 'Enter' || isEscapeKey) {\n this.finishEditing(event, isEscapeKey);\n }\n }\n\n populateContextMenu(contextMenu: UI.ContextMenu.ContextMenu, event: Event): void {\n if (!this.isEditing()) {\n contextMenu.editSection().appendItem(\n i18nString(UIStrings.deleteWatchExpression), this.updateExpression.bind(this, null),\n {jslogContext: 'delete-watch-expression'});\n }\n\n if (!this.isEditing() && this.result && (this.result.type === 'number' || this.result.type === 'string')) {\n contextMenu.clipboardSection().appendItem(\n i18nString(UIStrings.copyValue), this.copyValueButtonClicked.bind(this),\n {jslogContext: 'copy-watch-expression-value'});\n }\n\n const target = UI.UIUtils.deepElementFromEvent(event);\n if (target && this.valueElement.isSelfOrAncestor(target) && this.result) {\n contextMenu.appendApplicableItems(this.result);\n }\n }\n\n private copyValueButtonClicked(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.valueElement.textContent);\n }\n\n private static readonly watchObjectGroupId = 'watch-group';\n}\n\nconst enum Events {\n ExpressionUpdated = 'ExpressionUpdated',\n}\n\ntype EventTypes = {\n [Events.ExpressionUpdated]: WatchExpression,\n};\n"]} \ No newline at end of file diff --git a/public/panels/sources/breakpointEditDialog.css.js b/public/panels/sources/breakpointEditDialog.css.js index c1b1ac5bc..026ad1d89 100644 --- a/public/panels/sources/breakpointEditDialog.css.js +++ b/public/panels/sources/breakpointEditDialog.css.js @@ -14,7 +14,7 @@ styles.replaceSync( :host { z-index: 30; padding: 4px; - background-color: var(--sys-color-surface1); + background-color: var(--sys-color-surface3); border-radius: 7px; border: 2px solid var(--sys-color-divider); width: 90%; @@ -24,7 +24,7 @@ styles.replaceSync( :host(.sources-edit-breakpoint-dialog) { border-radius: 0; z-index: 30; - background-color: var(--sys-color-surface1); + background-color: var(--sys-color-surface3); width: 555px; pointer-events: auto; margin-left: -1px; diff --git a/public/panels/sources/sources-meta.js b/public/panels/sources/sources-meta.js index e2c418336..881884638 100644 --- a/public/panels/sources/sources-meta.js +++ b/public/panels/sources/sources-meta.js @@ -391,6 +391,10 @@ const UIStrings = { * comes to a halt. */ enableAutoFocusOnDebuggerPaused: 'Focus Sources panel when triggering a breakpoint', + /** + *@description Title of an action to reveal the active file in the navigator sidebar of the Sources panel + */ + revealActiveFileInSidebar: 'Reveal active file in navigator sidebar', /** * @description Text for command of toggling navigator sidebar in Sources panel */ @@ -450,7 +454,7 @@ UI.ViewManager.registerViewExtension({ persistence: "permanent" /* UI.ViewManager.ViewPersistence.PERMANENT */, async loadView() { const Sources = await loadSourcesModule(); - return Sources.SourcesNavigator.FilesNavigatorView.instance(); + return new Sources.SourcesNavigator.FilesNavigatorView(); }, }); UI.ViewManager.registerViewExtension({ @@ -462,7 +466,7 @@ UI.ViewManager.registerViewExtension({ persistence: "permanent" /* UI.ViewManager.ViewPersistence.PERMANENT */, async loadView() { const Sources = await loadSourcesModule(); - return Sources.SourcesNavigator.SnippetsNavigatorView.instance(); + return new Sources.SourcesNavigator.SnippetsNavigatorView(); }, }); UI.ViewManager.registerViewExtension({ @@ -474,7 +478,7 @@ UI.ViewManager.registerViewExtension({ persistence: "closeable" /* UI.ViewManager.ViewPersistence.CLOSEABLE */, async loadView() { const Sources = await loadSourcesModule(); - return Sources.SearchSourcesView.SearchSourcesView.instance(); + return new Sources.SearchSourcesView.SearchSourcesView(); }, }); UI.ViewManager.registerViewExtension({ @@ -497,7 +501,7 @@ UI.ViewManager.registerViewExtension({ condition: Root.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER, async loadView() { const Sources = await loadSourcesModule(); - return Sources.ThreadsSidebarPane.ThreadsSidebarPane.instance(); + return new Sources.ThreadsSidebarPane.ThreadsSidebarPane(); }, }); UI.ViewManager.registerViewExtension({ @@ -1297,6 +1301,18 @@ UI.ActionRegistration.registerActionExtension({ }, ], }); +UI.ActionRegistration.registerActionExtension({ + actionId: 'sources.reveal-in-navigator-sidebar', + category: UI.ActionRegistration.ActionCategory.SOURCES, + title: i18nLazyString(UIStrings.revealActiveFileInSidebar), + async loadActionDelegate() { + const Sources = await loadSourcesModule(); + return new Sources.SourcesPanel.ActionDelegate(); + }, + contextTypes() { + return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]); + }, +}); UI.ActionRegistration.registerActionExtension({ actionId: 'sources.toggle-navigator-sidebar', category: UI.ActionRegistration.ActionCategory.SOURCES, @@ -1762,6 +1778,16 @@ Common.Revealer.registerRevealer({ return new Sources.DebuggerPlugin.BreakpointLocationRevealer(); }, }); +Common.Revealer.registerRevealer({ + contextTypes() { + return maybeRetrieveContextTypes(Sources => [Sources.SearchSourcesView.SearchSources]); + }, + destination: undefined, + async loadRevealer() { + const Sources = await loadSourcesModule(); + return new Sources.SearchSourcesView.Revealer(); + }, +}); UI.Toolbar.registerToolbarItem({ actionId: 'sources.add-folder-to-workspace', location: UI.Toolbar.ToolbarItemLocation.FILES_NAVIGATION_TOOLBAR, diff --git a/public/panels/sources/sources-meta.js.map b/public/panels/sources/sources-meta.js.map index 5fed6a8c5..e9fe059f2 100644 --- a/public/panels/sources/sources-meta.js.map +++ b/public/panels/sources/sources-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"sources-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/sources-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,SAAS,MAAM,qDAAqD,CAAC;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B,SAAS,EAAE,MAAM;IACjB,KAAK,CAAC,QAAQ;QACZ,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,OAAO,IAAI,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;IACzD,CAAC;IACD,WAAW,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC;IAC3C,eAAe,EAAE,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC;CAClD,CAAC,CAAC;AAEH,SAAS,CAAC,kBAAkB,CAAC,gBAAgB,CAAC;IAC5C,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,MAAM;IACjB,KAAK,CAAC,QAAQ;QACZ,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,OAAO,IAAI,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,CAAC;IAC3D,CAAC;IACD,WAAW,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC;IAC3C,eAAe,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC;CAChD,CAAC,CAAC;AAEH,SAAS,CAAC,kBAAkB,CAAC,gBAAgB,CAAC;IAC5C,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,MAAM;IACjB,KAAK,CAAC,QAAQ;QACZ,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,OAAO,IAAI,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,CAAC;IAC3D,CAAC;IACD,WAAW,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC;IAC3C,eAAe,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC;CAChD,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Breakpoints from '../../models/breakpoints/breakpoints.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as QuickOpen from '../../ui/legacy/components/quick_open/quick_open.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Sources from './sources.js';\nimport type * as SourcesComponents from './components/components.js';\n\nconst UIStrings = {\n /**\n *@description Command for showing the 'Sources' tool\n */\n showSources: 'Show Sources',\n /**\n *@description Name of the Sources panel\n */\n sources: 'Sources',\n /**\n *@description Command for showing the 'Workspace' tool\n */\n showWorkspace: 'Show Workspace',\n /**\n *@description Title of the 'Filesystem' tool in the Files Navigator View, which is part of the Sources tool\n */\n workspace: 'Workspace',\n /**\n *@description Command for showing the 'Snippets' tool\n */\n showSnippets: 'Show Snippets',\n /**\n *@description Title of the 'Snippets' tool in the Snippets Navigator View, which is part of the Sources tool\n */\n snippets: 'Snippets',\n /**\n *@description Command for showing the 'Search' tool\n */\n showSearch: 'Show Search',\n /**\n *@description Title of a search bar or tool\n */\n search: 'Search',\n /**\n *@description Command for showing the 'Quick source' tool\n */\n showQuickSource: 'Show Quick source',\n /**\n *@description Title of the 'Quick source' tool in the bottom drawer\n */\n quickSource: 'Quick source',\n /**\n *@description Command for showing the 'Threads' tool\n */\n showThreads: 'Show Threads',\n /**\n *@description Title of the sources threads\n */\n threads: 'Threads',\n /**\n *@description Command for showing the 'Scope' tool\n */\n showScope: 'Show Scope',\n /**\n *@description Title of the sources scopeChain\n */\n scope: 'Scope',\n /**\n *@description Command for showing the 'Watch' tool\n */\n showWatch: 'Show Watch',\n /**\n *@description Title of the sources watch\n */\n watch: 'Watch',\n /**\n *@description Command for showing the 'Breakpoints' tool\n */\n showBreakpoints: 'Show Breakpoints',\n /**\n *@description Title of the sources jsBreakpoints\n */\n breakpoints: 'Breakpoints',\n /**\n *@description Title of an action under the Debugger category that can be invoked through the Command Menu\n */\n pauseScriptExecution: 'Pause script execution',\n /**\n *@description Title of an action under the Debugger category that can be invoked through the Command Menu\n */\n resumeScriptExecution: 'Resume script execution',\n /**\n *@description Title of an action in the debugger tool to step over\n */\n stepOverNextFunctionCall: 'Step over next function call',\n /**\n *@description Title of an action in the debugger tool to step into\n */\n stepIntoNextFunctionCall: 'Step into next function call',\n /**\n *@description Title of an action in the debugger tool to step\n */\n step: 'Step',\n /**\n *@description Title of an action in the debugger tool to step out\n */\n stepOutOfCurrentFunction: 'Step out of current function',\n /**\n *@description Text to run a code snippet\n */\n runSnippet: 'Run snippet',\n /**\n *@description Text in Java Script Breakpoints Sidebar Pane of the Sources panel\n */\n deactivateBreakpoints: 'Deactivate breakpoints',\n /**\n *@description Text in Java Script Breakpoints Sidebar Pane of the Sources panel\n */\n activateBreakpoints: 'Activate breakpoints',\n /**\n *@description Title of an action in the sources tool to add to watch\n */\n addSelectedTextToWatches: 'Add selected text to watches',\n /**\n *@description Title of an action in the debugger tool to evaluate selection\n */\n evaluateSelectedTextInConsole: 'Evaluate selected text in console',\n /**\n *@description Title of an action that switches files in the Sources panel\n */\n switchFile: 'Switch file',\n /**\n *@description Title of a sources panel action that renames a file\n */\n rename: 'Rename',\n /**\n *@description Title of an action in the sources tool to close all\n */\n closeAll: 'Close All',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (jump to previous editing location in text editor)\n */\n jumpToPreviousEditingLocation: 'Jump to previous editing location',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (jump to next editing location in text editor)\n */\n jumpToNextEditingLocation: 'Jump to next editing location',\n /**\n *@description Title of an action that closes the active editor tab in the Sources panel\n */\n closeTheActiveTab: 'Close the active tab',\n /**\n *@description Text to go to a given line\n */\n goToLine: 'Go to line',\n /**\n *@description Title of an action that opens the go to member menu\n */\n goToAFunctionDeclarationruleSet: 'Go to a function declaration/rule set',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (toggle breakpoint in debugger)\n */\n toggleBreakpoint: 'Toggle breakpoint',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (enable toggle breakpoint shortcut in debugger)\n */\n toggleBreakpointEnabled: 'Toggle breakpoint enabled',\n /**\n *@description Title of a sources panel action that opens the breakpoint input window\n */\n toggleBreakpointInputWindow: 'Toggle breakpoint input window',\n /**\n *@description Text to save something\n */\n save: 'Save',\n /**\n *@description Title of an action to save all files in the Sources panel\n */\n saveAll: 'Save all',\n /**\n *@description Title of an action in the sources tool to create snippet\n */\n createNewSnippet: 'Create new snippet',\n /**\n *@description Title of an action in the sources tool to add folder to workspace\n */\n addFolderToWorkspace: 'Add folder to workspace',\n /**\n *@description Title of an action in the sources tool to add folder to workspace\n */\n addFolder: 'Add folder',\n /**\n *@description Title of an action in the debugger tool to previous call frame\n */\n previousCallFrame: 'Previous call frame',\n /**\n *@description Title of an action in the debugger tool to next call frame\n */\n nextCallFrame: 'Next call frame',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (increment CSS unit by the amount passed in the placeholder in Styles pane)\n *@example {10} PH1\n */\n incrementCssUnitBy: 'Increment CSS unit by {PH1}',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (decrement CSS unit by the amount passed in the placeholder in Styles pane)\n *@example {10} PH1\n */\n decrementCssUnitBy: 'Decrement CSS unit by {PH1}',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n searchInAnonymousAndContent: 'Search in anonymous and content scripts',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotSearchInAnonymousAndContent: 'Do not search in anonymous and content scripts',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n automaticallyRevealFilesIn: 'Automatically reveal files in sidebar',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotAutomaticallyRevealFilesIn: 'Do not automatically reveal files in sidebar',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableJavascriptSourceMaps: 'Enable JavaScript source maps',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableJavascriptSourceMaps: 'Disable JavaScript source maps',\n /**\n *@description Title of a setting that can be invoked through the Command Menu.\n *'tab moves focus' is the name of the setting, which means that when the user\n *hits the tab key, the focus in the UI will be moved to the next part of the\n *text editor, as opposed to inserting a tab character into the text in the\n *text editor.\n */\n enableTabMovesFocus: 'Enable tab moves focus',\n /**\n *@description Title of a setting that can be invoked through the Command Menu.\n *'tab moves focus' is the name of the setting, which means that when the user\n *hits the tab key, the focus in the UI will be moved to the next part of the\n *text editor, as opposed to inserting a tab character into the text in the\n *text editor.\n */\n disableTabMovesFocus: 'Disable tab moves focus',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n detectIndentation: 'Detect indentation',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotDetectIndentation: 'Do not detect indentation',\n /**\n *@description Text for autocompletion\n */\n autocompletion: 'Autocompletion',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableAutocompletion: 'Enable autocompletion',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableAutocompletion: 'Disable autocompletion',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n bracketMatching: 'Bracket matching',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableBracketMatching: 'Enable bracket matching',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableBracketMatching: 'Disable bracket matching',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n codeFolding: 'Code folding',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableCodeFolding: 'Enable code folding',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableCodeFolding: 'Disable code folding',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n showWhitespaceCharacters: 'Show whitespace characters:',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotShowWhitespaceCharacters: 'Do not show whitespace characters',\n /**\n * @description One value of an option that can be set to 'none', 'all', or 'trailing'. The setting\n * controls how whitespace characters are shown in a text editor.\n */\n none: 'None',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n showAllWhitespaceCharacters: 'Show all whitespace characters',\n /**\n *@description Text for everything\n */\n all: 'All',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n showTrailingWhitespaceCharacters: 'Show trailing whitespace characters',\n /**\n *@description A drop-down menu option to show trailing whitespace characters\n */\n trailing: 'Trailing',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n displayVariableValuesInlineWhile: 'Display variable values inline while debugging',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotDisplayVariableValuesInline: 'Do not display variable values inline while debugging',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableCssSourceMaps: 'Enable CSS source maps',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableCssSourceMaps: 'Disable CSS source maps',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n allowScrollingPastEndOfFile: 'Allow scrolling past end of file',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n disallowScrollingPastEndOfFile: 'Disallow scrolling past end of file',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n wasmAutoStepping: 'When debugging wasm with debug information, do not pause on wasm bytecode if possible',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n enableWasmAutoStepping: 'Enable wasm auto-stepping',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n disableWasmAutoStepping: 'Disable wasm auto-stepping',\n\n /**\n *@description Text for command prefix of go to a given line or symbol\n */\n goTo: 'Go to',\n /**\n *@description Text for command suggestion of go to a given line\n */\n line: 'Line',\n /**\n *@description Text for command suggestion of go to a given symbol\n */\n symbol: 'Symbol',\n /**\n *@description Text for command prefix of open a file\n */\n open: 'Open',\n /**\n *@description Text for command suggestion of open a file\n */\n file: 'File',\n /**\n * @description Title of a setting under the Sources category in Settings. If this option is off,\n * the sources panel will not be automatically be focsed whenever the application hits a breakpoint\n * and comes to a halt.\n */\n disableAutoFocusOnDebuggerPaused: 'Do not focus Sources panel when triggering a breakpoint',\n /**\n * @description Title of a setting under the Sources category in Settings. If this option is on,\n * the sources panel will be automatically shown whenever the application hits a breakpoint and\n * comes to a halt.\n */\n enableAutoFocusOnDebuggerPaused: 'Focus Sources panel when triggering a breakpoint',\n /**\n * @description Text for command of toggling navigator sidebar in Sources panel\n */\n toggleNavigatorSidebar: 'Toggle navigator sidebar',\n /**\n * @description Text for command of toggling debugger sidebar in Sources panel\n */\n toggleDebuggerSidebar: 'Toggle debugger sidebar',\n /**\n * @description Title of an action that navigates to the next editor in the Sources panel.\n */\n nextEditorTab: 'Next editor',\n /**\n * @description Title of an action that navigates to the next editor in the Sources panel.\n */\n previousEditorTab: 'Previous editor',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/sources-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\nlet loadedSourcesModule: (typeof Sources|undefined);\nlet loadedSourcesComponentsModule: (typeof SourcesComponents|undefined);\n\nasync function loadSourcesModule(): Promise {\n if (!loadedSourcesModule) {\n loadedSourcesModule = await import('./sources.js');\n }\n return loadedSourcesModule;\n}\n\nasync function loadSourcesComponentsModule(): Promise {\n if (!loadedSourcesComponentsModule) {\n loadedSourcesComponentsModule = await import('./components/components.js');\n }\n return loadedSourcesComponentsModule;\n}\n\nfunction maybeRetrieveContextTypes(getClassCallBack: (sourcesModule: typeof Sources) => T[]): T[] {\n if (loadedSourcesModule === undefined) {\n return [];\n }\n return getClassCallBack(loadedSourcesModule);\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.PANEL,\n id: 'sources',\n commandPrompt: i18nLazyString(UIStrings.showSources),\n title: i18nLazyString(UIStrings.sources),\n order: 30,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW,\n id: 'navigator-files',\n commandPrompt: i18nLazyString(UIStrings.showWorkspace),\n title: i18nLazyString(UIStrings.workspace),\n order: 3,\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesNavigator.FilesNavigatorView.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW,\n id: 'navigator-snippets',\n commandPrompt: i18nLazyString(UIStrings.showSnippets),\n title: i18nLazyString(UIStrings.snippets),\n order: 6,\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesNavigator.SnippetsNavigatorView.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'sources.search-sources-tab',\n commandPrompt: i18nLazyString(UIStrings.showSearch),\n title: i18nLazyString(UIStrings.search),\n order: 7,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.SearchSourcesView.SearchSourcesView.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'sources.quick',\n commandPrompt: i18nLazyString(UIStrings.showQuickSource),\n title: i18nLazyString(UIStrings.quickSource),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 1000,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.WrapperView.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n id: 'sources.threads',\n commandPrompt: i18nLazyString(UIStrings.showThreads),\n title: i18nLazyString(UIStrings.threads),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n condition: Root.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.ThreadsSidebarPane.ThreadsSidebarPane.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n id: 'sources.scopeChain',\n commandPrompt: i18nLazyString(UIStrings.showScope),\n title: i18nLazyString(UIStrings.scope),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.ScopeChainSidebarPane.ScopeChainSidebarPane.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n id: 'sources.watch',\n commandPrompt: i18nLazyString(UIStrings.showWatch),\n title: i18nLazyString(UIStrings.watch),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance();\n },\n hasToolbar: true,\n});\n\nUI.ViewManager.registerViewExtension({\n id: 'sources.jsBreakpoints',\n commandPrompt: i18nLazyString(UIStrings.showBreakpoints),\n title: i18nLazyString(UIStrings.breakpoints),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const SourcesComponents = await loadSourcesComponentsModule();\n return SourcesComponents.BreakpointsView.BreakpointsView.instance().wrapper as UI.Widget.Widget;\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.toggle-pause',\n iconClass: UI.ActionRegistration.IconClass.LARGEICON_PAUSE,\n toggleable: true,\n toggledIconClass: UI.ActionRegistration.IconClass.LARGEICON_RESUME,\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.RevealingActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(\n Sources => [Sources.SourcesView.SourcesView, UI.ShortcutRegistry.ForwardedShortcut]);\n },\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.pauseScriptExecution),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.resumeScriptExecution),\n },\n ],\n bindings: [\n {\n shortcut: 'F8',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+\\\\',\n },\n {\n shortcut: 'F5',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n shortcut: 'Shift+F5',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+\\\\',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.step-over',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n\n title: i18nLazyString(UIStrings.stepOverNextFunctionCall),\n iconClass: UI.ActionRegistration.IconClass.LARGEICON_STEP_OVER,\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'F10',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+\\'',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+\\'',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.step-into',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.stepIntoNextFunctionCall),\n iconClass: UI.ActionRegistration.IconClass.LARGE_ICON_STEP_INTO,\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'F11',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+;',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+;',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.step',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.step),\n iconClass: UI.ActionRegistration.IconClass.LARGE_ICON_STEP,\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'F9',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.step-out',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.stepOutOfCurrentFunction),\n iconClass: UI.ActionRegistration.IconClass.LARGE_ICON_STEP_OUT,\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'Shift+F11',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Shift+Ctrl+;',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Shift+Meta+;',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.run-snippet',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.runSnippet),\n iconClass: UI.ActionRegistration.IconClass.PLAY,\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Enter',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Enter',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.toggle-breakpoints-active',\n iconClass: UI.ActionRegistration.IconClass.BREAKPOINT_CROSSED,\n toggledIconClass: UI.ActionRegistration.IconClass.BREAKPOINT_CROSSED_FILLED,\n toggleable: true,\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.deactivateBreakpoints),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.activateBreakpoints),\n },\n ],\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+F8',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+F8',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.add-to-watch',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return Sources.WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance();\n },\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n title: i18nLazyString(UIStrings.addSelectedTextToWatches),\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+A',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+A',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.evaluate-selection',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.evaluateSelectedTextInConsole),\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+E',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+E',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.switch-file',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.switchFile),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.SwitchFileActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Alt+O',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.rename',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.rename),\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'F2',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Enter',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n actionId: 'sources.close-all',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.closeAll),\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.jump-to-previous-location',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.jumpToPreviousEditingLocation),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Alt+Minus',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.jump-to-next-location',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.jumpToNextEditingLocation),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Alt+Plus',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.close-editor-tab',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.closeTheActiveTab),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Alt+w',\n },\n {\n shortcut: 'Ctrl+W',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Windows,\n shortcut: 'Ctrl+F4',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.next-editor-tab',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.nextEditorTab),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+PageDown',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+PageDown',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.previous-editor-tab',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.previousEditorTab),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+PageUp',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+PageUp',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.go-to-line',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.goToLine),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Ctrl+g',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.go-to-member',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.goToAFunctionDeclarationruleSet),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+o',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+o',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+T',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+T',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n shortcut: 'F12',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.toggle-breakpoint',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n title: i18nLazyString(UIStrings.toggleBreakpoint),\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+b',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+b',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n shortcut: 'F9',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.toggle-breakpoint-enabled',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n title: i18nLazyString(UIStrings.toggleBreakpointEnabled),\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+b',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+b',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.breakpoint-input-window',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n title: i18nLazyString(UIStrings.toggleBreakpointInputWindow),\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Alt+b',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Alt+b',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.save',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.save),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+s',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+s',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.save-all',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.saveAll),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+s',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Alt+s',\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+K S',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Alt+S',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n actionId: 'sources.create-snippet',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesNavigator.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.createNewSnippet),\n});\n\nif (!Host.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode()) {\n UI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n actionId: 'sources.add-folder-to-workspace',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesNavigator.ActionDelegate();\n },\n iconClass: UI.ActionRegistration.IconClass.PLUS,\n title: i18nLazyString(UIStrings.addFolderToWorkspace),\n condition: Root.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER,\n });\n}\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.previous-call-frame',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.CallStackSidebarPane.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.previousCallFrame),\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'Ctrl+,',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.next-call-frame',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.CallStackSidebarPane.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.nextCallFrame),\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'Ctrl+.',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.search',\n title: i18nLazyString(UIStrings.search),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SearchSourcesView.ActionDelegate();\n },\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Alt+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+J',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+J',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.increment-css',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.incrementCssUnitBy, {PH1: 1}),\n bindings: [\n {\n shortcut: 'Alt+Up',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.increment-css-by-ten',\n title: i18nLazyString(UIStrings.incrementCssUnitBy, {PH1: 10}),\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n bindings: [\n {\n shortcut: 'Alt+PageUp',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.decrement-css',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.decrementCssUnitBy, {PH1: 1}),\n bindings: [\n {\n shortcut: 'Alt+Down',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.decrement-css-by-ten',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.decrementCssUnitBy, {PH1: 10}),\n bindings: [\n {\n shortcut: 'Alt+PageDown',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.toggle-navigator-sidebar',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.toggleNavigatorSidebar),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+y',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+y',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+b',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Meta+b',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.toggle-debugger-sidebar',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.toggleDebuggerSidebar),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+h',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+h',\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n settingName: 'navigatorGroupByFolder',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n});\n\nCommon.Settings.registerSettingExtension({\n settingName: 'navigatorGroupByAuthored',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.searchInAnonymousAndContent),\n settingName: 'searchInAnonymousAndContentScripts',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.searchInAnonymousAndContent),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.doNotSearchInAnonymousAndContent),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.automaticallyRevealFilesIn),\n settingName: 'autoRevealInNavigator',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.automaticallyRevealFilesIn),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.doNotAutomaticallyRevealFilesIn),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.enableJavascriptSourceMaps),\n settingName: 'jsSourceMapsEnabled',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableJavascriptSourceMaps),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableJavascriptSourceMaps),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.enableTabMovesFocus),\n settingName: 'textEditorTabMovesFocus',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableTabMovesFocus),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableTabMovesFocus),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.detectIndentation),\n settingName: 'textEditorAutoDetectIndent',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.detectIndentation),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.doNotDetectIndentation),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.autocompletion),\n settingName: 'textEditorAutocompletion',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableAutocompletion),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableAutocompletion),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n title: i18nLazyString(UIStrings.bracketMatching),\n settingName: 'textEditorBracketMatching',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableBracketMatching),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableBracketMatching),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.codeFolding),\n settingName: 'textEditorCodeFolding',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableCodeFolding),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableCodeFolding),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.showWhitespaceCharacters),\n settingName: 'showWhitespacesInEditor',\n settingType: Common.Settings.SettingType.ENUM,\n defaultValue: 'original',\n options: [\n {\n title: i18nLazyString(UIStrings.doNotShowWhitespaceCharacters),\n text: i18nLazyString(UIStrings.none),\n value: 'none',\n },\n {\n title: i18nLazyString(UIStrings.showAllWhitespaceCharacters),\n text: i18nLazyString(UIStrings.all),\n value: 'all',\n },\n {\n title: i18nLazyString(UIStrings.showTrailingWhitespaceCharacters),\n text: i18nLazyString(UIStrings.trailing),\n value: 'trailing',\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.displayVariableValuesInlineWhile),\n settingName: 'inlineVariableValues',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.displayVariableValuesInlineWhile),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.doNotDisplayVariableValuesInline),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.enableAutoFocusOnDebuggerPaused),\n settingName: 'autoFocusOnDebuggerPausedEnabled',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableAutoFocusOnDebuggerPaused),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableAutoFocusOnDebuggerPaused),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.enableCssSourceMaps),\n settingName: 'cssSourceMapsEnabled',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableCssSourceMaps),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableCssSourceMaps),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.allowScrollingPastEndOfFile),\n settingName: 'allowScrollPastEof',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.allowScrollingPastEndOfFile),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disallowScrollingPastEndOfFile),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Local,\n title: i18nLazyString(UIStrings.wasmAutoStepping),\n settingName: 'wasmAutoStepping',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableWasmAutoStepping),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableWasmAutoStepping),\n },\n ],\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW,\n category: UI.ViewManager.ViewLocationCategory.SOURCES,\n async loadResolver() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.SOURCES_SIDEBAR_TOP,\n category: UI.ViewManager.ViewLocationCategory.SOURCES,\n async loadResolver() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.SOURCES_SIDEBAR_BOTTOM,\n category: UI.ViewManager.ViewLocationCategory.SOURCES,\n async loadResolver() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.SOURCES_SIDEBAR_TABS,\n category: UI.ViewManager.ViewLocationCategory.SOURCES,\n async loadResolver() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ContextMenu.registerProvider({\n contextTypes() {\n return [\n Workspace.UISourceCode.UISourceCode,\n Workspace.UISourceCode.UILocation,\n SDK.RemoteObject.RemoteObject,\n SDK.NetworkRequest.NetworkRequest,\n ...maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]),\n ];\n },\n async loadProvider() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n experiment: undefined,\n});\n\nUI.ContextMenu.registerProvider({\n async loadProvider() {\n const Sources = await loadSourcesModule();\n return Sources.WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance();\n },\n contextTypes() {\n return [\n ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement,\n ...maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]),\n ];\n },\n experiment: undefined,\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Workspace.UISourceCode.UILocation,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.UILocationRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Workspace.UISourceCode.UILocationRange,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.UILocationRangeRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n SDK.DebuggerModel.Location,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.DebuggerLocationRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Workspace.UISourceCode.UISourceCode,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.UISourceCodeRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n SDK.DebuggerModel.DebuggerPausedDetails,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.DebuggerPausedDetailsRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Breakpoints.BreakpointManager.BreakpointLocation,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.DebuggerPlugin.BreakpointLocationRevealer();\n },\n});\n\nUI.Toolbar.registerToolbarItem({\n actionId: 'sources.add-folder-to-workspace',\n location: UI.Toolbar.ToolbarItemLocation.FILES_NAVIGATION_TOOLBAR,\n label: i18nLazyString(UIStrings.addFolder),\n showLabel: true,\n condition: Root.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER,\n loadItem: undefined,\n order: undefined,\n separator: undefined,\n});\n\nUI.Context.registerListener({\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n async loadListener() {\n const SourcesComponents = await loadSourcesComponentsModule();\n return SourcesComponents.BreakpointsView.BreakpointsSidebarController.instance();\n },\n});\n\nUI.Context.registerListener({\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n async loadListener() {\n const Sources = await loadSourcesModule();\n return Sources.CallStackSidebarPane.CallStackSidebarPane.instance();\n },\n});\n\nUI.Context.registerListener({\n contextTypes() {\n return [SDK.DebuggerModel.CallFrame];\n },\n async loadListener() {\n const Sources = await loadSourcesModule();\n return Sources.ScopeChainSidebarPane.ScopeChainSidebarPane.instance();\n },\n});\n\nUI.ContextMenu.registerItem({\n location: UI.ContextMenu.ItemLocation.NAVIGATOR_MENU_DEFAULT,\n actionId: 'quickOpen.show',\n order: undefined,\n});\n\nUI.ContextMenu.registerItem({\n location: UI.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,\n actionId: 'sources.search',\n order: undefined,\n});\n\nQuickOpen.FilteredListWidget.registerProvider({\n prefix: '@',\n iconName: 'symbol',\n iconWidth: '16px',\n async provider() {\n const Sources = await loadSourcesModule();\n return new Sources.OutlineQuickOpen.OutlineQuickOpen();\n },\n titlePrefix: i18nLazyString(UIStrings.goTo),\n titleSuggestion: i18nLazyString(UIStrings.symbol),\n});\n\nQuickOpen.FilteredListWidget.registerProvider({\n prefix: ':',\n iconName: 'colon',\n iconWidth: '20px',\n async provider() {\n const Sources = await loadSourcesModule();\n return new Sources.GoToLineQuickOpen.GoToLineQuickOpen();\n },\n titlePrefix: i18nLazyString(UIStrings.goTo),\n titleSuggestion: i18nLazyString(UIStrings.line),\n});\n\nQuickOpen.FilteredListWidget.registerProvider({\n prefix: '',\n iconName: 'document',\n iconWidth: '16px',\n async provider() {\n const Sources = await loadSourcesModule();\n return new Sources.OpenFileQuickOpen.OpenFileQuickOpen();\n },\n titlePrefix: i18nLazyString(UIStrings.open),\n titleSuggestion: i18nLazyString(UIStrings.file),\n});\n"]} \ No newline at end of file +{"version":3,"file":"sources-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/sources-meta.ts"],"names":[],"mappings":"AAAA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ved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Breakpoints from '../../models/breakpoints/breakpoints.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport * as QuickOpen from '../../ui/legacy/components/quick_open/quick_open.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as SourcesComponents from './components/components.js';\nimport type * as Sources from './sources.js';\n\nconst UIStrings = {\n /**\n *@description Command for showing the 'Sources' tool\n */\n showSources: 'Show Sources',\n /**\n *@description Name of the Sources panel\n */\n sources: 'Sources',\n /**\n *@description Command for showing the 'Workspace' tool\n */\n showWorkspace: 'Show Workspace',\n /**\n *@description Title of the 'Filesystem' tool in the Files Navigator View, which is part of the Sources tool\n */\n workspace: 'Workspace',\n /**\n *@description Command for showing the 'Snippets' tool\n */\n showSnippets: 'Show Snippets',\n /**\n *@description Title of the 'Snippets' tool in the Snippets Navigator View, which is part of the Sources tool\n */\n snippets: 'Snippets',\n /**\n *@description Command for showing the 'Search' tool\n */\n showSearch: 'Show Search',\n /**\n *@description Title of a search bar or tool\n */\n search: 'Search',\n /**\n *@description Command for showing the 'Quick source' tool\n */\n showQuickSource: 'Show Quick source',\n /**\n *@description Title of the 'Quick source' tool in the bottom drawer\n */\n quickSource: 'Quick source',\n /**\n *@description Command for showing the 'Threads' tool\n */\n showThreads: 'Show Threads',\n /**\n *@description Title of the sources threads\n */\n threads: 'Threads',\n /**\n *@description Command for showing the 'Scope' tool\n */\n showScope: 'Show Scope',\n /**\n *@description Title of the sources scopeChain\n */\n scope: 'Scope',\n /**\n *@description Command for showing the 'Watch' tool\n */\n showWatch: 'Show Watch',\n /**\n *@description Title of the sources watch\n */\n watch: 'Watch',\n /**\n *@description Command for showing the 'Breakpoints' tool\n */\n showBreakpoints: 'Show Breakpoints',\n /**\n *@description Title of the sources jsBreakpoints\n */\n breakpoints: 'Breakpoints',\n /**\n *@description Title of an action under the Debugger category that can be invoked through the Command Menu\n */\n pauseScriptExecution: 'Pause script execution',\n /**\n *@description Title of an action under the Debugger category that can be invoked through the Command Menu\n */\n resumeScriptExecution: 'Resume script execution',\n /**\n *@description Title of an action in the debugger tool to step over\n */\n stepOverNextFunctionCall: 'Step over next function call',\n /**\n *@description Title of an action in the debugger tool to step into\n */\n stepIntoNextFunctionCall: 'Step into next function call',\n /**\n *@description Title of an action in the debugger tool to step\n */\n step: 'Step',\n /**\n *@description Title of an action in the debugger tool to step out\n */\n stepOutOfCurrentFunction: 'Step out of current function',\n /**\n *@description Text to run a code snippet\n */\n runSnippet: 'Run snippet',\n /**\n *@description Text in Java Script Breakpoints Sidebar Pane of the Sources panel\n */\n deactivateBreakpoints: 'Deactivate breakpoints',\n /**\n *@description Text in Java Script Breakpoints Sidebar Pane of the Sources panel\n */\n activateBreakpoints: 'Activate breakpoints',\n /**\n *@description Title of an action in the sources tool to add to watch\n */\n addSelectedTextToWatches: 'Add selected text to watches',\n /**\n *@description Title of an action in the debugger tool to evaluate selection\n */\n evaluateSelectedTextInConsole: 'Evaluate selected text in console',\n /**\n *@description Title of an action that switches files in the Sources panel\n */\n switchFile: 'Switch file',\n /**\n *@description Title of a sources panel action that renames a file\n */\n rename: 'Rename',\n /**\n *@description Title of an action in the sources tool to close all\n */\n closeAll: 'Close All',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (jump to previous editing location in text editor)\n */\n jumpToPreviousEditingLocation: 'Jump to previous editing location',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (jump to next editing location in text editor)\n */\n jumpToNextEditingLocation: 'Jump to next editing location',\n /**\n *@description Title of an action that closes the active editor tab in the Sources panel\n */\n closeTheActiveTab: 'Close the active tab',\n /**\n *@description Text to go to a given line\n */\n goToLine: 'Go to line',\n /**\n *@description Title of an action that opens the go to member menu\n */\n goToAFunctionDeclarationruleSet: 'Go to a function declaration/rule set',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (toggle breakpoint in debugger)\n */\n toggleBreakpoint: 'Toggle breakpoint',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (enable toggle breakpoint shortcut in debugger)\n */\n toggleBreakpointEnabled: 'Toggle breakpoint enabled',\n /**\n *@description Title of a sources panel action that opens the breakpoint input window\n */\n toggleBreakpointInputWindow: 'Toggle breakpoint input window',\n /**\n *@description Text to save something\n */\n save: 'Save',\n /**\n *@description Title of an action to save all files in the Sources panel\n */\n saveAll: 'Save all',\n /**\n *@description Title of an action in the sources tool to create snippet\n */\n createNewSnippet: 'Create new snippet',\n /**\n *@description Title of an action in the sources tool to add folder to workspace\n */\n addFolderToWorkspace: 'Add folder to workspace',\n /**\n *@description Title of an action in the sources tool to add folder to workspace\n */\n addFolder: 'Add folder',\n /**\n *@description Title of an action in the debugger tool to previous call frame\n */\n previousCallFrame: 'Previous call frame',\n /**\n *@description Title of an action in the debugger tool to next call frame\n */\n nextCallFrame: 'Next call frame',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (increment CSS unit by the amount passed in the placeholder in Styles pane)\n *@example {10} PH1\n */\n incrementCssUnitBy: 'Increment CSS unit by {PH1}',\n /**\n *@description Text in the Shortcuts page to explain a keyboard shortcut (decrement CSS unit by the amount passed in the placeholder in Styles pane)\n *@example {10} PH1\n */\n decrementCssUnitBy: 'Decrement CSS unit by {PH1}',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n searchInAnonymousAndContent: 'Search in anonymous and content scripts',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotSearchInAnonymousAndContent: 'Do not search in anonymous and content scripts',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n automaticallyRevealFilesIn: 'Automatically reveal files in sidebar',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotAutomaticallyRevealFilesIn: 'Do not automatically reveal files in sidebar',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableJavascriptSourceMaps: 'Enable JavaScript source maps',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableJavascriptSourceMaps: 'Disable JavaScript source maps',\n /**\n *@description Title of a setting that can be invoked through the Command Menu.\n *'tab moves focus' is the name of the setting, which means that when the user\n *hits the tab key, the focus in the UI will be moved to the next part of the\n *text editor, as opposed to inserting a tab character into the text in the\n *text editor.\n */\n enableTabMovesFocus: 'Enable tab moves focus',\n /**\n *@description Title of a setting that can be invoked through the Command Menu.\n *'tab moves focus' is the name of the setting, which means that when the user\n *hits the tab key, the focus in the UI will be moved to the next part of the\n *text editor, as opposed to inserting a tab character into the text in the\n *text editor.\n */\n disableTabMovesFocus: 'Disable tab moves focus',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n detectIndentation: 'Detect indentation',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotDetectIndentation: 'Do not detect indentation',\n /**\n *@description Text for autocompletion\n */\n autocompletion: 'Autocompletion',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableAutocompletion: 'Enable autocompletion',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableAutocompletion: 'Disable autocompletion',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n bracketMatching: 'Bracket matching',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableBracketMatching: 'Enable bracket matching',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableBracketMatching: 'Disable bracket matching',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n codeFolding: 'Code folding',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableCodeFolding: 'Enable code folding',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableCodeFolding: 'Disable code folding',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n showWhitespaceCharacters: 'Show whitespace characters:',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotShowWhitespaceCharacters: 'Do not show whitespace characters',\n /**\n * @description One value of an option that can be set to 'none', 'all', or 'trailing'. The setting\n * controls how whitespace characters are shown in a text editor.\n */\n none: 'None',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n showAllWhitespaceCharacters: 'Show all whitespace characters',\n /**\n *@description Text for everything\n */\n all: 'All',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n showTrailingWhitespaceCharacters: 'Show trailing whitespace characters',\n /**\n *@description A drop-down menu option to show trailing whitespace characters\n */\n trailing: 'Trailing',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n displayVariableValuesInlineWhile: 'Display variable values inline while debugging',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n doNotDisplayVariableValuesInline: 'Do not display variable values inline while debugging',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n enableCssSourceMaps: 'Enable CSS source maps',\n /**\n *@description Title of a setting under the Sources category that can be invoked through the Command Menu\n */\n disableCssSourceMaps: 'Disable CSS source maps',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n allowScrollingPastEndOfFile: 'Allow scrolling past end of file',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n disallowScrollingPastEndOfFile: 'Disallow scrolling past end of file',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n wasmAutoStepping: 'When debugging wasm with debug information, do not pause on wasm bytecode if possible',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n enableWasmAutoStepping: 'Enable wasm auto-stepping',\n /**\n *@description Title of a setting under the Sources category in Settings\n */\n disableWasmAutoStepping: 'Disable wasm auto-stepping',\n\n /**\n *@description Text for command prefix of go to a given line or symbol\n */\n goTo: 'Go to',\n /**\n *@description Text for command suggestion of go to a given line\n */\n line: 'Line',\n /**\n *@description Text for command suggestion of go to a given symbol\n */\n symbol: 'Symbol',\n /**\n *@description Text for command prefix of open a file\n */\n open: 'Open',\n /**\n *@description Text for command suggestion of open a file\n */\n file: 'File',\n /**\n * @description Title of a setting under the Sources category in Settings. If this option is off,\n * the sources panel will not be automatically be focsed whenever the application hits a breakpoint\n * and comes to a halt.\n */\n disableAutoFocusOnDebuggerPaused: 'Do not focus Sources panel when triggering a breakpoint',\n /**\n * @description Title of a setting under the Sources category in Settings. If this option is on,\n * the sources panel will be automatically shown whenever the application hits a breakpoint and\n * comes to a halt.\n */\n enableAutoFocusOnDebuggerPaused: 'Focus Sources panel when triggering a breakpoint',\n /**\n *@description Title of an action to reveal the active file in the navigator sidebar of the Sources panel\n */\n revealActiveFileInSidebar: 'Reveal active file in navigator sidebar',\n /**\n * @description Text for command of toggling navigator sidebar in Sources panel\n */\n toggleNavigatorSidebar: 'Toggle navigator sidebar',\n /**\n * @description Text for command of toggling debugger sidebar in Sources panel\n */\n toggleDebuggerSidebar: 'Toggle debugger sidebar',\n /**\n * @description Title of an action that navigates to the next editor in the Sources panel.\n */\n nextEditorTab: 'Next editor',\n /**\n * @description Title of an action that navigates to the next editor in the Sources panel.\n */\n previousEditorTab: 'Previous editor',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/sources-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\nlet loadedSourcesModule: (typeof Sources|undefined);\nlet loadedSourcesComponentsModule: (typeof SourcesComponents|undefined);\n\nasync function loadSourcesModule(): Promise {\n if (!loadedSourcesModule) {\n loadedSourcesModule = await import('./sources.js');\n }\n return loadedSourcesModule;\n}\n\nasync function loadSourcesComponentsModule(): Promise {\n if (!loadedSourcesComponentsModule) {\n loadedSourcesComponentsModule = await import('./components/components.js');\n }\n return loadedSourcesComponentsModule;\n}\n\nfunction maybeRetrieveContextTypes(getClassCallBack: (sourcesModule: typeof Sources) => T[]): T[] {\n if (loadedSourcesModule === undefined) {\n return [];\n }\n return getClassCallBack(loadedSourcesModule);\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.PANEL,\n id: 'sources',\n commandPrompt: i18nLazyString(UIStrings.showSources),\n title: i18nLazyString(UIStrings.sources),\n order: 30,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW,\n id: 'navigator-files',\n commandPrompt: i18nLazyString(UIStrings.showWorkspace),\n title: i18nLazyString(UIStrings.workspace),\n order: 3,\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesNavigator.FilesNavigatorView();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW,\n id: 'navigator-snippets',\n commandPrompt: i18nLazyString(UIStrings.showSnippets),\n title: i18nLazyString(UIStrings.snippets),\n order: 6,\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesNavigator.SnippetsNavigatorView();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'sources.search-sources-tab',\n commandPrompt: i18nLazyString(UIStrings.showSearch),\n title: i18nLazyString(UIStrings.search),\n order: 7,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const Sources = await loadSourcesModule();\n return new Sources.SearchSourcesView.SearchSourcesView();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'sources.quick',\n commandPrompt: i18nLazyString(UIStrings.showQuickSource),\n title: i18nLazyString(UIStrings.quickSource),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 1000,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.WrapperView.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n id: 'sources.threads',\n commandPrompt: i18nLazyString(UIStrings.showThreads),\n title: i18nLazyString(UIStrings.threads),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n condition: Root.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER,\n async loadView() {\n const Sources = await loadSourcesModule();\n return new Sources.ThreadsSidebarPane.ThreadsSidebarPane();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n id: 'sources.scopeChain',\n commandPrompt: i18nLazyString(UIStrings.showScope),\n title: i18nLazyString(UIStrings.scope),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.ScopeChainSidebarPane.ScopeChainSidebarPane.instance();\n },\n});\n\nUI.ViewManager.registerViewExtension({\n id: 'sources.watch',\n commandPrompt: i18nLazyString(UIStrings.showWatch),\n title: i18nLazyString(UIStrings.watch),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const Sources = await loadSourcesModule();\n return Sources.WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance();\n },\n hasToolbar: true,\n});\n\nUI.ViewManager.registerViewExtension({\n id: 'sources.jsBreakpoints',\n commandPrompt: i18nLazyString(UIStrings.showBreakpoints),\n title: i18nLazyString(UIStrings.breakpoints),\n persistence: UI.ViewManager.ViewPersistence.PERMANENT,\n async loadView() {\n const SourcesComponents = await loadSourcesComponentsModule();\n return SourcesComponents.BreakpointsView.BreakpointsView.instance().wrapper as UI.Widget.Widget;\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.toggle-pause',\n iconClass: UI.ActionRegistration.IconClass.LARGEICON_PAUSE,\n toggleable: true,\n toggledIconClass: UI.ActionRegistration.IconClass.LARGEICON_RESUME,\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.RevealingActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(\n Sources => [Sources.SourcesView.SourcesView, UI.ShortcutRegistry.ForwardedShortcut]);\n },\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.pauseScriptExecution),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.resumeScriptExecution),\n },\n ],\n bindings: [\n {\n shortcut: 'F8',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+\\\\',\n },\n {\n shortcut: 'F5',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n shortcut: 'Shift+F5',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+\\\\',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.step-over',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n\n title: i18nLazyString(UIStrings.stepOverNextFunctionCall),\n iconClass: UI.ActionRegistration.IconClass.LARGEICON_STEP_OVER,\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'F10',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+\\'',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+\\'',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.step-into',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.stepIntoNextFunctionCall),\n iconClass: UI.ActionRegistration.IconClass.LARGE_ICON_STEP_INTO,\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'F11',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+;',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+;',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.step',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.step),\n iconClass: UI.ActionRegistration.IconClass.LARGE_ICON_STEP,\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'F9',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.step-out',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.stepOutOfCurrentFunction),\n iconClass: UI.ActionRegistration.IconClass.LARGE_ICON_STEP_OUT,\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'Shift+F11',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Shift+Ctrl+;',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Shift+Meta+;',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.run-snippet',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.runSnippet),\n iconClass: UI.ActionRegistration.IconClass.PLAY,\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Enter',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Enter',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.toggle-breakpoints-active',\n iconClass: UI.ActionRegistration.IconClass.BREAKPOINT_CROSSED,\n toggledIconClass: UI.ActionRegistration.IconClass.BREAKPOINT_CROSSED_FILLED,\n toggleable: true,\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.deactivateBreakpoints),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.activateBreakpoints),\n },\n ],\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+F8',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+F8',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.add-to-watch',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return Sources.WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance();\n },\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n title: i18nLazyString(UIStrings.addSelectedTextToWatches),\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+A',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+A',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.evaluate-selection',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.evaluateSelectedTextInConsole),\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+E',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+E',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.switch-file',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.switchFile),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.SwitchFileActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Alt+O',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.rename',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.rename),\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'F2',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Enter',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n actionId: 'sources.close-all',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.closeAll),\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.jump-to-previous-location',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.jumpToPreviousEditingLocation),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Alt+Minus',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.jump-to-next-location',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.jumpToNextEditingLocation),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Alt+Plus',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.close-editor-tab',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.closeTheActiveTab),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Alt+w',\n },\n {\n shortcut: 'Ctrl+W',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Windows,\n shortcut: 'Ctrl+F4',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.next-editor-tab',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.nextEditorTab),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+PageDown',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+PageDown',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.previous-editor-tab',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.previousEditorTab),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+PageUp',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+PageUp',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.go-to-line',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.goToLine),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n shortcut: 'Ctrl+g',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.go-to-member',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.goToAFunctionDeclarationruleSet),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+o',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+o',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+T',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+T',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n shortcut: 'F12',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.toggle-breakpoint',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n title: i18nLazyString(UIStrings.toggleBreakpoint),\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+b',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+b',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n shortcut: 'F9',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.toggle-breakpoint-enabled',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n title: i18nLazyString(UIStrings.toggleBreakpointEnabled),\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+b',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+b',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'debugger.breakpoint-input-window',\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n title: i18nLazyString(UIStrings.toggleBreakpointInputWindow),\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Alt+b',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Alt+b',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.save',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.save),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+s',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+s',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.save-all',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.saveAll),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesView.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+s',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Alt+s',\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+K S',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Alt+S',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n actionId: 'sources.create-snippet',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesNavigator.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.createNewSnippet),\n});\n\nif (!Host.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode()) {\n UI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n actionId: 'sources.add-folder-to-workspace',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesNavigator.ActionDelegate();\n },\n iconClass: UI.ActionRegistration.IconClass.PLUS,\n title: i18nLazyString(UIStrings.addFolderToWorkspace),\n condition: Root.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER,\n });\n}\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.previous-call-frame',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.CallStackSidebarPane.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.previousCallFrame),\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'Ctrl+,',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n category: UI.ActionRegistration.ActionCategory.DEBUGGER,\n actionId: 'debugger.next-call-frame',\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.CallStackSidebarPane.ActionDelegate();\n },\n title: i18nLazyString(UIStrings.nextCallFrame),\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n bindings: [\n {\n shortcut: 'Ctrl+.',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.search',\n title: i18nLazyString(UIStrings.search),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SearchSourcesView.ActionDelegate();\n },\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Alt+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+J',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+F',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+J',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.increment-css',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.incrementCssUnitBy, {PH1: 1}),\n bindings: [\n {\n shortcut: 'Alt+Up',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.increment-css-by-ten',\n title: i18nLazyString(UIStrings.incrementCssUnitBy, {PH1: 10}),\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n bindings: [\n {\n shortcut: 'Alt+PageUp',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.decrement-css',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.decrementCssUnitBy, {PH1: 1}),\n bindings: [\n {\n shortcut: 'Alt+Down',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.decrement-css-by-ten',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.decrementCssUnitBy, {PH1: 10}),\n bindings: [\n {\n shortcut: 'Alt+PageDown',\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.reveal-in-navigator-sidebar',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.revealActiveFileInSidebar),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.toggle-navigator-sidebar',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.toggleNavigatorSidebar),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+y',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+y',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.DEVTOOLS_DEFAULT,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+b',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Meta+b',\n keybindSets: [\n UI.ActionRegistration.KeybindSet.VS_CODE,\n ],\n },\n ],\n});\n\nUI.ActionRegistration.registerActionExtension({\n actionId: 'sources.toggle-debugger-sidebar',\n category: UI.ActionRegistration.ActionCategory.SOURCES,\n title: i18nLazyString(UIStrings.toggleDebuggerSidebar),\n async loadActionDelegate() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.ActionDelegate();\n },\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SourcesView.SourcesView]);\n },\n bindings: [\n {\n platform: UI.ActionRegistration.Platforms.WindowsLinux,\n shortcut: 'Ctrl+Shift+h',\n },\n {\n platform: UI.ActionRegistration.Platforms.Mac,\n shortcut: 'Meta+Shift+h',\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n settingName: 'navigatorGroupByFolder',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n});\n\nCommon.Settings.registerSettingExtension({\n settingName: 'navigatorGroupByAuthored',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.searchInAnonymousAndContent),\n settingName: 'searchInAnonymousAndContentScripts',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.searchInAnonymousAndContent),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.doNotSearchInAnonymousAndContent),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.automaticallyRevealFilesIn),\n settingName: 'autoRevealInNavigator',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.automaticallyRevealFilesIn),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.doNotAutomaticallyRevealFilesIn),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.enableJavascriptSourceMaps),\n settingName: 'jsSourceMapsEnabled',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableJavascriptSourceMaps),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableJavascriptSourceMaps),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.enableTabMovesFocus),\n settingName: 'textEditorTabMovesFocus',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableTabMovesFocus),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableTabMovesFocus),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.detectIndentation),\n settingName: 'textEditorAutoDetectIndent',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.detectIndentation),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.doNotDetectIndentation),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.autocompletion),\n settingName: 'textEditorAutocompletion',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableAutocompletion),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableAutocompletion),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n title: i18nLazyString(UIStrings.bracketMatching),\n settingName: 'textEditorBracketMatching',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableBracketMatching),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableBracketMatching),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.codeFolding),\n settingName: 'textEditorCodeFolding',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableCodeFolding),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableCodeFolding),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.showWhitespaceCharacters),\n settingName: 'showWhitespacesInEditor',\n settingType: Common.Settings.SettingType.ENUM,\n defaultValue: 'original',\n options: [\n {\n title: i18nLazyString(UIStrings.doNotShowWhitespaceCharacters),\n text: i18nLazyString(UIStrings.none),\n value: 'none',\n },\n {\n title: i18nLazyString(UIStrings.showAllWhitespaceCharacters),\n text: i18nLazyString(UIStrings.all),\n value: 'all',\n },\n {\n title: i18nLazyString(UIStrings.showTrailingWhitespaceCharacters),\n text: i18nLazyString(UIStrings.trailing),\n value: 'trailing',\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.displayVariableValuesInlineWhile),\n settingName: 'inlineVariableValues',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.displayVariableValuesInlineWhile),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.doNotDisplayVariableValuesInline),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.enableAutoFocusOnDebuggerPaused),\n settingName: 'autoFocusOnDebuggerPausedEnabled',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableAutoFocusOnDebuggerPaused),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableAutoFocusOnDebuggerPaused),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.enableCssSourceMaps),\n settingName: 'cssSourceMapsEnabled',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableCssSourceMaps),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableCssSourceMaps),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Synced,\n title: i18nLazyString(UIStrings.allowScrollingPastEndOfFile),\n settingName: 'allowScrollPastEof',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.allowScrollingPastEndOfFile),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disallowScrollingPastEndOfFile),\n },\n ],\n});\n\nCommon.Settings.registerSettingExtension({\n category: Common.Settings.SettingCategory.SOURCES,\n storageType: Common.Settings.SettingStorageType.Local,\n title: i18nLazyString(UIStrings.wasmAutoStepping),\n settingName: 'wasmAutoStepping',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: true,\n options: [\n {\n value: true,\n title: i18nLazyString(UIStrings.enableWasmAutoStepping),\n },\n {\n value: false,\n title: i18nLazyString(UIStrings.disableWasmAutoStepping),\n },\n ],\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW,\n category: UI.ViewManager.ViewLocationCategory.SOURCES,\n async loadResolver() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.SOURCES_SIDEBAR_TOP,\n category: UI.ViewManager.ViewLocationCategory.SOURCES,\n async loadResolver() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.SOURCES_SIDEBAR_BOTTOM,\n category: UI.ViewManager.ViewLocationCategory.SOURCES,\n async loadResolver() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ViewManager.registerLocationResolver({\n name: UI.ViewManager.ViewLocationValues.SOURCES_SIDEBAR_TABS,\n category: UI.ViewManager.ViewLocationCategory.SOURCES,\n async loadResolver() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n});\n\nUI.ContextMenu.registerProvider({\n contextTypes() {\n return [\n Workspace.UISourceCode.UISourceCode,\n Workspace.UISourceCode.UILocation,\n SDK.RemoteObject.RemoteObject,\n SDK.NetworkRequest.NetworkRequest,\n ...maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]),\n ];\n },\n async loadProvider() {\n const Sources = await loadSourcesModule();\n return Sources.SourcesPanel.SourcesPanel.instance();\n },\n experiment: undefined,\n});\n\nUI.ContextMenu.registerProvider({\n async loadProvider() {\n const Sources = await loadSourcesModule();\n return Sources.WatchExpressionsSidebarPane.WatchExpressionsSidebarPane.instance();\n },\n contextTypes() {\n return [\n ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement,\n ...maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]),\n ];\n },\n experiment: undefined,\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Workspace.UISourceCode.UILocation,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.UILocationRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Workspace.UISourceCode.UILocationRange,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.UILocationRangeRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n SDK.DebuggerModel.Location,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.DebuggerLocationRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Workspace.UISourceCode.UISourceCode,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.UISourceCodeRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n SDK.DebuggerModel.DebuggerPausedDetails,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SourcesPanel.DebuggerPausedDetailsRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return [\n Breakpoints.BreakpointManager.BreakpointLocation,\n ];\n },\n destination: Common.Revealer.RevealerDestination.SOURCES_PANEL,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.DebuggerPlugin.BreakpointLocationRevealer();\n },\n});\n\nCommon.Revealer.registerRevealer({\n contextTypes() {\n return maybeRetrieveContextTypes(Sources => [Sources.SearchSourcesView.SearchSources]);\n },\n destination: undefined,\n async loadRevealer() {\n const Sources = await loadSourcesModule();\n return new Sources.SearchSourcesView.Revealer();\n },\n});\n\nUI.Toolbar.registerToolbarItem({\n actionId: 'sources.add-folder-to-workspace',\n location: UI.Toolbar.ToolbarItemLocation.FILES_NAVIGATION_TOOLBAR,\n label: i18nLazyString(UIStrings.addFolder),\n showLabel: true,\n condition: Root.Runtime.ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER,\n loadItem: undefined,\n order: undefined,\n separator: undefined,\n});\n\nUI.Context.registerListener({\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n async loadListener() {\n const SourcesComponents = await loadSourcesComponentsModule();\n return SourcesComponents.BreakpointsView.BreakpointsSidebarController.instance();\n },\n});\n\nUI.Context.registerListener({\n contextTypes() {\n return [SDK.DebuggerModel.DebuggerPausedDetails];\n },\n async loadListener() {\n const Sources = await loadSourcesModule();\n return Sources.CallStackSidebarPane.CallStackSidebarPane.instance();\n },\n});\n\nUI.Context.registerListener({\n contextTypes() {\n return [SDK.DebuggerModel.CallFrame];\n },\n async loadListener() {\n const Sources = await loadSourcesModule();\n return Sources.ScopeChainSidebarPane.ScopeChainSidebarPane.instance();\n },\n});\n\nUI.ContextMenu.registerItem({\n location: UI.ContextMenu.ItemLocation.NAVIGATOR_MENU_DEFAULT,\n actionId: 'quickOpen.show',\n order: undefined,\n});\n\nUI.ContextMenu.registerItem({\n location: UI.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,\n actionId: 'sources.search',\n order: undefined,\n});\n\nQuickOpen.FilteredListWidget.registerProvider({\n prefix: '@',\n iconName: 'symbol',\n iconWidth: '16px',\n async provider() {\n const Sources = await loadSourcesModule();\n return new Sources.OutlineQuickOpen.OutlineQuickOpen();\n },\n titlePrefix: i18nLazyString(UIStrings.goTo),\n titleSuggestion: i18nLazyString(UIStrings.symbol),\n});\n\nQuickOpen.FilteredListWidget.registerProvider({\n prefix: ':',\n iconName: 'colon',\n iconWidth: '20px',\n async provider() {\n const Sources = await loadSourcesModule();\n return new Sources.GoToLineQuickOpen.GoToLineQuickOpen();\n },\n titlePrefix: i18nLazyString(UIStrings.goTo),\n titleSuggestion: i18nLazyString(UIStrings.line),\n});\n\nQuickOpen.FilteredListWidget.registerProvider({\n prefix: '',\n iconName: 'document',\n iconWidth: '16px',\n async provider() {\n const Sources = await loadSourcesModule();\n return new Sources.OpenFileQuickOpen.OpenFileQuickOpen();\n },\n titlePrefix: i18nLazyString(UIStrings.open),\n titleSuggestion: i18nLazyString(UIStrings.file),\n});\n"]} \ No newline at end of file diff --git a/public/panels/timeline/ActiveFilters.d.ts b/public/panels/timeline/ActiveFilters.d.ts new file mode 100644 index 000000000..f552bca0b --- /dev/null +++ b/public/panels/timeline/ActiveFilters.d.ts @@ -0,0 +1,15 @@ +import type * as TimelineModel from '../../models/timeline_model/timeline_model.js'; +import type * as TraceEngine from '../../models/trace/trace.js'; +/** Singleton class that contains the set of active filters for the given trace + * file. + */ +export declare class ActiveFilters { + #private; + static instance(opts?: { + forceNew: boolean | null; + }): ActiveFilters; + static removeInstance(): void; + activeFilters(): readonly TimelineModel.TimelineModelFilter.TimelineModelFilter[]; + setFilters(newFilters: TimelineModel.TimelineModelFilter.TimelineModelFilter[]): void; + isVisible(event: TraceEngine.Legacy.CompatibleTraceEvent): boolean; +} diff --git a/public/panels/timeline/ActiveFilters.js b/public/panels/timeline/ActiveFilters.js new file mode 100644 index 000000000..5b5e519f6 --- /dev/null +++ b/public/panels/timeline/ActiveFilters.js @@ -0,0 +1,27 @@ +let instance = null; +/** Singleton class that contains the set of active filters for the given trace + * file. + */ +export class ActiveFilters { + static instance(opts = { forceNew: null }) { + const forceNew = Boolean(opts.forceNew); + if (!instance || forceNew) { + instance = new ActiveFilters(); + } + return instance; + } + static removeInstance() { + instance = null; + } + #activeFilters = []; + activeFilters() { + return this.#activeFilters; + } + setFilters(newFilters) { + this.#activeFilters = newFilters; + } + isVisible(event) { + return this.#activeFilters.every(f => f.accept(event)); + } +} +//# sourceMappingURL=ActiveFilters.js.map \ No newline at end of file diff --git a/public/panels/timeline/ActiveFilters.js.map b/public/panels/timeline/ActiveFilters.js.map new file mode 100644 index 000000000..afc9cf09a --- /dev/null +++ b/public/panels/timeline/ActiveFilters.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ActiveFilters.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/ActiveFilters.ts"],"names":[],"mappings":"AAMA,IAAI,QAAQ,GAAuB,IAAI,CAAC;AACxC;;GAEG;AACH,MAAM,OAAO,aAAa;IACxB,MAAM,CAAC,QAAQ,CAAC,OAEZ,EAAC,QAAQ,EAAE,IAAI,EAAC;QAClB,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,IAAI,QAAQ,EAAE;YACzB,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAC;SAChC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,cAAc;QACnB,QAAQ,GAAG,IAAI,CAAC;IAClB,CAAC;IAED,cAAc,GAA4D,EAAE,CAAC;IAE7E,aAAa;QACX,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,UAAU,CAAC,UAAmE;QAC5E,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC;IACnC,CAAC;IAED,SAAS,CAAC,KAA8C;QACtD,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport type * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport type * as TraceEngine from '../../models/trace/trace.js';\n\nlet instance: ActiveFilters|null = null;\n/** Singleton class that contains the set of active filters for the given trace\n * file.\n */\nexport class ActiveFilters {\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): ActiveFilters {\n const forceNew = Boolean(opts.forceNew);\n if (!instance || forceNew) {\n instance = new ActiveFilters();\n }\n return instance;\n }\n\n static removeInstance(): void {\n instance = null;\n }\n\n #activeFilters: TimelineModel.TimelineModelFilter.TimelineModelFilter[] = [];\n\n activeFilters(): readonly TimelineModel.TimelineModelFilter.TimelineModelFilter[] {\n return this.#activeFilters;\n }\n\n setFilters(newFilters: TimelineModel.TimelineModelFilter.TimelineModelFilter[]): void {\n this.#activeFilters = newFilters;\n }\n\n isVisible(event: TraceEngine.Legacy.CompatibleTraceEvent): boolean {\n return this.#activeFilters.every(f => f.accept(event));\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/CompatibilityTracksAppender.d.ts b/public/panels/timeline/CompatibilityTracksAppender.d.ts index 9459cb6b2..0ae397eb4 100644 --- a/public/panels/timeline/CompatibilityTracksAppender.d.ts +++ b/public/panels/timeline/CompatibilityTracksAppender.d.ts @@ -5,7 +5,7 @@ import { AnimationsTrackAppender } from './AnimationsTrackAppender.js'; import { GPUTrackAppender } from './GPUTrackAppender.js'; import { InteractionsTrackAppender } from './InteractionsTrackAppender.js'; import { LayoutShiftsTrackAppender } from './LayoutShiftsTrackAppender.js'; -import { ThreadAppender, ThreadType } from './ThreadAppender.js'; +import { ThreadAppender } from './ThreadAppender.js'; import { EntryType, type TimelineFlameChartEntry } from './TimelineFlameChartDataProvider.js'; import { TimingsTrackAppender } from './TimingsTrackAppender.js'; export type HighlightedEntryInfo = { @@ -77,7 +77,7 @@ export declare class CompatibilityTracksAppender { * architecture and should be removed once all tracks use the new * system. */ - constructor(flameChartData: PerfUI.FlameChart.FlameChartTimelineData, traceParsedData: TraceEngine.Handlers.Types.TraceParseData, entryData: TimelineFlameChartEntry[], legacyEntryTypeByLevel: EntryType[], legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl, isCpuProfile?: boolean); + constructor(flameChartData: PerfUI.FlameChart.FlameChartTimelineData, traceParsedData: TraceEngine.Handlers.Types.TraceParseData, entryData: TimelineFlameChartEntry[], legacyEntryTypeByLevel: EntryType[], legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl); setFlameChartDataAndEntryData(flameChartData: PerfUI.FlameChart.FlameChartTimelineData, entryData: TimelineFlameChartEntry[], legacyEntryTypeByLevel: EntryType[]): void; getFlameChartTimelineData(): PerfUI.FlameChart.FlameChartTimelineData; modifyTree(group: PerfUI.FlameChart.Group, node: TraceEngine.Types.TraceEvents.TraceEntry, action: TraceEngine.EntriesFilter.FilterAction, flameChartView: PerfUI.FlameChart.FlameChart): void; @@ -128,7 +128,7 @@ export declare class CompatibilityTracksAppender { * Returns number of tracks of given type already appended. * Used to name the "Raster Thread 6" tracks, etc */ - getCurrentTrackCountForThreadType(threadType: ThreadType.RASTERIZER | ThreadType.THREAD_POOL): number; + getCurrentTrackCountForThreadType(threadType: TraceEngine.Handlers.Threads.ThreadType.RASTERIZER | TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL): number; /** * Looks up a FlameChart group for a given appender. */ diff --git a/public/panels/timeline/CompatibilityTracksAppender.js b/public/panels/timeline/CompatibilityTracksAppender.js index 9a83ed614..a3d73c4dd 100644 --- a/public/panels/timeline/CompatibilityTracksAppender.js +++ b/public/panels/timeline/CompatibilityTracksAppender.js @@ -26,7 +26,6 @@ export class CompatibilityTracksAppender { #colorGenerator; #allTrackAppenders = []; #visibleTrackNames = new Set([...TrackNames]); - #isCpuProfile = false; // TODO(crbug.com/1416533) // These are used only for compatibility with the legacy flame chart // architecture of the panel. Once all tracks have been migrated to @@ -53,7 +52,7 @@ export class CompatibilityTracksAppender { * architecture and should be removed once all tracks use the new * system. */ - constructor(flameChartData, traceParsedData, entryData, legacyEntryTypeByLevel, legacyTimelineModel, isCpuProfile = false) { + constructor(flameChartData, traceParsedData, entryData, legacyEntryTypeByLevel, legacyTimelineModel) { this.#flameChartData = flameChartData; this.#traceParsedData = traceParsedData; this.#entryData = entryData; @@ -64,7 +63,6 @@ export class CompatibilityTracksAppender { /* alphaSpace= */ 0.7); this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel; this.#legacyTimelineModel = legacyTimelineModel; - this.#isCpuProfile = isCpuProfile; this.#timingsTrackAppender = new TimingsTrackAppender(this, this.#traceParsedData, this.#colorGenerator); this.#allTrackAppenders.push(this.#timingsTrackAppender); this.#interactionsTrackAppender = new InteractionsTrackAppender(this, this.#traceParsedData, this.#colorGenerator); @@ -108,62 +106,51 @@ export class CompatibilityTracksAppender { #addThreadAppenders() { const weight = (appender) => { switch (appender.threadType) { - case "MAIN_THREAD" /* ThreadType.MAIN_THREAD */: - return appender.isOnMainFrame ? 0 : 1; - case "WORKER" /* ThreadType.WORKER */: - return 2; - case "RASTERIZER" /* ThreadType.RASTERIZER */: + case "MAIN_THREAD" /* TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD */: { + // Within tracks of the main thread, those with data + // from about:blank are treated with the lowest priority, + // since there's a chance they have only noise from the + // navigation to about:blank done on record and reload. + const asUrl = new URL(appender.getUrl()); + if (asUrl.protocol === 'about:') { + return 2; + } + return (appender.isOnMainFrame && appender.getUrl() !== '') ? 0 : 1; + } + case "WORKER" /* TraceEngine.Handlers.Threads.ThreadType.WORKER */: return 3; - case "THREAD_POOL" /* ThreadType.THREAD_POOL */: + case "RASTERIZER" /* TraceEngine.Handlers.Threads.ThreadType.RASTERIZER */: return 4; - case "AUCTION_WORKLET" /* ThreadType.AUCTION_WORKLET */: - return 4; - case "OTHER" /* ThreadType.OTHER */: + case "THREAD_POOL" /* TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL */: return 5; - default: + case "AUCTION_WORKLET" /* TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET */: return 6; + case "OTHER" /* TraceEngine.Handlers.Threads.ThreadType.OTHER */: + return 7; + default: + return 8; } }; - if (this.#isCpuProfile && this.#traceParsedData.Samples) { - for (const [pid, process] of this.#traceParsedData.Samples.profilesInProcess) { - for (const tid of process.keys()) { - this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, tid, null, "CPU_PROFILE" /* ThreadType.CPU_PROFILE */)); - } + const threads = TraceEngine.Handlers.Threads.threadsInTrace(this.#traceParsedData); + const processedAuctionWorkletsIds = new Set(); + for (const { pid, tid, name, type } of threads) { + const maybeWorklet = this.#traceParsedData.AuctionWorklets.worklets.get(pid); + if (processedAuctionWorkletsIds.has(pid)) { + // Keep track of this process to ensure we only add the following + // tracks once per process and not once per thread. + continue; } - } - else if (this.#traceParsedData.Renderer) { - for (const [pid, process] of this.#traceParsedData.Renderer.processes) { - if (this.#traceParsedData.AuctionWorklets.worklets.has(pid)) { - const workletEvent = this.#traceParsedData.AuctionWorklets.worklets.get(pid); - if (!workletEvent) { - continue; - } - // Each AuctionWorklet event represents two threads: - // 1. the Utility Thread - // 2. the V8 Helper Thread - // Note that the names passed here are not used visually. TODO: remove this name? - this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, workletEvent.args.data.utilityThread.tid, 'auction-worket-utility', "AUCTION_WORKLET" /* ThreadType.AUCTION_WORKLET */)); - this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, workletEvent.args.data.v8HelperThread.tid, 'auction-worklet-v8helper', "AUCTION_WORKLET" /* ThreadType.AUCTION_WORKLET */)); - continue; - } - for (const [tid, thread] of process.threads) { - let threadType = "OTHER" /* ThreadType.OTHER */; - if (thread.name === 'CrRendererMain') { - threadType = "MAIN_THREAD" /* ThreadType.MAIN_THREAD */; - } - else if (thread.name === 'DedicatedWorker thread') { - threadType = "WORKER" /* ThreadType.WORKER */; - } - else if (thread.name?.startsWith('CompositorTileWorker')) { - threadType = "RASTERIZER" /* ThreadType.RASTERIZER */; - } - else if (thread.name?.startsWith('ThreadPool')) { - // TODO(paulirish): perhaps exclude ThreadPoolServiceThread entirely - threadType = "THREAD_POOL" /* ThreadType.THREAD_POOL */; - } - this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, tid, thread.name, threadType)); - } + if (maybeWorklet) { + processedAuctionWorkletsIds.add(pid); + // Each AuctionWorklet event represents two threads: + // 1. the Utility Thread + // 2. the V8 Helper Thread + // Note that the names passed here are not used visually. TODO: remove this name? + this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, maybeWorklet.args.data.utilityThread.tid, 'auction-worket-utility', "AUCTION_WORKLET" /* TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET */)); + this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, maybeWorklet.args.data.v8HelperThread.tid, 'auction-worklet-v8helper', "AUCTION_WORKLET" /* TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET */)); + continue; } + this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, tid, name, type)); } this.#threadAppenders.sort((a, b) => weight(a) - weight(b)); this.#allTrackAppenders.push(...this.#threadAppenders); diff --git a/public/panels/timeline/CompatibilityTracksAppender.js.map b/public/panels/timeline/CompatibilityTracksAppender.js.map index e9ca62d11..79f469974 100644 --- a/public/panels/timeline/CompatibilityTracksAppender.js.map +++ b/public/panels/timeline/CompatibilityTracksAppender.js.map @@ -1 +1 @@ -{"version":3,"file":"CompatibilityTracksAppender.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/CompatibilityTracksAppender.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAE/E,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,cAAc,EAAa,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACL,SAAS,EACT,6BAA6B,GAE9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,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,2GAA2G;QAC3G,2DAA2D;QAC3D,gEAAgE;QAChE,kBAAkB;QAClB,MAAM,eAAe,GACjB,kBAAkB,CAAC,WAAW,CAAC,4BAA4B,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAE9F,MAAM,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAC,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACxG,OAAO;YACL,KAAK;YACL,aAAa;YACb,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,oBAAoB,IAAI,EAAE,CAAC;SACpE,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport type * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport type * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {AnimationsTrackAppender} from './AnimationsTrackAppender.js';\nimport {getEventLevel} from './AppenderUtils.js';\nimport * as TimelineComponents from './components/components.js';\nimport {getEventStyle} from './EventUICategory.js';\nimport {GPUTrackAppender} from './GPUTrackAppender.js';\nimport {InteractionsTrackAppender} from './InteractionsTrackAppender.js';\nimport {LayoutShiftsTrackAppender} from './LayoutShiftsTrackAppender.js';\nimport {ThreadAppender, ThreadType} from './ThreadAppender.js';\nimport {\n EntryType,\n InstantEventVisibleDurationMs,\n type TimelineFlameChartEntry,\n} from './TimelineFlameChartDataProvider.js';\nimport {TimingsTrackAppender} from './TimingsTrackAppender.js';\n\nexport type HighlightedEntryInfo = {\n title: string,\n formattedTime: string,\n warningElements?: HTMLSpanElement[],\n};\n\n/**\n * Track appenders add the data of each track into the timeline flame\n * chart. Each track appender also implements functions tha allow the\n * canvas renderer to gather more information about an event in a track,\n * like its display name or color.\n *\n * At the moment, tracks in the timeline flame chart are appended in\n * two locations: in the TimelineFlameChartDataProvider and in the track\n * appenders exported by this module. As part of the work to use a new\n * trace parsing engine, a track appender will be defined with this API\n * for each of the tracks in the timeline. With this implementation in\n * place its counterpart in the TimelineFlameChartDataProvider can be\n * removed. This processes of doing this for a track is referred to as\n * \"migrating the track\" to the new system.\n *\n * The migration implementation will result beneficial among other\n * things because the complexity of rendering the details of each track\n * is distributed among multiple standalone modules.\n * Read more at go/rpp-flamechart-arch\n */\n\nexport interface TrackAppender {\n /**\n * The unique name given to the track appender.\n */\n appenderName: TrackAppenderName;\n\n /**\n * Appends into the flame chart data the data corresponding to a track.\n * @param level the horizontal level of the flame chart events where the\n * track's events will start being appended.\n * @param expanded wether the track should be rendered expanded.\n * @returns the first available level to append more data after having\n * appended the track's events.\n */\n appendTrackAtLevel(level: number, expanded?: boolean): number;\n /**\n * Returns the color an event is shown with in the timeline.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string;\n /**\n * Returns the title an event is shown with in the timeline.\n */\n titleForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string;\n /**\n * Returns the info shown when an event in the timeline is hovered.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.TraceEventData): HighlightedEntryInfo;\n}\n\nexport const TrackNames =\n ['Animations', 'Timings', 'Interactions', 'GPU', 'LayoutShifts', 'Thread', 'Thread_AuctionWorklet'] as const;\n// Network track will use TrackAppender interface, but it won't be shown in Main flamechart.\n// So manually add it to TrackAppenderName.\nexport type TrackAppenderName = typeof TrackNames[number]|'Network';\n\nexport class CompatibilityTracksAppender {\n #trackForLevel = new Map();\n #trackForGroup = new Map();\n #eventsForTrack = new Map();\n #trackEventsForTreeview = new Map();\n #flameChartData: PerfUI.FlameChart.FlameChartTimelineData;\n #traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n #entryData: TimelineFlameChartEntry[];\n #colorGenerator: Common.Color.Generator;\n #allTrackAppenders: TrackAppender[] = [];\n #visibleTrackNames: Set = new Set([...TrackNames]);\n #isCpuProfile = false;\n\n // TODO(crbug.com/1416533)\n // These are used only for compatibility with the legacy flame chart\n // architecture of the panel. Once all tracks have been migrated to\n // use the new engine and flame chart architecture, the reference can\n // be removed.\n #legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl;\n #legacyEntryTypeByLevel: EntryType[];\n #timingsTrackAppender: TimingsTrackAppender;\n #animationsTrackAppender: AnimationsTrackAppender;\n #interactionsTrackAppender: InteractionsTrackAppender;\n #gpuTrackAppender: GPUTrackAppender;\n #layoutShiftsTrackAppender: LayoutShiftsTrackAppender;\n #threadAppenders: ThreadAppender[] = [];\n\n /**\n * @param flameChartData the data used by the flame chart renderer on\n * which the track data will be appended.\n * @param traceParsedData the trace parsing engines output.\n * @param entryData the array containing all event to be rendered in\n * the flamechart.\n * @param legacyEntryTypeByLevel an array containing the type of\n * each entry in the entryData array. Indexed by the position the\n * corresponding entry occupies in the entryData array. This reference\n * is needed only for compatibility with the legacy flamechart\n * architecture and should be removed once all tracks use the new\n * system.\n */\n constructor(\n flameChartData: PerfUI.FlameChart.FlameChartTimelineData,\n traceParsedData: TraceEngine.Handlers.Types.TraceParseData, entryData: TimelineFlameChartEntry[],\n legacyEntryTypeByLevel: EntryType[], legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl,\n isCpuProfile = false) {\n this.#flameChartData = flameChartData;\n this.#traceParsedData = traceParsedData;\n this.#entryData = entryData;\n this.#colorGenerator = new Common.Color.Generator(\n /* hueSpace= */ {min: 30, max: 55, count: undefined},\n /* satSpace= */ {min: 70, max: 100, count: 6},\n /* lightnessSpace= */ 50,\n /* alphaSpace= */ 0.7);\n this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel;\n this.#legacyTimelineModel = legacyTimelineModel;\n this.#isCpuProfile = isCpuProfile;\n this.#timingsTrackAppender = new TimingsTrackAppender(this, this.#traceParsedData, this.#colorGenerator);\n this.#allTrackAppenders.push(this.#timingsTrackAppender);\n\n this.#interactionsTrackAppender = new InteractionsTrackAppender(this, this.#traceParsedData, this.#colorGenerator);\n this.#allTrackAppenders.push(this.#interactionsTrackAppender);\n\n this.#animationsTrackAppender = new AnimationsTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#animationsTrackAppender);\n\n this.#gpuTrackAppender = new GPUTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#gpuTrackAppender);\n\n // Layout Shifts track in OPP was called the \"Experience\" track even though\n // all it shows are layout shifts.\n this.#layoutShiftsTrackAppender = new LayoutShiftsTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#layoutShiftsTrackAppender);\n\n this.#addThreadAppenders();\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n for (const group of this.#flameChartData.groups) {\n // We only need to update the color here, because FlameChart will call `scheduleUpdate()` when theme is changed.\n group.style.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');\n group.style.backgroundColor =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n }\n });\n }\n\n setFlameChartDataAndEntryData(\n flameChartData: PerfUI.FlameChart.FlameChartTimelineData, entryData: TimelineFlameChartEntry[],\n legacyEntryTypeByLevel: EntryType[]): void {\n this.#trackForGroup.clear();\n this.#flameChartData = flameChartData;\n this.#entryData = entryData;\n this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel;\n }\n\n getFlameChartTimelineData(): PerfUI.FlameChart.FlameChartTimelineData {\n return this.#flameChartData;\n }\n\n modifyTree(\n group: PerfUI.FlameChart.Group, node: TraceEngine.Types.TraceEvents.TraceEntry,\n action: TraceEngine.EntriesFilter.FilterAction, flameChartView: PerfUI.FlameChart.FlameChart): void {\n const threadTrackAppender = this.#trackForGroup.get(group);\n if (threadTrackAppender instanceof ThreadAppender) {\n threadTrackAppender.modifyTree(node, action, flameChartView);\n } else {\n console.warn('Could not modify tree in not thread track');\n }\n }\n\n #addThreadAppenders(): void {\n const weight = (appender: ThreadAppender): number => {\n switch (appender.threadType) {\n case ThreadType.MAIN_THREAD:\n return appender.isOnMainFrame ? 0 : 1;\n case ThreadType.WORKER:\n return 2;\n case ThreadType.RASTERIZER:\n return 3;\n case ThreadType.THREAD_POOL:\n return 4;\n case ThreadType.AUCTION_WORKLET:\n return 4;\n case ThreadType.OTHER:\n return 5;\n default:\n return 6;\n }\n };\n if (this.#isCpuProfile && this.#traceParsedData.Samples) {\n for (const [pid, process] of this.#traceParsedData.Samples.profilesInProcess) {\n for (const tid of process.keys()) {\n this.#threadAppenders.push(\n new ThreadAppender(this, this.#traceParsedData, pid, tid, null, ThreadType.CPU_PROFILE));\n }\n }\n } else if (this.#traceParsedData.Renderer) {\n for (const [pid, process] of this.#traceParsedData.Renderer.processes) {\n if (this.#traceParsedData.AuctionWorklets.worklets.has(pid)) {\n const workletEvent = this.#traceParsedData.AuctionWorklets.worklets.get(pid);\n if (!workletEvent) {\n continue;\n }\n\n // Each AuctionWorklet event represents two threads:\n // 1. the Utility Thread\n // 2. the V8 Helper Thread\n // Note that the names passed here are not used visually. TODO: remove this name?\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, workletEvent.args.data.utilityThread.tid, 'auction-worket-utility',\n ThreadType.AUCTION_WORKLET));\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, workletEvent.args.data.v8HelperThread.tid, 'auction-worklet-v8helper',\n ThreadType.AUCTION_WORKLET));\n continue;\n }\n\n for (const [tid, thread] of process.threads) {\n let threadType = ThreadType.OTHER;\n if (thread.name === 'CrRendererMain') {\n threadType = ThreadType.MAIN_THREAD;\n } else if (thread.name === 'DedicatedWorker thread') {\n threadType = ThreadType.WORKER;\n } else if (thread.name?.startsWith('CompositorTileWorker')) {\n threadType = ThreadType.RASTERIZER;\n } else if (thread.name?.startsWith('ThreadPool')) {\n // TODO(paulirish): perhaps exclude ThreadPoolServiceThread entirely\n threadType = ThreadType.THREAD_POOL;\n }\n this.#threadAppenders.push(\n new ThreadAppender(this, this.#traceParsedData, pid, tid, thread.name, threadType));\n }\n }\n }\n this.#threadAppenders.sort((a, b) => weight(a) - weight(b));\n this.#allTrackAppenders.push(...this.#threadAppenders);\n }\n /**\n * Given a trace event returns instantiates a legacy SDK.Event. This should\n * be used for compatibility purposes only.\n */\n getLegacyEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): TraceEngine.Legacy.Event|null {\n const process = this.#legacyTimelineModel.tracingModel()?.getProcessById(event.pid);\n const thread = process?.threadById(event.tid);\n if (!thread) {\n return null;\n }\n return TraceEngine.Legacy.PayloadEvent.fromPayload(\n event as unknown as TraceEngine.TracingManager.EventPayload, thread);\n }\n\n timingsTrackAppender(): TimingsTrackAppender {\n return this.#timingsTrackAppender;\n }\n\n animationsTrackAppender(): AnimationsTrackAppender {\n return this.#animationsTrackAppender;\n }\n\n interactionsTrackAppender(): InteractionsTrackAppender {\n return this.#interactionsTrackAppender;\n }\n\n gpuTrackAppender(): GPUTrackAppender {\n return this.#gpuTrackAppender;\n }\n\n layoutShiftsTrackAppender(): LayoutShiftsTrackAppender {\n return this.#layoutShiftsTrackAppender;\n }\n\n threadAppenders(): ThreadAppender[] {\n return this.#threadAppenders;\n }\n\n eventsInTrack(trackAppender: TrackAppender): TraceEngine.Types.TraceEvents.TraceEventData[] {\n const cachedData = this.#eventsForTrack.get(trackAppender);\n if (cachedData) {\n return cachedData;\n }\n\n // Calculate the levels occupied by a track.\n let trackStartLevel = null;\n let trackEndLevel = null;\n for (const [level, track] of this.#trackForLevel) {\n if (track !== trackAppender) {\n continue;\n }\n if (trackStartLevel === null) {\n trackStartLevel = level;\n }\n trackEndLevel = level;\n }\n\n if (trackStartLevel === null || trackEndLevel === null) {\n throw new Error(`Could not find events for track: ${trackAppender}`);\n }\n const entryLevels = this.#flameChartData.entryLevels;\n const events = [];\n for (let i = 0; i < entryLevels.length; i++) {\n if (trackStartLevel <= entryLevels[i] && entryLevels[i] <= trackEndLevel) {\n events.push(this.#entryData[i] as TraceEngine.Types.TraceEvents.TraceEventData);\n }\n }\n events.sort((a, b) => a.ts - b.ts);\n this.#eventsForTrack.set(trackAppender, events);\n return events;\n }\n\n /**\n * Determines if the given events, which are assumed to be ordered can\n * be organized into tree structures.\n * This condition is met if there is *not* a pair of async events\n * e1 and e2 where:\n *\n * e1.startTime <= e2.startTime && e1.endTime > e2.startTime && e1.endTime > e2.endTime.\n * or, graphically:\n * |------- e1 ------|\n * |------- e2 --------|\n *\n * Because a parent-child relationship cannot be made from the example\n * above, a tree cannot be made from the set of events.\n *\n * Note that this will also return true if multiple trees can be\n * built, for example if none of the events overlap with each other.\n */\n canBuildTreesFromEvents(events: readonly TraceEngine.Types.TraceEvents.TraceEventData[]): boolean {\n const stack: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n for (const event of events) {\n const startTime = event.ts;\n const endTime = event.ts + (event.dur || 0);\n let parent = stack.at(-1);\n if (parent === undefined) {\n stack.push(event);\n continue;\n }\n let parentEndTime = parent.ts + (parent.dur || 0);\n // Discard events that are not parents for this event. The parent\n // is one whose end time is after this event start time.\n while (stack.length && startTime >= parentEndTime) {\n stack.pop();\n parent = stack.at(-1);\n\n if (parent === undefined) {\n break;\n }\n parentEndTime = parent.ts + (parent.dur || 0);\n }\n if (stack.length && endTime > parentEndTime) {\n // If such an event exists but its end time is before this\n // event's end time, then a tree cannot be made using this\n // events.\n return false;\n }\n stack.push(event);\n }\n return true;\n }\n\n /**\n * Gets the events to be shown in the tree views of the details pane\n * (Bottom-up, Call tree, etc.). These are the events from the track\n * that can be arranged in a tree shape.\n */\n eventsForTreeView(trackAppender: TrackAppender): TraceEngine.Types.TraceEvents.TraceEventData[] {\n const cachedData = this.#trackEventsForTreeview.get(trackAppender);\n if (cachedData) {\n return cachedData;\n }\n\n let trackEvents = this.eventsInTrack(trackAppender);\n if (!this.canBuildTreesFromEvents(trackEvents)) {\n // Some tracks can include both async and sync events. When this\n // happens, we use all events for the tree views if a trees can be\n // built from both sync and async events. If this is not possible,\n // async events are filtered out and only sync events are used\n // (it's assumed a tree can always be built using a tracks sync\n // events).\n trackEvents = trackEvents.filter(e => !TraceEngine.Types.TraceEvents.isAsyncPhase(e.ph));\n }\n this.#trackEventsForTreeview.set(trackAppender, trackEvents);\n return trackEvents;\n }\n\n /**\n * Caches the track appender that owns a flame chart group. FlameChart\n * groups are created for each track in the timeline. When an user\n * selects a track in the UI, the track's group is passed to the model\n * layer to inform about the selection.\n */\n registerTrackForGroup(group: PerfUI.FlameChart.Group, appender: TrackAppender): void {\n this.#flameChartData.groups.push(group);\n this.#trackForGroup.set(group, appender);\n }\n\n /**\n * Returns number of tracks of given type already appended.\n * Used to name the \"Raster Thread 6\" tracks, etc\n */\n getCurrentTrackCountForThreadType(threadType: ThreadType.RASTERIZER|ThreadType.THREAD_POOL): number {\n return this.#threadAppenders.filter(appender => appender.threadType === threadType && appender.headerAppended())\n .length;\n }\n\n /**\n * Looks up a FlameChart group for a given appender.\n */\n groupForAppender(targetAppender: TrackAppender): PerfUI.FlameChart.Group|null {\n let foundGroup: PerfUI.FlameChart.Group|null = null;\n for (const [group, appender] of this.#trackForGroup) {\n if (appender === targetAppender) {\n foundGroup = group;\n break;\n }\n }\n return foundGroup;\n }\n\n /**\n * Given a FlameChart group, gets the events to be shown in the tree\n * views if that group was registered by the appender system.\n */\n groupEventsForTreeView(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|null {\n const track = this.#trackForGroup.get(group);\n if (!track) {\n return null;\n }\n return this.eventsForTreeView(track);\n }\n\n /**\n * Caches the track appender that owns a level. An appender takes\n * ownership of a level when it appends data to it.\n * The cache is useful to determine what appender should handle a\n * query from the flame chart renderer when an event's feature (like\n * style, title, etc.) is needed.\n */\n registerTrackForLevel(level: number, appender: TrackAppender): void {\n // TODO(crbug.com/1442454) Figure out how to avoid the circular calls.\n this.#trackForLevel.set(level, appender);\n }\n\n /**\n * Adds an event to the flame chart data at a defined level.\n * @param event the event to be appended,\n * @param level the level to append the event,\n * @param appender the track which the event belongs to.\n * @returns the index of the event in all events to be rendered in the flamechart.\n */\n appendEventAtLevel(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number, appender: TrackAppender):\n number {\n // TODO(crbug.com/1442454) Figure out how to avoid the circular calls.\n this.#trackForLevel.set(level, appender);\n const index = this.#entryData.length;\n this.#entryData.push(event);\n this.#legacyEntryTypeByLevel[level] = EntryType.TrackAppender;\n this.#flameChartData.entryLevels[index] = level;\n this.#flameChartData.entryStartTimes[index] = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(event.ts);\n const msDuration = event.dur ||\n TraceEngine.Helpers.Timing.millisecondsToMicroseconds(\n InstantEventVisibleDurationMs as TraceEngine.Types.Timing.MilliSeconds);\n this.#flameChartData.entryTotalTimes[index] = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(msDuration);\n return index;\n }\n\n /**\n * Adds into the flame chart data a list of trace events.\n * @param events the trace events that will be appended to the flame chart.\n * The events should be taken straight from the trace handlers. The handlers\n * should sort the events by start time, and the parent event is before the\n * child.\n * @param trackStartLevel the flame chart level from which the events will\n * be appended.\n * @param appender the track that the trace events belong to.\n * @param eventAppendedCallback an optional function called after the\n * event has been added to the timeline data. This allows the caller\n * to know f.e. the position of the event in the entry data. Use this\n * hook to customize the data after it has been appended, f.e. to add\n * decorations to a set of the entries.\n * @returns the next level after the last occupied by the appended these\n * trace events (the first available level to append next track).\n */\n appendEventsAtLevel(\n events: readonly T[], trackStartLevel: number, appender: TrackAppender,\n eventAppendedCallback?: (event: T, index: number) => void): number {\n const lastUsedTimeByLevel: number[] = [];\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n if (!this.entryIsVisibleInTimeline(event)) {\n continue;\n }\n\n const level = getEventLevel(event, lastUsedTimeByLevel);\n const index = this.appendEventAtLevel(event, trackStartLevel + level, appender);\n eventAppendedCallback?.(event, index);\n }\n\n this.#legacyEntryTypeByLevel.length = trackStartLevel + lastUsedTimeByLevel.length;\n this.#legacyEntryTypeByLevel.fill(EntryType.TrackAppender, trackStartLevel);\n return trackStartLevel + lastUsedTimeByLevel.length;\n }\n\n entryIsVisibleInTimeline(entry: TraceEngine.Types.TraceEvents.TraceEventData): boolean {\n if (TraceEngine.Types.TraceEvents.isTraceEventUpdateCounters(entry)) {\n // These events are not \"visible\" on the timeline because they are instant events with 0 duration.\n // However, the Memory view (CountersGraph in the codebase) relies on\n // finding the UpdateCounters events within the user's active trace\n // selection in order to show the memory usage for the selected time\n // period.\n // Therefore we mark them as visible so they are appended onto the Thread\n // track, and hence accessible by the CountersGraph view.\n return true;\n }\n\n // Default styles are globally defined for each event name. Some\n // events are hidden by default.\n const eventStyle = getEventStyle(entry.name as TraceEngine.Types.TraceEvents.KnownEventName);\n const eventIsTiming = TraceEngine.Types.TraceEvents.isTraceEventConsoleTime(entry) ||\n TraceEngine.Types.TraceEvents.isTraceEventPerformanceMeasure(entry) ||\n TraceEngine.Types.TraceEvents.isTraceEventPerformanceMark(entry);\n\n return (eventStyle && !eventStyle.hidden) || eventIsTiming;\n }\n\n /**\n * Gets the all track appenders that have been set to be visible.\n */\n allVisibleTrackAppenders(): TrackAppender[] {\n return this.#allTrackAppenders.filter(track => this.#visibleTrackNames.has(track.appenderName));\n }\n\n /**\n * Sets the visible tracks internally\n * @param visibleTracks set with the names of the visible track\n * appenders. If undefined, all tracks are set to be visible.\n */\n setVisibleTracks(visibleTracks?: Set): void {\n if (!visibleTracks) {\n this.#visibleTrackNames = new Set([...TrackNames]);\n return;\n }\n this.#visibleTrackNames = visibleTracks;\n }\n\n /**\n * Returns the color an event is shown with in the timeline.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): string {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n return track.colorForEvent(event);\n }\n /**\n * Returns the title an event is shown with in the timeline.\n */\n titleForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): string {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n return track.titleForEvent(event);\n }\n /**\n * Returns the info shown when an event in the timeline is hovered.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): HighlightedEntryInfo {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n\n // Add any warnings information to the tooltip. Done here to avoid duplicating this call in every appender.\n // By doing this here, we ensure that any warnings that are\n // added to the WarningsHandler are automatically used and added\n // to the tooltip.\n const warningElements: HTMLSpanElement[] =\n TimelineComponents.DetailsView.buildWarningElementsForEvent(event, this.#traceParsedData);\n\n const {title, formattedTime, warningElements: extraWarningElements} = track.highlightedEntryInfo(event);\n return {\n title,\n formattedTime,\n warningElements: warningElements.concat(extraWarningElements || []),\n };\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"CompatibilityTracksAppender.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/CompatibilityTracksAppender.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAE/E,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,E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ed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport type * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport type * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {AnimationsTrackAppender} from './AnimationsTrackAppender.js';\nimport {getEventLevel} from './AppenderUtils.js';\nimport * as TimelineComponents from './components/components.js';\nimport {getEventStyle} from './EventUICategory.js';\nimport {GPUTrackAppender} from './GPUTrackAppender.js';\nimport {InteractionsTrackAppender} from './InteractionsTrackAppender.js';\nimport {LayoutShiftsTrackAppender} from './LayoutShiftsTrackAppender.js';\nimport {ThreadAppender} from './ThreadAppender.js';\nimport {\n EntryType,\n InstantEventVisibleDurationMs,\n type TimelineFlameChartEntry,\n} from './TimelineFlameChartDataProvider.js';\nimport {TimingsTrackAppender} from './TimingsTrackAppender.js';\n\nexport type HighlightedEntryInfo = {\n title: string,\n formattedTime: string,\n warningElements?: HTMLSpanElement[],\n};\n\n/**\n * Track appenders add the data of each track into the timeline flame\n * chart. Each track appender also implements functions tha allow the\n * canvas renderer to gather more information about an event in a track,\n * like its display name or color.\n *\n * At the moment, tracks in the timeline flame chart are appended in\n * two locations: in the TimelineFlameChartDataProvider and in the track\n * appenders exported by this module. As part of the work to use a new\n * trace parsing engine, a track appender will be defined with this API\n * for each of the tracks in the timeline. With this implementation in\n * place its counterpart in the TimelineFlameChartDataProvider can be\n * removed. This processes of doing this for a track is referred to as\n * \"migrating the track\" to the new system.\n *\n * The migration implementation will result beneficial among other\n * things because the complexity of rendering the details of each track\n * is distributed among multiple standalone modules.\n * Read more at go/rpp-flamechart-arch\n */\n\nexport interface TrackAppender {\n /**\n * The unique name given to the track appender.\n */\n appenderName: TrackAppenderName;\n\n /**\n * Appends into the flame chart data the data corresponding to a track.\n * @param level the horizontal level of the flame chart events where the\n * track's events will start being appended.\n * @param expanded wether the track should be rendered expanded.\n * @returns the first available level to append more data after having\n * appended the track's events.\n */\n appendTrackAtLevel(level: number, expanded?: boolean): number;\n /**\n * Returns the color an event is shown with in the timeline.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string;\n /**\n * Returns the title an event is shown with in the timeline.\n */\n titleForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string;\n /**\n * Returns the info shown when an event in the timeline is hovered.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.TraceEventData): HighlightedEntryInfo;\n}\n\nexport const TrackNames =\n ['Animations', 'Timings', 'Interactions', 'GPU', 'LayoutShifts', 'Thread', 'Thread_AuctionWorklet'] as const;\n// Network track will use TrackAppender interface, but it won't be shown in Main flamechart.\n// So manually add it to TrackAppenderName.\nexport type TrackAppenderName = typeof TrackNames[number]|'Network';\n\nexport class CompatibilityTracksAppender {\n #trackForLevel = new Map();\n #trackForGroup = new Map();\n #eventsForTrack = new Map();\n #trackEventsForTreeview = new Map();\n #flameChartData: PerfUI.FlameChart.FlameChartTimelineData;\n #traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n #entryData: TimelineFlameChartEntry[];\n #colorGenerator: Common.Color.Generator;\n #allTrackAppenders: TrackAppender[] = [];\n #visibleTrackNames: Set = new Set([...TrackNames]);\n\n // TODO(crbug.com/1416533)\n // These are used only for compatibility with the legacy flame chart\n // architecture of the panel. Once all tracks have been migrated to\n // use the new engine and flame chart architecture, the reference can\n // be removed.\n #legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl;\n #legacyEntryTypeByLevel: EntryType[];\n #timingsTrackAppender: TimingsTrackAppender;\n #animationsTrackAppender: AnimationsTrackAppender;\n #interactionsTrackAppender: InteractionsTrackAppender;\n #gpuTrackAppender: GPUTrackAppender;\n #layoutShiftsTrackAppender: LayoutShiftsTrackAppender;\n #threadAppenders: ThreadAppender[] = [];\n\n /**\n * @param flameChartData the data used by the flame chart renderer on\n * which the track data will be appended.\n * @param traceParsedData the trace parsing engines output.\n * @param entryData the array containing all event to be rendered in\n * the flamechart.\n * @param legacyEntryTypeByLevel an array containing the type of\n * each entry in the entryData array. Indexed by the position the\n * corresponding entry occupies in the entryData array. This reference\n * is needed only for compatibility with the legacy flamechart\n * architecture and should be removed once all tracks use the new\n * system.\n */\n constructor(\n flameChartData: PerfUI.FlameChart.FlameChartTimelineData,\n traceParsedData: TraceEngine.Handlers.Types.TraceParseData, entryData: TimelineFlameChartEntry[],\n legacyEntryTypeByLevel: EntryType[], legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl) {\n this.#flameChartData = flameChartData;\n this.#traceParsedData = traceParsedData;\n this.#entryData = entryData;\n this.#colorGenerator = new Common.Color.Generator(\n /* hueSpace= */ {min: 30, max: 55, count: undefined},\n /* satSpace= */ {min: 70, max: 100, count: 6},\n /* lightnessSpace= */ 50,\n /* alphaSpace= */ 0.7);\n this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel;\n this.#legacyTimelineModel = legacyTimelineModel;\n this.#timingsTrackAppender = new TimingsTrackAppender(this, this.#traceParsedData, this.#colorGenerator);\n this.#allTrackAppenders.push(this.#timingsTrackAppender);\n\n this.#interactionsTrackAppender = new InteractionsTrackAppender(this, this.#traceParsedData, this.#colorGenerator);\n this.#allTrackAppenders.push(this.#interactionsTrackAppender);\n\n this.#animationsTrackAppender = new AnimationsTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#animationsTrackAppender);\n\n this.#gpuTrackAppender = new GPUTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#gpuTrackAppender);\n\n // Layout Shifts track in OPP was called the \"Experience\" track even though\n // all it shows are layout shifts.\n this.#layoutShiftsTrackAppender = new LayoutShiftsTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#layoutShiftsTrackAppender);\n\n this.#addThreadAppenders();\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n for (const group of this.#flameChartData.groups) {\n // We only need to update the color here, because FlameChart will call `scheduleUpdate()` when theme is changed.\n group.style.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');\n group.style.backgroundColor =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n }\n });\n }\n\n setFlameChartDataAndEntryData(\n flameChartData: PerfUI.FlameChart.FlameChartTimelineData, entryData: TimelineFlameChartEntry[],\n legacyEntryTypeByLevel: EntryType[]): void {\n this.#trackForGroup.clear();\n this.#flameChartData = flameChartData;\n this.#entryData = entryData;\n this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel;\n }\n\n getFlameChartTimelineData(): PerfUI.FlameChart.FlameChartTimelineData {\n return this.#flameChartData;\n }\n\n modifyTree(\n group: PerfUI.FlameChart.Group, node: TraceEngine.Types.TraceEvents.TraceEntry,\n action: TraceEngine.EntriesFilter.FilterAction, flameChartView: PerfUI.FlameChart.FlameChart): void {\n const threadTrackAppender = this.#trackForGroup.get(group);\n if (threadTrackAppender instanceof ThreadAppender) {\n threadTrackAppender.modifyTree(node, action, flameChartView);\n } else {\n console.warn('Could not modify tree in not thread track');\n }\n }\n\n #addThreadAppenders(): void {\n const weight = (appender: ThreadAppender): number => {\n switch (appender.threadType) {\n case TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD: {\n // Within tracks of the main thread, those with data\n // from about:blank are treated with the lowest priority,\n // since there's a chance they have only noise from the\n // navigation to about:blank done on record and reload.\n const asUrl = new URL(appender.getUrl());\n if (asUrl.protocol === 'about:') {\n return 2;\n }\n return (appender.isOnMainFrame && appender.getUrl() !== '') ? 0 : 1;\n }\n case TraceEngine.Handlers.Threads.ThreadType.WORKER:\n return 3;\n case TraceEngine.Handlers.Threads.ThreadType.RASTERIZER:\n return 4;\n case TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL:\n return 5;\n case TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET:\n return 6;\n case TraceEngine.Handlers.Threads.ThreadType.OTHER:\n return 7;\n default:\n return 8;\n }\n };\n const threads = TraceEngine.Handlers.Threads.threadsInTrace(this.#traceParsedData);\n const processedAuctionWorkletsIds = new Set();\n\n for (const {pid, tid, name, type} of threads) {\n const maybeWorklet = this.#traceParsedData.AuctionWorklets.worklets.get(pid);\n if (processedAuctionWorkletsIds.has(pid)) {\n // Keep track of this process to ensure we only add the following\n // tracks once per process and not once per thread.\n continue;\n }\n if (maybeWorklet) {\n processedAuctionWorkletsIds.add(pid);\n // Each AuctionWorklet event represents two threads:\n // 1. the Utility Thread\n // 2. the V8 Helper Thread\n // Note that the names passed here are not used visually. TODO: remove this name?\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, maybeWorklet.args.data.utilityThread.tid, 'auction-worket-utility',\n TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET));\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, maybeWorklet.args.data.v8HelperThread.tid, 'auction-worklet-v8helper',\n TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET));\n continue;\n }\n\n this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, tid, name, type));\n }\n\n this.#threadAppenders.sort((a, b) => weight(a) - weight(b));\n this.#allTrackAppenders.push(...this.#threadAppenders);\n }\n /**\n * Given a trace event returns instantiates a legacy SDK.Event. This should\n * be used for compatibility purposes only.\n */\n getLegacyEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): TraceEngine.Legacy.Event|null {\n const process = this.#legacyTimelineModel.tracingModel()?.getProcessById(event.pid);\n const thread = process?.threadById(event.tid);\n if (!thread) {\n return null;\n }\n return TraceEngine.Legacy.PayloadEvent.fromPayload(\n event as unknown as TraceEngine.TracingManager.EventPayload, thread);\n }\n\n timingsTrackAppender(): TimingsTrackAppender {\n return this.#timingsTrackAppender;\n }\n\n animationsTrackAppender(): AnimationsTrackAppender {\n return this.#animationsTrackAppender;\n }\n\n interactionsTrackAppender(): InteractionsTrackAppender {\n return this.#interactionsTrackAppender;\n }\n\n gpuTrackAppender(): GPUTrackAppender {\n return this.#gpuTrackAppender;\n }\n\n layoutShiftsTrackAppender(): LayoutShiftsTrackAppender {\n return this.#layoutShiftsTrackAppender;\n }\n\n threadAppenders(): ThreadAppender[] {\n return this.#threadAppenders;\n }\n\n eventsInTrack(trackAppender: TrackAppender): TraceEngine.Types.TraceEvents.TraceEventData[] {\n const cachedData = this.#eventsForTrack.get(trackAppender);\n if (cachedData) {\n return cachedData;\n }\n\n // Calculate the levels occupied by a track.\n let trackStartLevel = null;\n let trackEndLevel = null;\n for (const [level, track] of this.#trackForLevel) {\n if (track !== trackAppender) {\n continue;\n }\n if (trackStartLevel === null) {\n trackStartLevel = level;\n }\n trackEndLevel = level;\n }\n\n if (trackStartLevel === null || trackEndLevel === null) {\n throw new Error(`Could not find events for track: ${trackAppender}`);\n }\n const entryLevels = this.#flameChartData.entryLevels;\n const events = [];\n for (let i = 0; i < entryLevels.length; i++) {\n if (trackStartLevel <= entryLevels[i] && entryLevels[i] <= trackEndLevel) {\n events.push(this.#entryData[i] as TraceEngine.Types.TraceEvents.TraceEventData);\n }\n }\n events.sort((a, b) => a.ts - b.ts);\n this.#eventsForTrack.set(trackAppender, events);\n return events;\n }\n\n /**\n * Determines if the given events, which are assumed to be ordered can\n * be organized into tree structures.\n * This condition is met if there is *not* a pair of async events\n * e1 and e2 where:\n *\n * e1.startTime <= e2.startTime && e1.endTime > e2.startTime && e1.endTime > e2.endTime.\n * or, graphically:\n * |------- e1 ------|\n * |------- e2 --------|\n *\n * Because a parent-child relationship cannot be made from the example\n * above, a tree cannot be made from the set of events.\n *\n * Note that this will also return true if multiple trees can be\n * built, for example if none of the events overlap with each other.\n */\n canBuildTreesFromEvents(events: readonly TraceEngine.Types.TraceEvents.TraceEventData[]): boolean {\n const stack: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n for (const event of events) {\n const startTime = event.ts;\n const endTime = event.ts + (event.dur || 0);\n let parent = stack.at(-1);\n if (parent === undefined) {\n stack.push(event);\n continue;\n }\n let parentEndTime = parent.ts + (parent.dur || 0);\n // Discard events that are not parents for this event. The parent\n // is one whose end time is after this event start time.\n while (stack.length && startTime >= parentEndTime) {\n stack.pop();\n parent = stack.at(-1);\n\n if (parent === undefined) {\n break;\n }\n parentEndTime = parent.ts + (parent.dur || 0);\n }\n if (stack.length && endTime > parentEndTime) {\n // If such an event exists but its end time is before this\n // event's end time, then a tree cannot be made using this\n // events.\n return false;\n }\n stack.push(event);\n }\n return true;\n }\n\n /**\n * Gets the events to be shown in the tree views of the details pane\n * (Bottom-up, Call tree, etc.). These are the events from the track\n * that can be arranged in a tree shape.\n */\n eventsForTreeView(trackAppender: TrackAppender): TraceEngine.Types.TraceEvents.TraceEventData[] {\n const cachedData = this.#trackEventsForTreeview.get(trackAppender);\n if (cachedData) {\n return cachedData;\n }\n\n let trackEvents = this.eventsInTrack(trackAppender);\n if (!this.canBuildTreesFromEvents(trackEvents)) {\n // Some tracks can include both async and sync events. When this\n // happens, we use all events for the tree views if a trees can be\n // built from both sync and async events. If this is not possible,\n // async events are filtered out and only sync events are used\n // (it's assumed a tree can always be built using a tracks sync\n // events).\n trackEvents = trackEvents.filter(e => !TraceEngine.Types.TraceEvents.isAsyncPhase(e.ph));\n }\n this.#trackEventsForTreeview.set(trackAppender, trackEvents);\n return trackEvents;\n }\n\n /**\n * Caches the track appender that owns a flame chart group. FlameChart\n * groups are created for each track in the timeline. When an user\n * selects a track in the UI, the track's group is passed to the model\n * layer to inform about the selection.\n */\n registerTrackForGroup(group: PerfUI.FlameChart.Group, appender: TrackAppender): void {\n this.#flameChartData.groups.push(group);\n this.#trackForGroup.set(group, appender);\n }\n\n /**\n * Returns number of tracks of given type already appended.\n * Used to name the \"Raster Thread 6\" tracks, etc\n */\n getCurrentTrackCountForThreadType(threadType: TraceEngine.Handlers.Threads.ThreadType.RASTERIZER|\n TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL): number {\n return this.#threadAppenders.filter(appender => appender.threadType === threadType && appender.headerAppended())\n .length;\n }\n\n /**\n * Looks up a FlameChart group for a given appender.\n */\n groupForAppender(targetAppender: TrackAppender): PerfUI.FlameChart.Group|null {\n let foundGroup: PerfUI.FlameChart.Group|null = null;\n for (const [group, appender] of this.#trackForGroup) {\n if (appender === targetAppender) {\n foundGroup = group;\n break;\n }\n }\n return foundGroup;\n }\n\n /**\n * Given a FlameChart group, gets the events to be shown in the tree\n * views if that group was registered by the appender system.\n */\n groupEventsForTreeView(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|null {\n const track = this.#trackForGroup.get(group);\n if (!track) {\n return null;\n }\n return this.eventsForTreeView(track);\n }\n\n /**\n * Caches the track appender that owns a level. An appender takes\n * ownership of a level when it appends data to it.\n * The cache is useful to determine what appender should handle a\n * query from the flame chart renderer when an event's feature (like\n * style, title, etc.) is needed.\n */\n registerTrackForLevel(level: number, appender: TrackAppender): void {\n // TODO(crbug.com/1442454) Figure out how to avoid the circular calls.\n this.#trackForLevel.set(level, appender);\n }\n\n /**\n * Adds an event to the flame chart data at a defined level.\n * @param event the event to be appended,\n * @param level the level to append the event,\n * @param appender the track which the event belongs to.\n * @returns the index of the event in all events to be rendered in the flamechart.\n */\n appendEventAtLevel(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number, appender: TrackAppender):\n number {\n // TODO(crbug.com/1442454) Figure out how to avoid the circular calls.\n this.#trackForLevel.set(level, appender);\n const index = this.#entryData.length;\n this.#entryData.push(event);\n this.#legacyEntryTypeByLevel[level] = EntryType.TrackAppender;\n this.#flameChartData.entryLevels[index] = level;\n this.#flameChartData.entryStartTimes[index] = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(event.ts);\n const msDuration = event.dur ||\n TraceEngine.Helpers.Timing.millisecondsToMicroseconds(\n InstantEventVisibleDurationMs as TraceEngine.Types.Timing.MilliSeconds);\n this.#flameChartData.entryTotalTimes[index] = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(msDuration);\n return index;\n }\n\n /**\n * Adds into the flame chart data a list of trace events.\n * @param events the trace events that will be appended to the flame chart.\n * The events should be taken straight from the trace handlers. The handlers\n * should sort the events by start time, and the parent event is before the\n * child.\n * @param trackStartLevel the flame chart level from which the events will\n * be appended.\n * @param appender the track that the trace events belong to.\n * @param eventAppendedCallback an optional function called after the\n * event has been added to the timeline data. This allows the caller\n * to know f.e. the position of the event in the entry data. Use this\n * hook to customize the data after it has been appended, f.e. to add\n * decorations to a set of the entries.\n * @returns the next level after the last occupied by the appended these\n * trace events (the first available level to append next track).\n */\n appendEventsAtLevel(\n events: readonly T[], trackStartLevel: number, appender: TrackAppender,\n eventAppendedCallback?: (event: T, index: number) => void): number {\n const lastUsedTimeByLevel: number[] = [];\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n if (!this.entryIsVisibleInTimeline(event)) {\n continue;\n }\n\n const level = getEventLevel(event, lastUsedTimeByLevel);\n const index = this.appendEventAtLevel(event, trackStartLevel + level, appender);\n eventAppendedCallback?.(event, index);\n }\n\n this.#legacyEntryTypeByLevel.length = trackStartLevel + lastUsedTimeByLevel.length;\n this.#legacyEntryTypeByLevel.fill(EntryType.TrackAppender, trackStartLevel);\n return trackStartLevel + lastUsedTimeByLevel.length;\n }\n\n entryIsVisibleInTimeline(entry: TraceEngine.Types.TraceEvents.TraceEventData): boolean {\n if (TraceEngine.Types.TraceEvents.isTraceEventUpdateCounters(entry)) {\n // These events are not \"visible\" on the timeline because they are instant events with 0 duration.\n // However, the Memory view (CountersGraph in the codebase) relies on\n // finding the UpdateCounters events within the user's active trace\n // selection in order to show the memory usage for the selected time\n // period.\n // Therefore we mark them as visible so they are appended onto the Thread\n // track, and hence accessible by the CountersGraph view.\n return true;\n }\n\n // Default styles are globally defined for each event name. Some\n // events are hidden by default.\n const eventStyle = getEventStyle(entry.name as TraceEngine.Types.TraceEvents.KnownEventName);\n const eventIsTiming = TraceEngine.Types.TraceEvents.isTraceEventConsoleTime(entry) ||\n TraceEngine.Types.TraceEvents.isTraceEventPerformanceMeasure(entry) ||\n TraceEngine.Types.TraceEvents.isTraceEventPerformanceMark(entry);\n\n return (eventStyle && !eventStyle.hidden) || eventIsTiming;\n }\n\n /**\n * Gets the all track appenders that have been set to be visible.\n */\n allVisibleTrackAppenders(): TrackAppender[] {\n return this.#allTrackAppenders.filter(track => this.#visibleTrackNames.has(track.appenderName));\n }\n\n /**\n * Sets the visible tracks internally\n * @param visibleTracks set with the names of the visible track\n * appenders. If undefined, all tracks are set to be visible.\n */\n setVisibleTracks(visibleTracks?: Set): void {\n if (!visibleTracks) {\n this.#visibleTrackNames = new Set([...TrackNames]);\n return;\n }\n this.#visibleTrackNames = visibleTracks;\n }\n\n /**\n * Returns the color an event is shown with in the timeline.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): string {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n return track.colorForEvent(event);\n }\n /**\n * Returns the title an event is shown with in the timeline.\n */\n titleForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): string {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n return track.titleForEvent(event);\n }\n /**\n * Returns the info shown when an event in the timeline is hovered.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): HighlightedEntryInfo {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n\n // Add any warnings information to the tooltip. Done here to avoid duplicating this call in every appender.\n // By doing this here, we ensure that any warnings that are\n // added to the WarningsHandler are automatically used and added\n // to the tooltip.\n const warningElements: HTMLSpanElement[] =\n TimelineComponents.DetailsView.buildWarningElementsForEvent(event, this.#traceParsedData);\n\n const {title, formattedTime, warningElements: extraWarningElements} = track.highlightedEntryInfo(event);\n return {\n title,\n formattedTime,\n warningElements: warningElements.concat(extraWarningElements || []),\n };\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/CountersGraph.d.ts b/public/panels/timeline/CountersGraph.d.ts index ccdc630bf..529adf7b8 100644 --- a/public/panels/timeline/CountersGraph.d.ts +++ b/public/panels/timeline/CountersGraph.d.ts @@ -1,13 +1,11 @@ import * as TraceEngine from '../../models/trace/trace.js'; import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; -import { type PerformanceModel } from './PerformanceModel.js'; import { type TimelineModeViewDelegate } from './TimelinePanel.js'; export declare class CountersGraph extends UI.Widget.VBox { #private; private readonly delegate; private readonly calculator; - private model; private readonly header; readonly toolbar: UI.Toolbar.Toolbar; private graphsContainer; @@ -21,13 +19,11 @@ export declare class CountersGraph extends UI.Widget.VBox { currentValuesBar?: HTMLElement; private markerXPosition?; constructor(delegate: TimelineModeViewDelegate); - setModel(model: PerformanceModel | null, traceEngineData: TraceEngine.Handlers.Types.TraceParseData | null, events: TraceEngine.Legacy.CompatibleTraceEvent[] | null): void; + setModel(traceEngineData: TraceEngine.Handlers.Types.TraceParseData | null, events: TraceEngine.Types.TraceEvents.TraceEventData[] | null): void; private createCurrentValuesBar; private createCounter; resizerElement(): Element | null; private resize; - private onWindowChanged; - scheduleRefresh(): void; draw(): void; private onClick; private onMouseLeave; diff --git a/public/panels/timeline/CountersGraph.js b/public/panels/timeline/CountersGraph.js index 693efd909..4e5df7460 100644 --- a/public/panels/timeline/CountersGraph.js +++ b/public/panels/timeline/CountersGraph.js @@ -31,9 +31,9 @@ import * as Common from '../../core/common/common.js'; import * as i18n from '../../core/i18n/i18n.js'; import * as Platform from '../../core/platform/platform.js'; import * as TraceEngine from '../../models/trace/trace.js'; +import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js'; import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; -import { Events } from './PerformanceModel.js'; const UIStrings = { /** *@description Text for a heap profile type @@ -67,7 +67,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); export class CountersGraph extends UI.Widget.VBox { delegate; calculator; - model; header; toolbar; graphsContainer; @@ -81,6 +80,7 @@ export class CountersGraph extends UI.Widget.VBox { #events = null; currentValuesBar; markerXPosition; + #onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this); constructor(delegate) { super(); this.element.id = 'memory-graphs-container'; @@ -118,34 +118,29 @@ export class CountersGraph extends UI.Widget.VBox { this.countersByName.set('jsEventListeners', this.createCounter(i18nString(UIStrings.listeners), 'hsl(38, 90%, 43%)')); this.gpuMemoryCounter = this.createCounter(i18nString(UIStrings.gpuMemory), 'hsl(300, 90%, 43%)', Platform.NumberUtilities.bytesToString); this.countersByName.set('gpuMemoryUsedKB', this.gpuMemoryCounter); + TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound); } - setModel(model, traceEngineData, events) { + #onTraceBoundsChange(event) { + if (event.updateType === 'RESET' || event.updateType === 'VISIBLE_WINDOW') { + const newWindow = event.state.milli.timelineTraceWindow; + this.calculator.setWindow(newWindow.min, newWindow.max); + this.#scheduleRefresh(); + } + } + setModel(traceEngineData, events) { this.#events = events; if (!events) { return; } - if (this.model !== model) { - if (this.model) { - this.model.removeEventListener(Events.WindowChanged, this.onWindowChanged, this); - } - this.model = model; - if (this.model) { - this.model.addEventListener(Events.WindowChanged, this.onWindowChanged, this); - } - } const minTime = traceEngineData ? TraceEngine.Helpers.Timing.traceWindowMilliSeconds(traceEngineData.Meta.traceBounds).min : 0; this.calculator.setZeroTime(minTime); for (let i = 0; i < this.counters.length; ++i) { this.counters[i].reset(); this.counterUI[i].reset(); } - this.scheduleRefresh(); + this.#scheduleRefresh(); for (let i = 0; i < events.length; ++i) { const event = events[i]; - if (!TraceEngine.Legacy.eventIsFromNewEngine(event)) { - // Can remove this check once the old engine is fully removed. - continue; - } if (!TraceEngine.Types.TraceEvents.isTraceEventUpdateCounters(event)) { continue; } @@ -185,12 +180,7 @@ export class CountersGraph extends UI.Widget.VBox { this.calculator.setDisplayWidth(this.canvas.width); this.refresh(); } - onWindowChanged(event) { - const window = event.data.window; - this.calculator.setWindow(window.left, window.right); - this.scheduleRefresh(); - } - scheduleRefresh() { + #scheduleRefresh() { UI.UIUtils.invokeOnceAfterBatchUpdate(this, this.refresh); } draw() { diff --git a/public/panels/timeline/CountersGraph.js.map b/public/panels/timeline/CountersGraph.js.map index cb931b597..c7df79d71 100644 --- a/public/panels/timeline/CountersGraph.js.map +++ b/public/panels/timeline/CountersGraph.js.map @@ -1 +1 @@ -{"version":3,"file":"CountersGraph.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/CountersGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,EAAC,MAAM,EAAiD,MAAM,uBAAuB,CAAC;AAG7F,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,MAAM,EAAE,SAAS;IACjB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,SAAS,EAAE,YAAY;IACvB;;;;OAIG;IACH,EAAE,EAAE,iBAAiB;CACtB,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;AACxF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IA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tC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAC;IACrE,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2012 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {Events, type PerformanceModel, type WindowChangedEvent} from './PerformanceModel.js';\nimport {type TimelineModeViewDelegate} from './TimelinePanel.js';\n\nconst UIStrings = {\n /**\n *@description Text for a heap profile type\n */\n jsHeap: 'JS Heap',\n /**\n *@description Text for documents, a type of resources\n */\n documents: 'Documents',\n /**\n *@description Text in Counters Graph of the Performance panel\n */\n nodes: 'Nodes',\n /**\n *@description Text in Counters Graph of the Performance panel\n */\n listeners: 'Listeners',\n /**\n *@description Text in Counters Graph of the Performance panel\n */\n gpuMemory: 'GPU Memory',\n /**\n *@description Range text content in Counters Graph of the Performance panel\n *@example {2} PH1\n *@example {10} PH2\n */\n ss: '[{PH1} – {PH2}]',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/CountersGraph.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class CountersGraph extends UI.Widget.VBox {\n private readonly delegate: TimelineModeViewDelegate;\n private readonly calculator: Calculator;\n private model!: PerformanceModel|null;\n private readonly header: UI.Widget.HBox;\n readonly toolbar: UI.Toolbar.Toolbar;\n private graphsContainer: UI.Widget.VBox;\n canvasContainer: UI.Widget.WidgetElement;\n private canvas: HTMLCanvasElement;\n private readonly timelineGrid: PerfUI.TimelineGrid.TimelineGrid;\n private readonly counters: Counter[];\n private readonly counterUI: CounterUI[];\n private readonly countersByName: Map;\n private readonly gpuMemoryCounter: Counter;\n #events: TraceEngine.Legacy.CompatibleTraceEvent[]|null = null;\n currentValuesBar?: HTMLElement;\n private markerXPosition?: number;\n\n constructor(delegate: TimelineModeViewDelegate) {\n super();\n this.element.id = 'memory-graphs-container';\n\n this.delegate = delegate;\n this.calculator = new Calculator();\n\n // Create selectors\n this.header = new UI.Widget.HBox();\n this.header.element.classList.add('timeline-memory-header');\n this.header.show(this.element);\n this.toolbar = new UI.Toolbar.Toolbar('timeline-memory-toolbar');\n this.header.element.appendChild(this.toolbar.element);\n\n this.graphsContainer = new UI.Widget.VBox();\n this.graphsContainer.show(this.element);\n const canvasWidget = new UI.Widget.VBoxWithResizeCallback(this.resize.bind(this));\n canvasWidget.show(this.graphsContainer.element);\n this.createCurrentValuesBar();\n this.canvasContainer = canvasWidget.element;\n this.canvasContainer.id = 'memory-graphs-canvas-container';\n this.canvas = document.createElement('canvas');\n this.canvasContainer.appendChild(this.canvas);\n this.canvas.id = 'memory-counters-graph';\n\n this.canvasContainer.addEventListener('mouseover', this.onMouseMove.bind(this), true);\n this.canvasContainer.addEventListener('mousemove', this.onMouseMove.bind(this), true);\n this.canvasContainer.addEventListener('mouseleave', this.onMouseLeave.bind(this), true);\n this.canvasContainer.addEventListener('click', this.onClick.bind(this), true);\n // We create extra timeline grid here to reuse its event dividers.\n this.timelineGrid = new PerfUI.TimelineGrid.TimelineGrid();\n this.canvasContainer.appendChild(this.timelineGrid.dividersElement);\n\n this.counters = [];\n this.counterUI = [];\n\n this.countersByName = new Map();\n this.countersByName.set(\n 'jsHeapSizeUsed',\n this.createCounter(i18nString(UIStrings.jsHeap), 'hsl(220, 90%, 43%)', Platform.NumberUtilities.bytesToString));\n this.countersByName.set('documents', this.createCounter(i18nString(UIStrings.documents), 'hsl(0, 90%, 43%)'));\n this.countersByName.set('nodes', this.createCounter(i18nString(UIStrings.nodes), 'hsl(120, 90%, 43%)'));\n this.countersByName.set(\n 'jsEventListeners', this.createCounter(i18nString(UIStrings.listeners), 'hsl(38, 90%, 43%)'));\n\n this.gpuMemoryCounter = this.createCounter(\n i18nString(UIStrings.gpuMemory), 'hsl(300, 90%, 43%)', Platform.NumberUtilities.bytesToString);\n this.countersByName.set('gpuMemoryUsedKB', this.gpuMemoryCounter);\n }\n\n setModel(\n model: PerformanceModel|null, traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n events: TraceEngine.Legacy.CompatibleTraceEvent[]|null): void {\n this.#events = events;\n if (!events) {\n return;\n }\n if (this.model !== model) {\n if (this.model) {\n this.model.removeEventListener(Events.WindowChanged, this.onWindowChanged, this);\n }\n this.model = model;\n if (this.model) {\n this.model.addEventListener(Events.WindowChanged, this.onWindowChanged, this);\n }\n }\n const minTime =\n traceEngineData ? TraceEngine.Helpers.Timing.traceWindowMilliSeconds(traceEngineData.Meta.traceBounds).min : 0;\n this.calculator.setZeroTime(minTime);\n\n for (let i = 0; i < this.counters.length; ++i) {\n this.counters[i].reset();\n this.counterUI[i].reset();\n }\n this.scheduleRefresh();\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n if (!TraceEngine.Legacy.eventIsFromNewEngine(event)) {\n // Can remove this check once the old engine is fully removed.\n continue;\n }\n if (!TraceEngine.Types.TraceEvents.isTraceEventUpdateCounters(event)) {\n continue;\n }\n\n const counters = event.args.data;\n if (!counters) {\n return;\n }\n for (const name in counters) {\n const counter = this.countersByName.get(name);\n if (counter) {\n const {startTime} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n counter.appendSample(\n startTime, counters[name as 'documents' | 'jsEventListeners' | 'jsHeapSizeUsed' | 'nodes']);\n }\n }\n\n if (typeof counters.gpuMemoryLimitKB !== 'undefined') {\n this.gpuMemoryCounter.setLimit(counters.gpuMemoryLimitKB);\n }\n }\n }\n\n private createCurrentValuesBar(): void {\n this.currentValuesBar = this.graphsContainer.element.createChild('div');\n this.currentValuesBar.id = 'counter-values-bar';\n }\n\n private createCounter(uiName: string, color: string, formatter?: ((arg0: number) => string)): Counter {\n const counter = new Counter();\n this.counters.push(counter);\n this.counterUI.push(new CounterUI(this, uiName, color, counter, formatter));\n return counter;\n }\n\n resizerElement(): Element|null {\n return this.header.element;\n }\n\n private resize(): void {\n const parentElement = (this.canvas.parentElement as HTMLElement);\n this.canvas.width = parentElement.clientWidth * window.devicePixelRatio;\n this.canvas.height = parentElement.clientHeight * window.devicePixelRatio;\n this.calculator.setDisplayWidth(this.canvas.width);\n this.refresh();\n }\n\n private onWindowChanged(event: Common.EventTarget.EventTargetEvent): void {\n const window = event.data.window;\n this.calculator.setWindow(window.left, window.right);\n this.scheduleRefresh();\n }\n\n scheduleRefresh(): void {\n UI.UIUtils.invokeOnceAfterBatchUpdate(this, this.refresh);\n }\n\n draw(): void {\n this.clear();\n for (const counter of this.counters) {\n counter.calculateVisibleIndexes(this.calculator);\n counter.calculateXValues(this.canvas.width);\n }\n for (const counterUI of this.counterUI) {\n counterUI.drawGraph(this.canvas);\n }\n }\n\n private onClick(event: Event): void {\n const x = (event as MouseEvent).x - this.canvasContainer.getBoundingClientRect().left;\n let minDistance: number = Infinity;\n let bestTime;\n for (const counterUI of this.counterUI) {\n if (!counterUI.counter.times.length) {\n continue;\n }\n const index = counterUI.recordIndexAt(x);\n const distance = Math.abs(x * window.devicePixelRatio - counterUI.counter.x[index]);\n if (distance < minDistance) {\n minDistance = distance;\n bestTime = counterUI.counter.times[index];\n }\n }\n if (bestTime !== undefined && this.#events) {\n this.delegate.selectEntryAtTime(this.#events, bestTime);\n }\n }\n\n private onMouseLeave(_event: Event): void {\n delete this.markerXPosition;\n this.clearCurrentValueAndMarker();\n }\n\n private clearCurrentValueAndMarker(): void {\n for (let i = 0; i < this.counterUI.length; i++) {\n this.counterUI[i].clearCurrentValueAndMarker();\n }\n }\n\n private onMouseMove(event: Event): void {\n const x = (event as MouseEvent).x - this.canvasContainer.getBoundingClientRect().left;\n this.markerXPosition = x;\n this.refreshCurrentValues();\n }\n\n private refreshCurrentValues(): void {\n if (this.markerXPosition === undefined) {\n return;\n }\n for (let i = 0; i < this.counterUI.length; ++i) {\n this.counterUI[i].updateCurrentValue(this.markerXPosition);\n }\n }\n\n refresh(): void {\n this.timelineGrid.updateDividers(this.calculator);\n this.draw();\n this.refreshCurrentValues();\n }\n\n private clear(): void {\n const ctx = this.canvas.getContext('2d');\n if (!ctx) {\n throw new Error('Unable to get canvas context');\n }\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n }\n}\n\nexport class Counter {\n times: number[];\n values: number[];\n x: number[];\n minimumIndex: number;\n maximumIndex: number;\n private maxTime: number;\n private minTime: number;\n limitValue?: number;\n\n constructor() {\n this.times = [];\n this.values = [];\n this.x = [];\n this.minimumIndex = 0;\n this.maximumIndex = 0;\n this.maxTime = 0;\n this.minTime = 0;\n }\n\n appendSample(time: number, value: number): void {\n if (this.values.length && this.values[this.values.length - 1] === value) {\n return;\n }\n this.times.push(time);\n this.values.push(value);\n }\n\n reset(): void {\n this.times = [];\n this.values = [];\n }\n\n setLimit(value: number): void {\n this.limitValue = value;\n }\n\n calculateBounds(): {\n min: number,\n max: number,\n } {\n let maxValue;\n let minValue;\n for (let i = this.minimumIndex; i <= this.maximumIndex; i++) {\n const value = this.values[i];\n if (minValue === undefined || value < minValue) {\n minValue = value;\n }\n if (maxValue === undefined || value > maxValue) {\n maxValue = value;\n }\n }\n minValue = minValue || 0;\n maxValue = maxValue || 1;\n if (this.limitValue) {\n if (maxValue > this.limitValue * 0.5) {\n maxValue = Math.max(maxValue, this.limitValue);\n }\n minValue = Math.min(minValue, this.limitValue);\n }\n return {min: minValue, max: maxValue};\n }\n\n calculateVisibleIndexes(calculator: Calculator): void {\n const start = calculator.minimumBoundary();\n const end = calculator.maximumBoundary();\n\n // Maximum index of element whose time <= start.\n this.minimumIndex = Platform.NumberUtilities.clamp(\n Platform.ArrayUtilities.upperBound(this.times, start, Platform.ArrayUtilities.DEFAULT_COMPARATOR) - 1, 0,\n this.times.length - 1);\n\n // Minimum index of element whose time >= end.\n this.maximumIndex = Platform.NumberUtilities.clamp(\n Platform.ArrayUtilities.lowerBound(this.times, end, Platform.ArrayUtilities.DEFAULT_COMPARATOR), 0,\n this.times.length - 1);\n\n // Current window bounds.\n this.minTime = start;\n this.maxTime = end;\n }\n\n calculateXValues(width: number): void {\n if (!this.values.length) {\n return;\n }\n\n const xFactor = width / (this.maxTime - this.minTime);\n\n this.x = new Array(this.values.length);\n for (let i = this.minimumIndex + 1; i <= this.maximumIndex; i++) {\n this.x[i] = xFactor * (this.times[i] - this.minTime);\n }\n }\n}\n\nexport class CounterUI {\n private readonly countersPane: CountersGraph;\n counter: Counter;\n private readonly formatter: (arg0: number) => string;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly setting: Common.Settings.Setting;\n private filter: UI.Toolbar.ToolbarSettingCheckbox;\n private range: HTMLElement;\n private value: HTMLElement;\n graphColor: string;\n limitColor: string|null|undefined;\n graphYValues: number[];\n private readonly verticalPadding: number;\n private currentValueLabel: string;\n private marker: HTMLElement;\n\n constructor(\n countersPane: CountersGraph, title: string, graphColor: string, counter: Counter,\n formatter?: (arg0: number) => string) {\n this.countersPane = countersPane;\n this.counter = counter;\n this.formatter = formatter || Platform.NumberUtilities.withThousandsSeparator;\n\n this.setting = Common.Settings.Settings.instance().createSetting('timelineCountersGraph-' + title, true);\n this.setting.setTitle(title);\n this.filter = new UI.Toolbar.ToolbarSettingCheckbox(this.setting, title);\n this.filter.inputElement.classList.add('-theme-preserve-input');\n const parsedColor = Common.Color.parse(graphColor);\n if (parsedColor) {\n const colorWithAlpha = parsedColor.setAlpha(0.5).asString(Common.Color.Format.RGBA);\n const htmlElement = (this.filter.element as HTMLElement);\n if (colorWithAlpha) {\n htmlElement.style.backgroundColor = colorWithAlpha;\n }\n htmlElement.style.borderColor = 'transparent';\n }\n this.filter.inputElement.addEventListener('click', this.toggleCounterGraph.bind(this));\n countersPane.toolbar.appendToolbarItem(this.filter);\n this.range = this.filter.element.createChild('span', 'range');\n\n this.value = (countersPane.currentValuesBar as HTMLElement).createChild('span', 'memory-counter-value');\n this.value.style.color = graphColor;\n this.graphColor = graphColor;\n if (parsedColor) {\n this.limitColor = parsedColor.setAlpha(0.3).asString(Common.Color.Format.RGBA);\n }\n this.graphYValues = [];\n this.verticalPadding = 10;\n\n this.currentValueLabel = title;\n this.marker = countersPane.canvasContainer.createChild('div', 'memory-counter-marker');\n this.marker.style.backgroundColor = graphColor;\n this.clearCurrentValueAndMarker();\n }\n\n reset(): void {\n this.range.textContent = '';\n }\n\n setRange(minValue: number, maxValue: number): void {\n const min = this.formatter(minValue);\n const max = this.formatter(maxValue);\n this.range.textContent = i18nString(UIStrings.ss, {PH1: min, PH2: max});\n }\n\n private toggleCounterGraph(): void {\n this.value.classList.toggle('hidden', !this.filter.checked());\n this.countersPane.refresh();\n }\n\n recordIndexAt(x: number): number {\n return Platform.ArrayUtilities.upperBound(\n this.counter.x, x * window.devicePixelRatio, Platform.ArrayUtilities.DEFAULT_COMPARATOR,\n this.counter.minimumIndex + 1, this.counter.maximumIndex + 1) -\n 1;\n }\n\n updateCurrentValue(x: number): void {\n if (!this.visible() || !this.counter.values.length || !this.counter.x) {\n return;\n }\n const index = this.recordIndexAt(x);\n const value = Platform.NumberUtilities.withThousandsSeparator(this.counter.values[index]);\n this.value.textContent = `${this.currentValueLabel}: ${value}`;\n const y = this.graphYValues[index] / window.devicePixelRatio;\n this.marker.style.left = x + 'px';\n this.marker.style.top = y + 'px';\n this.marker.classList.remove('hidden');\n }\n\n clearCurrentValueAndMarker(): void {\n this.value.textContent = '';\n this.marker.classList.add('hidden');\n }\n\n drawGraph(canvas: HTMLCanvasElement): void {\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n throw new Error('Unable to get canvas context');\n }\n const width = canvas.width;\n const height = canvas.height - 2 * this.verticalPadding;\n if (height <= 0) {\n this.graphYValues = [];\n return;\n }\n const originY = this.verticalPadding;\n const counter = this.counter;\n const values = counter.values;\n\n if (!values.length) {\n return;\n }\n\n const bounds = counter.calculateBounds();\n const minValue = bounds.min;\n const maxValue = bounds.max;\n this.setRange(minValue, maxValue);\n\n if (!this.visible()) {\n return;\n }\n\n const yValues = this.graphYValues;\n const maxYRange = maxValue - minValue;\n const yFactor = maxYRange ? height / (maxYRange) : 1;\n\n ctx.save();\n ctx.lineWidth = window.devicePixelRatio;\n if (ctx.lineWidth % 2) {\n ctx.translate(0.5, 0.5);\n }\n ctx.beginPath();\n let value: number = values[counter.minimumIndex];\n let currentY = Math.round(originY + height - (value - minValue) * yFactor);\n ctx.moveTo(0, currentY);\n let i = counter.minimumIndex;\n for (; i <= counter.maximumIndex; i++) {\n const x = Math.round(counter.x[i]);\n ctx.lineTo(x, currentY);\n const currentValue = values[i];\n if (typeof currentValue !== 'undefined') {\n value = currentValue;\n }\n currentY = Math.round(originY + height - (value - minValue) * yFactor);\n ctx.lineTo(x, currentY);\n yValues[i] = currentY;\n }\n yValues.length = i;\n ctx.lineTo(width, currentY);\n ctx.strokeStyle = this.graphColor;\n ctx.stroke();\n if (counter.limitValue) {\n const limitLineY = Math.round(originY + height - (counter.limitValue - minValue) * yFactor);\n ctx.moveTo(0, limitLineY);\n ctx.lineTo(width, limitLineY);\n if (this.limitColor) {\n ctx.strokeStyle = this.limitColor;\n }\n ctx.stroke();\n }\n ctx.closePath();\n ctx.restore();\n }\n\n visible(): boolean {\n return this.filter.checked();\n }\n}\n\nexport class Calculator implements PerfUI.TimelineGrid.Calculator {\n private minimumBoundaryInternal: number;\n private maximumBoundaryInternal: number;\n private workingArea: number;\n private zeroTimeInternal: number;\n\n constructor() {\n this.minimumBoundaryInternal = 0;\n this.maximumBoundaryInternal = 0;\n this.workingArea = 0;\n this.zeroTimeInternal = 0;\n }\n setZeroTime(time: number): void {\n this.zeroTimeInternal = time;\n }\n\n computePosition(time: number): number {\n return (time - this.minimumBoundaryInternal) / this.boundarySpan() * this.workingArea;\n }\n\n setWindow(minimumBoundary: number, maximumBoundary: number): void {\n this.minimumBoundaryInternal = minimumBoundary;\n this.maximumBoundaryInternal = maximumBoundary;\n }\n\n setDisplayWidth(clientWidth: number): void {\n this.workingArea = clientWidth;\n }\n\n formatValue(value: number, precision?: number): string {\n return i18n.TimeUtilities.preciseMillisToString(value - this.zeroTime(), precision);\n }\n\n maximumBoundary(): number {\n return this.maximumBoundaryInternal;\n }\n\n minimumBoundary(): number {\n return this.minimumBoundaryInternal;\n }\n\n zeroTime(): number {\n return this.zeroTimeInternal;\n }\n\n boundarySpan(): number {\n return this.maximumBoundaryInternal - this.minimumBoundaryInternal;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"CountersGraph.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/CountersGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6CAA6C,CAAC;AAC3E,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,MAAM,EAAE,SAAS;IACjB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,SAAS,EAAE,YAAY;IACvB;;;;OAIG;IACH,EAAE,EAAE,iBAAiB;CACtB,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;AACxF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,MAAM,OAAO,aAAc,SAAQ,EAAE,CAAC,MAAM,CAAC,IAAI;IAC9B,QAAQ,CAA2B;IACnC,UAAU,CAAa;IACvB,MAAM,CAAiB;IAC/B,OAAO,CAAqB;IAC7B,eAAe,CAAiB;IACxC,eAAe,CAA0B;IACjC,MAAM,CAAoB;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CAAC;IAC5B,CAAC;IACD,WAAW,CAAC,IAAY;QACtB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC/B,CAAC;IAED,eAAe,CAAC,IAAY;QAC1B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC;IACxF,CAAC;IAED,SAAS,CAAC,eAAuB,EAAE,eAAuB;QACxD,IAAI,CAAC,uBAAuB,GAAG,eAAe,CAAC;QAC/C,IAAI,CAAC,uBAAuB,GAAG,eAAe,CAAC;IACjD,CAAC;IAED,eAAe,CAAC,WAAmB;QACjC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,WAAW,CAAC,KAAa,EAAE,SAAkB;QAC3C,OAAO,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,CAAC;IACtF,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACtC,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACtC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAC;IACrE,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2012 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {type TimelineModeViewDelegate} from './TimelinePanel.js';\n\nconst UIStrings = {\n /**\n *@description Text for a heap profile type\n */\n jsHeap: 'JS Heap',\n /**\n *@description Text for documents, a type of resources\n */\n documents: 'Documents',\n /**\n *@description Text in Counters Graph of the Performance panel\n */\n nodes: 'Nodes',\n /**\n *@description Text in Counters Graph of the Performance panel\n */\n listeners: 'Listeners',\n /**\n *@description Text in Counters Graph of the Performance panel\n */\n gpuMemory: 'GPU Memory',\n /**\n *@description Range text content in Counters Graph of the Performance panel\n *@example {2} PH1\n *@example {10} PH2\n */\n ss: '[{PH1} – {PH2}]',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/CountersGraph.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class CountersGraph extends UI.Widget.VBox {\n private readonly delegate: TimelineModeViewDelegate;\n private readonly calculator: Calculator;\n private readonly header: UI.Widget.HBox;\n readonly toolbar: UI.Toolbar.Toolbar;\n private graphsContainer: UI.Widget.VBox;\n canvasContainer: UI.Widget.WidgetElement;\n private canvas: HTMLCanvasElement;\n private readonly timelineGrid: PerfUI.TimelineGrid.TimelineGrid;\n private readonly counters: Counter[];\n private readonly counterUI: CounterUI[];\n private readonly countersByName: Map;\n private readonly gpuMemoryCounter: Counter;\n #events: TraceEngine.Types.TraceEvents.TraceEventData[]|null = null;\n currentValuesBar?: HTMLElement;\n private markerXPosition?: number;\n #onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this);\n\n constructor(delegate: TimelineModeViewDelegate) {\n super();\n this.element.id = 'memory-graphs-container';\n\n this.delegate = delegate;\n this.calculator = new Calculator();\n\n // Create selectors\n this.header = new UI.Widget.HBox();\n this.header.element.classList.add('timeline-memory-header');\n this.header.show(this.element);\n this.toolbar = new UI.Toolbar.Toolbar('timeline-memory-toolbar');\n this.header.element.appendChild(this.toolbar.element);\n\n this.graphsContainer = new UI.Widget.VBox();\n this.graphsContainer.show(this.element);\n const canvasWidget = new UI.Widget.VBoxWithResizeCallback(this.resize.bind(this));\n canvasWidget.show(this.graphsContainer.element);\n this.createCurrentValuesBar();\n this.canvasContainer = canvasWidget.element;\n this.canvasContainer.id = 'memory-graphs-canvas-container';\n this.canvas = document.createElement('canvas');\n this.canvasContainer.appendChild(this.canvas);\n this.canvas.id = 'memory-counters-graph';\n\n this.canvasContainer.addEventListener('mouseover', this.onMouseMove.bind(this), true);\n this.canvasContainer.addEventListener('mousemove', this.onMouseMove.bind(this), true);\n this.canvasContainer.addEventListener('mouseleave', this.onMouseLeave.bind(this), true);\n this.canvasContainer.addEventListener('click', this.onClick.bind(this), true);\n // We create extra timeline grid here to reuse its event dividers.\n this.timelineGrid = new PerfUI.TimelineGrid.TimelineGrid();\n this.canvasContainer.appendChild(this.timelineGrid.dividersElement);\n\n this.counters = [];\n this.counterUI = [];\n\n this.countersByName = new Map();\n this.countersByName.set(\n 'jsHeapSizeUsed',\n this.createCounter(i18nString(UIStrings.jsHeap), 'hsl(220, 90%, 43%)', Platform.NumberUtilities.bytesToString));\n this.countersByName.set('documents', this.createCounter(i18nString(UIStrings.documents), 'hsl(0, 90%, 43%)'));\n this.countersByName.set('nodes', this.createCounter(i18nString(UIStrings.nodes), 'hsl(120, 90%, 43%)'));\n this.countersByName.set(\n 'jsEventListeners', this.createCounter(i18nString(UIStrings.listeners), 'hsl(38, 90%, 43%)'));\n\n this.gpuMemoryCounter = this.createCounter(\n i18nString(UIStrings.gpuMemory), 'hsl(300, 90%, 43%)', Platform.NumberUtilities.bytesToString);\n this.countersByName.set('gpuMemoryUsedKB', this.gpuMemoryCounter);\n\n TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound);\n }\n\n #onTraceBoundsChange(event: TraceBounds.TraceBounds.StateChangedEvent): void {\n if (event.updateType === 'RESET' || event.updateType === 'VISIBLE_WINDOW') {\n const newWindow = event.state.milli.timelineTraceWindow;\n this.calculator.setWindow(newWindow.min, newWindow.max);\n this.#scheduleRefresh();\n }\n }\n\n setModel(\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n events: TraceEngine.Types.TraceEvents.TraceEventData[]|null): void {\n this.#events = events;\n if (!events) {\n return;\n }\n const minTime =\n traceEngineData ? TraceEngine.Helpers.Timing.traceWindowMilliSeconds(traceEngineData.Meta.traceBounds).min : 0;\n this.calculator.setZeroTime(minTime);\n\n for (let i = 0; i < this.counters.length; ++i) {\n this.counters[i].reset();\n this.counterUI[i].reset();\n }\n this.#scheduleRefresh();\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n if (!TraceEngine.Types.TraceEvents.isTraceEventUpdateCounters(event)) {\n continue;\n }\n\n const counters = event.args.data;\n if (!counters) {\n return;\n }\n for (const name in counters) {\n const counter = this.countersByName.get(name);\n if (counter) {\n const {startTime} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n counter.appendSample(\n startTime, counters[name as 'documents' | 'jsEventListeners' | 'jsHeapSizeUsed' | 'nodes']);\n }\n }\n\n if (typeof counters.gpuMemoryLimitKB !== 'undefined') {\n this.gpuMemoryCounter.setLimit(counters.gpuMemoryLimitKB);\n }\n }\n }\n\n private createCurrentValuesBar(): void {\n this.currentValuesBar = this.graphsContainer.element.createChild('div');\n this.currentValuesBar.id = 'counter-values-bar';\n }\n\n private createCounter(uiName: string, color: string, formatter?: ((arg0: number) => string)): Counter {\n const counter = new Counter();\n this.counters.push(counter);\n this.counterUI.push(new CounterUI(this, uiName, color, counter, formatter));\n return counter;\n }\n\n resizerElement(): Element|null {\n return this.header.element;\n }\n\n private resize(): void {\n const parentElement = (this.canvas.parentElement as HTMLElement);\n this.canvas.width = parentElement.clientWidth * window.devicePixelRatio;\n this.canvas.height = parentElement.clientHeight * window.devicePixelRatio;\n this.calculator.setDisplayWidth(this.canvas.width);\n this.refresh();\n }\n\n #scheduleRefresh(): void {\n UI.UIUtils.invokeOnceAfterBatchUpdate(this, this.refresh);\n }\n\n draw(): void {\n this.clear();\n for (const counter of this.counters) {\n counter.calculateVisibleIndexes(this.calculator);\n counter.calculateXValues(this.canvas.width);\n }\n for (const counterUI of this.counterUI) {\n counterUI.drawGraph(this.canvas);\n }\n }\n\n private onClick(event: Event): void {\n const x = (event as MouseEvent).x - this.canvasContainer.getBoundingClientRect().left;\n let minDistance: number = Infinity;\n let bestTime;\n for (const counterUI of this.counterUI) {\n if (!counterUI.counter.times.length) {\n continue;\n }\n const index = counterUI.recordIndexAt(x);\n const distance = Math.abs(x * window.devicePixelRatio - counterUI.counter.x[index]);\n if (distance < minDistance) {\n minDistance = distance;\n bestTime = counterUI.counter.times[index];\n }\n }\n if (bestTime !== undefined && this.#events) {\n this.delegate.selectEntryAtTime(this.#events, bestTime);\n }\n }\n\n private onMouseLeave(_event: Event): void {\n delete this.markerXPosition;\n this.clearCurrentValueAndMarker();\n }\n\n private clearCurrentValueAndMarker(): void {\n for (let i = 0; i < this.counterUI.length; i++) {\n this.counterUI[i].clearCurrentValueAndMarker();\n }\n }\n\n private onMouseMove(event: Event): void {\n const x = (event as MouseEvent).x - this.canvasContainer.getBoundingClientRect().left;\n this.markerXPosition = x;\n this.refreshCurrentValues();\n }\n\n private refreshCurrentValues(): void {\n if (this.markerXPosition === undefined) {\n return;\n }\n for (let i = 0; i < this.counterUI.length; ++i) {\n this.counterUI[i].updateCurrentValue(this.markerXPosition);\n }\n }\n\n refresh(): void {\n this.timelineGrid.updateDividers(this.calculator);\n this.draw();\n this.refreshCurrentValues();\n }\n\n private clear(): void {\n const ctx = this.canvas.getContext('2d');\n if (!ctx) {\n throw new Error('Unable to get canvas context');\n }\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n }\n}\n\nexport class Counter {\n times: number[];\n values: number[];\n x: number[];\n minimumIndex: number;\n maximumIndex: number;\n private maxTime: number;\n private minTime: number;\n limitValue?: number;\n\n constructor() {\n this.times = [];\n this.values = [];\n this.x = [];\n this.minimumIndex = 0;\n this.maximumIndex = 0;\n this.maxTime = 0;\n this.minTime = 0;\n }\n\n appendSample(time: number, value: number): void {\n if (this.values.length && this.values[this.values.length - 1] === value) {\n return;\n }\n this.times.push(time);\n this.values.push(value);\n }\n\n reset(): void {\n this.times = [];\n this.values = [];\n }\n\n setLimit(value: number): void {\n this.limitValue = value;\n }\n\n calculateBounds(): {\n min: number,\n max: number,\n } {\n let maxValue;\n let minValue;\n for (let i = this.minimumIndex; i <= this.maximumIndex; i++) {\n const value = this.values[i];\n if (minValue === undefined || value < minValue) {\n minValue = value;\n }\n if (maxValue === undefined || value > maxValue) {\n maxValue = value;\n }\n }\n minValue = minValue || 0;\n maxValue = maxValue || 1;\n if (this.limitValue) {\n if (maxValue > this.limitValue * 0.5) {\n maxValue = Math.max(maxValue, this.limitValue);\n }\n minValue = Math.min(minValue, this.limitValue);\n }\n return {min: minValue, max: maxValue};\n }\n\n calculateVisibleIndexes(calculator: Calculator): void {\n const start = calculator.minimumBoundary();\n const end = calculator.maximumBoundary();\n\n // Maximum index of element whose time <= start.\n this.minimumIndex = Platform.NumberUtilities.clamp(\n Platform.ArrayUtilities.upperBound(this.times, start, Platform.ArrayUtilities.DEFAULT_COMPARATOR) - 1, 0,\n this.times.length - 1);\n\n // Minimum index of element whose time >= end.\n this.maximumIndex = Platform.NumberUtilities.clamp(\n Platform.ArrayUtilities.lowerBound(this.times, end, Platform.ArrayUtilities.DEFAULT_COMPARATOR), 0,\n this.times.length - 1);\n\n // Current window bounds.\n this.minTime = start;\n this.maxTime = end;\n }\n\n calculateXValues(width: number): void {\n if (!this.values.length) {\n return;\n }\n\n const xFactor = width / (this.maxTime - this.minTime);\n\n this.x = new Array(this.values.length);\n for (let i = this.minimumIndex + 1; i <= this.maximumIndex; i++) {\n this.x[i] = xFactor * (this.times[i] - this.minTime);\n }\n }\n}\n\nexport class CounterUI {\n private readonly countersPane: CountersGraph;\n counter: Counter;\n private readonly formatter: (arg0: number) => string;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly setting: Common.Settings.Setting;\n private filter: UI.Toolbar.ToolbarSettingCheckbox;\n private range: HTMLElement;\n private value: HTMLElement;\n graphColor: string;\n limitColor: string|null|undefined;\n graphYValues: number[];\n private readonly verticalPadding: number;\n private currentValueLabel: string;\n private marker: HTMLElement;\n\n constructor(\n countersPane: CountersGraph, title: string, graphColor: string, counter: Counter,\n formatter?: (arg0: number) => string) {\n this.countersPane = countersPane;\n this.counter = counter;\n this.formatter = formatter || Platform.NumberUtilities.withThousandsSeparator;\n\n this.setting = Common.Settings.Settings.instance().createSetting('timelineCountersGraph-' + title, true);\n this.setting.setTitle(title);\n this.filter = new UI.Toolbar.ToolbarSettingCheckbox(this.setting, title);\n this.filter.inputElement.classList.add('-theme-preserve-input');\n const parsedColor = Common.Color.parse(graphColor);\n if (parsedColor) {\n const colorWithAlpha = parsedColor.setAlpha(0.5).asString(Common.Color.Format.RGBA);\n const htmlElement = (this.filter.element as HTMLElement);\n if (colorWithAlpha) {\n htmlElement.style.backgroundColor = colorWithAlpha;\n }\n htmlElement.style.borderColor = 'transparent';\n }\n this.filter.inputElement.addEventListener('click', this.toggleCounterGraph.bind(this));\n countersPane.toolbar.appendToolbarItem(this.filter);\n this.range = this.filter.element.createChild('span', 'range');\n\n this.value = (countersPane.currentValuesBar as HTMLElement).createChild('span', 'memory-counter-value');\n this.value.style.color = graphColor;\n this.graphColor = graphColor;\n if (parsedColor) {\n this.limitColor = parsedColor.setAlpha(0.3).asString(Common.Color.Format.RGBA);\n }\n this.graphYValues = [];\n this.verticalPadding = 10;\n\n this.currentValueLabel = title;\n this.marker = countersPane.canvasContainer.createChild('div', 'memory-counter-marker');\n this.marker.style.backgroundColor = graphColor;\n this.clearCurrentValueAndMarker();\n }\n\n reset(): void {\n this.range.textContent = '';\n }\n\n setRange(minValue: number, maxValue: number): void {\n const min = this.formatter(minValue);\n const max = this.formatter(maxValue);\n this.range.textContent = i18nString(UIStrings.ss, {PH1: min, PH2: max});\n }\n\n private toggleCounterGraph(): void {\n this.value.classList.toggle('hidden', !this.filter.checked());\n this.countersPane.refresh();\n }\n\n recordIndexAt(x: number): number {\n return Platform.ArrayUtilities.upperBound(\n this.counter.x, x * window.devicePixelRatio, Platform.ArrayUtilities.DEFAULT_COMPARATOR,\n this.counter.minimumIndex + 1, this.counter.maximumIndex + 1) -\n 1;\n }\n\n updateCurrentValue(x: number): void {\n if (!this.visible() || !this.counter.values.length || !this.counter.x) {\n return;\n }\n const index = this.recordIndexAt(x);\n const value = Platform.NumberUtilities.withThousandsSeparator(this.counter.values[index]);\n this.value.textContent = `${this.currentValueLabel}: ${value}`;\n const y = this.graphYValues[index] / window.devicePixelRatio;\n this.marker.style.left = x + 'px';\n this.marker.style.top = y + 'px';\n this.marker.classList.remove('hidden');\n }\n\n clearCurrentValueAndMarker(): void {\n this.value.textContent = '';\n this.marker.classList.add('hidden');\n }\n\n drawGraph(canvas: HTMLCanvasElement): void {\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n throw new Error('Unable to get canvas context');\n }\n const width = canvas.width;\n const height = canvas.height - 2 * this.verticalPadding;\n if (height <= 0) {\n this.graphYValues = [];\n return;\n }\n const originY = this.verticalPadding;\n const counter = this.counter;\n const values = counter.values;\n\n if (!values.length) {\n return;\n }\n\n const bounds = counter.calculateBounds();\n const minValue = bounds.min;\n const maxValue = bounds.max;\n this.setRange(minValue, maxValue);\n\n if (!this.visible()) {\n return;\n }\n\n const yValues = this.graphYValues;\n const maxYRange = maxValue - minValue;\n const yFactor = maxYRange ? height / (maxYRange) : 1;\n\n ctx.save();\n ctx.lineWidth = window.devicePixelRatio;\n if (ctx.lineWidth % 2) {\n ctx.translate(0.5, 0.5);\n }\n ctx.beginPath();\n let value: number = values[counter.minimumIndex];\n let currentY = Math.round(originY + height - (value - minValue) * yFactor);\n ctx.moveTo(0, currentY);\n let i = counter.minimumIndex;\n for (; i <= counter.maximumIndex; i++) {\n const x = Math.round(counter.x[i]);\n ctx.lineTo(x, currentY);\n const currentValue = values[i];\n if (typeof currentValue !== 'undefined') {\n value = currentValue;\n }\n currentY = Math.round(originY + height - (value - minValue) * yFactor);\n ctx.lineTo(x, currentY);\n yValues[i] = currentY;\n }\n yValues.length = i;\n ctx.lineTo(width, currentY);\n ctx.strokeStyle = this.graphColor;\n ctx.stroke();\n if (counter.limitValue) {\n const limitLineY = Math.round(originY + height - (counter.limitValue - minValue) * yFactor);\n ctx.moveTo(0, limitLineY);\n ctx.lineTo(width, limitLineY);\n if (this.limitColor) {\n ctx.strokeStyle = this.limitColor;\n }\n ctx.stroke();\n }\n ctx.closePath();\n ctx.restore();\n }\n\n visible(): boolean {\n return this.filter.checked();\n }\n}\n\nexport class Calculator implements PerfUI.TimelineGrid.Calculator {\n private minimumBoundaryInternal: number;\n private maximumBoundaryInternal: number;\n private workingArea: number;\n private zeroTimeInternal: number;\n\n constructor() {\n this.minimumBoundaryInternal = 0;\n this.maximumBoundaryInternal = 0;\n this.workingArea = 0;\n this.zeroTimeInternal = 0;\n }\n setZeroTime(time: number): void {\n this.zeroTimeInternal = time;\n }\n\n computePosition(time: number): number {\n return (time - this.minimumBoundaryInternal) / this.boundarySpan() * this.workingArea;\n }\n\n setWindow(minimumBoundary: number, maximumBoundary: number): void {\n this.minimumBoundaryInternal = minimumBoundary;\n this.maximumBoundaryInternal = maximumBoundary;\n }\n\n setDisplayWidth(clientWidth: number): void {\n this.workingArea = clientWidth;\n }\n\n formatValue(value: number, precision?: number): string {\n return i18n.TimeUtilities.preciseMillisToString(value - this.zeroTime(), precision);\n }\n\n maximumBoundary(): number {\n return this.maximumBoundaryInternal;\n }\n\n minimumBoundary(): number {\n return this.minimumBoundaryInternal;\n }\n\n zeroTime(): number {\n return this.zeroTimeInternal;\n }\n\n boundarySpan(): number {\n return this.maximumBoundaryInternal - this.minimumBoundaryInternal;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/PerformanceModel.d.ts b/public/panels/timeline/PerformanceModel.d.ts index b17fde9e6..3d33f997e 100644 --- a/public/panels/timeline/PerformanceModel.d.ts +++ b/public/panels/timeline/PerformanceModel.d.ts @@ -1,45 +1,10 @@ -import * as Common from '../../core/common/common.js'; -import type * as SDK from '../../core/sdk/sdk.js'; import * as TimelineModel from '../../models/timeline_model/timeline_model.js'; -import * as TraceEngine from '../../models/trace/trace.js'; -export declare class PerformanceModel extends Common.ObjectWrapper.ObjectWrapper { - #private; - private mainTargetInternal; +import type * as TraceEngine from '../../models/trace/trace.js'; +export declare class PerformanceModel { private tracingModelInternal; - private filtersInternal; private readonly timelineModelInternal; - private windowInternal; - private recordStartTimeInternal?; constructor(); - setMainTarget(target: SDK.Target.Target): void; - mainTarget(): SDK.Target.Target | null; - setRecordStartTime(time: number): void; - recordStartTime(): number | undefined; - setFilters(filters: TimelineModel.TimelineModelFilter.TimelineModelFilter[]): void; - filters(): TimelineModel.TimelineModelFilter.TimelineModelFilter[]; - isVisible(event: TraceEngine.Legacy.Event): boolean; setTracingModel(model: TraceEngine.Legacy.TracingModel, isFreshRecording?: boolean): Promise; tracingModel(): TraceEngine.Legacy.TracingModel; timelineModel(): TimelineModel.TimelineModel.TimelineModelImpl; - setWindow(window: Window, animate?: boolean, breadcrumb?: TraceEngine.Types.Timing.TraceWindowMicroSeconds): void; - window(): Window; - minimumRecordTime(): number; - maximumRecordTime(): number; -} -export declare enum Events { - WindowChanged = "WindowChanged", - NamesResolved = "NamesResolved" -} -export interface WindowChangedEvent { - window: Window; - animate: boolean | undefined; - breadcrumbWindow?: TraceEngine.Types.Timing.TraceWindowMicroSeconds; -} -export type EventTypes = { - [Events.WindowChanged]: WindowChangedEvent; - [Events.NamesResolved]: void; -}; -export interface Window { - left: number; - right: number; } diff --git a/public/panels/timeline/PerformanceModel.js b/public/panels/timeline/PerformanceModel.js index aebca35e9..918a02f9e 100644 --- a/public/panels/timeline/PerformanceModel.js +++ b/public/panels/timeline/PerformanceModel.js @@ -1,47 +1,13 @@ // Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import * as Common from '../../core/common/common.js'; import * as TimelineModel from '../../models/timeline_model/timeline_model.js'; -import * as TraceEngine from '../../models/trace/trace.js'; -import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js'; -export class PerformanceModel extends Common.ObjectWrapper.ObjectWrapper { - mainTargetInternal; +export class PerformanceModel { tracingModelInternal; - filtersInternal; timelineModelInternal; - windowInternal; - recordStartTimeInternal; - #activeBreadcrumbWindow; constructor() { - super(); - this.mainTargetInternal = null; this.tracingModelInternal = null; - this.filtersInternal = []; this.timelineModelInternal = new TimelineModel.TimelineModel.TimelineModelImpl(); - this.windowInternal = { left: 0, right: Infinity }; - this.recordStartTimeInternal = undefined; - } - setMainTarget(target) { - this.mainTargetInternal = target; - } - mainTarget() { - return this.mainTargetInternal; - } - setRecordStartTime(time) { - this.recordStartTimeInternal = time; - } - recordStartTime() { - return this.recordStartTimeInternal; - } - setFilters(filters) { - this.filtersInternal = filters; - } - filters() { - return this.filtersInternal; - } - isVisible(event) { - return this.filtersInternal.every(f => f.accept(event)); } async setTracingModel(model, isFreshRecording = false) { this.tracingModelInternal = model; @@ -56,36 +22,5 @@ export class PerformanceModel extends Common.ObjectWrapper.ObjectWrapper { timelineModel() { return this.timelineModelInternal; } - setWindow(window, animate, breadcrumb) { - const didWindowOrBreadcrumbChange = this.windowInternal.left !== window.left || - this.windowInternal.right !== window.right || (breadcrumb && (this.#activeBreadcrumbWindow !== breadcrumb)); - this.windowInternal = window; - if (breadcrumb) { - this.#activeBreadcrumbWindow = breadcrumb; - } - if (didWindowOrBreadcrumbChange) { - this.dispatchEventToListeners(Events.WindowChanged, { window, animate, breadcrumbWindow: breadcrumb }); - TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(TraceEngine.Types.Timing.MilliSeconds(window.left), TraceEngine.Types.Timing.MilliSeconds(window.right)), { shouldAnimate: Boolean(animate) }); - if (breadcrumb) { - TraceBounds.TraceBounds.BoundsManager.instance().setMiniMapBounds(breadcrumb); - } - } - } - window() { - return this.windowInternal; - } - minimumRecordTime() { - return this.timelineModelInternal.minimumRecordTime(); - } - maximumRecordTime() { - return this.timelineModelInternal.maximumRecordTime(); - } } -// TODO(crbug.com/1167717): Make this a const enum again -// eslint-disable-next-line rulesdir/const_enum -export var Events; -(function (Events) { - Events["WindowChanged"] = "WindowChanged"; - Events["NamesResolved"] = "NamesResolved"; -})(Events || (Events = {})); //# sourceMappingURL=PerformanceModel.js.map \ No newline at end of file diff --git a/public/panels/timeline/PerformanceModel.js.map b/public/panels/timeline/PerformanceModel.js.map index 28ad5f60b..43fd02db4 100644 --- a/public/panels/timeline/PerformanceModel.js.map +++ b/public/panels/timeline/PerformanceModel.js.map @@ -1 +1 @@ -{"version":3,"file":"PerformanceModel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/PerformanceModel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6CAA6C,CAAC;AAE3E,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,aAAa,CAAC,aAAyB;IAC1E,kBAAkB,CAAyB;IAC3C,oBAAoB,CAAuC;IAC3D,eAAe,CAA0D;IAChE,qBAAqB,CAAgD;IAC9E,cAAc,CAAS;IACvB,uBAAuB,CAAU;IACzC,uBAAuB,CAAoD;IAE3E;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;QACjC,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAE1B,IAAI,CAAC,qBAAqB,GAAG,IAAI,aAAa,CAAC,aAAa,CAAC,iBAAiB,EAAE,CAAC;QACjF,IAAI,CAAC,cAAc,GAAG,EAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAC,CAAC;QAEjD,IAAI,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAC3C,CAAC;IAED,aAAa,CAAC,MAAyB;QACrC,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC;IACnC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED,kBAAkB,CAAC,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,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,aAAa,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAC,CAAC,CAAC;YACrG,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,wBAAwB,CACrE,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAClD,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,EAClD,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAClD,EACL,EAAC,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,EAAC,CACpC,CAAC;YACF,IAAI,UAAU,EAAE;gBACd,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;aAC/E;SACF;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;IACxD,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;IACxD,CAAC;CACF;AAED,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,yCAA+B,CAAA;IAC/B,yCAA+B,CAAA;AACjC,CAAC,EAHW,MAAM,KAAN,MAAM,QAGjB","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport type * as SDK from '../../core/sdk/sdk.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';\n\nexport class PerformanceModel extends Common.ObjectWrapper.ObjectWrapper {\n private mainTargetInternal: SDK.Target.Target|null;\n private tracingModelInternal: TraceEngine.Legacy.TracingModel|null;\n private filtersInternal: TimelineModel.TimelineModelFilter.TimelineModelFilter[];\n private readonly timelineModelInternal: TimelineModel.TimelineModel.TimelineModelImpl;\n private windowInternal: Window;\n private recordStartTimeInternal?: number;\n #activeBreadcrumbWindow?: TraceEngine.Types.Timing.TraceWindowMicroSeconds;\n\n constructor() {\n super();\n this.mainTargetInternal = null;\n this.tracingModelInternal = null;\n this.filtersInternal = [];\n\n this.timelineModelInternal = new TimelineModel.TimelineModel.TimelineModelImpl();\n this.windowInternal = {left: 0, right: Infinity};\n\n this.recordStartTimeInternal = undefined;\n }\n\n setMainTarget(target: SDK.Target.Target): void {\n this.mainTargetInternal = target;\n }\n\n mainTarget(): SDK.Target.Target|null {\n return this.mainTargetInternal;\n }\n\n setRecordStartTime(time: number): void {\n this.recordStartTimeInternal = time;\n }\n\n recordStartTime(): number|undefined {\n return this.recordStartTimeInternal;\n }\n\n setFilters(filters: TimelineModel.TimelineModelFilter.TimelineModelFilter[]): void {\n this.filtersInternal = filters;\n }\n\n filters(): TimelineModel.TimelineModelFilter.TimelineModelFilter[] {\n return this.filtersInternal;\n }\n\n isVisible(event: TraceEngine.Legacy.Event): boolean {\n return this.filtersInternal.every(f => f.accept(event));\n }\n\n async setTracingModel(model: TraceEngine.Legacy.TracingModel, isFreshRecording = false): Promise {\n this.tracingModelInternal = model;\n this.timelineModelInternal.setEvents(model, isFreshRecording);\n }\n\n tracingModel(): TraceEngine.Legacy.TracingModel {\n if (!this.tracingModelInternal) {\n throw 'call setTracingModel before accessing PerformanceModel';\n }\n return this.tracingModelInternal;\n }\n\n timelineModel(): TimelineModel.TimelineModel.TimelineModelImpl {\n return this.timelineModelInternal;\n }\n\n setWindow(window: Window, animate?: boolean, breadcrumb?: TraceEngine.Types.Timing.TraceWindowMicroSeconds): void {\n const didWindowOrBreadcrumbChange = this.windowInternal.left !== window.left ||\n this.windowInternal.right !== window.right || (breadcrumb && (this.#activeBreadcrumbWindow !== breadcrumb));\n this.windowInternal = window;\n if (breadcrumb) {\n this.#activeBreadcrumbWindow = breadcrumb;\n }\n if (didWindowOrBreadcrumbChange) {\n this.dispatchEventToListeners(Events.WindowChanged, {window, animate, breadcrumbWindow: breadcrumb});\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n TraceEngine.Types.Timing.MilliSeconds(window.left),\n TraceEngine.Types.Timing.MilliSeconds(window.right),\n ),\n {shouldAnimate: Boolean(animate)},\n );\n if (breadcrumb) {\n TraceBounds.TraceBounds.BoundsManager.instance().setMiniMapBounds(breadcrumb);\n }\n }\n }\n\n window(): Window {\n return this.windowInternal;\n }\n\n minimumRecordTime(): number {\n return this.timelineModelInternal.minimumRecordTime();\n }\n\n maximumRecordTime(): number {\n return this.timelineModelInternal.maximumRecordTime();\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Events {\n WindowChanged = 'WindowChanged',\n NamesResolved = 'NamesResolved',\n}\nexport interface WindowChangedEvent {\n window: Window;\n animate: boolean|undefined;\n breadcrumbWindow?: TraceEngine.Types.Timing.TraceWindowMicroSeconds;\n}\n\nexport type EventTypes = {\n [Events.WindowChanged]: WindowChangedEvent,\n [Events.NamesResolved]: void,\n};\n\nexport interface Window {\n left: number;\n right: number;\n}\n"]} \ No newline at end of file +{"version":3,"file":"PerformanceModel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/PerformanceModel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAG/E,MAAM,OAAO,gBAAgB;IACnB,oBAAoB,CAAuC;IAClD,qBAAqB,CAAgD;IAEtF;QACE,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;QACjC,IAAI,CAAC,qBAAqB,GAAG,IAAI,aAAa,CAAC,aAAa,CAAC,iBAAiB,EAAE,CAAC;IACnF,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,KAAsC,EAAE,gBAAgB,GAAG,KAAK;QACpF,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;QAClC,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IAChE,CAAC;IAED,YAAY;QACV,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC9B,MAAM,wDAAwD,CAAC;SAChE;QACD,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACpC,CAAC;CACF","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport type * as TraceEngine from '../../models/trace/trace.js';\n\nexport class PerformanceModel {\n private tracingModelInternal: TraceEngine.Legacy.TracingModel|null;\n private readonly timelineModelInternal: TimelineModel.TimelineModel.TimelineModelImpl;\n\n constructor() {\n this.tracingModelInternal = null;\n this.timelineModelInternal = new TimelineModel.TimelineModel.TimelineModelImpl();\n }\n\n async setTracingModel(model: TraceEngine.Legacy.TracingModel, isFreshRecording = false): Promise {\n this.tracingModelInternal = model;\n this.timelineModelInternal.setEvents(model, isFreshRecording);\n }\n\n tracingModel(): TraceEngine.Legacy.TracingModel {\n if (!this.tracingModelInternal) {\n throw 'call setTracingModel before accessing PerformanceModel';\n }\n return this.tracingModelInternal;\n }\n\n timelineModel(): TimelineModel.TimelineModel.TimelineModelImpl {\n return this.timelineModelInternal;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/ThreadAppender.d.ts b/public/panels/timeline/ThreadAppender.d.ts index c2000b114..c0e0b3e6e 100644 --- a/public/panels/timeline/ThreadAppender.d.ts +++ b/public/panels/timeline/ThreadAppender.d.ts @@ -1,21 +1,12 @@ import * as TraceEngine from '../../models/trace/trace.js'; import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import { type CompatibilityTracksAppender, type HighlightedEntryInfo, type TrackAppender, type TrackAppenderName } from './CompatibilityTracksAppender.js'; -export declare const enum ThreadType { - MAIN_THREAD = "MAIN_THREAD", - WORKER = "WORKER", - RASTERIZER = "RASTERIZER", - THREAD_POOL = "THREAD_POOL", - AUCTION_WORKLET = "AUCTION_WORKLET", - OTHER = "OTHER", - CPU_PROFILE = "CPU_PROFILE" -} export declare class ThreadAppender implements TrackAppender { #private; readonly appenderName: TrackAppenderName; - readonly threadType: ThreadType; + readonly threadType: TraceEngine.Handlers.Threads.ThreadType; readonly isOnMainFrame: boolean; - constructor(compatibilityBuilder: CompatibilityTracksAppender, traceParsedData: TraceEngine.Handlers.Types.TraceParseData, processId: TraceEngine.Types.TraceEvents.ProcessID, threadId: TraceEngine.Types.TraceEvents.ThreadID, threadName: string | null, type: ThreadType); + constructor(compatibilityBuilder: CompatibilityTracksAppender, traceParsedData: TraceEngine.Handlers.Types.TraceParseData, processId: TraceEngine.Types.TraceEvents.ProcessID, threadId: TraceEngine.Types.TraceEvents.ThreadID, threadName: string | null, type: TraceEngine.Handlers.Threads.ThreadType); modifyTree(traceEvent: TraceEngine.Types.TraceEvents.TraceEntry, action: TraceEngine.EntriesFilter.FilterAction, flameChartView: PerfUI.FlameChart.FlameChart): void; processId(): TraceEngine.Types.TraceEvents.ProcessID; threadId(): TraceEngine.Types.TraceEvents.ThreadID; @@ -32,6 +23,7 @@ export declare class ThreadAppender implements TrackAppender { setHeaderAppended(headerAppended: boolean): void; headerAppended(): boolean; trackName(): string; + getUrl(): string; isIgnoreListedEntry(entry: TraceEngine.Types.TraceEvents.TraceEventData): boolean; private isIgnoreListedURL; /** diff --git a/public/panels/timeline/ThreadAppender.js b/public/panels/timeline/ThreadAppender.js index c247c5234..041b7f1c8 100644 --- a/public/panels/timeline/ThreadAppender.js +++ b/public/panels/timeline/ThreadAppender.js @@ -135,11 +135,12 @@ export class ThreadAppender { #threadDefaultName; #expanded = false; #headerAppended = false; - threadType = "MAIN_THREAD" /* ThreadType.MAIN_THREAD */; + threadType = "MAIN_THREAD" /* TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD */; isOnMainFrame; #ignoreListingEnabled = Root.Runtime.experiments.isEnabled('ignoreListJSFramesOnTimeline'); #showAllEventsEnabled = Root.Runtime.experiments.isEnabled('timelineShowAllEvents'); #entriesFilter; + #url = ''; constructor(compatibilityBuilder, traceParsedData, processId, threadId, threadName, type) { this.#compatibilityBuilder = compatibilityBuilder; // TODO(crbug.com/1456706): @@ -157,10 +158,10 @@ export class ThreadAppender { this.#threadId = threadId; // When loading a CPU profile, only CPU data will be available, thus // we get the data from the SamplesHandler. - const entries = type === "CPU_PROFILE" /* ThreadType.CPU_PROFILE */ ? + const entries = type === "CPU_PROFILE" /* TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE */ ? this.#traceParsedData.Samples?.profilesInProcess.get(processId)?.get(threadId)?.profileCalls : this.#traceParsedData.Renderer?.processes.get(processId)?.threads?.get(threadId)?.entries; - const tree = type === "CPU_PROFILE" /* ThreadType.CPU_PROFILE */ ? + const tree = type === "CPU_PROFILE" /* TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE */ ? this.#traceParsedData.Samples?.profilesInProcess.get(processId)?.get(threadId)?.profileTree : this.#traceParsedData.Renderer?.processes.get(processId)?.threads?.get(threadId)?.tree; if (!entries || !tree) { @@ -177,8 +178,9 @@ export class ThreadAppender { if (this.#traceParsedData.AuctionWorklets.worklets.has(processId)) { this.appenderName = 'Thread_AuctionWorklet'; } - this.#entriesFilter = new TraceEngine.EntriesFilter.EntriesFilter(this.threadType === "CPU_PROFILE" /* ThreadType.CPU_PROFILE */ ? traceParsedData.Samples.entryToNode : + this.#entriesFilter = new TraceEngine.EntriesFilter.EntriesFilter(this.threadType === "CPU_PROFILE" /* TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE */ ? traceParsedData.Samples.entryToNode : traceParsedData.Renderer.entryToNode); + this.#url = this.#traceParsedData.Renderer?.processes.get(this.#processId)?.url || ''; } modifyTree(traceEvent, action, flameChartView) { if (!this.#entriesFilter) { @@ -219,7 +221,8 @@ export class ThreadAppender { if (this.#headerAppended) { return; } - if (this.threadType === "RASTERIZER" /* ThreadType.RASTERIZER */ || this.threadType === "THREAD_POOL" /* ThreadType.THREAD_POOL */) { + if (this.threadType === "RASTERIZER" /* TraceEngine.Handlers.Threads.ThreadType.RASTERIZER */ || + this.threadType === "THREAD_POOL" /* TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL */) { this.#appendGroupedTrackHeaderAndTitle(trackStartLevel, this.threadType); } else { @@ -265,38 +268,34 @@ export class ThreadAppender { // Nesting is set to 1 because the track is appended inside the // header for all raster threads. const titleStyle = buildGroupStyle({ padding: 2, nestingLevel: 1, collapsible: false }); - const rasterizerTitle = this.threadType === "RASTERIZER" /* ThreadType.RASTERIZER */ ? + const rasterizerTitle = this.threadType === "RASTERIZER" /* TraceEngine.Handlers.Threads.ThreadType.RASTERIZER */ ? i18nString(UIStrings.rasterizerThreadS, { PH1: currentTrackCount + 1 }) : i18nString(UIStrings.threadPoolThreadS, { PH1: currentTrackCount + 1 }); const titleGroup = buildTrackHeader(trackStartLevel, rasterizerTitle, titleStyle, /* selectable= */ true, this.#expanded); this.#compatibilityBuilder.registerTrackForGroup(titleGroup, this); } trackName() { - // This UI string doesn't yet use the i18n API because it is not - // shown in production, only in the component server, reason being - // it is not ready to be shipped. - const url = this.#traceParsedData.Renderer?.processes.get(this.#processId)?.url || ''; let threadTypeLabel = null; switch (this.threadType) { - case "MAIN_THREAD" /* ThreadType.MAIN_THREAD */: - threadTypeLabel = - this.isOnMainFrame ? i18nString(UIStrings.mainS, { PH1: url }) : i18nString(UIStrings.frameS, { PH1: url }); + case "MAIN_THREAD" /* TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD */: + threadTypeLabel = this.isOnMainFrame ? i18nString(UIStrings.mainS, { PH1: this.#url }) : + i18nString(UIStrings.frameS, { PH1: this.#url }); break; - case "CPU_PROFILE" /* ThreadType.CPU_PROFILE */: + case "CPU_PROFILE" /* TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE */: threadTypeLabel = i18nString(UIStrings.main); break; - case "WORKER" /* ThreadType.WORKER */: + case "WORKER" /* TraceEngine.Handlers.Threads.ThreadType.WORKER */: threadTypeLabel = this.#buildNameForWorker(); break; - case "RASTERIZER" /* ThreadType.RASTERIZER */: + case "RASTERIZER" /* TraceEngine.Handlers.Threads.ThreadType.RASTERIZER */: threadTypeLabel = i18nString(UIStrings.raster); break; - case "THREAD_POOL" /* ThreadType.THREAD_POOL */: + case "THREAD_POOL" /* TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL */: threadTypeLabel = i18nString(UIStrings.threadPool); break; - case "OTHER" /* ThreadType.OTHER */: + case "OTHER" /* TraceEngine.Handlers.Threads.ThreadType.OTHER */: break; - case "AUCTION_WORKLET" /* ThreadType.AUCTION_WORKLET */: + case "AUCTION_WORKLET" /* TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET */: threadTypeLabel = this.#buildNameForAuctionWorklet(); break; default: @@ -304,6 +303,9 @@ export class ThreadAppender { } return threadTypeLabel || this.#threadDefaultName; } + getUrl() { + return this.#url; + } #buildNameForAuctionWorklet() { const workletMetadataEvent = this.#traceParsedData.AuctionWorklets.worklets.get(this.#processId); // We should always have this event - if we do not, we were instantiated with invalid data. diff --git a/public/panels/timeline/ThreadAppender.js.map b/public/panels/timeline/ThreadAppender.js.map index 0cffba915..849f06674 100644 --- a/public/panels/timeline/ThreadAppender.js.map +++ b/public/panels/timeline/ThreadAppender.js.map @@ -1 +1 @@ -{"version":3,"file":"ThreadAppender.js","sourceR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,CAAC,CAAC,GAAG,SAAS,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAClG,KAAK,IAAI,MAAM,GAAG,KAAK,KAAK,GAAG,CAAC;SACjC;QACD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC7E,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\n\nimport {\n addDecorationToEvent,\n buildGroupStyle,\n buildTrackHeader,\n getFormattedTime,\n} from './AppenderUtils.js';\nimport {\n type CompatibilityTracksAppender,\n type HighlightedEntryInfo,\n type TrackAppender,\n type TrackAppenderName,\n} from './CompatibilityTracksAppender.js';\nimport {getCategoryStyles, getEventStyle} from './EventUICategory.js';\n\nconst UIStrings = {\n /**\n *@description Text shown for an entry in the flame chart that is ignored because it matches\n * a predefined ignore list.\n */\n onIgnoreList: 'On ignore list',\n /**\n * @description Refers to the \"Main frame\", meaning the top level frame. See https://www.w3.org/TR/html401/present/frames.html\n * @example{example.com} PH1\n */\n mainS: 'Main — {PH1}',\n /**\n * @description Refers to the main thread of execution of a program. See https://developer.mozilla.org/en-US/docs/Glossary/Main_thread\n */\n main: 'Main',\n /**\n * @description Refers to any frame in the page. See https://www.w3.org/TR/html401/present/frames.html\n * @example {https://example.com} PH1\n */\n frameS: 'Frame — {PH1}',\n /**\n *@description A web worker in the page. See https://developer.mozilla.org/en-US/docs/Web/API/Worker\n *@example {https://google.com} PH1\n */\n workerS: '`Worker` — {PH1}',\n /**\n *@description A web worker in the page. See https://developer.mozilla.org/en-US/docs/Web/API/Worker\n *@example {FormatterWorker} PH1\n *@example {https://google.com} PH2\n */\n workerSS: '`Worker`: {PH1} — {PH2}',\n /**\n *@description Label for a web worker exclusively allocated for a purpose.\n */\n dedicatedWorker: 'Dedicated `Worker`',\n /**\n *@description Text for the name of anonymous functions\n */\n anonymous: '(anonymous)',\n /**\n *@description A generic name given for a thread running in the browser (sequence of programmed instructions).\n * The placeholder is an enumeration given to the thread.\n *@example {1} PH1\n */\n threadS: 'Thread {PH1}',\n /**\n *@description Rasterization in computer graphics.\n */\n raster: 'Raster',\n /**\n *@description Threads used for background tasks.\n */\n threadPool: 'Thread Pool',\n /**\n *@description Name for a thread that rasterizes graphics in a website.\n *@example {2} PH1\n */\n rasterizerThreadS: 'Rasterizer Thread {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n *@example {2} PH1\n */\n threadPoolThreadS: 'Thread Pool Worker {PH1}',\n /**\n *@description Title of a bidder auction worklet with known URL in the timeline flame chart of the Performance panel\n *@example {https://google.com} PH1\n */\n bidderWorkletS: 'Bidder Worklet — {PH1}',\n /**\n *@description Title of a bidder auction worklet in the timeline flame chart of the Performance panel with an unknown URL\n */\n bidderWorklet: 'Bidder Worklet',\n\n /**\n *@description Title of a seller auction worklet in the timeline flame chart of the Performance panel with an unknown URL\n */\n sellerWorklet: 'Seller Worklet',\n\n /**\n *@description Title of an auction worklet in the timeline flame chart of the Performance panel with an unknown URL\n */\n unknownWorklet: 'Auction Worklet',\n\n /**\n *@description Title of control thread of a service process for an auction worklet in the timeline flame chart of the Performance panel with an unknown URL\n */\n workletService: 'Auction Worklet Service',\n\n /**\n *@description Title of a seller auction worklet with known URL in the timeline flame chart of the Performance panel\n *@example {https://google.com} PH1\n */\n sellerWorkletS: 'Seller Worklet — {PH1}',\n\n /**\n *@description Title of an auction worklet with known URL in the timeline flame chart of the Performance panel\n *@example {https://google.com} PH1\n */\n unknownWorkletS: 'Auction Worklet — {PH1}',\n\n /**\n *@description Title of control thread of a service process for an auction worklet with known URL in the timeline flame chart of the Performance panel\n * @example {https://google.com} PH1\n */\n workletServiceS: 'Auction Worklet Service — {PH1}',\n /**\n *@description Text used to show an EventDispatch event which has a type associated with it\n *@example {click} PH1\n */\n eventDispatchS: 'Event: {PH1}',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/ThreadAppender.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport const enum ThreadType {\n MAIN_THREAD = 'MAIN_THREAD',\n WORKER = 'WORKER',\n RASTERIZER = 'RASTERIZER',\n THREAD_POOL = 'THREAD_POOL',\n AUCTION_WORKLET = 'AUCTION_WORKLET',\n OTHER = 'OTHER',\n CPU_PROFILE = 'CPU_PROFILE',\n}\n\n// This appender is only triggered when the Renderer handler is run. At\n// the moment this only happens in the basic component server example.\n// In the future, once this appender fully supports the behaviour of the\n// old engine's thread/sync tracks we can always run it by enabling the\n// Renderer and Samples handler by default.\nexport class ThreadAppender implements TrackAppender {\n readonly appenderName: TrackAppenderName = 'Thread';\n\n #colorGenerator: Common.Color.Generator;\n #compatibilityBuilder: CompatibilityTracksAppender;\n #traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n\n #entries: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n #tree: TraceEngine.Helpers.TreeHelpers.TraceEntryTree;\n #processId: TraceEngine.Types.TraceEvents.ProcessID;\n #threadId: TraceEngine.Types.TraceEvents.ThreadID;\n #threadDefaultName: string;\n #expanded = false;\n #headerAppended: boolean = false;\n readonly threadType: ThreadType = ThreadType.MAIN_THREAD;\n readonly isOnMainFrame: boolean;\n #ignoreListingEnabled = Root.Runtime.experiments.isEnabled('ignoreListJSFramesOnTimeline');\n #showAllEventsEnabled = Root.Runtime.experiments.isEnabled('timelineShowAllEvents');\n #entriesFilter?: TraceEngine.EntriesFilter.EntriesFilter;\n constructor(\n compatibilityBuilder: CompatibilityTracksAppender, traceParsedData: TraceEngine.Handlers.Types.TraceParseData,\n processId: TraceEngine.Types.TraceEvents.ProcessID, threadId: TraceEngine.Types.TraceEvents.ThreadID,\n threadName: string|null, type: ThreadType) {\n this.#compatibilityBuilder = compatibilityBuilder;\n // TODO(crbug.com/1456706):\n // The values for this color generator have been taken from the old\n // engine to keep the colors the same after the migration. This\n // generator is used here to create colors for js frames (profile\n // calls) in the flamechart by hashing the script's url. We might\n // need to reconsider this generator when migrating to GM3 colors.\n this.#colorGenerator =\n new Common.Color.Generator({min: 30, max: 330, count: undefined}, {min: 50, max: 80, count: 3}, 85);\n // Add a default color for call frames with no url.\n this.#colorGenerator.setColorForID('', '#f2ecdc');\n this.#traceParsedData = traceParsedData;\n this.#processId = processId;\n this.#threadId = threadId;\n\n // When loading a CPU profile, only CPU data will be available, thus\n // we get the data from the SamplesHandler.\n const entries = type === ThreadType.CPU_PROFILE ?\n this.#traceParsedData.Samples?.profilesInProcess.get(processId)?.get(threadId)?.profileCalls :\n this.#traceParsedData.Renderer?.processes.get(processId)?.threads?.get(threadId)?.entries;\n const tree = type === ThreadType.CPU_PROFILE ?\n this.#traceParsedData.Samples?.profilesInProcess.get(processId)?.get(threadId)?.profileTree :\n this.#traceParsedData.Renderer?.processes.get(processId)?.threads?.get(threadId)?.tree;\n if (!entries || !tree) {\n throw new Error(`Could not find data for thread with id ${threadId} in process with id ${processId}`);\n }\n this.#entries = entries;\n this.#tree = tree;\n this.#threadDefaultName = threadName || i18nString(UIStrings.threadS, {PH1: threadId});\n this.isOnMainFrame = Boolean(this.#traceParsedData.Renderer?.processes.get(processId)?.isOnMainFrame);\n this.threadType = type;\n // AuctionWorklets are threads, so we re-use this appender rather than\n // duplicate it, but we change the name because we want to render these\n // lower down than other threads.\n if (this.#traceParsedData.AuctionWorklets.worklets.has(processId)) {\n this.appenderName = 'Thread_AuctionWorklet';\n }\n\n this.#entriesFilter = new TraceEngine.EntriesFilter.EntriesFilter(\n this.threadType === ThreadType.CPU_PROFILE ? traceParsedData.Samples.entryToNode :\n traceParsedData.Renderer.entryToNode);\n }\n\n modifyTree(\n traceEvent: TraceEngine.Types.TraceEvents.TraceEntry, action: TraceEngine.EntriesFilter.FilterAction,\n flameChartView: PerfUI.FlameChart.FlameChart): void {\n if (!this.#entriesFilter) {\n return;\n }\n this.#entriesFilter.applyAction({type: action, entry: traceEvent});\n flameChartView.dispatchEventToListeners(PerfUI.FlameChart.Events.EntriesModified);\n }\n\n processId(): TraceEngine.Types.TraceEvents.ProcessID {\n return this.#processId;\n }\n\n threadId(): TraceEngine.Types.TraceEvents.ThreadID {\n return this.#threadId;\n }\n\n /**\n * Appends into the flame chart data the data corresponding to the\n * this thread.\n * @param trackStartLevel the horizontal level of the flame chart events where\n * the track's events will start being appended.\n * @param expanded wether the track should be rendered expanded.\n * @returns the first available level to append more data after having\n * appended the track's events.\n */\n appendTrackAtLevel(trackStartLevel: number, expanded: boolean = false): number {\n if (this.#entries.length === 0) {\n return trackStartLevel;\n }\n this.#expanded = expanded;\n return this.#appendTreeAtLevel(trackStartLevel);\n }\n\n /**\n * Track header is appended only if there are events visible on it.\n * Otherwise we don't append any track. So, instead of preemptively\n * appending a track before appending its events, we only do so once\n * we have detected that the track contains an event that is visible.\n */\n #ensureTrackHeaderAppended(trackStartLevel: number): void {\n if (this.#headerAppended) {\n return;\n }\n if (this.threadType === ThreadType.RASTERIZER || this.threadType === ThreadType.THREAD_POOL) {\n this.#appendGroupedTrackHeaderAndTitle(trackStartLevel, this.threadType);\n } else {\n this.#appendTrackHeaderAtLevel(trackStartLevel);\n }\n this.#headerAppended = true;\n }\n\n setHeaderAppended(headerAppended: boolean): void {\n this.#headerAppended = headerAppended;\n }\n\n headerAppended(): boolean {\n return this.#headerAppended;\n }\n\n /**\n * Adds into the flame chart data the header corresponding to this\n * thread. A header is added in the shape of a group in the flame\n * chart data. A group has a predefined style and a reference to the\n * definition of the legacy track (which should be removed in the\n * future).\n * @param currentLevel the flame chart level at which the header is\n * appended.\n */\n #appendTrackHeaderAtLevel(currentLevel: number): void {\n const trackIsCollapsible = this.#entries.length > 0;\n const style = buildGroupStyle({shareHeaderLine: false, collapsible: trackIsCollapsible});\n const group = buildTrackHeader(\n currentLevel, this.trackName(), style, /* selectable= */ true, this.#expanded, /* track= */ null,\n /* showStackContextMenu= */ true);\n this.#compatibilityBuilder.registerTrackForGroup(group, this);\n }\n /**\n * Raster threads are rendered under a single header in the\n * flamechart. However, each thread has a unique title which needs to\n * be added to the flamechart data.\n */\n #appendGroupedTrackHeaderAndTitle(trackStartLevel: number, threadType: ThreadType.RASTERIZER|ThreadType.THREAD_POOL):\n void {\n const currentTrackCount = this.#compatibilityBuilder.getCurrentTrackCountForThreadType(threadType);\n if (currentTrackCount === 0) {\n const trackIsCollapsible = this.#entries.length > 0;\n const headerStyle = buildGroupStyle({shareHeaderLine: false, collapsible: trackIsCollapsible});\n const headerGroup =\n buildTrackHeader(trackStartLevel, this.trackName(), headerStyle, /* selectable= */ false, this.#expanded);\n this.#compatibilityBuilder.getFlameChartTimelineData().groups.push(headerGroup);\n }\n\n // Nesting is set to 1 because the track is appended inside the\n // header for all raster threads.\n const titleStyle = buildGroupStyle({padding: 2, nestingLevel: 1, collapsible: false});\n const rasterizerTitle = this.threadType === ThreadType.RASTERIZER ?\n i18nString(UIStrings.rasterizerThreadS, {PH1: currentTrackCount + 1}) :\n i18nString(UIStrings.threadPoolThreadS, {PH1: currentTrackCount + 1});\n const titleGroup =\n buildTrackHeader(trackStartLevel, rasterizerTitle, titleStyle, /* selectable= */ true, this.#expanded);\n this.#compatibilityBuilder.registerTrackForGroup(titleGroup, this);\n }\n\n trackName(): string {\n // This UI string doesn't yet use the i18n API because it is not\n // shown in production, only in the component server, reason being\n // it is not ready to be shipped.\n const url = this.#traceParsedData.Renderer?.processes.get(this.#processId)?.url || '';\n let threadTypeLabel: string|null = null;\n switch (this.threadType) {\n case ThreadType.MAIN_THREAD:\n threadTypeLabel =\n this.isOnMainFrame ? i18nString(UIStrings.mainS, {PH1: url}) : i18nString(UIStrings.frameS, {PH1: url});\n break;\n case ThreadType.CPU_PROFILE:\n threadTypeLabel = i18nString(UIStrings.main);\n break;\n case ThreadType.WORKER:\n threadTypeLabel = this.#buildNameForWorker();\n break;\n case ThreadType.RASTERIZER:\n threadTypeLabel = i18nString(UIStrings.raster);\n break;\n case ThreadType.THREAD_POOL:\n threadTypeLabel = i18nString(UIStrings.threadPool);\n break;\n case ThreadType.OTHER:\n break;\n case ThreadType.AUCTION_WORKLET:\n threadTypeLabel = this.#buildNameForAuctionWorklet();\n break;\n default:\n return Platform.assertNever(this.threadType, `Unknown thread type: ${this.threadType}`);\n }\n return threadTypeLabel || this.#threadDefaultName;\n }\n\n #buildNameForAuctionWorklet(): string {\n const workletMetadataEvent = this.#traceParsedData.AuctionWorklets.worklets.get(this.#processId);\n // We should always have this event - if we do not, we were instantiated with invalid data.\n if (!workletMetadataEvent) {\n return i18nString(UIStrings.unknownWorklet);\n }\n\n // Host could be empty - in which case we do not want to add it.\n const host = workletMetadataEvent.host ? `https://${workletMetadataEvent.host}` : '';\n const shouldAddHost = host.length > 0;\n\n // For each Auction Worklet in a page there are two threads we care about on the same process.\n // 1. The \"Worklet Service\" which is a generic helper service. This thread\n // is always named \"auction_worklet.CrUtilityMain\".\n //\n // 2. The \"Seller/Bidder\" service. This thread is always named\n // \"AuctionV8HelperThread\". The AuctionWorkets handler does the job of\n // figuring this out for us - the metadata event it provides for each\n // worklet process will have a `type` already set.\n //\n // Therefore, for this given thread, which we know is part of\n // an AuctionWorklet process, we need to figure out if this thread is the\n // generic service, or a seller/bidder worklet.\n //\n // Note that the worklet could also have the \"unknown\" type - this is not\n // expected but implemented to prevent trace event changes causing DevTools\n // to break with unknown worklet types.\n const isUtilityThread = workletMetadataEvent.args.data.utilityThread.tid === this.#threadId;\n const isBidderOrSeller = workletMetadataEvent.args.data.v8HelperThread.tid === this.#threadId;\n\n if (isUtilityThread) {\n return shouldAddHost ? i18nString(UIStrings.workletServiceS, {PH1: host}) : i18nString(UIStrings.workletService);\n }\n\n if (isBidderOrSeller) {\n switch (workletMetadataEvent.type) {\n case TraceEngine.Types.TraceEvents.AuctionWorkletType.SELLER:\n return shouldAddHost ? i18nString(UIStrings.sellerWorkletS, {PH1: host}) :\n i18nString(UIStrings.sellerWorklet);\n case TraceEngine.Types.TraceEvents.AuctionWorkletType.BIDDER:\n return shouldAddHost ? i18nString(UIStrings.bidderWorkletS, {PH1: host}) :\n i18nString(UIStrings.bidderWorklet);\n case TraceEngine.Types.TraceEvents.AuctionWorkletType.UNKNOWN:\n return shouldAddHost ? i18nString(UIStrings.unknownWorkletS, {PH1: host}) :\n i18nString(UIStrings.unknownWorklet);\n default:\n Platform.assertNever(\n workletMetadataEvent.type, `Unexpected Auction Worklet Type ${workletMetadataEvent.type}`);\n }\n }\n // We should never reach here, but just in case!\n return shouldAddHost ? i18nString(UIStrings.unknownWorkletS, {PH1: host}) : i18nString(UIStrings.unknownWorklet);\n }\n\n #buildNameForWorker(): string {\n const url = this.#traceParsedData.Renderer?.processes.get(this.#processId)?.url || '';\n const workerId = this.#traceParsedData.Workers.workerIdByThread.get(this.#threadId);\n const workerURL = workerId ? this.#traceParsedData.Workers.workerURLById.get(workerId) : url;\n // Try to create a name using the worker url if present. If not, use a generic label.\n let workerName =\n workerURL ? i18nString(UIStrings.workerS, {PH1: workerURL}) : i18nString(UIStrings.dedicatedWorker);\n const workerTarget = workerId !== undefined && SDK.TargetManager.TargetManager.instance().targetById(workerId);\n if (workerTarget) {\n // Get the worker name from the target, which corresponds to the name\n // assigned to the worker when it was constructed.\n workerName = i18nString(UIStrings.workerSS, {PH1: workerTarget.name(), PH2: url});\n }\n return workerName;\n }\n\n /**\n * Adds into the flame chart data the entries of this thread, which\n * includes trace events and JS calls.\n * @param currentLevel the flame chart level from which entries will\n * be appended.\n * @returns the next level after the last occupied by the appended\n * entries (the first available level to append more data).\n */\n #appendTreeAtLevel(trackStartLevel: number): number {\n // We can not used the tree maxDepth in the tree from the\n // RendererHandler because ignore listing and visibility of events\n // alter the final depth of the flame chart.\n return this.#appendNodesAtLevel(this.#tree.roots, trackStartLevel);\n }\n\n /**\n * Traverses the trees formed by the provided nodes in breadth first\n * fashion and appends each node's entry on each iteration. As each\n * entry is handled, a check for the its visibility or if it's ignore\n * listed is done before appending.\n */\n #appendNodesAtLevel(\n nodes: Iterable, startingLevel: number,\n parentIsIgnoredListed: boolean = false): number {\n const invisibleEntries = this.#entriesFilter?.invisibleEntries() ?? [];\n let maxDepthInTree = startingLevel;\n for (const node of nodes) {\n let nextLevel = startingLevel;\n const entry = node.entry;\n const entryIsIgnoreListed = this.isIgnoreListedEntry(entry);\n // Events' visibility is determined from their predefined styles,\n // which is something that's not available in the engine data.\n // Thus it needs to be checked in the appenders, but preemptively\n // checking if there are visible events and returning early if not\n // is potentially expensive since, in theory, we would be adding\n // another traversal to the entries array (which could grow\n // large). To avoid the extra cost we add the check in the\n // traversal we already need to append events.\n const entryIsVisible =\n (!invisibleEntries.includes(entry) && this.#compatibilityBuilder.entryIsVisibleInTimeline(entry)) ||\n this.#showAllEventsEnabled;\n // For ignore listing support, these two conditions need to be met\n // to not append a profile call to the flame chart:\n // 1. It is ignore listed\n // 2. It is NOT the bottom-most call in an ignore listed stack (a\n // set of chained profile calls that belong to ignore listed\n // URLs).\n // This means that all of the ignore listed calls are ignored (not\n // appended), except if it is the bottom call of an ignored stack.\n // This is becaue to represent ignore listed stack frames, we add\n // a flame chart entry with the length and position of the bottom\n // frame, which is distictively marked to denote an ignored listed\n // stack.\n const skipEventDueToIgnoreListing = entryIsIgnoreListed && parentIsIgnoredListed;\n if (entryIsVisible && !skipEventDueToIgnoreListing) {\n this.#appendEntryAtLevel(entry, startingLevel);\n nextLevel++;\n }\n\n const depthInChildTree = this.#appendNodesAtLevel(node.children, nextLevel, entryIsIgnoreListed);\n maxDepthInTree = Math.max(depthInChildTree, maxDepthInTree);\n }\n return maxDepthInTree;\n }\n\n #appendEntryAtLevel(entry: TraceEngine.Types.TraceEvents.TraceEventData, level: number): void {\n this.#ensureTrackHeaderAppended(level);\n const index = this.#compatibilityBuilder.appendEventAtLevel(entry, level, this);\n this.#addDecorationsToEntry(entry, index);\n }\n\n #addDecorationsToEntry(entry: TraceEngine.Types.TraceEvents.TraceEventData, index: number): void {\n const warnings = this.#traceParsedData.Warnings.perEvent.get(entry);\n if (!warnings) {\n return;\n }\n const flameChartData = this.#compatibilityBuilder.getFlameChartTimelineData();\n addDecorationToEvent(flameChartData, index, {type: 'WARNING_TRIANGLE'});\n if (!warnings.includes('LONG_TASK')) {\n return;\n }\n addDecorationToEvent(flameChartData, index, {\n type: 'CANDY',\n startAtTime: TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD,\n });\n }\n\n isIgnoreListedEntry(entry: TraceEngine.Types.TraceEvents.TraceEventData): boolean {\n if (!this.#ignoreListingEnabled) {\n return false;\n }\n\n if (!TraceEngine.Types.TraceEvents.isProfileCall(entry)) {\n return false;\n }\n const url = entry.callFrame.url as Platform.DevToolsPath.UrlString;\n return url && this.isIgnoreListedURL(url);\n }\n\n private isIgnoreListedURL(url: Platform.DevToolsPath.UrlString): boolean {\n return Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url);\n }\n\n /*\n ------------------------------------------------------------------------------------\n The following methods are invoked by the flame chart renderer to query features about\n events on rendering.\n ------------------------------------------------------------------------------------\n */\n\n /**\n * Gets the color an event added by this appender should be rendered with.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string {\n if (this.#entriesFilter?.isEntryModified(event)) {\n // TODO(crbug.com/1469887): Change the UI of modifies entries to the final designs when they're completed.\n return this.#colorGenerator.colorForID('temporary');\n }\n\n if (TraceEngine.Types.TraceEvents.isProfileCall(event)) {\n if (event.callFrame.functionName === '(idle)') {\n return getCategoryStyles().Idle.getComputedColorValue();\n }\n if (event.callFrame.scriptId === '0') {\n // If we can not match this frame to a script, return the\n // generic \"scripting\" color.\n return getCategoryStyles().Scripting.getComputedColorValue();\n }\n // Otherwise, return a color created based on its URL.\n return this.#colorGenerator.colorForID(event.callFrame.url);\n }\n const defaultColor =\n getEventStyle(event.name as TraceEngine.Types.TraceEvents.KnownEventName)?.category.getComputedColorValue();\n return defaultColor || getCategoryStyles().Other.getComputedColorValue();\n }\n\n /**\n * Gets the title an event added by this appender should be rendered with.\n */\n titleForEvent(entry: TraceEngine.Types.TraceEvents.TraceEventData): string {\n if (this.isIgnoreListedEntry(entry)) {\n return i18nString(UIStrings.onIgnoreList);\n }\n\n // If the event is a profile call, we need to look up its name based on its\n // ProfileNode in the CPUProfile for the trace we are working with.\n if (TraceEngine.Types.TraceEvents.isProfileCall(entry)) {\n // In the future traceParsedData.Samples will always be defined, but this\n // is not the case until the sync tracks migration is fully shipped,\n // hence this extra check.\n if (this.#traceParsedData.Samples) {\n const potentialCallName =\n TraceEngine.Handlers.ModelHandlers.Samples.getProfileCallFunctionName(this.#traceParsedData.Samples, entry);\n // We need this extra check because the call name could be the empty\n // string. If it is, we want to fallback to the \"(anonymous)\" text.\n if (potentialCallName) {\n return potentialCallName;\n }\n }\n\n return entry.callFrame.functionName || i18nString(UIStrings.anonymous);\n }\n\n if (TraceEngine.Types.TraceEvents.isTraceEventDispatch(entry)) {\n // EventDispatch represent user actions such as clicks, so in this case\n // rather than show the event title (which is always just \"Event\"), we\n // add the type (\"click\") to help the user understand the event.\n return i18nString(UIStrings.eventDispatchS, {PH1: entry.args.data.type});\n }\n\n const defaultName = getEventStyle(entry.name as TraceEngine.Types.TraceEvents.KnownEventName)?.title;\n return defaultName || entry.name;\n }\n\n /**\n * Returns the info shown when an event added by this appender\n * is hovered in the timeline.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.SyntheticEventWithSelfTime): HighlightedEntryInfo {\n let title = this.titleForEvent(event);\n if (TraceEngine.Types.TraceEvents.isTraceEventParseHTML(event)) {\n const startLine = event.args['beginData']['startLine'];\n const endLine = event.args['endData'] && event.args['endData']['endLine'];\n const eventURL = event.args['beginData']['url'] as Platform.DevToolsPath.UrlString;\n const url = Bindings.ResourceUtils.displayNameForURL(eventURL);\n const range = (endLine !== -1 || endLine === startLine) ? `${startLine}...${endLine}` : startLine;\n title += ` - ${url} [${range}]`;\n }\n return {title, formattedTime: getFormattedTime(event.dur, event.selfTime)};\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"ThreadAppender.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/ThreadAppender.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAC7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AAExE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAEtE,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,YAAY,EAAE,gBAAgB;IAC9B;;;OAGG;IACH,KAAK,EAAE,cAAc;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;;OAGG;IACH,MAAM,EAAE,eAAe;IACvB;;;OAGG;IACH,OAAO,EAAE,kBAAkB;IAC3B;;;;OAIG;IACH,QAAQ,EAAE,yBAAyB;IACnC;;OAEG;I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C,WAAW,CAAC,CAAC;YACvD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC;YAC1E,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAoC,CAAC;YACnF,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;YAC/D,MAAM,KAAK,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,IAAI,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAClG,KAAK,IAAI,MAAM,GAAG,KAAK,KAAK,GAAG,CAAC;SACjC;QACD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC7E,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\n\nimport {\n addDecorationToEvent,\n buildGroupStyle,\n buildTrackHeader,\n getFormattedTime,\n} from './AppenderUtils.js';\nimport {\n type CompatibilityTracksAppender,\n type HighlightedEntryInfo,\n type TrackAppender,\n type TrackAppenderName,\n} from './CompatibilityTracksAppender.js';\nimport {getCategoryStyles, getEventStyle} from './EventUICategory.js';\n\nconst UIStrings = {\n /**\n *@description Text shown for an entry in the flame chart that is ignored because it matches\n * a predefined ignore list.\n */\n onIgnoreList: 'On ignore list',\n /**\n * @description Refers to the \"Main frame\", meaning the top level frame. See https://www.w3.org/TR/html401/present/frames.html\n * @example{example.com} PH1\n */\n mainS: 'Main — {PH1}',\n /**\n * @description Refers to the main thread of execution of a program. See https://developer.mozilla.org/en-US/docs/Glossary/Main_thread\n */\n main: 'Main',\n /**\n * @description Refers to any frame in the page. See https://www.w3.org/TR/html401/present/frames.html\n * @example {https://example.com} PH1\n */\n frameS: 'Frame — {PH1}',\n /**\n *@description A web worker in the page. See https://developer.mozilla.org/en-US/docs/Web/API/Worker\n *@example {https://google.com} PH1\n */\n workerS: '`Worker` — {PH1}',\n /**\n *@description A web worker in the page. See https://developer.mozilla.org/en-US/docs/Web/API/Worker\n *@example {FormatterWorker} PH1\n *@example {https://google.com} PH2\n */\n workerSS: '`Worker`: {PH1} — {PH2}',\n /**\n *@description Label for a web worker exclusively allocated for a purpose.\n */\n dedicatedWorker: 'Dedicated `Worker`',\n /**\n *@description Text for the name of anonymous functions\n */\n anonymous: '(anonymous)',\n /**\n *@description A generic name given for a thread running in the browser (sequence of programmed instructions).\n * The placeholder is an enumeration given to the thread.\n *@example {1} PH1\n */\n threadS: 'Thread {PH1}',\n /**\n *@description Rasterization in computer graphics.\n */\n raster: 'Raster',\n /**\n *@description Threads used for background tasks.\n */\n threadPool: 'Thread Pool',\n /**\n *@description Name for a thread that rasterizes graphics in a website.\n *@example {2} PH1\n */\n rasterizerThreadS: 'Rasterizer Thread {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n *@example {2} PH1\n */\n threadPoolThreadS: 'Thread Pool Worker {PH1}',\n /**\n *@description Title of a bidder auction worklet with known URL in the timeline flame chart of the Performance panel\n *@example {https://google.com} PH1\n */\n bidderWorkletS: 'Bidder Worklet — {PH1}',\n /**\n *@description Title of a bidder auction worklet in the timeline flame chart of the Performance panel with an unknown URL\n */\n bidderWorklet: 'Bidder Worklet',\n\n /**\n *@description Title of a seller auction worklet in the timeline flame chart of the Performance panel with an unknown URL\n */\n sellerWorklet: 'Seller Worklet',\n\n /**\n *@description Title of an auction worklet in the timeline flame chart of the Performance panel with an unknown URL\n */\n unknownWorklet: 'Auction Worklet',\n\n /**\n *@description Title of control thread of a service process for an auction worklet in the timeline flame chart of the Performance panel with an unknown URL\n */\n workletService: 'Auction Worklet Service',\n\n /**\n *@description Title of a seller auction worklet with known URL in the timeline flame chart of the Performance panel\n *@example {https://google.com} PH1\n */\n sellerWorkletS: 'Seller Worklet — {PH1}',\n\n /**\n *@description Title of an auction worklet with known URL in the timeline flame chart of the Performance panel\n *@example {https://google.com} PH1\n */\n unknownWorkletS: 'Auction Worklet — {PH1}',\n\n /**\n *@description Title of control thread of a service process for an auction worklet with known URL in the timeline flame chart of the Performance panel\n * @example {https://google.com} PH1\n */\n workletServiceS: 'Auction Worklet Service — {PH1}',\n /**\n *@description Text used to show an EventDispatch event which has a type associated with it\n *@example {click} PH1\n */\n eventDispatchS: 'Event: {PH1}',\n};\n\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/ThreadAppender.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// This appender is only triggered when the Renderer handler is run. At\n// the moment this only happens in the basic component server example.\n// In the future, once this appender fully supports the behaviour of the\n// old engine's thread/sync tracks we can always run it by enabling the\n// Renderer and Samples handler by default.\nexport class ThreadAppender implements TrackAppender {\n readonly appenderName: TrackAppenderName = 'Thread';\n\n #colorGenerator: Common.Color.Generator;\n #compatibilityBuilder: CompatibilityTracksAppender;\n #traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n\n #entries: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n #tree: TraceEngine.Helpers.TreeHelpers.TraceEntryTree;\n #processId: TraceEngine.Types.TraceEvents.ProcessID;\n #threadId: TraceEngine.Types.TraceEvents.ThreadID;\n #threadDefaultName: string;\n #expanded = false;\n #headerAppended: boolean = false;\n readonly threadType: TraceEngine.Handlers.Threads.ThreadType = TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD;\n readonly isOnMainFrame: boolean;\n #ignoreListingEnabled = Root.Runtime.experiments.isEnabled('ignoreListJSFramesOnTimeline');\n #showAllEventsEnabled = Root.Runtime.experiments.isEnabled('timelineShowAllEvents');\n #entriesFilter?: TraceEngine.EntriesFilter.EntriesFilter;\n #url: string = '';\n constructor(\n compatibilityBuilder: CompatibilityTracksAppender, traceParsedData: TraceEngine.Handlers.Types.TraceParseData,\n processId: TraceEngine.Types.TraceEvents.ProcessID, threadId: TraceEngine.Types.TraceEvents.ThreadID,\n threadName: string|null, type: TraceEngine.Handlers.Threads.ThreadType) {\n this.#compatibilityBuilder = compatibilityBuilder;\n // TODO(crbug.com/1456706):\n // The values for this color generator have been taken from the old\n // engine to keep the colors the same after the migration. This\n // generator is used here to create colors for js frames (profile\n // calls) in the flamechart by hashing the script's url. We might\n // need to reconsider this generator when migrating to GM3 colors.\n this.#colorGenerator =\n new Common.Color.Generator({min: 30, max: 330, count: undefined}, {min: 50, max: 80, count: 3}, 85);\n // Add a default color for call frames with no url.\n this.#colorGenerator.setColorForID('', '#f2ecdc');\n this.#traceParsedData = traceParsedData;\n this.#processId = processId;\n this.#threadId = threadId;\n\n // When loading a CPU profile, only CPU data will be available, thus\n // we get the data from the SamplesHandler.\n const entries = type === TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE ?\n this.#traceParsedData.Samples?.profilesInProcess.get(processId)?.get(threadId)?.profileCalls :\n this.#traceParsedData.Renderer?.processes.get(processId)?.threads?.get(threadId)?.entries;\n const tree = type === TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE ?\n this.#traceParsedData.Samples?.profilesInProcess.get(processId)?.get(threadId)?.profileTree :\n this.#traceParsedData.Renderer?.processes.get(processId)?.threads?.get(threadId)?.tree;\n if (!entries || !tree) {\n throw new Error(`Could not find data for thread with id ${threadId} in process with id ${processId}`);\n }\n this.#entries = entries;\n this.#tree = tree;\n this.#threadDefaultName = threadName || i18nString(UIStrings.threadS, {PH1: threadId});\n this.isOnMainFrame = Boolean(this.#traceParsedData.Renderer?.processes.get(processId)?.isOnMainFrame);\n this.threadType = type;\n // AuctionWorklets are threads, so we re-use this appender rather than\n // duplicate it, but we change the name because we want to render these\n // lower down than other threads.\n if (this.#traceParsedData.AuctionWorklets.worklets.has(processId)) {\n this.appenderName = 'Thread_AuctionWorklet';\n }\n\n this.#entriesFilter = new TraceEngine.EntriesFilter.EntriesFilter(\n this.threadType === TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE ? traceParsedData.Samples.entryToNode :\n traceParsedData.Renderer.entryToNode);\n\n this.#url = this.#traceParsedData.Renderer?.processes.get(this.#processId)?.url || '';\n }\n\n modifyTree(\n traceEvent: TraceEngine.Types.TraceEvents.TraceEntry, action: TraceEngine.EntriesFilter.FilterAction,\n flameChartView: PerfUI.FlameChart.FlameChart): void {\n if (!this.#entriesFilter) {\n return;\n }\n this.#entriesFilter.applyAction({type: action, entry: traceEvent});\n flameChartView.dispatchEventToListeners(PerfUI.FlameChart.Events.EntriesModified);\n }\n\n processId(): TraceEngine.Types.TraceEvents.ProcessID {\n return this.#processId;\n }\n\n threadId(): TraceEngine.Types.TraceEvents.ThreadID {\n return this.#threadId;\n }\n\n /**\n * Appends into the flame chart data the data corresponding to the\n * this thread.\n * @param trackStartLevel the horizontal level of the flame chart events where\n * the track's events will start being appended.\n * @param expanded wether the track should be rendered expanded.\n * @returns the first available level to append more data after having\n * appended the track's events.\n */\n appendTrackAtLevel(trackStartLevel: number, expanded: boolean = false): number {\n if (this.#entries.length === 0) {\n return trackStartLevel;\n }\n this.#expanded = expanded;\n return this.#appendTreeAtLevel(trackStartLevel);\n }\n\n /**\n * Track header is appended only if there are events visible on it.\n * Otherwise we don't append any track. So, instead of preemptively\n * appending a track before appending its events, we only do so once\n * we have detected that the track contains an event that is visible.\n */\n #ensureTrackHeaderAppended(trackStartLevel: number): void {\n if (this.#headerAppended) {\n return;\n }\n if (this.threadType === TraceEngine.Handlers.Threads.ThreadType.RASTERIZER ||\n this.threadType === TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL) {\n this.#appendGroupedTrackHeaderAndTitle(trackStartLevel, this.threadType);\n } else {\n this.#appendTrackHeaderAtLevel(trackStartLevel);\n }\n this.#headerAppended = true;\n }\n\n setHeaderAppended(headerAppended: boolean): void {\n this.#headerAppended = headerAppended;\n }\n\n headerAppended(): boolean {\n return this.#headerAppended;\n }\n\n /**\n * Adds into the flame chart data the header corresponding to this\n * thread. A header is added in the shape of a group in the flame\n * chart data. A group has a predefined style and a reference to the\n * definition of the legacy track (which should be removed in the\n * future).\n * @param currentLevel the flame chart level at which the header is\n * appended.\n */\n #appendTrackHeaderAtLevel(currentLevel: number): void {\n const trackIsCollapsible = this.#entries.length > 0;\n const style = buildGroupStyle({shareHeaderLine: false, collapsible: trackIsCollapsible});\n const group = buildTrackHeader(\n currentLevel, this.trackName(), style, /* selectable= */ true, this.#expanded, /* track= */ null,\n /* showStackContextMenu= */ true);\n this.#compatibilityBuilder.registerTrackForGroup(group, this);\n }\n /**\n * Raster threads are rendered under a single header in the\n * flamechart. However, each thread has a unique title which needs to\n * be added to the flamechart data.\n */\n #appendGroupedTrackHeaderAndTitle(\n trackStartLevel: number,\n threadType: TraceEngine.Handlers.Threads.ThreadType.RASTERIZER|\n TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL): void {\n const currentTrackCount = this.#compatibilityBuilder.getCurrentTrackCountForThreadType(threadType);\n if (currentTrackCount === 0) {\n const trackIsCollapsible = this.#entries.length > 0;\n const headerStyle = buildGroupStyle({shareHeaderLine: false, collapsible: trackIsCollapsible});\n const headerGroup =\n buildTrackHeader(trackStartLevel, this.trackName(), headerStyle, /* selectable= */ false, this.#expanded);\n this.#compatibilityBuilder.getFlameChartTimelineData().groups.push(headerGroup);\n }\n\n // Nesting is set to 1 because the track is appended inside the\n // header for all raster threads.\n const titleStyle = buildGroupStyle({padding: 2, nestingLevel: 1, collapsible: false});\n const rasterizerTitle = this.threadType === TraceEngine.Handlers.Threads.ThreadType.RASTERIZER ?\n i18nString(UIStrings.rasterizerThreadS, {PH1: currentTrackCount + 1}) :\n i18nString(UIStrings.threadPoolThreadS, {PH1: currentTrackCount + 1});\n const titleGroup =\n buildTrackHeader(trackStartLevel, rasterizerTitle, titleStyle, /* selectable= */ true, this.#expanded);\n this.#compatibilityBuilder.registerTrackForGroup(titleGroup, this);\n }\n\n trackName(): string {\n let threadTypeLabel: string|null = null;\n switch (this.threadType) {\n case TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD:\n threadTypeLabel = this.isOnMainFrame ? i18nString(UIStrings.mainS, {PH1: this.#url}) :\n i18nString(UIStrings.frameS, {PH1: this.#url});\n break;\n case TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE:\n threadTypeLabel = i18nString(UIStrings.main);\n break;\n case TraceEngine.Handlers.Threads.ThreadType.WORKER:\n threadTypeLabel = this.#buildNameForWorker();\n break;\n case TraceEngine.Handlers.Threads.ThreadType.RASTERIZER:\n threadTypeLabel = i18nString(UIStrings.raster);\n break;\n case TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL:\n threadTypeLabel = i18nString(UIStrings.threadPool);\n break;\n case TraceEngine.Handlers.Threads.ThreadType.OTHER:\n break;\n case TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET:\n threadTypeLabel = this.#buildNameForAuctionWorklet();\n break;\n default:\n return Platform.assertNever(this.threadType, `Unknown thread type: ${this.threadType}`);\n }\n return threadTypeLabel || this.#threadDefaultName;\n }\n\n getUrl(): string {\n return this.#url;\n }\n\n #buildNameForAuctionWorklet(): string {\n const workletMetadataEvent = this.#traceParsedData.AuctionWorklets.worklets.get(this.#processId);\n // We should always have this event - if we do not, we were instantiated with invalid data.\n if (!workletMetadataEvent) {\n return i18nString(UIStrings.unknownWorklet);\n }\n\n // Host could be empty - in which case we do not want to add it.\n const host = workletMetadataEvent.host ? `https://${workletMetadataEvent.host}` : '';\n const shouldAddHost = host.length > 0;\n\n // For each Auction Worklet in a page there are two threads we care about on the same process.\n // 1. The \"Worklet Service\" which is a generic helper service. This thread\n // is always named \"auction_worklet.CrUtilityMain\".\n //\n // 2. The \"Seller/Bidder\" service. This thread is always named\n // \"AuctionV8HelperThread\". The AuctionWorkets handler does the job of\n // figuring this out for us - the metadata event it provides for each\n // worklet process will have a `type` already set.\n //\n // Therefore, for this given thread, which we know is part of\n // an AuctionWorklet process, we need to figure out if this thread is the\n // generic service, or a seller/bidder worklet.\n //\n // Note that the worklet could also have the \"unknown\" type - this is not\n // expected but implemented to prevent trace event changes causing DevTools\n // to break with unknown worklet types.\n const isUtilityThread = workletMetadataEvent.args.data.utilityThread.tid === this.#threadId;\n const isBidderOrSeller = workletMetadataEvent.args.data.v8HelperThread.tid === this.#threadId;\n\n if (isUtilityThread) {\n return shouldAddHost ? i18nString(UIStrings.workletServiceS, {PH1: host}) : i18nString(UIStrings.workletService);\n }\n\n if (isBidderOrSeller) {\n switch (workletMetadataEvent.type) {\n case TraceEngine.Types.TraceEvents.AuctionWorkletType.SELLER:\n return shouldAddHost ? i18nString(UIStrings.sellerWorkletS, {PH1: host}) :\n i18nString(UIStrings.sellerWorklet);\n case TraceEngine.Types.TraceEvents.AuctionWorkletType.BIDDER:\n return shouldAddHost ? i18nString(UIStrings.bidderWorkletS, {PH1: host}) :\n i18nString(UIStrings.bidderWorklet);\n case TraceEngine.Types.TraceEvents.AuctionWorkletType.UNKNOWN:\n return shouldAddHost ? i18nString(UIStrings.unknownWorkletS, {PH1: host}) :\n i18nString(UIStrings.unknownWorklet);\n default:\n Platform.assertNever(\n workletMetadataEvent.type, `Unexpected Auction Worklet Type ${workletMetadataEvent.type}`);\n }\n }\n // We should never reach here, but just in case!\n return shouldAddHost ? i18nString(UIStrings.unknownWorkletS, {PH1: host}) : i18nString(UIStrings.unknownWorklet);\n }\n\n #buildNameForWorker(): string {\n const url = this.#traceParsedData.Renderer?.processes.get(this.#processId)?.url || '';\n const workerId = this.#traceParsedData.Workers.workerIdByThread.get(this.#threadId);\n const workerURL = workerId ? this.#traceParsedData.Workers.workerURLById.get(workerId) : url;\n // Try to create a name using the worker url if present. If not, use a generic label.\n let workerName =\n workerURL ? i18nString(UIStrings.workerS, {PH1: workerURL}) : i18nString(UIStrings.dedicatedWorker);\n const workerTarget = workerId !== undefined && SDK.TargetManager.TargetManager.instance().targetById(workerId);\n if (workerTarget) {\n // Get the worker name from the target, which corresponds to the name\n // assigned to the worker when it was constructed.\n workerName = i18nString(UIStrings.workerSS, {PH1: workerTarget.name(), PH2: url});\n }\n return workerName;\n }\n\n /**\n * Adds into the flame chart data the entries of this thread, which\n * includes trace events and JS calls.\n * @param currentLevel the flame chart level from which entries will\n * be appended.\n * @returns the next level after the last occupied by the appended\n * entries (the first available level to append more data).\n */\n #appendTreeAtLevel(trackStartLevel: number): number {\n // We can not used the tree maxDepth in the tree from the\n // RendererHandler because ignore listing and visibility of events\n // alter the final depth of the flame chart.\n return this.#appendNodesAtLevel(this.#tree.roots, trackStartLevel);\n }\n\n /**\n * Traverses the trees formed by the provided nodes in breadth first\n * fashion and appends each node's entry on each iteration. As each\n * entry is handled, a check for the its visibility or if it's ignore\n * listed is done before appending.\n */\n #appendNodesAtLevel(\n nodes: Iterable, startingLevel: number,\n parentIsIgnoredListed: boolean = false): number {\n const invisibleEntries = this.#entriesFilter?.invisibleEntries() ?? [];\n let maxDepthInTree = startingLevel;\n for (const node of nodes) {\n let nextLevel = startingLevel;\n const entry = node.entry;\n const entryIsIgnoreListed = this.isIgnoreListedEntry(entry);\n // Events' visibility is determined from their predefined styles,\n // which is something that's not available in the engine data.\n // Thus it needs to be checked in the appenders, but preemptively\n // checking if there are visible events and returning early if not\n // is potentially expensive since, in theory, we would be adding\n // another traversal to the entries array (which could grow\n // large). To avoid the extra cost we add the check in the\n // traversal we already need to append events.\n const entryIsVisible =\n (!invisibleEntries.includes(entry) && this.#compatibilityBuilder.entryIsVisibleInTimeline(entry)) ||\n this.#showAllEventsEnabled;\n // For ignore listing support, these two conditions need to be met\n // to not append a profile call to the flame chart:\n // 1. It is ignore listed\n // 2. It is NOT the bottom-most call in an ignore listed stack (a\n // set of chained profile calls that belong to ignore listed\n // URLs).\n // This means that all of the ignore listed calls are ignored (not\n // appended), except if it is the bottom call of an ignored stack.\n // This is becaue to represent ignore listed stack frames, we add\n // a flame chart entry with the length and position of the bottom\n // frame, which is distictively marked to denote an ignored listed\n // stack.\n const skipEventDueToIgnoreListing = entryIsIgnoreListed && parentIsIgnoredListed;\n if (entryIsVisible && !skipEventDueToIgnoreListing) {\n this.#appendEntryAtLevel(entry, startingLevel);\n nextLevel++;\n }\n\n const depthInChildTree = this.#appendNodesAtLevel(node.children, nextLevel, entryIsIgnoreListed);\n maxDepthInTree = Math.max(depthInChildTree, maxDepthInTree);\n }\n return maxDepthInTree;\n }\n\n #appendEntryAtLevel(entry: TraceEngine.Types.TraceEvents.TraceEventData, level: number): void {\n this.#ensureTrackHeaderAppended(level);\n const index = this.#compatibilityBuilder.appendEventAtLevel(entry, level, this);\n this.#addDecorationsToEntry(entry, index);\n }\n\n #addDecorationsToEntry(entry: TraceEngine.Types.TraceEvents.TraceEventData, index: number): void {\n const warnings = this.#traceParsedData.Warnings.perEvent.get(entry);\n if (!warnings) {\n return;\n }\n const flameChartData = this.#compatibilityBuilder.getFlameChartTimelineData();\n addDecorationToEvent(flameChartData, index, {type: 'WARNING_TRIANGLE'});\n if (!warnings.includes('LONG_TASK')) {\n return;\n }\n addDecorationToEvent(flameChartData, index, {\n type: 'CANDY',\n startAtTime: TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD,\n });\n }\n\n isIgnoreListedEntry(entry: TraceEngine.Types.TraceEvents.TraceEventData): boolean {\n if (!this.#ignoreListingEnabled) {\n return false;\n }\n\n if (!TraceEngine.Types.TraceEvents.isProfileCall(entry)) {\n return false;\n }\n const url = entry.callFrame.url as Platform.DevToolsPath.UrlString;\n return url && this.isIgnoreListedURL(url);\n }\n\n private isIgnoreListedURL(url: Platform.DevToolsPath.UrlString): boolean {\n return Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url);\n }\n\n /*\n ------------------------------------------------------------------------------------\n The following methods are invoked by the flame chart renderer to query features about\n events on rendering.\n ------------------------------------------------------------------------------------\n */\n\n /**\n * Gets the color an event added by this appender should be rendered with.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string {\n if (this.#entriesFilter?.isEntryModified(event)) {\n // TODO(crbug.com/1469887): Change the UI of modifies entries to the final designs when they're completed.\n return this.#colorGenerator.colorForID('temporary');\n }\n\n if (TraceEngine.Types.TraceEvents.isProfileCall(event)) {\n if (event.callFrame.functionName === '(idle)') {\n return getCategoryStyles().Idle.getComputedColorValue();\n }\n if (event.callFrame.scriptId === '0') {\n // If we can not match this frame to a script, return the\n // generic \"scripting\" color.\n return getCategoryStyles().Scripting.getComputedColorValue();\n }\n // Otherwise, return a color created based on its URL.\n return this.#colorGenerator.colorForID(event.callFrame.url);\n }\n const defaultColor =\n getEventStyle(event.name as TraceEngine.Types.TraceEvents.KnownEventName)?.category.getComputedColorValue();\n return defaultColor || getCategoryStyles().Other.getComputedColorValue();\n }\n\n /**\n * Gets the title an event added by this appender should be rendered with.\n */\n titleForEvent(entry: TraceEngine.Types.TraceEvents.TraceEventData): string {\n if (this.isIgnoreListedEntry(entry)) {\n return i18nString(UIStrings.onIgnoreList);\n }\n\n // If the event is a profile call, we need to look up its name based on its\n // ProfileNode in the CPUProfile for the trace we are working with.\n if (TraceEngine.Types.TraceEvents.isProfileCall(entry)) {\n // In the future traceParsedData.Samples will always be defined, but this\n // is not the case until the sync tracks migration is fully shipped,\n // hence this extra check.\n if (this.#traceParsedData.Samples) {\n const potentialCallName =\n TraceEngine.Handlers.ModelHandlers.Samples.getProfileCallFunctionName(this.#traceParsedData.Samples, entry);\n // We need this extra check because the call name could be the empty\n // string. If it is, we want to fallback to the \"(anonymous)\" text.\n if (potentialCallName) {\n return potentialCallName;\n }\n }\n\n return entry.callFrame.functionName || i18nString(UIStrings.anonymous);\n }\n\n if (TraceEngine.Types.TraceEvents.isTraceEventDispatch(entry)) {\n // EventDispatch represent user actions such as clicks, so in this case\n // rather than show the event title (which is always just \"Event\"), we\n // add the type (\"click\") to help the user understand the event.\n return i18nString(UIStrings.eventDispatchS, {PH1: entry.args.data.type});\n }\n\n const defaultName = getEventStyle(entry.name as TraceEngine.Types.TraceEvents.KnownEventName)?.title;\n return defaultName || entry.name;\n }\n\n /**\n * Returns the info shown when an event added by this appender\n * is hovered in the timeline.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.SyntheticEventWithSelfTime): HighlightedEntryInfo {\n let title = this.titleForEvent(event);\n if (TraceEngine.Types.TraceEvents.isTraceEventParseHTML(event)) {\n const startLine = event.args['beginData']['startLine'];\n const endLine = event.args['endData'] && event.args['endData']['endLine'];\n const eventURL = event.args['beginData']['url'] as Platform.DevToolsPath.UrlString;\n const url = Bindings.ResourceUtils.displayNameForURL(eventURL);\n const range = (endLine !== -1 || endLine === startLine) ? `${startLine}...${endLine}` : startLine;\n title += ` - ${url} [${range}]`;\n }\n return {title, formattedTime: getFormattedTime(event.dur, event.selfTime)};\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineController.d.ts b/public/panels/timeline/TimelineController.d.ts index 790d9f81b..d5f96f642 100644 --- a/public/panels/timeline/TimelineController.d.ts +++ b/public/panels/timeline/TimelineController.d.ts @@ -57,7 +57,7 @@ export interface Client { loadingStarted(): void; processingStarted(): void; loadingProgress(progress?: number): void; - loadingComplete(collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[], tracingModel: TraceEngine.Legacy.TracingModel | null, exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter | null, isCpuProfile: boolean): Promise; + loadingComplete(collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[], tracingModel: TraceEngine.Legacy.TracingModel | null, exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter | null, isCpuProfile: boolean, recordingStartTime: number | null): Promise; loadingCompleteForTest(): void; } export interface RecordingOptions { diff --git a/public/panels/timeline/TimelineController.js b/public/panels/timeline/TimelineController.js index 6399e9bd9..c4acd6c97 100644 --- a/public/panels/timeline/TimelineController.js +++ b/public/panels/timeline/TimelineController.js @@ -23,6 +23,7 @@ export class TimelineController { tracingManager; performanceModel; #collectedEvents = []; + #recordingStartTime = null; client; tracingModel; // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration @@ -61,7 +62,6 @@ export class TimelineController { // primaryPageTarget, as that is the one we have to invoke tracing against. this.tracingManager = rootTarget.model(TraceEngine.TracingManager.TracingManager); this.performanceModel = new PerformanceModel(); - this.performanceModel.setMainTarget(rootTarget); this.client = client; this.tracingModel = new TraceEngine.Legacy.TracingModel(); } @@ -112,7 +112,7 @@ export class TimelineController { if (options.captureFilmStrip) { categoriesArray.push(disabledByDefault('devtools.screenshot')); } - this.performanceModel.setRecordStartTime(Date.now()); + this.#recordingStartTime = Date.now(); const response = await this.startRecordingWithCategories(categoriesArray.join(',')); if (response.getError()) { await this.waitForTracingToStop(false); @@ -170,7 +170,7 @@ export class TimelineController { async finalizeTrace() { await SDK.TargetManager.TargetManager.instance().resumeAllTargets(); this.tracingModel.tracingComplete(); - await this.client.loadingComplete(this.#collectedEvents, this.tracingModel, /* exclusiveFilter= */ null, /* isCpuProfile= */ false); + await this.client.loadingComplete(this.#collectedEvents, this.tracingModel, /* exclusiveFilter= */ null, /* isCpuProfile= */ false, this.#recordingStartTime); this.client.loadingCompleteForTest(); } tracingBufferUsage(usage) { diff --git a/public/panels/timeline/TimelineController.js.map b/public/panels/timeline/TimelineController.js.map index 63d081b4d..590484dd8 100644 --- a/public/panels/timeline/TimelineController.js.map +++ b/public/panels/timeline/TimelineController.js.map @@ -1 +1 @@ -{"version":3,"file":"T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AAM,CAAC,CAAC;IACtC,CAAC;IAED,eAAe;QACb,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE;YACjC,OAAO;SACR;QACD,IAAI,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;QACxC,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;IACtC,CAAC;IAEO,KAAK,CAAC,kBAAkB;QAC9B,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;IAEO,KAAK,CAAC,aAAa;QACzB,MAAM,GAAG,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,CAAC;QACpE,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC;QACpC,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAC7B,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,YAAY,EAAE,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACtG,IAAI,CAAC,MAAM,CAAC,sBAAsB,EAAE,CAAC;IACvC,CAAC;IAED,kBAAkB,CAAC,KAAa;QAC9B,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,uBAAuB,CAAC,QAAgB;QACtC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nimport {PerformanceModel} from './PerformanceModel.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Controller of the Performance panel indicating that the Performance Panel cannot\n * record a performance trace because the type of target (where possible types are page, service worker and shared\n * worker) doesn't support it.\n */\n tracingNotSupported: 'Performance trace recording not supported for this type of target',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineController.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class TimelineController implements TraceEngine.TracingManager.TracingManagerClient {\n readonly primaryPageTarget: SDK.Target.Target;\n readonly rootTarget: SDK.Target.Target;\n private tracingManager: TraceEngine.TracingManager.TracingManager|null;\n private performanceModel: PerformanceModel;\n #collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n private readonly client: Client;\n private readonly tracingModel: TraceEngine.Legacy.TracingModel;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private tracingCompleteCallback?: ((value: any) => void)|null;\n\n /**\n * We always need to profile against the DevTools root target, which is\n * the target that DevTools is attached to.\n *\n * In most cases, this will be the tab that DevTools is inspecting.\n * Now pre-rendering is active, tabs can have multiple pages - only one\n * of which the user is being shown. This is the \"primary page\" and hence\n * why in code we have \"primaryPageTarget\". When there's a prerendered\n * page in a background, tab target would have multiple subtargets, one\n * of them being primaryPageTarget.\n *\n * The problems with with using primary page target for tracing are:\n * 1. Performance trace doesn't include information from the other pages on\n * the tab which is probably not what the user wants as it does not\n * reflect reality.\n * 2. Capturing trace never finishes after prerendering activation as\n * we've started on one target and ending on another one, and\n * tracingComplete event never gets processed.\n *\n * However, when we want to look at the URL of the current page, we need\n * to use the primaryPageTarget to ensure we get the URL of the tab and\n * the tab's page that is being shown to the user. This is because the tab\n * target (which is what rootTarget is) only exposes the Target and Tracing\n * domains. We need the Page target to navigate as it implements the Page\n * domain. That is why here we have to store both.\n **/\n constructor(rootTarget: SDK.Target.Target, primaryPageTarget: SDK.Target.Target, client: Client) {\n this.primaryPageTarget = primaryPageTarget;\n this.rootTarget = rootTarget;\n // Ensure the tracing manager is the one for the Root Target, NOT the\n // primaryPageTarget, as that is the one we have to invoke tracing against.\n this.tracingManager = rootTarget.model(TraceEngine.TracingManager.TracingManager);\n this.performanceModel = new PerformanceModel();\n this.performanceModel.setMainTarget(rootTarget);\n this.client = client;\n this.tracingModel = new TraceEngine.Legacy.TracingModel();\n }\n\n async dispose(): Promise {\n if (this.tracingManager) {\n await this.tracingManager.reset();\n }\n }\n\n async startRecording(options: RecordingOptions): Promise {\n function disabledByDefault(category: string): string {\n return 'disabled-by-default-' + category;\n }\n\n // The following categories are also used in other tools, but this panel\n // offers the possibility of turning them off (see below).\n // 'disabled-by-default-devtools.screenshot'\n // └ default: on, option: captureFilmStrip\n // 'disabled-by-default-devtools.timeline.invalidationTracking'\n // └ default: off, experiment: timelineInvalidationTracking\n // 'disabled-by-default-v8.cpu_profiler'\n // └ default: on, option: enableJSSampling\n const categoriesArray = [\n Root.Runtime.experiments.isEnabled('timelineShowAllEvents') ? '*' : '-*',\n TimelineModel.TimelineModel.TimelineModelImpl.Category.Console,\n TimelineModel.TimelineModel.TimelineModelImpl.Category.UserTiming,\n 'devtools.timeline',\n disabledByDefault('devtools.timeline'),\n disabledByDefault('devtools.timeline.frame'),\n disabledByDefault('devtools.timeline.stack'),\n disabledByDefault('v8.compile'),\n disabledByDefault('v8.cpu_profiler.hires'),\n TimelineModel.TimelineModel.TimelineModelImpl.Category.Loading,\n disabledByDefault('lighthouse'),\n 'v8.execute',\n 'v8',\n ];\n\n if (Root.Runtime.experiments.isEnabled('timelineV8RuntimeCallStats') && options.enableJSSampling) {\n categoriesArray.push(disabledByDefault('v8.runtime_stats_sampling'));\n }\n if (options.enableJSSampling) {\n categoriesArray.push(disabledByDefault('v8.cpu_profiler'));\n }\n if (Root.Runtime.experiments.isEnabled('timelineInvalidationTracking')) {\n categoriesArray.push(disabledByDefault('devtools.timeline.invalidationTracking'));\n }\n if (options.capturePictures) {\n categoriesArray.push(\n disabledByDefault('devtools.timeline.layers'), disabledByDefault('devtools.timeline.picture'),\n disabledByDefault('blink.graphics_context_annotations'));\n }\n if (options.captureFilmStrip) {\n categoriesArray.push(disabledByDefault('devtools.screenshot'));\n }\n\n this.performanceModel.setRecordStartTime(Date.now());\n const response = await this.startRecordingWithCategories(categoriesArray.join(','));\n if (response.getError()) {\n await this.waitForTracingToStop(false);\n await SDK.TargetManager.TargetManager.instance().resumeAllTargets();\n }\n return response;\n }\n\n async stopRecording(): Promise {\n if (this.tracingManager) {\n this.tracingManager.stop();\n }\n\n this.client.loadingStarted();\n await this.waitForTracingToStop(true);\n await this.allSourcesFinished();\n return this.performanceModel;\n }\n\n getPerformanceModel(): PerformanceModel {\n return this.performanceModel;\n }\n\n private async waitForTracingToStop(awaitTracingCompleteCallback: boolean): Promise {\n const tracingStoppedPromises = [];\n if (this.tracingManager && awaitTracingCompleteCallback) {\n tracingStoppedPromises.push(new Promise(resolve => {\n this.tracingCompleteCallback = resolve;\n }));\n }\n\n await Promise.all(tracingStoppedPromises);\n }\n\n private async startRecordingWithCategories(categories: string): Promise {\n if (!this.tracingManager) {\n throw new Error(i18nString(UIStrings.tracingNotSupported));\n }\n // There might be a significant delay in the beginning of timeline recording\n // caused by starting CPU profiler, that needs to traverse JS heap to collect\n // all the functions data.\n await SDK.TargetManager.TargetManager.instance().suspendAllTargets('performance-timeline');\n return this.tracingManager.start(this, categories, '');\n }\n\n traceEventsCollected(events: TraceEngine.TracingManager.EventPayload[]): void {\n this.#collectedEvents =\n this.#collectedEvents.concat(events as unknown as TraceEngine.Types.TraceEvents.TraceEventData[]);\n this.tracingModel.addEvents(events);\n }\n\n tracingComplete(): void {\n if (!this.tracingCompleteCallback) {\n return;\n }\n this.tracingCompleteCallback(undefined);\n this.tracingCompleteCallback = null;\n }\n\n private async allSourcesFinished(): Promise {\n this.client.processingStarted();\n await this.finalizeTrace();\n }\n\n private async finalizeTrace(): Promise {\n await SDK.TargetManager.TargetManager.instance().resumeAllTargets();\n this.tracingModel.tracingComplete();\n await this.client.loadingComplete(\n this.#collectedEvents, this.tracingModel, /* exclusiveFilter= */ null, /* isCpuProfile= */ false);\n this.client.loadingCompleteForTest();\n }\n\n tracingBufferUsage(usage: number): void {\n this.client.recordingProgress(usage);\n }\n\n eventsRetrievalProgress(progress: number): void {\n this.client.loadingProgress(progress);\n }\n}\n\nexport interface Client {\n recordingProgress(usage: number): void;\n loadingStarted(): void;\n processingStarted(): void;\n loadingProgress(progress?: number): void;\n loadingComplete(\n collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[],\n tracingModel: TraceEngine.Legacy.TracingModel|null,\n exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null,\n isCpuProfile: boolean): Promise;\n loadingCompleteForTest(): void;\n}\nexport interface RecordingOptions {\n enableJSSampling?: boolean;\n capturePictures?: boolean;\n captureFilmStrip?: boolean;\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineController.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineController.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAEvD,MAAM,SAAS,GAAG;IAChB;;;;OAIG;IACH,mBAAmB,EAAE,mEAAmE;CACzF,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,uCAAuC,EAAE,SAAS,CAAC,CAAC;AAC7F,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC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AAI,CAAC,MAAM,CAAC,sBAAsB,EAAE,CAAC;IACvC,CAAC;IAED,kBAAkB,CAAC,KAAa;QAC9B,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,uBAAuB,CAAC,QAAgB;QACtC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nimport {PerformanceModel} from './PerformanceModel.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Controller of the Performance panel indicating that the Performance Panel cannot\n * record a performance trace because the type of target (where possible types are page, service worker and shared\n * worker) doesn't support it.\n */\n tracingNotSupported: 'Performance trace recording not supported for this type of target',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineController.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class TimelineController implements TraceEngine.TracingManager.TracingManagerClient {\n readonly primaryPageTarget: SDK.Target.Target;\n readonly rootTarget: SDK.Target.Target;\n private tracingManager: TraceEngine.TracingManager.TracingManager|null;\n private performanceModel: PerformanceModel;\n #collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n #recordingStartTime: number|null = null;\n private readonly client: Client;\n private readonly tracingModel: TraceEngine.Legacy.TracingModel;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private tracingCompleteCallback?: ((value: any) => void)|null;\n\n /**\n * We always need to profile against the DevTools root target, which is\n * the target that DevTools is attached to.\n *\n * In most cases, this will be the tab that DevTools is inspecting.\n * Now pre-rendering is active, tabs can have multiple pages - only one\n * of which the user is being shown. This is the \"primary page\" and hence\n * why in code we have \"primaryPageTarget\". When there's a prerendered\n * page in a background, tab target would have multiple subtargets, one\n * of them being primaryPageTarget.\n *\n * The problems with with using primary page target for tracing are:\n * 1. Performance trace doesn't include information from the other pages on\n * the tab which is probably not what the user wants as it does not\n * reflect reality.\n * 2. Capturing trace never finishes after prerendering activation as\n * we've started on one target and ending on another one, and\n * tracingComplete event never gets processed.\n *\n * However, when we want to look at the URL of the current page, we need\n * to use the primaryPageTarget to ensure we get the URL of the tab and\n * the tab's page that is being shown to the user. This is because the tab\n * target (which is what rootTarget is) only exposes the Target and Tracing\n * domains. We need the Page target to navigate as it implements the Page\n * domain. That is why here we have to store both.\n **/\n constructor(rootTarget: SDK.Target.Target, primaryPageTarget: SDK.Target.Target, client: Client) {\n this.primaryPageTarget = primaryPageTarget;\n this.rootTarget = rootTarget;\n // Ensure the tracing manager is the one for the Root Target, NOT the\n // primaryPageTarget, as that is the one we have to invoke tracing against.\n this.tracingManager = rootTarget.model(TraceEngine.TracingManager.TracingManager);\n this.performanceModel = new PerformanceModel();\n this.client = client;\n this.tracingModel = new TraceEngine.Legacy.TracingModel();\n }\n\n async dispose(): Promise {\n if (this.tracingManager) {\n await this.tracingManager.reset();\n }\n }\n\n async startRecording(options: RecordingOptions): Promise {\n function disabledByDefault(category: string): string {\n return 'disabled-by-default-' + category;\n }\n\n // The following categories are also used in other tools, but this panel\n // offers the possibility of turning them off (see below).\n // 'disabled-by-default-devtools.screenshot'\n // └ default: on, option: captureFilmStrip\n // 'disabled-by-default-devtools.timeline.invalidationTracking'\n // └ default: off, experiment: timelineInvalidationTracking\n // 'disabled-by-default-v8.cpu_profiler'\n // └ default: on, option: enableJSSampling\n const categoriesArray = [\n Root.Runtime.experiments.isEnabled('timelineShowAllEvents') ? '*' : '-*',\n TimelineModel.TimelineModel.TimelineModelImpl.Category.Console,\n TimelineModel.TimelineModel.TimelineModelImpl.Category.UserTiming,\n 'devtools.timeline',\n disabledByDefault('devtools.timeline'),\n disabledByDefault('devtools.timeline.frame'),\n disabledByDefault('devtools.timeline.stack'),\n disabledByDefault('v8.compile'),\n disabledByDefault('v8.cpu_profiler.hires'),\n TimelineModel.TimelineModel.TimelineModelImpl.Category.Loading,\n disabledByDefault('lighthouse'),\n 'v8.execute',\n 'v8',\n ];\n\n if (Root.Runtime.experiments.isEnabled('timelineV8RuntimeCallStats') && options.enableJSSampling) {\n categoriesArray.push(disabledByDefault('v8.runtime_stats_sampling'));\n }\n if (options.enableJSSampling) {\n categoriesArray.push(disabledByDefault('v8.cpu_profiler'));\n }\n if (Root.Runtime.experiments.isEnabled('timelineInvalidationTracking')) {\n categoriesArray.push(disabledByDefault('devtools.timeline.invalidationTracking'));\n }\n if (options.capturePictures) {\n categoriesArray.push(\n disabledByDefault('devtools.timeline.layers'), disabledByDefault('devtools.timeline.picture'),\n disabledByDefault('blink.graphics_context_annotations'));\n }\n if (options.captureFilmStrip) {\n categoriesArray.push(disabledByDefault('devtools.screenshot'));\n }\n\n this.#recordingStartTime = Date.now();\n const response = await this.startRecordingWithCategories(categoriesArray.join(','));\n if (response.getError()) {\n await this.waitForTracingToStop(false);\n await SDK.TargetManager.TargetManager.instance().resumeAllTargets();\n }\n return response;\n }\n\n async stopRecording(): Promise {\n if (this.tracingManager) {\n this.tracingManager.stop();\n }\n\n this.client.loadingStarted();\n await this.waitForTracingToStop(true);\n await this.allSourcesFinished();\n return this.performanceModel;\n }\n\n getPerformanceModel(): PerformanceModel {\n return this.performanceModel;\n }\n\n private async waitForTracingToStop(awaitTracingCompleteCallback: boolean): Promise {\n const tracingStoppedPromises = [];\n if (this.tracingManager && awaitTracingCompleteCallback) {\n tracingStoppedPromises.push(new Promise(resolve => {\n this.tracingCompleteCallback = resolve;\n }));\n }\n\n await Promise.all(tracingStoppedPromises);\n }\n\n private async startRecordingWithCategories(categories: string): Promise {\n if (!this.tracingManager) {\n throw new Error(i18nString(UIStrings.tracingNotSupported));\n }\n // There might be a significant delay in the beginning of timeline recording\n // caused by starting CPU profiler, that needs to traverse JS heap to collect\n // all the functions data.\n await SDK.TargetManager.TargetManager.instance().suspendAllTargets('performance-timeline');\n return this.tracingManager.start(this, categories, '');\n }\n\n traceEventsCollected(events: TraceEngine.TracingManager.EventPayload[]): void {\n this.#collectedEvents =\n this.#collectedEvents.concat(events as unknown as TraceEngine.Types.TraceEvents.TraceEventData[]);\n this.tracingModel.addEvents(events);\n }\n\n tracingComplete(): void {\n if (!this.tracingCompleteCallback) {\n return;\n }\n this.tracingCompleteCallback(undefined);\n this.tracingCompleteCallback = null;\n }\n\n private async allSourcesFinished(): Promise {\n this.client.processingStarted();\n await this.finalizeTrace();\n }\n\n private async finalizeTrace(): Promise {\n await SDK.TargetManager.TargetManager.instance().resumeAllTargets();\n this.tracingModel.tracingComplete();\n await this.client.loadingComplete(\n this.#collectedEvents, this.tracingModel, /* exclusiveFilter= */ null, /* isCpuProfile= */ false,\n this.#recordingStartTime);\n this.client.loadingCompleteForTest();\n }\n\n tracingBufferUsage(usage: number): void {\n this.client.recordingProgress(usage);\n }\n\n eventsRetrievalProgress(progress: number): void {\n this.client.loadingProgress(progress);\n }\n}\n\nexport interface Client {\n recordingProgress(usage: number): void;\n loadingStarted(): void;\n processingStarted(): void;\n loadingProgress(progress?: number): void;\n loadingComplete(\n collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[],\n tracingModel: TraceEngine.Legacy.TracingModel|null,\n exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null, isCpuProfile: boolean,\n recordingStartTime: number|null): Promise;\n loadingCompleteForTest(): void;\n}\nexport interface RecordingOptions {\n enableJSSampling?: boolean;\n capturePictures?: boolean;\n captureFilmStrip?: boolean;\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineDetailsView.d.ts b/public/panels/timeline/TimelineDetailsView.d.ts index 7ddc79588..aab1a0317 100644 --- a/public/panels/timeline/TimelineDetailsView.d.ts +++ b/public/panels/timeline/TimelineDetailsView.d.ts @@ -18,13 +18,12 @@ export declare class TimelineDetailsView extends UI.Widget.VBox { private updateContentsScheduled; constructor(delegate: TimelineModeViewDelegate); getDetailsContentElementForTest(): HTMLElement; - setModel(model: PerformanceModel | null, traceEngineData: TraceEngine.Handlers.Types.TraceParseData | null, selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[] | null): Promise; + setModel(model: PerformanceModel | null, traceEngineData: TraceEngine.Handlers.Types.TraceParseData | null, selectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] | null): Promise; private setContent; private updateContents; private appendTab; headerElement(): Element; setPreferredTab(tabId: string): void; - private onWindowChanged; /** * This forces a recalculation and rerendering of the timings * breakdown of a track. diff --git a/public/panels/timeline/TimelineDetailsView.js b/public/panels/timeline/TimelineDetailsView.js index 3961ff2ef..6d2ff6b32 100644 --- a/public/panels/timeline/TimelineDetailsView.js +++ b/public/panels/timeline/TimelineDetailsView.js @@ -5,10 +5,10 @@ import * as i18n from '../../core/i18n/i18n.js'; import * as SDK from '../../core/sdk/sdk.js'; import * as TimelineModel from '../../models/timeline_model/timeline_model.js'; import * as TraceEngine from '../../models/trace/trace.js'; +import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js'; import * as Components from '../../ui/legacy/components/utils/utils.js'; import * as UI from '../../ui/legacy/legacy.js'; import { EventsTimelineTreeView } from './EventsTimelineTreeView.js'; -import { Events } from './PerformanceModel.js'; import { TimelineLayersView } from './TimelineLayersView.js'; import { TimelinePaintProfilerView } from './TimelinePaintProfilerView.js'; import { TimelineSelection } from './TimelineSelection.js'; @@ -63,6 +63,7 @@ export class TimelineDetailsView extends UI.Widget.VBox { updateContentsScheduled; #traceEngineData = null; #filmStrip = null; + #onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this); constructor(delegate) { super(); this.element.classList.add('timeline-details'); @@ -87,19 +88,23 @@ export class TimelineDetailsView extends UI.Widget.VBox { this.appendTab(Tab.EventLog, i18nString(UIStrings.eventLog), eventsView); this.rangeDetailViews.set(Tab.EventLog, eventsView); this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this.tabSelected, this); + TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound); } getDetailsContentElementForTest() { return this.defaultDetailsContentElement; } + #onTraceBoundsChange(event) { + if (event.updateType === 'RESET' || event.updateType === 'VISIBLE_WINDOW') { + // If the update type was a changing of the minimap bounds, we do not + // need to redraw. + if (!this.selection) { + this.scheduleUpdateContentsFromWindow(); + } + } + } async setModel(model, traceEngineData, selectedEvents) { if (this.model !== model) { - if (this.model) { - this.model.removeEventListener(Events.WindowChanged, this.onWindowChanged, this); - } this.model = model; - if (this.model) { - this.model.addEventListener(Events.WindowChanged, this.onWindowChanged, this); - } } this.#traceEngineData = traceEngineData; if (traceEngineData) { @@ -127,8 +132,12 @@ export class TimelineDetailsView extends UI.Widget.VBox { updateContents() { const view = this.rangeDetailViews.get(this.tabbedPane.selectedTabId || ''); if (view) { - const window = this.model.window(); - view.updateContents(this.selection || TimelineSelection.fromRange(window.left, window.right)); + const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (!traceBoundsState) { + return; + } + const visibleWindow = traceBoundsState.milli.timelineTraceWindow; + view.updateContents(this.selection || TimelineSelection.fromRange(visibleWindow.min, visibleWindow.max)); } } appendTab(id, tabTitle, view, isCloseable) { @@ -143,11 +152,6 @@ export class TimelineDetailsView extends UI.Widget.VBox { setPreferredTab(tabId) { this.preferredTabId = tabId; } - onWindowChanged() { - if (!this.selection) { - this.scheduleUpdateContentsFromWindow(); - } - } /** * This forces a recalculation and rerendering of the timings * breakdown of a track. @@ -176,8 +180,12 @@ export class TimelineDetailsView extends UI.Widget.VBox { } } updateContentsFromWindow() { - const window = this.model.window(); - this.updateSelectedRangeStats(window.left, window.right); + const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (!traceBoundsState) { + return; + } + const visibleWindow = traceBoundsState.milli.timelineTraceWindow; + this.updateSelectedRangeStats(visibleWindow.min, visibleWindow.max); this.updateContents(); } #getFilmStripFrame(frame) { diff --git a/public/panels/timeline/TimelineDetailsView.js.map b/public/panels/timeline/TimelineDetailsView.js.map index b9e68f118..dc7956da5 100644 --- a/public/panels/timeline/TimelineDetailsView.js.map +++ b/public/panels/timeline/TimelineDetailsView.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineDetailsView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineDetailsView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAC,MAAM,EAAwB,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,wBAAwB,EAAE,wBAAwB,EAAwB,MAAM,uBAAuB,CAAC;AAChH,OAAO,EAAC,4BAA4B,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAEnF,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,QAAQ,EAAE,WAAW;IACrB;;OAEG;IACH,QAAQ,EAAE,WAAW;IACrB;;OA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A+B,CAAA;IAC/B,kCAA2B,CAAA;AAC7B,CAAC,EAPW,GAAG,KAAH,GAAG,QAOd","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {EventsTimelineTreeView} from './EventsTimelineTreeView.js';\nimport {Events, type PerformanceModel} from './PerformanceModel.js';\nimport {TimelineLayersView} from './TimelineLayersView.js';\nimport {TimelinePaintProfilerView} from './TimelinePaintProfilerView.js';\nimport {type TimelineModeViewDelegate} from './TimelinePanel.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport {BottomUpTimelineTreeView, CallTreeTimelineTreeView, type TimelineTreeView} from './TimelineTreeView.js';\nimport {TimelineDetailsContentHelper, TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text for the summary view\n */\n summary: 'Summary',\n /**\n *@description Text in Timeline Details View of the Performance panel\n */\n bottomup: 'Bottom-Up',\n /**\n *@description Text in Timeline Details View of the Performance panel\n */\n callTree: 'Call Tree',\n /**\n *@description Text in Timeline Details View of the Performance panel\n */\n eventLog: 'Event Log',\n /**\n *@description Title of the paint profiler, old name of the performance pane\n */\n paintProfiler: 'Paint Profiler',\n /**\n *@description Title of the Layers tool\n */\n layers: 'Layers',\n /**\n *@description Text in Timeline Details View of the Performance panel\n *@example {1ms} PH1\n *@example {10ms} PH2\n */\n rangeSS: 'Range: {PH1} – {PH2}',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineDetailsView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class TimelineDetailsView extends UI.Widget.VBox {\n private readonly detailsLinkifier: Components.Linkifier.Linkifier;\n private tabbedPane: UI.TabbedPane.TabbedPane;\n private readonly defaultDetailsWidget: UI.Widget.VBox;\n private readonly defaultDetailsContentElement: HTMLElement;\n private rangeDetailViews: Map;\n private model!: PerformanceModel;\n #selectedEvents?: TraceEngine.Legacy.CompatibleTraceEvent[]|null;\n private lazyPaintProfilerView?: TimelinePaintProfilerView|null;\n private lazyLayersView?: TimelineLayersView|null;\n private preferredTabId?: string;\n private selection?: TimelineSelection|null;\n private updateContentsScheduled: boolean;\n #traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null = null;\n #filmStrip: TraceEngine.Extras.FilmStrip.Data|null = null;\n\n constructor(delegate: TimelineModeViewDelegate) {\n super();\n this.element.classList.add('timeline-details');\n\n this.detailsLinkifier = new Components.Linkifier.Linkifier();\n\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n this.tabbedPane.show(this.element);\n\n this.defaultDetailsWidget = new UI.Widget.VBox();\n this.defaultDetailsWidget.element.classList.add('timeline-details-view');\n this.defaultDetailsContentElement =\n this.defaultDetailsWidget.element.createChild('div', 'timeline-details-view-body vbox');\n this.appendTab(Tab.Details, i18nString(UIStrings.summary), this.defaultDetailsWidget);\n this.setPreferredTab(Tab.Details);\n\n this.rangeDetailViews = new Map();\n this.updateContentsScheduled = false;\n\n const bottomUpView = new BottomUpTimelineTreeView();\n this.appendTab(Tab.BottomUp, i18nString(UIStrings.bottomup), bottomUpView);\n this.rangeDetailViews.set(Tab.BottomUp, bottomUpView);\n\n const callTreeView = new CallTreeTimelineTreeView();\n this.appendTab(Tab.CallTree, i18nString(UIStrings.callTree), callTreeView);\n this.rangeDetailViews.set(Tab.CallTree, callTreeView);\n\n const eventsView = new EventsTimelineTreeView(delegate);\n this.appendTab(Tab.EventLog, i18nString(UIStrings.eventLog), eventsView);\n this.rangeDetailViews.set(Tab.EventLog, eventsView);\n\n this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this.tabSelected, this);\n }\n\n getDetailsContentElementForTest(): HTMLElement {\n return this.defaultDetailsContentElement;\n }\n\n async setModel(\n model: PerformanceModel|null, traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[]|null): Promise {\n if (this.model !== model) {\n if (this.model) {\n this.model.removeEventListener(Events.WindowChanged, this.onWindowChanged, this);\n }\n this.model = (model as PerformanceModel);\n if (this.model) {\n this.model.addEventListener(Events.WindowChanged, this.onWindowChanged, this);\n }\n }\n this.#traceEngineData = traceEngineData;\n if (traceEngineData) {\n this.#filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(traceEngineData);\n }\n this.#selectedEvents = selectedEvents;\n this.tabbedPane.closeTabs([Tab.PaintProfiler, Tab.LayerViewer], false);\n for (const view of this.rangeDetailViews.values()) {\n view.setModelWithEvents(model, selectedEvents, traceEngineData);\n }\n this.lazyPaintProfilerView = null;\n this.lazyLayersView = null;\n await this.setSelection(null);\n }\n\n private setContent(node: Node): void {\n const allTabs = this.tabbedPane.otherTabs(Tab.Details);\n for (let i = 0; i < allTabs.length; ++i) {\n if (!this.rangeDetailViews.has(allTabs[i])) {\n this.tabbedPane.closeTab(allTabs[i]);\n }\n }\n this.defaultDetailsContentElement.removeChildren();\n this.defaultDetailsContentElement.appendChild(node);\n }\n\n private updateContents(): void {\n const view = this.rangeDetailViews.get(this.tabbedPane.selectedTabId || '');\n if (view) {\n const window = this.model.window();\n view.updateContents(this.selection || TimelineSelection.fromRange(window.left, window.right));\n }\n }\n\n private appendTab(id: string, tabTitle: string, view: UI.Widget.Widget, isCloseable?: boolean): void {\n this.tabbedPane.appendTab(id, tabTitle, view, undefined, undefined, isCloseable);\n if (this.preferredTabId !== this.tabbedPane.selectedTabId) {\n this.tabbedPane.selectTab(id);\n }\n }\n\n headerElement(): Element {\n return this.tabbedPane.headerElement();\n }\n\n setPreferredTab(tabId: string): void {\n this.preferredTabId = tabId;\n }\n\n private onWindowChanged(): void {\n if (!this.selection) {\n this.scheduleUpdateContentsFromWindow();\n }\n }\n\n /**\n * This forces a recalculation and rerendering of the timings\n * breakdown of a track.\n * User actions like zooming or scrolling can trigger many updates in\n * short time windows, so we debounce the calls in those cases. Single\n * sporadic calls (like selecting a new track) don't need to be\n * debounced. The forceImmediateUpdate param configures the debouncing\n * behaviour.\n */\n private scheduleUpdateContentsFromWindow(forceImmediateUpdate: boolean = false): void {\n if (!this.model) {\n this.setContent(UI.Fragment.html`
`);\n return;\n }\n if (forceImmediateUpdate) {\n this.updateContentsFromWindow();\n return;\n }\n\n // Debounce this update as it's not critical.\n if (!this.updateContentsScheduled) {\n this.updateContentsScheduled = true;\n setTimeout(() => {\n this.updateContentsScheduled = false;\n this.updateContentsFromWindow();\n }, 100);\n }\n }\n\n private updateContentsFromWindow(): void {\n const window = this.model.window();\n this.updateSelectedRangeStats(window.left, window.right);\n this.updateContents();\n }\n\n #getFilmStripFrame(frame: TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame): TraceEngine.Extras.FilmStrip.Frame\n |null {\n if (!this.#filmStrip) {\n return null;\n }\n const screenshotTime = (frame.idle ? frame.startTime : frame.endTime);\n const filmStripFrame = TraceEngine.Extras.FilmStrip.frameClosestToTimestamp(this.#filmStrip, screenshotTime);\n if (!filmStripFrame) {\n return null;\n }\n const frameTimeMilliSeconds =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(filmStripFrame.screenshotEvent.ts);\n return frameTimeMilliSeconds - frame.endTime < 10 ? filmStripFrame : null;\n }\n\n async setSelection(selection: TimelineSelection|null): Promise {\n this.detailsLinkifier.reset();\n this.selection = selection;\n if (!this.selection) {\n // Update instantly using forceImmediateUpdate, since we are only\n // making a single call and don't need to debounce.\n this.scheduleUpdateContentsFromWindow(/* forceImmediateUpdate */ true);\n return;\n }\n const selectionObject = this.selection.object;\n if (TimelineSelection.isSyntheticNetworkRequestDetailsEventSelection(selectionObject)) {\n const event = selectionObject;\n const networkDetails = await TimelineUIUtils.buildSyntheticNetworkRequestDetails(\n event, this.model.timelineModel(), this.detailsLinkifier);\n this.setContent(networkDetails);\n } else if (TimelineSelection.isTraceEventSelection(selectionObject)) {\n const event = selectionObject;\n const traceEventDetails = await TimelineUIUtils.buildTraceEventDetails(\n event, this.model.timelineModel(), this.detailsLinkifier, true, this.#traceEngineData);\n this.appendDetailsTabsForTraceEventAndShowDetails(event, traceEventDetails);\n } else if (TimelineSelection.isFrameObject(selectionObject)) {\n const frame = selectionObject;\n const matchedFilmStripFrame = this.#getFilmStripFrame(frame);\n this.setContent(TimelineUIUtils.generateDetailsContentForFrame(frame, this.#filmStrip, matchedFilmStripFrame));\n const target = SDK.TargetManager.TargetManager.instance().rootTarget();\n if (frame.layerTree && target) {\n const layerTreeForFrame = new TimelineModel.TracingLayerTree.TracingFrameLayerTree(target, frame.layerTree);\n const layersView = this.layersView();\n layersView.showLayerTree(layerTreeForFrame);\n if (!this.tabbedPane.hasTab(Tab.LayerViewer)) {\n this.appendTab(Tab.LayerViewer, i18nString(UIStrings.layers), layersView);\n }\n }\n } else if (TimelineSelection.isRangeSelection(selectionObject)) {\n this.updateSelectedRangeStats(this.selection.startTime, this.selection.endTime);\n }\n\n this.updateContents();\n }\n\n private tabSelected(event: Common.EventTarget.EventTargetEvent): void {\n if (!event.data.isUserGesture) {\n return;\n }\n this.setPreferredTab(event.data.tabId);\n this.updateContents();\n }\n\n private layersView(): TimelineLayersView {\n if (this.lazyLayersView) {\n return this.lazyLayersView;\n }\n this.lazyLayersView =\n new TimelineLayersView(this.model.timelineModel(), this.showSnapshotInPaintProfiler.bind(this));\n return this.lazyLayersView;\n }\n\n private paintProfilerView(): TimelinePaintProfilerView|null {\n if (this.lazyPaintProfilerView) {\n return this.lazyPaintProfilerView;\n }\n if (!this.#traceEngineData) {\n return null;\n }\n this.lazyPaintProfilerView = new TimelinePaintProfilerView(this.#traceEngineData);\n return this.lazyPaintProfilerView;\n }\n\n private showSnapshotInPaintProfiler(snapshot: SDK.PaintProfiler.PaintProfilerSnapshot): void {\n const paintProfilerView = this.paintProfilerView();\n if (!paintProfilerView) {\n return;\n }\n paintProfilerView.setSnapshot(snapshot);\n if (!this.tabbedPane.hasTab(Tab.PaintProfiler)) {\n this.appendTab(Tab.PaintProfiler, i18nString(UIStrings.paintProfiler), paintProfilerView, true);\n }\n this.tabbedPane.selectTab(Tab.PaintProfiler, true);\n }\n\n private appendDetailsTabsForTraceEventAndShowDetails(event: TraceEngine.Legacy.CompatibleTraceEvent, content: Node):\n void {\n this.setContent(content);\n // TODO: once the legacy engine types are fully removed, this conditional\n // can be removed.\n if (TraceEngine.Legacy.eventIsFromNewEngine(event)) {\n if (TraceEngine.Types.TraceEvents.isTraceEventPaint(event) ||\n TraceEngine.Types.TraceEvents.isTraceEventRasterTask(event)) {\n this.showEventInPaintProfiler(event);\n }\n }\n }\n\n private showEventInPaintProfiler(event: TraceEngine.Types.TraceEvents.TraceEventData): void {\n const paintProfilerModel =\n SDK.TargetManager.TargetManager.instance().models(SDK.PaintProfiler.PaintProfilerModel)[0];\n if (!paintProfilerModel) {\n return;\n }\n const paintProfilerView = this.paintProfilerView();\n if (!paintProfilerView) {\n return;\n }\n const hasProfileData = paintProfilerView.setEvent(paintProfilerModel, event);\n if (!hasProfileData) {\n return;\n }\n if (this.tabbedPane.hasTab(Tab.PaintProfiler)) {\n return;\n }\n this.appendTab(Tab.PaintProfiler, i18nString(UIStrings.paintProfiler), paintProfilerView);\n }\n\n private updateSelectedRangeStats(startTime: number, endTime: number): void {\n if (!this.model || !this.#selectedEvents) {\n return;\n }\n const aggregatedStats = TimelineUIUtils.statsForTimeRange(this.#selectedEvents, startTime, endTime);\n const startOffset = startTime - this.model.timelineModel().minimumRecordTime();\n const endOffset = endTime - this.model.timelineModel().minimumRecordTime();\n\n const contentHelper = new TimelineDetailsContentHelper(null, null);\n contentHelper.addSection(i18nString(\n UIStrings.rangeSS,\n {PH1: i18n.TimeUtilities.millisToString(startOffset), PH2: i18n.TimeUtilities.millisToString(endOffset)}));\n const pieChart = TimelineUIUtils.generatePieChart(aggregatedStats);\n contentHelper.appendElementRow('', pieChart);\n this.setContent(contentHelper.fragment);\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Tab {\n Details = 'Details',\n EventLog = 'EventLog',\n CallTree = 'CallTree',\n BottomUp = 'BottomUp',\n PaintProfiler = 'PaintProfiler',\n LayerViewer = 'LayerViewer',\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineDetailsView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineDetailsView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6CAA6C,CAAC;AAC3E,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,wBAAwB,EAAE,wBAAwB,EAAwB,MAAM,uBAAuB,CAAC;AAChH,OAAO,EAAC,4BAA4B,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAEnF,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,QAAQ,EAAE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,CAAC,eAAe,CAAC,CAAC;QACnE,aAAa,CAAC,gBAAgB,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;CACF;AAED,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,GAOX;AAPD,WAAY,GAAG;IACb,0BAAmB,CAAA;IACnB,4BAAqB,CAAA;IACrB,4BAAqB,CAAA;IACrB,4BAAqB,CAAA;IACrB,sCAA+B,CAAA;IAC/B,kCAA2B,CAAA;AAC7B,CAAC,EAPW,GAAG,KAAH,GAAG,QAOd","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {EventsTimelineTreeView} from './EventsTimelineTreeView.js';\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {TimelineLayersView} from './TimelineLayersView.js';\nimport {TimelinePaintProfilerView} from './TimelinePaintProfilerView.js';\nimport {type TimelineModeViewDelegate} from './TimelinePanel.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport {BottomUpTimelineTreeView, CallTreeTimelineTreeView, type TimelineTreeView} from './TimelineTreeView.js';\nimport {TimelineDetailsContentHelper, TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text for the summary view\n */\n summary: 'Summary',\n /**\n *@description Text in Timeline Details View of the Performance panel\n */\n bottomup: 'Bottom-Up',\n /**\n *@description Text in Timeline Details View of the Performance panel\n */\n callTree: 'Call Tree',\n /**\n *@description Text in Timeline Details View of the Performance panel\n */\n eventLog: 'Event Log',\n /**\n *@description Title of the paint profiler, old name of the performance pane\n */\n paintProfiler: 'Paint Profiler',\n /**\n *@description Title of the Layers tool\n */\n layers: 'Layers',\n /**\n *@description Text in Timeline Details View of the Performance panel\n *@example {1ms} PH1\n *@example {10ms} PH2\n */\n rangeSS: 'Range: {PH1} – {PH2}',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineDetailsView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class TimelineDetailsView extends UI.Widget.VBox {\n private readonly detailsLinkifier: Components.Linkifier.Linkifier;\n private tabbedPane: UI.TabbedPane.TabbedPane;\n private readonly defaultDetailsWidget: UI.Widget.VBox;\n private readonly defaultDetailsContentElement: HTMLElement;\n private rangeDetailViews: Map;\n private model!: PerformanceModel;\n #selectedEvents?: TraceEngine.Types.TraceEvents.TraceEventData[]|null;\n private lazyPaintProfilerView?: TimelinePaintProfilerView|null;\n private lazyLayersView?: TimelineLayersView|null;\n private preferredTabId?: string;\n private selection?: TimelineSelection|null;\n private updateContentsScheduled: boolean;\n #traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null = null;\n #filmStrip: TraceEngine.Extras.FilmStrip.Data|null = null;\n #onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this);\n\n constructor(delegate: TimelineModeViewDelegate) {\n super();\n this.element.classList.add('timeline-details');\n\n this.detailsLinkifier = new Components.Linkifier.Linkifier();\n\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n this.tabbedPane.show(this.element);\n\n this.defaultDetailsWidget = new UI.Widget.VBox();\n this.defaultDetailsWidget.element.classList.add('timeline-details-view');\n this.defaultDetailsContentElement =\n this.defaultDetailsWidget.element.createChild('div', 'timeline-details-view-body vbox');\n this.appendTab(Tab.Details, i18nString(UIStrings.summary), this.defaultDetailsWidget);\n this.setPreferredTab(Tab.Details);\n\n this.rangeDetailViews = new Map();\n this.updateContentsScheduled = false;\n\n const bottomUpView = new BottomUpTimelineTreeView();\n this.appendTab(Tab.BottomUp, i18nString(UIStrings.bottomup), bottomUpView);\n this.rangeDetailViews.set(Tab.BottomUp, bottomUpView);\n\n const callTreeView = new CallTreeTimelineTreeView();\n this.appendTab(Tab.CallTree, i18nString(UIStrings.callTree), callTreeView);\n this.rangeDetailViews.set(Tab.CallTree, callTreeView);\n\n const eventsView = new EventsTimelineTreeView(delegate);\n this.appendTab(Tab.EventLog, i18nString(UIStrings.eventLog), eventsView);\n this.rangeDetailViews.set(Tab.EventLog, eventsView);\n\n this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this.tabSelected, this);\n\n TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound);\n }\n\n getDetailsContentElementForTest(): HTMLElement {\n return this.defaultDetailsContentElement;\n }\n\n #onTraceBoundsChange(event: TraceBounds.TraceBounds.StateChangedEvent): void {\n if (event.updateType === 'RESET' || event.updateType === 'VISIBLE_WINDOW') {\n // If the update type was a changing of the minimap bounds, we do not\n // need to redraw.\n if (!this.selection) {\n this.scheduleUpdateContentsFromWindow();\n }\n }\n }\n\n async setModel(\n model: PerformanceModel|null, traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n selectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[]|null): Promise {\n if (this.model !== model) {\n this.model = (model as PerformanceModel);\n }\n this.#traceEngineData = traceEngineData;\n if (traceEngineData) {\n this.#filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(traceEngineData);\n }\n this.#selectedEvents = selectedEvents;\n this.tabbedPane.closeTabs([Tab.PaintProfiler, Tab.LayerViewer], false);\n for (const view of this.rangeDetailViews.values()) {\n view.setModelWithEvents(model, selectedEvents, traceEngineData);\n }\n this.lazyPaintProfilerView = null;\n this.lazyLayersView = null;\n await this.setSelection(null);\n }\n\n private setContent(node: Node): void {\n const allTabs = this.tabbedPane.otherTabs(Tab.Details);\n for (let i = 0; i < allTabs.length; ++i) {\n if (!this.rangeDetailViews.has(allTabs[i])) {\n this.tabbedPane.closeTab(allTabs[i]);\n }\n }\n this.defaultDetailsContentElement.removeChildren();\n this.defaultDetailsContentElement.appendChild(node);\n }\n\n private updateContents(): void {\n const view = this.rangeDetailViews.get(this.tabbedPane.selectedTabId || '');\n if (view) {\n const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (!traceBoundsState) {\n return;\n }\n const visibleWindow = traceBoundsState.milli.timelineTraceWindow;\n view.updateContents(this.selection || TimelineSelection.fromRange(visibleWindow.min, visibleWindow.max));\n }\n }\n\n private appendTab(id: string, tabTitle: string, view: UI.Widget.Widget, isCloseable?: boolean): void {\n this.tabbedPane.appendTab(id, tabTitle, view, undefined, undefined, isCloseable);\n if (this.preferredTabId !== this.tabbedPane.selectedTabId) {\n this.tabbedPane.selectTab(id);\n }\n }\n\n headerElement(): Element {\n return this.tabbedPane.headerElement();\n }\n\n setPreferredTab(tabId: string): void {\n this.preferredTabId = tabId;\n }\n\n /**\n * This forces a recalculation and rerendering of the timings\n * breakdown of a track.\n * User actions like zooming or scrolling can trigger many updates in\n * short time windows, so we debounce the calls in those cases. Single\n * sporadic calls (like selecting a new track) don't need to be\n * debounced. The forceImmediateUpdate param configures the debouncing\n * behaviour.\n */\n private scheduleUpdateContentsFromWindow(forceImmediateUpdate: boolean = false): void {\n if (!this.model) {\n this.setContent(UI.Fragment.html`
`);\n return;\n }\n if (forceImmediateUpdate) {\n this.updateContentsFromWindow();\n return;\n }\n\n // Debounce this update as it's not critical.\n if (!this.updateContentsScheduled) {\n this.updateContentsScheduled = true;\n setTimeout(() => {\n this.updateContentsScheduled = false;\n this.updateContentsFromWindow();\n }, 100);\n }\n }\n\n private updateContentsFromWindow(): void {\n const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (!traceBoundsState) {\n return;\n }\n const visibleWindow = traceBoundsState.milli.timelineTraceWindow;\n this.updateSelectedRangeStats(visibleWindow.min, visibleWindow.max);\n this.updateContents();\n }\n\n #getFilmStripFrame(frame: TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame): TraceEngine.Extras.FilmStrip.Frame\n |null {\n if (!this.#filmStrip) {\n return null;\n }\n const screenshotTime = (frame.idle ? frame.startTime : frame.endTime);\n const filmStripFrame = TraceEngine.Extras.FilmStrip.frameClosestToTimestamp(this.#filmStrip, screenshotTime);\n if (!filmStripFrame) {\n return null;\n }\n const frameTimeMilliSeconds =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(filmStripFrame.screenshotEvent.ts);\n return frameTimeMilliSeconds - frame.endTime < 10 ? filmStripFrame : null;\n }\n\n async setSelection(selection: TimelineSelection|null): Promise {\n this.detailsLinkifier.reset();\n this.selection = selection;\n if (!this.selection) {\n // Update instantly using forceImmediateUpdate, since we are only\n // making a single call and don't need to debounce.\n this.scheduleUpdateContentsFromWindow(/* forceImmediateUpdate */ true);\n return;\n }\n const selectionObject = this.selection.object;\n if (TimelineSelection.isSyntheticNetworkRequestDetailsEventSelection(selectionObject)) {\n const event = selectionObject;\n const networkDetails = await TimelineUIUtils.buildSyntheticNetworkRequestDetails(\n event, this.model.timelineModel(), this.detailsLinkifier);\n this.setContent(networkDetails);\n } else if (TimelineSelection.isTraceEventSelection(selectionObject)) {\n const event = selectionObject;\n const traceEventDetails = await TimelineUIUtils.buildTraceEventDetails(\n event, this.model.timelineModel(), this.detailsLinkifier, true, this.#traceEngineData);\n this.appendDetailsTabsForTraceEventAndShowDetails(event, traceEventDetails);\n } else if (TimelineSelection.isFrameObject(selectionObject)) {\n const frame = selectionObject;\n const matchedFilmStripFrame = this.#getFilmStripFrame(frame);\n this.setContent(TimelineUIUtils.generateDetailsContentForFrame(frame, this.#filmStrip, matchedFilmStripFrame));\n const target = SDK.TargetManager.TargetManager.instance().rootTarget();\n if (frame.layerTree && target) {\n const layerTreeForFrame = new TimelineModel.TracingLayerTree.TracingFrameLayerTree(target, frame.layerTree);\n const layersView = this.layersView();\n layersView.showLayerTree(layerTreeForFrame);\n if (!this.tabbedPane.hasTab(Tab.LayerViewer)) {\n this.appendTab(Tab.LayerViewer, i18nString(UIStrings.layers), layersView);\n }\n }\n } else if (TimelineSelection.isRangeSelection(selectionObject)) {\n this.updateSelectedRangeStats(this.selection.startTime, this.selection.endTime);\n }\n\n this.updateContents();\n }\n\n private tabSelected(event: Common.EventTarget.EventTargetEvent): void {\n if (!event.data.isUserGesture) {\n return;\n }\n this.setPreferredTab(event.data.tabId);\n this.updateContents();\n }\n\n private layersView(): TimelineLayersView {\n if (this.lazyLayersView) {\n return this.lazyLayersView;\n }\n this.lazyLayersView =\n new TimelineLayersView(this.model.timelineModel(), this.showSnapshotInPaintProfiler.bind(this));\n return this.lazyLayersView;\n }\n\n private paintProfilerView(): TimelinePaintProfilerView|null {\n if (this.lazyPaintProfilerView) {\n return this.lazyPaintProfilerView;\n }\n if (!this.#traceEngineData) {\n return null;\n }\n this.lazyPaintProfilerView = new TimelinePaintProfilerView(this.#traceEngineData);\n return this.lazyPaintProfilerView;\n }\n\n private showSnapshotInPaintProfiler(snapshot: SDK.PaintProfiler.PaintProfilerSnapshot): void {\n const paintProfilerView = this.paintProfilerView();\n if (!paintProfilerView) {\n return;\n }\n paintProfilerView.setSnapshot(snapshot);\n if (!this.tabbedPane.hasTab(Tab.PaintProfiler)) {\n this.appendTab(Tab.PaintProfiler, i18nString(UIStrings.paintProfiler), paintProfilerView, true);\n }\n this.tabbedPane.selectTab(Tab.PaintProfiler, true);\n }\n\n private appendDetailsTabsForTraceEventAndShowDetails(event: TraceEngine.Legacy.CompatibleTraceEvent, content: Node):\n void {\n this.setContent(content);\n // TODO: once the legacy engine types are fully removed, this conditional\n // can be removed.\n if (TraceEngine.Legacy.eventIsFromNewEngine(event)) {\n if (TraceEngine.Types.TraceEvents.isTraceEventPaint(event) ||\n TraceEngine.Types.TraceEvents.isTraceEventRasterTask(event)) {\n this.showEventInPaintProfiler(event);\n }\n }\n }\n\n private showEventInPaintProfiler(event: TraceEngine.Types.TraceEvents.TraceEventData): void {\n const paintProfilerModel =\n SDK.TargetManager.TargetManager.instance().models(SDK.PaintProfiler.PaintProfilerModel)[0];\n if (!paintProfilerModel) {\n return;\n }\n const paintProfilerView = this.paintProfilerView();\n if (!paintProfilerView) {\n return;\n }\n const hasProfileData = paintProfilerView.setEvent(paintProfilerModel, event);\n if (!hasProfileData) {\n return;\n }\n if (this.tabbedPane.hasTab(Tab.PaintProfiler)) {\n return;\n }\n this.appendTab(Tab.PaintProfiler, i18nString(UIStrings.paintProfiler), paintProfilerView);\n }\n\n private updateSelectedRangeStats(startTime: number, endTime: number): void {\n if (!this.model || !this.#selectedEvents) {\n return;\n }\n const aggregatedStats = TimelineUIUtils.statsForTimeRange(this.#selectedEvents, startTime, endTime);\n const startOffset = startTime - this.model.timelineModel().minimumRecordTime();\n const endOffset = endTime - this.model.timelineModel().minimumRecordTime();\n\n const contentHelper = new TimelineDetailsContentHelper(null, null);\n contentHelper.addSection(i18nString(\n UIStrings.rangeSS,\n {PH1: i18n.TimeUtilities.millisToString(startOffset), PH2: i18n.TimeUtilities.millisToString(endOffset)}));\n const pieChart = TimelineUIUtils.generatePieChart(aggregatedStats);\n contentHelper.appendElementRow('', pieChart);\n this.setContent(contentHelper.fragment);\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Tab {\n Details = 'Details',\n EventLog = 'EventLog',\n CallTree = 'CallTree',\n BottomUp = 'BottomUp',\n PaintProfiler = 'PaintProfiler',\n LayerViewer = 'LayerViewer',\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineFlameChartDataProvider.d.ts b/public/panels/timeline/TimelineFlameChartDataProvider.d.ts index 113506b3e..73c19d636 100644 --- a/public/panels/timeline/TimelineFlameChartDataProvider.d.ts +++ b/public/panels/timeline/TimelineFlameChartDataProvider.d.ts @@ -24,7 +24,6 @@ export declare class TimelineFlameChartDataProvider extends Common.ObjectWrapper private readonly staticHeader; private framesHeader; private readonly screenshotsHeader; - private readonly flowEventIndexById; private entryData; private entryTypeByLevel; private screenshotImageCache; @@ -54,7 +53,7 @@ export declare class TimelineFlameChartDataProvider extends Common.ObjectWrapper expandedTracks?: Set; }): void; groupTrack(group: PerfUI.FlameChart.Group): TimelineModel.TimelineModel.Track | null; - groupTreeEvents(group: PerfUI.FlameChart.Group): TraceEngine.Legacy.CompatibleTraceEvent[] | null; + groupTreeEvents(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[] | null; mainFrameNavigationStartEvents(): readonly TraceEngine.Types.TraceEvents.TraceEventNavigationStart[]; entryTitle(entryIndex: number): string | null; textColor(index: number): string; diff --git a/public/panels/timeline/TimelineFlameChartDataProvider.js b/public/panels/timeline/TimelineFlameChartDataProvider.js index f1c12f51a..308f25326 100644 --- a/public/panels/timeline/TimelineFlameChartDataProvider.js +++ b/public/panels/timeline/TimelineFlameChartDataProvider.js @@ -37,6 +37,7 @@ import * as TraceEngine from '../../models/trace/trace.js'; import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js'; +import { ActiveFilters } from './ActiveFilters.js'; import { CompatibilityTracksAppender } from './CompatibilityTracksAppender.js'; import * as Components from './components/components.js'; import { eventInitiatorPairsToDraw } from './Initiators.js'; @@ -138,7 +139,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW staticHeader; framesHeader; screenshotsHeader; - flowEventIndexById; entryData; entryTypeByLevel; screenshotImageCache; @@ -186,7 +186,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container'); } }); - this.flowEventIndexById = new Map(); } modifyTree(group, node, action, flameChartView) { const entry = this.entryData[node]; @@ -231,7 +230,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW throw new Error('Attempted to instantiate a CompatibilityTracksAppender without having set the trace parse data first.'); } this.timelineDataInternal = this.#instantiateTimelineData(); - this.compatibilityTracksAppender = new CompatibilityTracksAppender(this.timelineDataInternal, this.traceEngineData, this.entryData, this.entryTypeByLevel, this.legacyTimelineModel, this.isCpuProfile); + this.compatibilityTracksAppender = new CompatibilityTracksAppender(this.timelineDataInternal, this.traceEngineData, this.entryData, this.entryTypeByLevel, this.legacyTimelineModel); } return this.compatibilityTracksAppender; } @@ -267,8 +266,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW return group.track || null; } groupTreeEvents(group) { - const eventsFromAppenderSystem = this.compatibilityTracksAppender?.groupEventsForTreeView(group); - return eventsFromAppenderSystem || group.track?.eventsForTreeView() || null; + return this.compatibilityTracksAppender?.groupEventsForTreeView(group) ?? null; } mainFrameNavigationStartEvents() { if (!this.traceEngineData) { @@ -356,7 +354,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW if (rebuild) { this.reset(/* resetCompatibilityTracksAppender= */ false); } - this.flowEventIndexById.clear(); this.currentLevel = 0; if (this.traceEngineData) { this.compatibilityTracksAppender = this.compatibilityTracksAppenderInstance(); @@ -455,7 +452,8 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW // If it is, we mark the group as selected. if (this.timelineDataInternal && !this.timelineDataInternal.selectedGroup) { if (appender instanceof ThreadAppender && - (appender.threadType === "MAIN_THREAD" /* ThreadType.MAIN_THREAD */ || appender.threadType === "CPU_PROFILE" /* ThreadType.CPU_PROFILE */)) { + (appender.threadType === "MAIN_THREAD" /* TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD */ || + appender.threadType === "CPU_PROFILE" /* TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE */)) { const group = this.compatibilityTracksAppender?.groupForAppender(appender); if (group) { this.timelineDataInternal.selectedGroup = group; @@ -466,7 +464,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW if (this.timelineDataInternal && this.timelineDataInternal.selectedGroup) { this.timelineDataInternal.selectedGroup.expanded = true; } - this.flowEventIndexById.clear(); } #addDecorationToEvent(eventIndex, decoration) { if (!this.timelineDataInternal) { @@ -614,7 +611,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW if (TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase)) { continue; } - if (!this.legacyPerformanceModel.isVisible(event)) { + if (!ActiveFilters.instance().isVisible(event)) { continue; } } @@ -683,7 +680,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW let group = null; for (let i = 0; i < events.length; ++i) { const asyncEvent = events[i]; - if (!this.legacyPerformanceModel || !this.legacyPerformanceModel.isVisible(asyncEvent)) { + if (!this.legacyPerformanceModel || !ActiveFilters.instance().isVisible(asyncEvent)) { continue; } if (!group && title) { diff --git a/public/panels/timeline/TimelineFlameChartDataProvider.js.map b/public/panels/timeline/TimelineFlameChartDataProvider.js.map index 601d2863a..295811f07 100644 --- a/public/panels/timeline/TimelineFlameChartDataProvider.js.map +++ b/public/panels/timeline/TimelineFlameChartDataProvider.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineFlameChartDataProvider.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineFlameChartDataProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO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iD,CAAC;SACnF;QACD,IAAI,SAAS,KAAK,SAAS,CAAC,KAAK,EAAE;YACjC,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAA6B,CAAC;SAC/D;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB,CAAC,aAAyD;QAC5E,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,kCAAkC;IAClC,6DAA6D;IAC7D,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAEnD,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,MAEX;AAFD,WAAY,MAAM;IAChB,qCAA2B,CAAA;AAC7B,CAAC,EAFW,MAAM,KAAN,MAAM,QAEjB;AAMD,oEAAoE;AACpE,wEAAwE;AACxE,sEAAsE;AACtE,kEAAkE;AAClE,mEAAmE;AACnE,wEAAwE;AACxE,mCAAmC;AACnC,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,4CAA+B,CAAA;IAC/B,sCAAyB,CAAA;AAC3B,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB","sourcesContent":["/*\n * Copyright (C) 2014 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {CompatibilityTracksAppender, type TrackAppenderName} from './CompatibilityTracksAppender.js';\nimport * as Components from './components/components.js';\nimport {type TimelineCategory} from './EventUICategory.js';\nimport {eventInitiatorPairsToDraw} from './Initiators.js';\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {ThreadAppender, ThreadType} from './ThreadAppender.js';\nimport timelineFlamechartPopoverStyles from './timelineFlamechartPopover.css.js';\nimport {FlameChartStyle, Selection} from './TimelineFlameChartView.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n onIgnoreList: 'On ignore list',\n /**\n * @description Text in Timeline Flame Chart Data Provider of the Performance panel *\n * @example{example.com} PH1\n */\n mainS: 'Main — {PH1}',\n /**\n * @description Text that refers to the main target\n */\n main: 'Main',\n /**\n * @description Text in Timeline Flame Chart Data Provider of the Performance panel * @example {https://example.com} PH1\n */\n frameS: 'Frame — {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n subframe: 'Subframe',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n raster: 'Raster',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n *@example {2} PH1\n */\n rasterizerThreadS: 'Rasterizer Thread {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n thread: 'Thread',\n /**\n *@description Text for rendering frames\n */\n frames: 'Frames',\n /**\n * @description Text in the Performance panel to show how long was spent in a particular part of the code.\n * The first placeholder is the total time taken for this node and all children, the second is the self time\n * (time taken in this node, without children included).\n *@example {10ms} PH1\n *@example {10ms} PH2\n */\n sSelfS: '{PH1} (self {PH2})',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n idleFrame: 'Idle Frame',\n /**\n *@description Text in Timeline Frame Chart Data Provider of the Performance panel\n */\n droppedFrame: 'Dropped Frame',\n /**\n *@description Text in Timeline Frame Chart Data Provider of the Performance panel\n */\n partiallyPresentedFrame: 'Partially Presented Frame',\n /**\n *@description Text for a rendering frame\n */\n frame: 'Frame',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineFlameChartDataProvider.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// at the moment there are two types defined for trace events: traceeventdata and\n// SDK.TracingModel.Event. This is only for compatibility between the legacy system\n// and the new system proposed in go/rpp-flamechart-arch. In the future, once all\n// tracks have been migrated to the new system, all entries will be of the\n// TraceEventData type.\nexport type TimelineFlameChartEntry =\n (TraceEngine.Legacy.Event|TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame|\n TraceEngine.Types.TraceEvents.TraceEventData);\nexport class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectWrapper implements\n PerfUI.FlameChart.FlameChartDataProvider {\n private droppedFramePatternCanvas: HTMLCanvasElement;\n private partialFramePatternCanvas: HTMLCanvasElement;\n private timelineDataInternal: PerfUI.FlameChart.FlameChartTimelineData|null;\n private currentLevel: number;\n\n // The Performance and the Timeline models are expected to be\n // deprecated in favor of using traceEngineData (new RPP engine) only\n // as part of the work in crbug.com/1386091. For this reason they\n // have the \"legacy\" prefix on their name.\n private legacyPerformanceModel: PerformanceModel|null;\n private compatibilityTracksAppender: CompatibilityTracksAppender|null;\n private legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl|null;\n private traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null;\n private isCpuProfile = false;\n /**\n * Raster threads are tracked and enumerated with this property. This is also\n * used to group all raster threads together in the same track, instead of\n * rendering a track for thread.\n */\n #rasterCount: number = 0;\n\n private minimumBoundaryInternal: number;\n private timeSpan: number;\n private readonly headerLevel1: PerfUI.FlameChart.GroupStyle;\n private readonly headerLevel2: PerfUI.FlameChart.GroupStyle;\n private readonly staticHeader: PerfUI.FlameChart.GroupStyle;\n private framesHeader: PerfUI.FlameChart.GroupStyle;\n private readonly screenshotsHeader: PerfUI.FlameChart.GroupStyle;\n private readonly flowEventIndexById: Map;\n private entryData!: TimelineFlameChartEntry[];\n private entryTypeByLevel!: EntryType[];\n private screenshotImageCache!: Map;\n private entryIndexToTitle!: string[];\n private asyncColorByCategory!: Map;\n private lastInitiatorEntry!: number;\n private entryParent!: TraceEngine.Legacy.Event[];\n private lastSelection?: Selection;\n private colorForEvent?: ((arg0: TraceEngine.Legacy.Event) => string);\n #eventToDisallowRoot = new WeakMap();\n #font: string;\n\n #eventIndexByEvent: WeakMap = new WeakMap();\n\n constructor() {\n super();\n this.reset();\n this.#font = `${PerfUI.Font.DEFAULT_FONT_SIZE} ${PerfUI.Font.getFontFamilyForCanvas()}`;\n this.droppedFramePatternCanvas = document.createElement('canvas');\n this.partialFramePatternCanvas = document.createElement('canvas');\n this.preparePatternCanvas();\n this.timelineDataInternal = null;\n this.currentLevel = 0;\n this.legacyPerformanceModel = null;\n this.legacyTimelineModel = null;\n this.compatibilityTracksAppender = null;\n this.traceEngineData = null;\n this.minimumBoundaryInternal = 0;\n this.timeSpan = 0;\n\n this.headerLevel1 = this.buildGroupStyle({shareHeaderLine: false});\n this.headerLevel2 = this.buildGroupStyle({padding: 2, nestingLevel: 1, collapsible: false});\n this.staticHeader = this.buildGroupStyle({collapsible: false});\n this.framesHeader = this.buildGroupStyle({useFirstLineForOverview: true});\n this.screenshotsHeader =\n this.buildGroupStyle({useFirstLineForOverview: true, nestingLevel: 1, collapsible: false, itemsHeight: 150});\n\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n const headers = [\n this.headerLevel1,\n this.headerLevel2,\n this.staticHeader,\n this.framesHeader,\n this.screenshotsHeader,\n ];\n for (const header of headers) {\n header.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');\n header.backgroundColor =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n }\n });\n\n this.flowEventIndexById = new Map();\n }\n\n modifyTree(\n group: PerfUI.FlameChart.Group, node: number, action: TraceEngine.EntriesFilter.FilterAction,\n flameChartView: PerfUI.FlameChart.FlameChart): void {\n const entry = this.entryData[node] as TraceEngine.Types.TraceEvents.TraceEntry;\n this.compatibilityTracksAppender?.modifyTree(group, entry, action, flameChartView);\n }\n\n private buildGroupStyle(extra: Object): PerfUI.FlameChart.GroupStyle {\n const defaultGroupStyle = {\n padding: 4,\n height: 17,\n collapsible: true,\n color: ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface'),\n backgroundColor: ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container'),\n nestingLevel: 0,\n shareHeaderLine: true,\n };\n return Object.assign(defaultGroupStyle, extra);\n }\n\n setModel(\n performanceModel: PerformanceModel|null, newTraceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n isCpuProfile = false): void {\n this.reset();\n this.legacyPerformanceModel = performanceModel;\n this.legacyTimelineModel = performanceModel && performanceModel.timelineModel();\n this.traceEngineData = newTraceEngineData;\n\n this.isCpuProfile = isCpuProfile;\n if (newTraceEngineData) {\n const {traceBounds} = newTraceEngineData.Meta;\n const minTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceBounds.min);\n const maxTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceBounds.max);\n this.minimumBoundaryInternal = minTime;\n this.timeSpan = minTime === maxTime ? 1000 : maxTime - this.minimumBoundaryInternal;\n }\n }\n\n /**\n * Instances and caches a CompatibilityTracksAppender using the\n * internal flame chart data and the trace parsed data coming from the\n * trace engine.\n * The model data must have been set to the data provider instance before\n * attempting to instance the CompatibilityTracksAppender.\n */\n compatibilityTracksAppenderInstance(forceNew = false): CompatibilityTracksAppender {\n if (!this.compatibilityTracksAppender || forceNew) {\n if (!this.traceEngineData || !this.legacyTimelineModel) {\n throw new Error(\n 'Attempted to instantiate a CompatibilityTracksAppender without having set the trace parse data first.');\n }\n this.timelineDataInternal = this.#instantiateTimelineData();\n this.compatibilityTracksAppender = new CompatibilityTracksAppender(\n this.timelineDataInternal, this.traceEngineData, this.entryData, this.entryTypeByLevel,\n this.legacyTimelineModel, this.isCpuProfile);\n }\n return this.compatibilityTracksAppender;\n }\n\n /**\n * Returns the instance of the timeline flame chart data, without\n * adding data to it. In case the timeline data hasn't been instanced\n * creates a new instance and returns it.\n */\n #instantiateTimelineData(): PerfUI.FlameChart.FlameChartTimelineData {\n if (!this.timelineDataInternal) {\n this.timelineDataInternal = PerfUI.FlameChart.FlameChartTimelineData.createEmpty();\n }\n return this.timelineDataInternal;\n }\n\n /**\n * Builds the flame chart data using the track appenders\n */\n buildFromTrackAppenders(options?: {filterThreadsByName?: string, expandedTracks?: Set}): void {\n if (!this.compatibilityTracksAppender) {\n return;\n }\n const appenders = this.compatibilityTracksAppender.allVisibleTrackAppenders();\n for (const appender of appenders) {\n const skipThreadAppenderByName =\n appender instanceof ThreadAppender && !appender.trackName().includes(options?.filterThreadsByName || '');\n if (skipThreadAppenderByName) {\n continue;\n }\n const expanded = Boolean(options?.expandedTracks?.has(appender.appenderName));\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel, expanded);\n }\n }\n\n groupTrack(group: PerfUI.FlameChart.Group): TimelineModel.TimelineModel.Track|null {\n return group.track || null;\n }\n\n groupTreeEvents(group: PerfUI.FlameChart.Group): TraceEngine.Legacy.CompatibleTraceEvent[]|null {\n const eventsFromAppenderSystem = this.compatibilityTracksAppender?.groupEventsForTreeView(group);\n return eventsFromAppenderSystem || group.track?.eventsForTreeView() || null;\n }\n\n mainFrameNavigationStartEvents(): readonly TraceEngine.Types.TraceEvents.TraceEventNavigationStart[] {\n if (!this.traceEngineData) {\n return [];\n }\n return this.traceEngineData.Meta.mainFrameNavigations;\n }\n\n entryTitle(entryIndex: number): string|null {\n const entryTypes = EntryType;\n const entryType = this.entryType(entryIndex);\n if (entryType === entryTypes.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n if (event.phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_INTO ||\n event.phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_PAST) {\n return event.name + ':' + event.args['step'];\n }\n if (this.#eventToDisallowRoot.get(event)) {\n return i18nString(UIStrings.onIgnoreList);\n }\n return TimelineUIUtils.eventTitle(event);\n }\n if (entryType === entryTypes.Screenshot) {\n return '';\n }\n if (entryType === entryTypes.TrackAppender) {\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n return this.compatibilityTracksAppender?.titleForEvent(event, eventLevel) || null;\n }\n let title: Common.UIString.LocalizedString|string = this.entryIndexToTitle[entryIndex];\n if (!title) {\n title = `Unexpected entryIndex ${entryIndex}`;\n console.error(title);\n }\n return title;\n }\n\n textColor(index: number): string {\n const event = this.entryData[index];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(event)) {\n return FlameChartStyle.textColor;\n }\n return this.isIgnoreListedEvent(event) ? '#888' : FlameChartStyle.textColor;\n }\n\n entryFont(_index: number): string|null {\n return this.#font;\n }\n\n // resetCompatibilityTracksAppender boolean set to false does not recreate the thread appenders\n reset(resetCompatibilityTracksAppender: boolean = true): void {\n this.currentLevel = 0;\n this.entryData = [];\n this.entryParent = [];\n this.entryTypeByLevel = [];\n this.entryIndexToTitle = [];\n this.asyncColorByCategory = new Map();\n this.screenshotImageCache = new Map();\n this.#eventToDisallowRoot = new WeakMap();\n if (resetCompatibilityTracksAppender) {\n this.compatibilityTracksAppender = null;\n this.timelineDataInternal = null;\n } else if (!resetCompatibilityTracksAppender && this.timelineDataInternal) {\n this.compatibilityTracksAppender?.setFlameChartDataAndEntryData(\n this.timelineDataInternal, this.entryData, this.entryTypeByLevel);\n this.compatibilityTracksAppender?.threadAppenders().forEach(\n threadAppender => threadAppender.setHeaderAppended(false));\n }\n }\n\n maxStackDepth(): number {\n return this.currentLevel;\n }\n\n /**\n * Builds the flame chart data using the tracks appender (which use\n * the new trace engine) and the legacy code paths present in this\n * file. The result built data is cached and returned.\n */\n timelineData(rebuild: boolean = false): PerfUI.FlameChart.FlameChartTimelineData {\n if (this.timelineDataInternal && this.timelineDataInternal.entryLevels.length !== 0 && !rebuild) {\n // The flame chart data is built already, so return the cached\n // data.\n return this.timelineDataInternal;\n }\n\n this.timelineDataInternal = PerfUI.FlameChart.FlameChartTimelineData.createEmpty();\n if (!this.legacyTimelineModel) {\n return this.timelineDataInternal;\n }\n\n if (rebuild) {\n this.reset(/* resetCompatibilityTracksAppender= */ false);\n }\n\n this.flowEventIndexById.clear();\n this.currentLevel = 0;\n\n if (this.traceEngineData) {\n this.compatibilityTracksAppender = this.compatibilityTracksAppenderInstance();\n }\n if (this.legacyTimelineModel.isGenericTrace()) {\n this.processGenericTrace();\n } else {\n this.processInspectorTrace();\n }\n\n return this.timelineDataInternal;\n }\n\n private processGenericTrace(): void {\n const processGroupStyle = this.buildGroupStyle({shareHeaderLine: false});\n const threadGroupStyle = this.buildGroupStyle({padding: 2, nestingLevel: 1, shareHeaderLine: false});\n const eventEntryType = EntryType.Event;\n const tracksByProcess =\n new Platform.MapUtilities.Multimap();\n if (!this.legacyTimelineModel) {\n return;\n }\n for (const track of this.legacyTimelineModel.tracks()) {\n if (track.thread !== null) {\n tracksByProcess.set(track.thread.process(), track);\n } else {\n // The Timings track can reach this point, so we should probably do something more useful.\n console.error('Failed to process track');\n }\n }\n for (const process of tracksByProcess.keysArray()) {\n if (tracksByProcess.size > 1) {\n const name = `${process.name()} ${process.id()}`;\n this.appendHeader(name, processGroupStyle, false /* selectable */);\n }\n for (const track of tracksByProcess.get(process)) {\n const group = this.appendSyncEvents(\n track, track.events, track.name, threadGroupStyle, eventEntryType, true /* selectable */);\n if (this.timelineDataInternal &&\n (!this.timelineDataInternal.selectedGroup ||\n track.name === TimelineModel.TimelineModel.TimelineModelImpl.BrowserMainThreadName)) {\n this.timelineDataInternal.selectedGroup = group;\n }\n }\n }\n }\n\n private processInspectorTrace(): void {\n if (!this.isCpuProfile) {\n this.appendFrames();\n }\n\n const weight = (track: {type?: string, forMainFrame?: boolean, appenderName?: TrackAppenderName}): number => {\n if (track.appenderName !== undefined) {\n switch (track.appenderName) {\n case 'Animations':\n return 0;\n case 'Timings':\n return 1;\n case 'Interactions':\n return 2;\n case 'LayoutShifts':\n return 3;\n case 'GPU':\n return 8;\n case 'Thread':\n return 4;\n case 'Thread_AuctionWorklet':\n return 10;\n default:\n return -1;\n }\n }\n\n switch (track.type) {\n case TimelineModel.TimelineModel.TrackType.MainThread:\n return track.forMainFrame ? 5 : 6;\n case TimelineModel.TimelineModel.TrackType.Worker:\n return 7;\n case TimelineModel.TimelineModel.TrackType.Raster:\n return 9;\n case TimelineModel.TimelineModel.TrackType.Other:\n return 11;\n default:\n return -1;\n }\n };\n\n if (!this.legacyTimelineModel) {\n return;\n }\n const allTrackAppenders =\n this.compatibilityTracksAppender ? this.compatibilityTracksAppender.allVisibleTrackAppenders() : [];\n\n allTrackAppenders.sort((a, b) => weight(a) - weight(b));\n\n for (const appender of allTrackAppenders) {\n if (!this.traceEngineData) {\n continue;\n }\n\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel);\n\n // If there is not a selected group, we want to default to selecting the\n // main thread track. Therefore in this check we look to see if the\n // current appender is a ThreadAppender and represnets the Main Thread.\n // If it is, we mark the group as selected.\n if (this.timelineDataInternal && !this.timelineDataInternal.selectedGroup) {\n if (appender instanceof ThreadAppender &&\n (appender.threadType === ThreadType.MAIN_THREAD || appender.threadType === ThreadType.CPU_PROFILE)) {\n const group = this.compatibilityTracksAppender?.groupForAppender(appender);\n if (group) {\n this.timelineDataInternal.selectedGroup = group;\n }\n }\n }\n }\n if (this.timelineDataInternal && this.timelineDataInternal.selectedGroup) {\n this.timelineDataInternal.selectedGroup.expanded = true;\n }\n\n this.flowEventIndexById.clear();\n }\n\n #addDecorationToEvent(eventIndex: number, decoration: PerfUI.FlameChart.FlameChartDecoration): void {\n if (!this.timelineDataInternal) {\n return;\n }\n const decorationsForEvent = this.timelineDataInternal.entryDecorations[eventIndex] || [];\n decorationsForEvent.push(decoration);\n this.timelineDataInternal.entryDecorations[eventIndex] = decorationsForEvent;\n }\n\n /**\n * Appends a track in the flame chart using the legacy system.\n * @param track the legacy track to be rendered.\n * @param expanded if the track is expanded.\n */\n appendLegacyTrackData(track: TimelineModel.TimelineModel.Track, expanded?: boolean): void {\n this.#instantiateTimelineData();\n const eventEntryType = EntryType.Event;\n switch (track.type) {\n case TimelineModel.TimelineModel.TrackType.MainThread: {\n if (track.forMainFrame) {\n const group = this.appendSyncEvents(\n track, track.events,\n track.url ? i18nString(UIStrings.mainS, {PH1: track.url}) : i18nString(UIStrings.main), this.headerLevel1,\n eventEntryType, true /* selectable */, expanded);\n if (group && this.timelineDataInternal) {\n this.timelineDataInternal.selectedGroup = group;\n }\n } else {\n this.appendSyncEvents(\n track, track.events,\n track.url ? i18nString(UIStrings.frameS, {PH1: track.url}) : i18nString(UIStrings.subframe),\n this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n }\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Worker: {\n this.appendSyncEvents(\n track, track.events, track.name, this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Raster: {\n if (!this.#rasterCount) {\n this.appendHeader(i18nString(UIStrings.raster), this.headerLevel1, false /* selectable */, expanded);\n }\n ++this.#rasterCount;\n this.appendSyncEvents(\n track, track.events, i18nString(UIStrings.rasterizerThreadS, {PH1: this.#rasterCount}), this.headerLevel2,\n eventEntryType, true /* selectable */, expanded);\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Other: {\n this.appendSyncEvents(\n track, track.events, track.name || i18nString(UIStrings.thread), this.headerLevel1, eventEntryType,\n true /* selectable */, expanded);\n this.appendAsyncEventsGroup(\n track, track.name, track.asyncEvents, this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n break;\n }\n }\n }\n minimumBoundary(): number {\n return this.minimumBoundaryInternal;\n }\n\n totalTime(): number {\n return this.timeSpan;\n }\n\n /**\n * Narrows an entry of type TimelineFlameChartEntry to the 2 types of\n * simple trace events (legacy and new engine definitions).\n */\n static isEntryRegularEvent(entry: TimelineFlameChartEntry):\n entry is(TraceEngine.Types.TraceEvents.TraceEventData|TraceEngine.Legacy.Event) {\n return 'name' in entry;\n }\n\n search(startTime: number, endTime: number, filter: TimelineModel.TimelineModelFilter.TimelineModelFilter): number[] {\n const result = [];\n this.timelineData();\n for (let i = 0; i < this.entryData.length; ++i) {\n const entry = this.entryData[i];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(entry)) {\n continue;\n }\n if (!entry) {\n continue;\n }\n\n // Until all the tracks are powered by the new engine, we need to\n // consider that these entries could be either new engine or legacy\n // engine.\n const entryStartTime = TraceEngine.Legacy.eventIsFromNewEngine(entry) ?\n TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(entry).startTime :\n entry.startTime;\n const entryEndTime = TraceEngine.Legacy.eventIsFromNewEngine(entry) ?\n TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(entry).endTime :\n entry.endTime;\n\n if (entryStartTime > endTime) {\n continue;\n }\n if ((entryEndTime || entryStartTime) < startTime) {\n continue;\n }\n if (filter.accept(entry, this.traceEngineData || undefined)) {\n result.push(i);\n }\n }\n result.sort((a, b) => {\n let firstEvent: TimelineFlameChartEntry|null = this.entryData[a];\n let secondEvent: TimelineFlameChartEntry|null = this.entryData[b];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(firstEvent) ||\n !TimelineFlameChartDataProvider.isEntryRegularEvent(secondEvent)) {\n return 0;\n }\n firstEvent = firstEvent instanceof TraceEngine.Legacy.Event ?\n firstEvent :\n (this.compatibilityTracksAppender?.getLegacyEvent(firstEvent) || null);\n secondEvent = secondEvent instanceof TraceEngine.Legacy.Event ?\n secondEvent :\n (this.compatibilityTracksAppender?.getLegacyEvent(secondEvent) || null);\n if (!firstEvent || !secondEvent) {\n return 0;\n }\n return TraceEngine.Legacy.Event.compareStartTime(firstEvent, secondEvent);\n });\n return result;\n }\n\n private appendSyncEvents(\n track: TimelineModel.TimelineModel.Track|null, events: TraceEngine.Legacy.Event[], title: string|null,\n style: PerfUI.FlameChart.GroupStyle|null, entryType: EntryType, selectable: boolean,\n expanded?: boolean): PerfUI.FlameChart.Group|null {\n if (!events.length) {\n return null;\n }\n if (!this.legacyPerformanceModel || !this.legacyTimelineModel) {\n return null;\n }\n const openEvents = [];\n const ignoreListingEnabled = Root.Runtime.experiments.isEnabled('ignoreListJSFramesOnTimeline');\n let maxStackDepth = 0;\n let group: PerfUI.FlameChart.Group|null = null;\n if (track && track.type === TimelineModel.TimelineModel.TrackType.MainThread) {\n group = this.appendHeader((title as string), (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n group.track = track;\n }\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n const {duration: eventDuration} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n // TODO(crbug.com/1386091) this check should happen at the model level.\n // Skip Layout Shifts and TTI events when dealing with the main thread.\n if (this.legacyPerformanceModel) {\n const isInteractiveTime = this.legacyPerformanceModel.timelineModel().isInteractiveTimeEvent(event);\n const isLayoutShift = this.legacyPerformanceModel.timelineModel().isLayoutShiftEvent(event);\n const skippableEvent = isInteractiveTime || isLayoutShift;\n\n if (track && track.type === TimelineModel.TimelineModel.TrackType.MainThread && skippableEvent) {\n continue;\n }\n }\n\n if (!TraceEngine.Types.TraceEvents.isFlowPhase(event.phase)) {\n if (!event.endTime && event.phase !== TraceEngine.Types.TraceEvents.Phase.INSTANT) {\n continue;\n }\n if (TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase)) {\n continue;\n }\n if (!this.legacyPerformanceModel.isVisible(event)) {\n continue;\n }\n }\n // Handle events belonging to a stack. E.g. A call stack in the main thread flame chart.\n while (openEvents.length &&\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n ((openEvents[openEvents.length - 1] as TraceEngine.Legacy.Event).endTime) <= event.startTime) {\n openEvents.pop();\n }\n this.#eventToDisallowRoot.set(event, false);\n if (ignoreListingEnabled && this.isIgnoreListedEvent(event)) {\n const parent = openEvents[openEvents.length - 1];\n if (parent && this.#eventToDisallowRoot.get(parent)) {\n continue;\n }\n this.#eventToDisallowRoot.set(event, true);\n }\n if (!group && title) {\n group = this.appendHeader(title, (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n if (selectable) {\n group.track = track;\n }\n }\n\n const level = this.currentLevel + openEvents.length;\n const index = this.appendEvent(event, level);\n if (openEvents.length) {\n this.entryParent[index] = (openEvents[openEvents.length - 1] as TraceEngine.Legacy.Event);\n }\n\n const trackIsMainThreadMainFrame =\n Boolean(track?.forMainFrame && track?.type === TimelineModel.TimelineModel.TrackType.MainThread);\n // If we are dealing with the Main Thread, find any long tasks and add\n // the candy striping to them. Doing it here avoids having to do another\n // pass through the events at a later point.\n if (trackIsMainThreadMainFrame && event.name === TimelineModel.TimelineModel.RecordType.Task &&\n TraceEngine.Helpers.Timing.millisecondsToMicroseconds(eventDuration) >\n TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD) {\n this.#addDecorationToEvent(index, {\n type: 'CANDY',\n startAtTime: TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD,\n });\n }\n maxStackDepth = Math.max(maxStackDepth, openEvents.length + 1);\n if (event.endTime) {\n openEvents.push(event);\n }\n }\n this.entryTypeByLevel.length = this.currentLevel + maxStackDepth;\n this.entryTypeByLevel.fill(entryType, this.currentLevel);\n this.currentLevel += maxStackDepth;\n return group;\n }\n\n isIgnoreListedEvent(event: TraceEngine.Legacy.CompatibleTraceEvent): boolean {\n if (TraceEngine.Legacy.eventIsFromNewEngine(event) && TraceEngine.Types.TraceEvents.isProfileCall(event)) {\n return this.isIgnoreListedURL(event.callFrame.url as Platform.DevToolsPath.UrlString);\n }\n return false;\n }\n\n private isIgnoreListedURL(url: Platform.DevToolsPath.UrlString): boolean {\n return Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url);\n }\n\n private appendAsyncEventsGroup(\n track: TimelineModel.TimelineModel.Track|null, title: string|null, events: TraceEngine.Legacy.AsyncEvent[],\n style: PerfUI.FlameChart.GroupStyle|null, entryType: EntryType, selectable: boolean,\n expanded?: boolean): PerfUI.FlameChart.Group|null {\n if (!events.length) {\n return null;\n }\n const lastUsedTimeByLevel: number[] = [];\n let group: PerfUI.FlameChart.Group|null = null;\n for (let i = 0; i < events.length; ++i) {\n const asyncEvent = events[i];\n if (!this.legacyPerformanceModel || !this.legacyPerformanceModel.isVisible(asyncEvent)) {\n continue;\n }\n if (!group && title) {\n group = this.appendHeader(title, (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n if (selectable) {\n group.track = track;\n }\n }\n const startTime = asyncEvent.startTime;\n let level;\n for (level = 0; level < lastUsedTimeByLevel.length && lastUsedTimeByLevel[level] > startTime; ++level) {\n }\n this.appendAsyncEvent(asyncEvent, this.currentLevel + level);\n lastUsedTimeByLevel[level] = (asyncEvent.endTime as number);\n }\n this.entryTypeByLevel.length = this.currentLevel + lastUsedTimeByLevel.length;\n this.entryTypeByLevel.fill(entryType, this.currentLevel);\n this.currentLevel += lastUsedTimeByLevel.length;\n return group;\n }\n\n getEntryTypeForLevel(level: number): EntryType {\n return this.entryTypeByLevel[level];\n }\n\n private appendFrames(): void {\n if (!this.legacyPerformanceModel || !this.timelineDataInternal || !this.legacyTimelineModel ||\n !this.traceEngineData) {\n return;\n }\n\n // TODO: Long term we want to move both the Frames track and the screenshots\n // track into the TrackAppender system. However right now the frames track\n // expects data in a different form to how the new engine parses frame\n // information. Therefore we have migrated the screenshots to use the new\n // data model in place without creating a new TrackAppender. When we can\n // migrate the frames track to the new appender system, we can migrate the\n // screnshots then as well.\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(this.traceEngineData);\n const hasScreenshots = filmStrip.frames.length > 0;\n\n this.framesHeader.collapsible = hasScreenshots;\n const expanded = Root.Runtime.Runtime.queryParam('flamechart-force-expand') === 'frames';\n\n this.appendHeader(i18nString(UIStrings.frames), this.framesHeader, false /* selectable */, expanded);\n\n this.entryTypeByLevel[this.currentLevel] = EntryType.Frame;\n for (const frame of this.traceEngineData.Frames.frames) {\n this.#appendNewEngineFrame(frame);\n }\n ++this.currentLevel;\n\n if (!hasScreenshots) {\n return;\n }\n this.#appendScreenshots(filmStrip);\n }\n\n #appendScreenshots(filmStrip: TraceEngine.Extras.FilmStrip.Data): void {\n if (!this.timelineDataInternal || !this.legacyTimelineModel) {\n return;\n }\n this.appendHeader('', this.screenshotsHeader, false /* selectable */);\n this.entryTypeByLevel[this.currentLevel] = EntryType.Screenshot;\n let prevTimestamp: TraceEngine.Types.Timing.MilliSeconds|undefined = undefined;\n\n for (const filmStripFrame of filmStrip.frames) {\n const screenshotTimeInMilliSeconds =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(filmStripFrame.screenshotEvent.ts);\n this.entryData.push(filmStripFrame.screenshotEvent);\n (this.timelineDataInternal.entryLevels as number[]).push(this.currentLevel);\n (this.timelineDataInternal.entryStartTimes as number[]).push(screenshotTimeInMilliSeconds);\n if (prevTimestamp) {\n (this.timelineDataInternal.entryTotalTimes as number[]).push(screenshotTimeInMilliSeconds - prevTimestamp);\n }\n prevTimestamp = screenshotTimeInMilliSeconds;\n }\n if (filmStrip.frames.length && prevTimestamp !== undefined) {\n // Set the total time of the final screenshot so it takes up the remainder of the trace.\n (this.timelineDataInternal.entryTotalTimes as number[])\n .push(this.legacyTimelineModel.maximumRecordTime() - prevTimestamp);\n }\n ++this.currentLevel;\n }\n\n private entryType(entryIndex: number): EntryType {\n return this.entryTypeByLevel[(this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData)\n .entryLevels[entryIndex]];\n }\n\n prepareHighlightedEntryInfo(entryIndex: number): Element|null {\n let time = '';\n let title;\n let warningElements: Element[] = [];\n let nameSpanTimelineInfoTime = 'timeline-info-time';\n\n const additionalContent: HTMLElement[] = [];\n\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.TrackAppender) {\n if (!this.compatibilityTracksAppender) {\n return null;\n }\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const highlightedEntryInfo = this.compatibilityTracksAppender.highlightedEntryInfo(event, eventLevel);\n title = highlightedEntryInfo.title;\n time = highlightedEntryInfo.formattedTime;\n warningElements = highlightedEntryInfo.warningElements || warningElements;\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(event)) {\n const breakdown = new Components.InteractionBreakdown.InteractionBreakdown();\n breakdown.entry = event;\n additionalContent.push(breakdown);\n }\n } else if (entryType === EntryType.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n const totalTime = event.duration;\n const selfTime = event.selfTime;\n const eps = 1e-6;\n if (typeof totalTime === 'number') {\n time = Math.abs(totalTime - selfTime) > eps && selfTime > eps ?\n i18nString(UIStrings.sSelfS, {\n PH1: i18n.TimeUtilities.millisToString(totalTime, true),\n PH2: i18n.TimeUtilities.millisToString(selfTime, true),\n }) :\n i18n.TimeUtilities.millisToString(totalTime, true);\n }\n title = this.entryTitle(entryIndex);\n\n } else if (entryType === EntryType.Frame) {\n const frame = (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame);\n time = i18n.TimeUtilities.preciseMillisToString(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration), 1);\n\n if (frame.idle) {\n title = i18nString(UIStrings.idleFrame);\n } else if (frame.dropped) {\n if (frame.isPartial) {\n title = i18nString(UIStrings.partiallyPresentedFrame);\n } else {\n title = i18nString(UIStrings.droppedFrame);\n }\n nameSpanTimelineInfoTime = 'timeline-info-warning';\n } else {\n title = i18nString(UIStrings.frame);\n }\n } else {\n return null;\n }\n\n const element = document.createElement('div');\n const root = UI.Utils.createShadowRootWithCoreStyles(element, {\n cssFile: [timelineFlamechartPopoverStyles],\n delegatesFocus: undefined,\n });\n const contents = root.createChild('div', 'timeline-flamechart-popover');\n contents.createChild('span', nameSpanTimelineInfoTime).textContent = time;\n contents.createChild('span', 'timeline-info-title').textContent = title;\n if (warningElements) {\n for (const warningElement of warningElements) {\n warningElement.classList.add('timeline-info-warning');\n contents.appendChild(warningElement);\n }\n }\n for (const elem of additionalContent) {\n contents.appendChild(elem);\n }\n return element;\n }\n\n entryColor(entryIndex: number): string {\n function patchColorAndCache(cache: Map, key: KEY, lookupColor: (arg0: KEY) => string): string {\n let color = cache.get(key);\n if (color) {\n return color;\n }\n const parsedColor = lookupColor(key);\n if (!parsedColor) {\n throw new Error('Could not parse color from entry');\n }\n color = parsedColor;\n cache.set(key, color);\n return (color);\n }\n\n if (!this.legacyPerformanceModel || !this.legacyTimelineModel) {\n return '';\n }\n\n const entryTypes = EntryType;\n const entryType = this.entryType(entryIndex);\n if (entryType === entryTypes.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n if (this.legacyTimelineModel.isGenericTrace()) {\n return this.genericTraceEventColor(event);\n }\n if (this.legacyPerformanceModel.timelineModel().isMarkerEvent(event)) {\n return TimelineUIUtils.markerStyleForEvent(event).color;\n }\n if (!TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase) && this.colorForEvent) {\n return this.colorForEvent(event);\n }\n const category = TimelineUIUtils.eventStyle(event).category;\n return patchColorAndCache(this.asyncColorByCategory, category, () => category.getComputedColorValue());\n }\n if (entryType === entryTypes.Frame) {\n return 'white';\n }\n if (entryType === entryTypes.TrackAppender) {\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n return this.compatibilityTracksAppender?.colorForEvent(event, eventLevel) || '';\n }\n return '';\n }\n\n private genericTraceEventColor(event: TraceEngine.Legacy.Event): string {\n const key = event.categoriesString || event.name;\n return key ? `hsl(${Platform.StringUtilities.hashCode(key) % 300 + 30}, 40%, 70%)` : '#ccc';\n }\n\n private preparePatternCanvas(): void {\n // Set the candy stripe pattern to 17px so it repeats well.\n const size = 17;\n this.droppedFramePatternCanvas.width = size;\n this.droppedFramePatternCanvas.height = size;\n\n this.partialFramePatternCanvas.width = size;\n this.partialFramePatternCanvas.height = size;\n\n const ctx = this.droppedFramePatternCanvas.getContext('2d');\n if (ctx) {\n // Make a dense solid-line pattern.\n ctx.translate(size * 0.5, size * 0.5);\n ctx.rotate(Math.PI * 0.25);\n ctx.translate(-size * 0.5, -size * 0.5);\n\n ctx.fillStyle = 'rgb(255, 255, 255)';\n for (let x = -size; x < size * 2; x += 3) {\n ctx.fillRect(x, -size, 1, size * 3);\n }\n }\n\n const ctx2 = this.partialFramePatternCanvas.getContext('2d');\n if (ctx2) {\n // Make a sparse dashed-line pattern.\n ctx2.strokeStyle = 'rgb(255, 255, 255)';\n ctx2.lineWidth = 2;\n ctx2.beginPath();\n ctx2.moveTo(17, 0);\n ctx2.lineTo(10, 7);\n ctx2.moveTo(8, 9);\n ctx2.lineTo(2, 15);\n ctx2.stroke();\n }\n }\n\n private drawFrame(\n entryIndex: number, context: CanvasRenderingContext2D, text: string|null, barX: number, barY: number,\n barWidth: number, barHeight: number): void {\n const hPadding = 1;\n const frame = (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame);\n barX += hPadding;\n barWidth -= 2 * hPadding;\n if (frame.idle) {\n context.fillStyle = 'white';\n } else if (frame.dropped) {\n if (frame.isPartial) {\n // For partially presented frame boxes, paint a yellow background with\n // a sparse white dashed-line pattern overlay.\n context.fillStyle = '#f0e442';\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const overlay = context.createPattern(this.partialFramePatternCanvas, 'repeat');\n context.fillStyle = overlay || context.fillStyle;\n } else {\n // For dropped frame boxes, paint a red background with a dense white\n // solid-line pattern overlay.\n context.fillStyle = '#f08080';\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const overlay = context.createPattern(this.droppedFramePatternCanvas, 'repeat');\n context.fillStyle = overlay || context.fillStyle;\n }\n } else {\n context.fillStyle = '#d7f0d1';\n }\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const frameDurationText = i18n.TimeUtilities.preciseMillisToString(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration), 1);\n const textWidth = context.measureText(frameDurationText).width;\n if (textWidth <= barWidth) {\n context.fillStyle = this.textColor(entryIndex);\n context.fillText(frameDurationText, barX + (barWidth - textWidth) / 2, barY + barHeight - 4);\n }\n }\n\n private async drawScreenshot(\n entryIndex: number, context: CanvasRenderingContext2D, barX: number, barY: number, barWidth: number,\n barHeight: number): Promise {\n const screenshot = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventSnapshot);\n if (!this.screenshotImageCache.has(screenshot)) {\n this.screenshotImageCache.set(screenshot, null);\n const data = screenshot.args.snapshot;\n const image = await UI.UIUtils.loadImageFromData(data);\n this.screenshotImageCache.set(screenshot, image);\n this.dispatchEventToListeners(Events.DataChanged);\n return;\n }\n\n const image = this.screenshotImageCache.get(screenshot);\n if (!image) {\n return;\n }\n const imageX = barX + 1;\n const imageY = barY + 1;\n const imageHeight = barHeight - 2;\n const scale = imageHeight / image.naturalHeight;\n const imageWidth = Math.floor(image.naturalWidth * scale);\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n context.clip();\n context.drawImage(image, imageX, imageY, imageWidth, imageHeight);\n context.strokeStyle = '#ccc';\n context.strokeRect(imageX - 0.5, imageY - 0.5, Math.min(barWidth - 1, imageWidth + 1), imageHeight);\n context.restore();\n }\n\n decorateEntry(\n entryIndex: number, context: CanvasRenderingContext2D, text: string|null, barX: number, barY: number,\n barWidth: number, barHeight: number, unclippedBarX: number, timeToPixelRatio: number): boolean {\n const entryType = this.entryType(entryIndex);\n\n if (entryType === EntryType.Frame) {\n this.drawFrame(entryIndex, context, text, barX, barY, barWidth, barHeight);\n return true;\n }\n\n if (entryType === EntryType.Screenshot) {\n void this.drawScreenshot(entryIndex, context, barX, barY, barWidth, barHeight);\n return true;\n }\n\n if (entryType === EntryType.TrackAppender) {\n const entry = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(entry)) {\n this.#drawInteractionEventWithWhiskers(\n context, entryIndex, text, entry, barX, barY, unclippedBarX, barWidth, barHeight, timeToPixelRatio);\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Draws the left and right whiskers around an interaction in the timeline.\n * @param context - the canvas that will be drawn onto\n * @param entryIndex\n * @param entryTitle - the title of the entry\n * @param entry - the entry itself\n * @param barX - the starting X pixel position of the bar representing this event. This is clipped: if the bar is off the left side of the screen, this value will be 0\n * @param barY - the starting Y pixel position of the bar representing this event.\n * @param unclippedBarXStartPixel - the starting X pixel position of the bar representing this event, not clipped. This means if the bar is off the left of the screen this will be a negative number.\n * @param barWidth - the width of the full bar in pixels\n * @param barHeight - the height of the full bar in pixels\n * @param timeToPixelRatio - the ratio required to convert a millisecond time to a pixel value.\n **/\n #drawInteractionEventWithWhiskers(\n context: CanvasRenderingContext2D, entryIndex: number, entryTitle: string|null,\n entry: TraceEngine.Types.TraceEvents.SyntheticInteractionEvent, barX: number, barY: number,\n unclippedBarXStartPixel: number, barWidth: number, barHeight: number, timeToPixelRatio: number): void {\n /**\n * An interaction is drawn with whiskers as so:\n * |----------[=======]-------------|\n * => The left whisker is the event's start time (event.ts)\n * => The box start is the event's processingStart time\n * => The box end is the event's processingEnd time\n * => The right whisker is the event's end time (event.ts + event.dur)\n *\n * When we draw the event in the InteractionsAppender, we draw a huge box\n * that spans the entire of the above. So here we need to draw over the\n * rectangle that is outside of {processingStart, processingEnd} and\n * replace it with the whiskers.\n * TODO(crbug.com/1495248): rework how we draw whiskers to avoid this inefficiency\n */\n\n const beginTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(entry.ts);\n const entireBarEndXPixel = barX + barWidth;\n\n function timeToPixel(time: TraceEngine.Types.Timing.MicroSeconds): number {\n const timeMilli = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(time);\n return Math.floor(unclippedBarXStartPixel + (timeMilli - beginTime) * timeToPixelRatio);\n }\n\n context.save();\n\n // Clear portions of initial rect to prepare for the ticks.\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n let desiredBoxStartX = timeToPixel(entry.processingStart);\n const desiredBoxEndX = timeToPixel(entry.processingEnd);\n\n // If the entry has no processing time, ensure the box is 1px wide so at least it is visible.\n if (entry.processingEnd - entry.processingStart === 0) {\n desiredBoxStartX -= 1;\n }\n\n context.fillRect(barX, barY - 0.5, desiredBoxStartX - barX, barHeight);\n context.fillRect(desiredBoxEndX, barY - 0.5, entireBarEndXPixel - desiredBoxEndX, barHeight);\n\n // Draws left and right whiskers\n function drawTick(begin: number, end: number, y: number): void {\n const tickHeightPx = 6;\n context.moveTo(begin, y - tickHeightPx / 2);\n context.lineTo(begin, y + tickHeightPx / 2);\n context.moveTo(begin, y);\n context.lineTo(end, y);\n }\n\n // The left whisker starts at the enty timestamp, and continues until the start of the box (processingStart).\n const leftWhiskerX = timeToPixel(entry.ts);\n // The right whisker ends at (entry.ts + entry.dur). We draw the line from the end of the box (processingEnd).\n const rightWhiskerX = timeToPixel(TraceEngine.Types.Timing.MicroSeconds(entry.ts + entry.dur));\n context.beginPath();\n context.lineWidth = 1;\n context.strokeStyle = '#ccc';\n const lineY = Math.floor(barY + barHeight / 2) + 0.5;\n const leftTick = leftWhiskerX + 0.5;\n const rightTick = rightWhiskerX - 0.5;\n drawTick(leftTick, desiredBoxStartX, lineY);\n drawTick(rightTick, desiredBoxEndX, lineY);\n context.stroke();\n\n if (entryTitle) {\n // BarX will be set to 0 if the start of the box if off the screen to the\n // left. If this happens, the desiredBoxStartX will be negative. In that\n // case, we fallback to the BarX. This ensures that even if the box\n // starts off-screen, we draw the text at the first visible on screen\n // pixels, so the user can still see the event's title.\n const textStartX = desiredBoxStartX > 0 ? desiredBoxStartX : barX;\n context.font = this.#font;\n const textWidth = UI.UIUtils.measureTextWidth(context, entryTitle);\n\n // These numbers are duplicated from FlameChart.ts.\n const textPadding = 5;\n const textBaseline = 5;\n\n // Only draw the text if it can fit in the amount of box that is visible.\n if (textWidth <= desiredBoxEndX - textStartX + textPadding) {\n context.fillStyle = this.textColor(entryIndex);\n context.fillText(entryTitle, textStartX + textPadding, barY + barHeight - textBaseline);\n }\n }\n context.restore();\n }\n\n forceDecoration(entryIndex: number): boolean {\n const entryTypes = EntryType;\n const entryType = this.entryType(entryIndex);\n if (entryType === entryTypes.Frame) {\n return true;\n }\n if (entryType === entryTypes.Screenshot) {\n return true;\n }\n\n if (entryType === entryTypes.Event) {\n // TODO: this entryType can no longer exist as all tracks are now\n // migrated to appenders. This can be removed as part of the old engine\n // removal.\n return false;\n }\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(event)) {\n // We draw interactions with whiskers, which are done via the\n // decorateEntry() method, hence we always want to force these to be\n // decorated.\n return true;\n }\n return Boolean(this.traceEngineData?.Warnings.perEvent.get(event));\n }\n\n private appendHeader(title: string, style: PerfUI.FlameChart.GroupStyle, selectable: boolean, expanded?: boolean):\n PerfUI.FlameChart.Group {\n const group =\n ({startLevel: this.currentLevel, name: title, style: style, selectable: selectable, expanded} as\n PerfUI.FlameChart.Group);\n (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData).groups.push(group);\n return group;\n }\n\n private appendEvent(event: TraceEngine.Legacy.Event, level: number): number {\n const index = this.entryData.length;\n this.entryData.push(event);\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n timelineData.entryLevels[index] = level;\n timelineData.entryTotalTimes[index] = event.duration || InstantEventVisibleDurationMs;\n timelineData.entryStartTimes[index] = event.startTime;\n return index;\n }\n\n private appendAsyncEvent(asyncEvent: TraceEngine.Legacy.AsyncEvent, level: number): void {\n const steps = asyncEvent.steps;\n // If we have past steps, put the end event for each range rather than start one.\n const eventOffset =\n steps.length > 1 && steps[1].phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_PAST ? 1 : 0;\n for (let i = 0; i < steps.length - 1; ++i) {\n const index = this.entryData.length;\n this.entryData.push(steps[i + eventOffset]);\n const startTime = steps[i].startTime;\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n timelineData.entryLevels[index] = level;\n timelineData.entryTotalTimes[index] = steps[i + 1].startTime - startTime;\n timelineData.entryStartTimes[index] = startTime;\n }\n }\n\n #appendNewEngineFrame(frame: TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame): void {\n const index = this.entryData.length;\n this.entryData.push(frame);\n const durationMilliseconds = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration);\n this.entryIndexToTitle[index] = i18n.TimeUtilities.millisToString(durationMilliseconds, true);\n if (!this.timelineDataInternal) {\n return;\n }\n this.timelineDataInternal.entryLevels[index] = this.currentLevel;\n this.timelineDataInternal.entryTotalTimes[index] = durationMilliseconds;\n this.timelineDataInternal.entryStartTimes[index] =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.startTime);\n }\n\n createSelection(entryIndex: number): TimelineSelection|null {\n const entryType = this.entryType(entryIndex);\n let timelineSelection: TimelineSelection|null = null;\n const entry = this.entryData[entryIndex];\n if (entry && TimelineFlameChartDataProvider.isEntryRegularEvent(entry)) {\n timelineSelection = TimelineSelection.fromTraceEvent(entry);\n } else if (entryType === EntryType.Frame) {\n timelineSelection = TimelineSelection.fromFrame(\n (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame));\n }\n if (timelineSelection) {\n this.lastSelection = new Selection(timelineSelection, entryIndex);\n }\n return timelineSelection;\n }\n\n formatValue(value: number, precision?: number): string {\n return i18n.TimeUtilities.preciseMillisToString(value, precision);\n }\n\n canJumpToEntry(_entryIndex: number): boolean {\n return false;\n }\n\n entryIndexForSelection(selection: TimelineSelection|null): number {\n if (!selection || TimelineSelection.isRangeSelection(selection.object) ||\n TimelineSelection.isSyntheticNetworkRequestDetailsEventSelection(selection.object)) {\n return -1;\n }\n\n if (this.lastSelection && this.lastSelection.timelineSelection.object === selection.object) {\n return this.lastSelection.entryIndex;\n }\n const index = this.entryData.indexOf(selection.object);\n if (index !== -1) {\n this.lastSelection = new Selection(selection, index);\n }\n return index;\n }\n\n getIndexForEvent(targetEvent: TraceEngine.Types.TraceEvents.TraceEventData): number|null {\n // Gets the index for the given event by walking through the array of entryData.\n // This may seem inefficient - but we have seen that by building up large\n // maps keyed by trace events that this has a significant impact on the\n // performance of the panel.\n // Therefore, we strike a middle ground: look up the event the first time,\n // but then cache the result.\n const fromCache = this.#eventIndexByEvent.get(targetEvent);\n if (fromCache) {\n return fromCache;\n }\n const index = this.entryData.indexOf(targetEvent);\n const result = index > -1 ? index : null;\n this.#eventIndexByEvent.set(targetEvent, result);\n return result;\n }\n\n buildFlowForInitiator(entryIndex: number): boolean {\n if (this.lastInitiatorEntry === entryIndex) {\n return false;\n }\n if (!this.traceEngineData) {\n return false;\n }\n if (!this.timelineDataInternal) {\n return false;\n }\n if (!this.compatibilityTracksAppender) {\n return false;\n }\n\n const entryType = this.entryType(entryIndex);\n if (entryType !== EntryType.TrackAppender) {\n return false;\n }\n const event = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n if (!TraceEngine.Legacy.eventIsFromNewEngine(event)) {\n // TODO: as part of the old engine removal, we need to redefine the Event\n // type to teach the code that only new engine events can be selected by\n // the user.\n return false;\n }\n // Reset to clear any previous arrows from the last event.\n this.timelineDataInternal.flowStartTimes = [];\n this.timelineDataInternal.flowStartLevels = [];\n this.timelineDataInternal.flowEndTimes = [];\n this.timelineDataInternal.flowEndLevels = [];\n\n this.lastInitiatorEntry = entryIndex;\n\n const initiatorPairs = eventInitiatorPairsToDraw(\n this.traceEngineData,\n event,\n );\n if (initiatorPairs.length === 0) {\n return false;\n }\n for (const pair of initiatorPairs) {\n const eventIndex = this.getIndexForEvent(pair.event);\n const initiatorIndex = this.getIndexForEvent(pair.initiator);\n if (eventIndex === null || initiatorIndex === null) {\n continue;\n }\n const {startTime} = TraceEngine.Legacy.timesForEventInMilliseconds(pair.event);\n const {endTime: initiatorEndTime, startTime: initiatorStartTime} =\n TraceEngine.Legacy.timesForEventInMilliseconds(pair.initiator);\n\n const td = this.timelineDataInternal;\n td.flowStartTimes.push(initiatorEndTime || initiatorStartTime);\n td.flowStartLevels.push(td.entryLevels[initiatorIndex]);\n td.flowEndTimes.push(startTime);\n td.flowEndLevels.push(td.entryLevels[eventIndex]);\n }\n return true;\n }\n\n eventByIndex(entryIndex: number): TraceEngine.Legacy.CompatibleTraceEvent|null {\n if (entryIndex < 0) {\n return null;\n }\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.TrackAppender) {\n return this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n }\n if (entryType === EntryType.Event) {\n return this.entryData[entryIndex] as TraceEngine.Legacy.Event;\n }\n return null;\n }\n\n setEventColorMapping(colorForEvent: (arg0: TraceEngine.Legacy.Event) => string): void {\n this.colorForEvent = colorForEvent;\n }\n\n // Included only for layout tests.\n // TODO(crbug.com/1386091): Fix/port layout tests and remove.\n get performanceModel(): PerformanceModel|null {\n return this.legacyPerformanceModel;\n }\n}\n\nexport const InstantEventVisibleDurationMs = 0.001;\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Events {\n DataChanged = 'DataChanged',\n}\n\nexport type EventTypes = {\n [Events.DataChanged]: void,\n};\n\n// an entry is a trace event, they are classified into \"entry types\"\n// because some events are rendered differently. For example, screenshot\n// events are rendered as images. Checks for entry types allow to have\n// different styles, names, etc. for events that look differently.\n// In the future we won't have this checks: instead we will forward\n// the event to the corresponding \"track appender\" and it will determine\n// how the event shall be rendered.\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum EntryType {\n Frame = 'Frame',\n Event = 'Event',\n TrackAppender = 'TrackAppender',\n Screenshot = 'Screenshot',\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineFlameChartDataProvider.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineFlameChartDataProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAE/E,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAC,2BAA2B,EAAyB,MAAM,kCAAkC,CAAC;AACrG,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAC,yBAAyB,EAAC,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,+BAA+B,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAC,eAAe,EAAE,SAAS,EAAC,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAErD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,YAAY,EAAE,gBAAgB;IAC9B;;;OAGG;IACH,KAAK,EAAE,c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W,CAAC,UAAU,CAAC,CAAC,CAAC;SACnD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,CAAC,UAAkB;QAC7B,IAAI,UAAU,GAAG,CAAC,EAAE;YAClB,OAAO,IAAI,CAAC;SACb;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,SAAS,KAAK,SAAS,CAAC,aAAa,EAAE;YACzC,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAiD,CAAC;SACnF;QACD,IAAI,SAAS,KAAK,SAAS,CAAC,KAAK,EAAE;YACjC,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAA6B,CAAC;SAC/D;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB,CAAC,aAAyD;QAC5E,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,kCAAkC;IAClC,6DAA6D;IAC7D,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAEnD,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,MAEX;AAFD,WAAY,MAAM;IAChB,qCAA2B,CAAA;AAC7B,CAAC,EAFW,MAAM,KAAN,MAAM,QAEjB;AAMD,oEAAoE;AACpE,wEAAwE;AACxE,sEAAsE;AACtE,kEAAkE;AAClE,mEAAmE;AACnE,wEAAwE;AACxE,mCAAmC;AACnC,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,4CAA+B,CAAA;IAC/B,sCAAyB,CAAA;AAC3B,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB","sourcesContent":["/*\n * Copyright (C) 2014 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {ActiveFilters} from './ActiveFilters.js';\nimport {CompatibilityTracksAppender, type TrackAppenderName} from './CompatibilityTracksAppender.js';\nimport * as Components from './components/components.js';\nimport {type TimelineCategory} from './EventUICategory.js';\nimport {eventInitiatorPairsToDraw} from './Initiators.js';\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {ThreadAppender} from './ThreadAppender.js';\nimport timelineFlamechartPopoverStyles from './timelineFlamechartPopover.css.js';\nimport {FlameChartStyle, Selection} from './TimelineFlameChartView.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n onIgnoreList: 'On ignore list',\n /**\n * @description Text in Timeline Flame Chart Data Provider of the Performance panel *\n * @example{example.com} PH1\n */\n mainS: 'Main — {PH1}',\n /**\n * @description Text that refers to the main target\n */\n main: 'Main',\n /**\n * @description Text in Timeline Flame Chart Data Provider of the Performance panel * @example {https://example.com} PH1\n */\n frameS: 'Frame — {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n subframe: 'Subframe',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n raster: 'Raster',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n *@example {2} PH1\n */\n rasterizerThreadS: 'Rasterizer Thread {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n thread: 'Thread',\n /**\n *@description Text for rendering frames\n */\n frames: 'Frames',\n /**\n * @description Text in the Performance panel to show how long was spent in a particular part of the code.\n * The first placeholder is the total time taken for this node and all children, the second is the self time\n * (time taken in this node, without children included).\n *@example {10ms} PH1\n *@example {10ms} PH2\n */\n sSelfS: '{PH1} (self {PH2})',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n idleFrame: 'Idle Frame',\n /**\n *@description Text in Timeline Frame Chart Data Provider of the Performance panel\n */\n droppedFrame: 'Dropped Frame',\n /**\n *@description Text in Timeline Frame Chart Data Provider of the Performance panel\n */\n partiallyPresentedFrame: 'Partially Presented Frame',\n /**\n *@description Text for a rendering frame\n */\n frame: 'Frame',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineFlameChartDataProvider.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// at the moment there are two types defined for trace events: traceeventdata and\n// SDK.TracingModel.Event. This is only for compatibility between the legacy system\n// and the new system proposed in go/rpp-flamechart-arch. In the future, once all\n// tracks have been migrated to the new system, all entries will be of the\n// TraceEventData type.\nexport type TimelineFlameChartEntry =\n (TraceEngine.Legacy.Event|TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame|\n TraceEngine.Types.TraceEvents.TraceEventData);\nexport class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectWrapper implements\n PerfUI.FlameChart.FlameChartDataProvider {\n private droppedFramePatternCanvas: HTMLCanvasElement;\n private partialFramePatternCanvas: HTMLCanvasElement;\n private timelineDataInternal: PerfUI.FlameChart.FlameChartTimelineData|null;\n private currentLevel: number;\n\n // The Performance and the Timeline models are expected to be\n // deprecated in favor of using traceEngineData (new RPP engine) only\n // as part of the work in crbug.com/1386091. For this reason they\n // have the \"legacy\" prefix on their name.\n private legacyPerformanceModel: PerformanceModel|null;\n private compatibilityTracksAppender: CompatibilityTracksAppender|null;\n private legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl|null;\n private traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null;\n private isCpuProfile = false;\n /**\n * Raster threads are tracked and enumerated with this property. This is also\n * used to group all raster threads together in the same track, instead of\n * rendering a track for thread.\n */\n #rasterCount: number = 0;\n\n private minimumBoundaryInternal: number;\n private timeSpan: number;\n private readonly headerLevel1: PerfUI.FlameChart.GroupStyle;\n private readonly headerLevel2: PerfUI.FlameChart.GroupStyle;\n private readonly staticHeader: PerfUI.FlameChart.GroupStyle;\n private framesHeader: PerfUI.FlameChart.GroupStyle;\n private readonly screenshotsHeader: PerfUI.FlameChart.GroupStyle;\n private entryData!: TimelineFlameChartEntry[];\n private entryTypeByLevel!: EntryType[];\n private screenshotImageCache!: Map;\n private entryIndexToTitle!: string[];\n private asyncColorByCategory!: Map;\n private lastInitiatorEntry!: number;\n private entryParent!: TraceEngine.Legacy.Event[];\n private lastSelection?: Selection;\n private colorForEvent?: ((arg0: TraceEngine.Legacy.Event) => string);\n #eventToDisallowRoot = new WeakMap();\n #font: string;\n\n #eventIndexByEvent: WeakMap = new WeakMap();\n\n constructor() {\n super();\n this.reset();\n this.#font = `${PerfUI.Font.DEFAULT_FONT_SIZE} ${PerfUI.Font.getFontFamilyForCanvas()}`;\n this.droppedFramePatternCanvas = document.createElement('canvas');\n this.partialFramePatternCanvas = document.createElement('canvas');\n this.preparePatternCanvas();\n this.timelineDataInternal = null;\n this.currentLevel = 0;\n this.legacyPerformanceModel = null;\n this.legacyTimelineModel = null;\n this.compatibilityTracksAppender = null;\n this.traceEngineData = null;\n this.minimumBoundaryInternal = 0;\n this.timeSpan = 0;\n\n this.headerLevel1 = this.buildGroupStyle({shareHeaderLine: false});\n this.headerLevel2 = this.buildGroupStyle({padding: 2, nestingLevel: 1, collapsible: false});\n this.staticHeader = this.buildGroupStyle({collapsible: false});\n this.framesHeader = this.buildGroupStyle({useFirstLineForOverview: true});\n this.screenshotsHeader =\n this.buildGroupStyle({useFirstLineForOverview: true, nestingLevel: 1, collapsible: false, itemsHeight: 150});\n\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n const headers = [\n this.headerLevel1,\n this.headerLevel2,\n this.staticHeader,\n this.framesHeader,\n this.screenshotsHeader,\n ];\n for (const header of headers) {\n header.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');\n header.backgroundColor =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n }\n });\n }\n\n modifyTree(\n group: PerfUI.FlameChart.Group, node: number, action: TraceEngine.EntriesFilter.FilterAction,\n flameChartView: PerfUI.FlameChart.FlameChart): void {\n const entry = this.entryData[node] as TraceEngine.Types.TraceEvents.TraceEntry;\n this.compatibilityTracksAppender?.modifyTree(group, entry, action, flameChartView);\n }\n\n private buildGroupStyle(extra: Object): PerfUI.FlameChart.GroupStyle {\n const defaultGroupStyle = {\n padding: 4,\n height: 17,\n collapsible: true,\n color: ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface'),\n backgroundColor: ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container'),\n nestingLevel: 0,\n shareHeaderLine: true,\n };\n return Object.assign(defaultGroupStyle, extra);\n }\n\n setModel(\n performanceModel: PerformanceModel|null, newTraceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n isCpuProfile = false): void {\n this.reset();\n this.legacyPerformanceModel = performanceModel;\n this.legacyTimelineModel = performanceModel && performanceModel.timelineModel();\n this.traceEngineData = newTraceEngineData;\n\n this.isCpuProfile = isCpuProfile;\n if (newTraceEngineData) {\n const {traceBounds} = newTraceEngineData.Meta;\n const minTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceBounds.min);\n const maxTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceBounds.max);\n this.minimumBoundaryInternal = minTime;\n this.timeSpan = minTime === maxTime ? 1000 : maxTime - this.minimumBoundaryInternal;\n }\n }\n\n /**\n * Instances and caches a CompatibilityTracksAppender using the\n * internal flame chart data and the trace parsed data coming from the\n * trace engine.\n * The model data must have been set to the data provider instance before\n * attempting to instance the CompatibilityTracksAppender.\n */\n compatibilityTracksAppenderInstance(forceNew = false): CompatibilityTracksAppender {\n if (!this.compatibilityTracksAppender || forceNew) {\n if (!this.traceEngineData || !this.legacyTimelineModel) {\n throw new Error(\n 'Attempted to instantiate a CompatibilityTracksAppender without having set the trace parse data first.');\n }\n this.timelineDataInternal = this.#instantiateTimelineData();\n this.compatibilityTracksAppender = new CompatibilityTracksAppender(\n this.timelineDataInternal, this.traceEngineData, this.entryData, this.entryTypeByLevel,\n this.legacyTimelineModel);\n }\n return this.compatibilityTracksAppender;\n }\n\n /**\n * Returns the instance of the timeline flame chart data, without\n * adding data to it. In case the timeline data hasn't been instanced\n * creates a new instance and returns it.\n */\n #instantiateTimelineData(): PerfUI.FlameChart.FlameChartTimelineData {\n if (!this.timelineDataInternal) {\n this.timelineDataInternal = PerfUI.FlameChart.FlameChartTimelineData.createEmpty();\n }\n return this.timelineDataInternal;\n }\n\n /**\n * Builds the flame chart data using the track appenders\n */\n buildFromTrackAppenders(options?: {filterThreadsByName?: string, expandedTracks?: Set}): void {\n if (!this.compatibilityTracksAppender) {\n return;\n }\n const appenders = this.compatibilityTracksAppender.allVisibleTrackAppenders();\n for (const appender of appenders) {\n const skipThreadAppenderByName =\n appender instanceof ThreadAppender && !appender.trackName().includes(options?.filterThreadsByName || '');\n if (skipThreadAppenderByName) {\n continue;\n }\n const expanded = Boolean(options?.expandedTracks?.has(appender.appenderName));\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel, expanded);\n }\n }\n\n groupTrack(group: PerfUI.FlameChart.Group): TimelineModel.TimelineModel.Track|null {\n return group.track || null;\n }\n\n groupTreeEvents(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|null {\n return this.compatibilityTracksAppender?.groupEventsForTreeView(group) ?? null;\n }\n\n mainFrameNavigationStartEvents(): readonly TraceEngine.Types.TraceEvents.TraceEventNavigationStart[] {\n if (!this.traceEngineData) {\n return [];\n }\n return this.traceEngineData.Meta.mainFrameNavigations;\n }\n\n entryTitle(entryIndex: number): string|null {\n const entryTypes = EntryType;\n const entryType = this.entryType(entryIndex);\n if (entryType === entryTypes.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n if (event.phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_INTO ||\n event.phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_PAST) {\n return event.name + ':' + event.args['step'];\n }\n if (this.#eventToDisallowRoot.get(event)) {\n return i18nString(UIStrings.onIgnoreList);\n }\n return TimelineUIUtils.eventTitle(event);\n }\n if (entryType === entryTypes.Screenshot) {\n return '';\n }\n if (entryType === entryTypes.TrackAppender) {\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n return this.compatibilityTracksAppender?.titleForEvent(event, eventLevel) || null;\n }\n let title: Common.UIString.LocalizedString|string = this.entryIndexToTitle[entryIndex];\n if (!title) {\n title = `Unexpected entryIndex ${entryIndex}`;\n console.error(title);\n }\n return title;\n }\n\n textColor(index: number): string {\n const event = this.entryData[index];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(event)) {\n return FlameChartStyle.textColor;\n }\n return this.isIgnoreListedEvent(event) ? '#888' : FlameChartStyle.textColor;\n }\n\n entryFont(_index: number): string|null {\n return this.#font;\n }\n\n // resetCompatibilityTracksAppender boolean set to false does not recreate the thread appenders\n reset(resetCompatibilityTracksAppender: boolean = true): void {\n this.currentLevel = 0;\n this.entryData = [];\n this.entryParent = [];\n this.entryTypeByLevel = [];\n this.entryIndexToTitle = [];\n this.asyncColorByCategory = new Map();\n this.screenshotImageCache = new Map();\n this.#eventToDisallowRoot = new WeakMap();\n if (resetCompatibilityTracksAppender) {\n this.compatibilityTracksAppender = null;\n this.timelineDataInternal = null;\n } else if (!resetCompatibilityTracksAppender && this.timelineDataInternal) {\n this.compatibilityTracksAppender?.setFlameChartDataAndEntryData(\n this.timelineDataInternal, this.entryData, this.entryTypeByLevel);\n this.compatibilityTracksAppender?.threadAppenders().forEach(\n threadAppender => threadAppender.setHeaderAppended(false));\n }\n }\n\n maxStackDepth(): number {\n return this.currentLevel;\n }\n\n /**\n * Builds the flame chart data using the tracks appender (which use\n * the new trace engine) and the legacy code paths present in this\n * file. The result built data is cached and returned.\n */\n timelineData(rebuild: boolean = false): PerfUI.FlameChart.FlameChartTimelineData {\n if (this.timelineDataInternal && this.timelineDataInternal.entryLevels.length !== 0 && !rebuild) {\n // The flame chart data is built already, so return the cached\n // data.\n return this.timelineDataInternal;\n }\n\n this.timelineDataInternal = PerfUI.FlameChart.FlameChartTimelineData.createEmpty();\n if (!this.legacyTimelineModel) {\n return this.timelineDataInternal;\n }\n\n if (rebuild) {\n this.reset(/* resetCompatibilityTracksAppender= */ false);\n }\n\n this.currentLevel = 0;\n\n if (this.traceEngineData) {\n this.compatibilityTracksAppender = this.compatibilityTracksAppenderInstance();\n }\n if (this.legacyTimelineModel.isGenericTrace()) {\n this.processGenericTrace();\n } else {\n this.processInspectorTrace();\n }\n\n return this.timelineDataInternal;\n }\n\n private processGenericTrace(): void {\n const processGroupStyle = this.buildGroupStyle({shareHeaderLine: false});\n const threadGroupStyle = this.buildGroupStyle({padding: 2, nestingLevel: 1, shareHeaderLine: false});\n const eventEntryType = EntryType.Event;\n const tracksByProcess =\n new Platform.MapUtilities.Multimap();\n if (!this.legacyTimelineModel) {\n return;\n }\n for (const track of this.legacyTimelineModel.tracks()) {\n if (track.thread !== null) {\n tracksByProcess.set(track.thread.process(), track);\n } else {\n // The Timings track can reach this point, so we should probably do something more useful.\n console.error('Failed to process track');\n }\n }\n for (const process of tracksByProcess.keysArray()) {\n if (tracksByProcess.size > 1) {\n const name = `${process.name()} ${process.id()}`;\n this.appendHeader(name, processGroupStyle, false /* selectable */);\n }\n for (const track of tracksByProcess.get(process)) {\n const group = this.appendSyncEvents(\n track, track.events, track.name, threadGroupStyle, eventEntryType, true /* selectable */);\n if (this.timelineDataInternal &&\n (!this.timelineDataInternal.selectedGroup ||\n track.name === TimelineModel.TimelineModel.TimelineModelImpl.BrowserMainThreadName)) {\n this.timelineDataInternal.selectedGroup = group;\n }\n }\n }\n }\n\n private processInspectorTrace(): void {\n if (!this.isCpuProfile) {\n this.appendFrames();\n }\n\n const weight = (track: {type?: string, forMainFrame?: boolean, appenderName?: TrackAppenderName}): number => {\n if (track.appenderName !== undefined) {\n switch (track.appenderName) {\n case 'Animations':\n return 0;\n case 'Timings':\n return 1;\n case 'Interactions':\n return 2;\n case 'LayoutShifts':\n return 3;\n case 'GPU':\n return 8;\n case 'Thread':\n return 4;\n case 'Thread_AuctionWorklet':\n return 10;\n default:\n return -1;\n }\n }\n\n switch (track.type) {\n case TimelineModel.TimelineModel.TrackType.MainThread:\n return track.forMainFrame ? 5 : 6;\n case TimelineModel.TimelineModel.TrackType.Worker:\n return 7;\n case TimelineModel.TimelineModel.TrackType.Raster:\n return 9;\n case TimelineModel.TimelineModel.TrackType.Other:\n return 11;\n default:\n return -1;\n }\n };\n\n if (!this.legacyTimelineModel) {\n return;\n }\n const allTrackAppenders =\n this.compatibilityTracksAppender ? this.compatibilityTracksAppender.allVisibleTrackAppenders() : [];\n\n allTrackAppenders.sort((a, b) => weight(a) - weight(b));\n\n for (const appender of allTrackAppenders) {\n if (!this.traceEngineData) {\n continue;\n }\n\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel);\n\n // If there is not a selected group, we want to default to selecting the\n // main thread track. Therefore in this check we look to see if the\n // current appender is a ThreadAppender and represnets the Main Thread.\n // If it is, we mark the group as selected.\n if (this.timelineDataInternal && !this.timelineDataInternal.selectedGroup) {\n if (appender instanceof ThreadAppender &&\n (appender.threadType === TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD ||\n appender.threadType === TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE)) {\n const group = this.compatibilityTracksAppender?.groupForAppender(appender);\n if (group) {\n this.timelineDataInternal.selectedGroup = group;\n }\n }\n }\n }\n if (this.timelineDataInternal && this.timelineDataInternal.selectedGroup) {\n this.timelineDataInternal.selectedGroup.expanded = true;\n }\n }\n\n #addDecorationToEvent(eventIndex: number, decoration: PerfUI.FlameChart.FlameChartDecoration): void {\n if (!this.timelineDataInternal) {\n return;\n }\n const decorationsForEvent = this.timelineDataInternal.entryDecorations[eventIndex] || [];\n decorationsForEvent.push(decoration);\n this.timelineDataInternal.entryDecorations[eventIndex] = decorationsForEvent;\n }\n\n /**\n * Appends a track in the flame chart using the legacy system.\n * @param track the legacy track to be rendered.\n * @param expanded if the track is expanded.\n */\n appendLegacyTrackData(track: TimelineModel.TimelineModel.Track, expanded?: boolean): void {\n this.#instantiateTimelineData();\n const eventEntryType = EntryType.Event;\n switch (track.type) {\n case TimelineModel.TimelineModel.TrackType.MainThread: {\n if (track.forMainFrame) {\n const group = this.appendSyncEvents(\n track, track.events,\n track.url ? i18nString(UIStrings.mainS, {PH1: track.url}) : i18nString(UIStrings.main), this.headerLevel1,\n eventEntryType, true /* selectable */, expanded);\n if (group && this.timelineDataInternal) {\n this.timelineDataInternal.selectedGroup = group;\n }\n } else {\n this.appendSyncEvents(\n track, track.events,\n track.url ? i18nString(UIStrings.frameS, {PH1: track.url}) : i18nString(UIStrings.subframe),\n this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n }\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Worker: {\n this.appendSyncEvents(\n track, track.events, track.name, this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Raster: {\n if (!this.#rasterCount) {\n this.appendHeader(i18nString(UIStrings.raster), this.headerLevel1, false /* selectable */, expanded);\n }\n ++this.#rasterCount;\n this.appendSyncEvents(\n track, track.events, i18nString(UIStrings.rasterizerThreadS, {PH1: this.#rasterCount}), this.headerLevel2,\n eventEntryType, true /* selectable */, expanded);\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Other: {\n this.appendSyncEvents(\n track, track.events, track.name || i18nString(UIStrings.thread), this.headerLevel1, eventEntryType,\n true /* selectable */, expanded);\n this.appendAsyncEventsGroup(\n track, track.name, track.asyncEvents, this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n break;\n }\n }\n }\n minimumBoundary(): number {\n return this.minimumBoundaryInternal;\n }\n\n totalTime(): number {\n return this.timeSpan;\n }\n\n /**\n * Narrows an entry of type TimelineFlameChartEntry to the 2 types of\n * simple trace events (legacy and new engine definitions).\n */\n static isEntryRegularEvent(entry: TimelineFlameChartEntry):\n entry is(TraceEngine.Types.TraceEvents.TraceEventData|TraceEngine.Legacy.Event) {\n return 'name' in entry;\n }\n\n search(startTime: number, endTime: number, filter: TimelineModel.TimelineModelFilter.TimelineModelFilter): number[] {\n const result = [];\n this.timelineData();\n for (let i = 0; i < this.entryData.length; ++i) {\n const entry = this.entryData[i];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(entry)) {\n continue;\n }\n if (!entry) {\n continue;\n }\n\n // Until all the tracks are powered by the new engine, we need to\n // consider that these entries could be either new engine or legacy\n // engine.\n const entryStartTime = TraceEngine.Legacy.eventIsFromNewEngine(entry) ?\n TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(entry).startTime :\n entry.startTime;\n const entryEndTime = TraceEngine.Legacy.eventIsFromNewEngine(entry) ?\n TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(entry).endTime :\n entry.endTime;\n\n if (entryStartTime > endTime) {\n continue;\n }\n if ((entryEndTime || entryStartTime) < startTime) {\n continue;\n }\n if (filter.accept(entry, this.traceEngineData || undefined)) {\n result.push(i);\n }\n }\n result.sort((a, b) => {\n let firstEvent: TimelineFlameChartEntry|null = this.entryData[a];\n let secondEvent: TimelineFlameChartEntry|null = this.entryData[b];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(firstEvent) ||\n !TimelineFlameChartDataProvider.isEntryRegularEvent(secondEvent)) {\n return 0;\n }\n firstEvent = firstEvent instanceof TraceEngine.Legacy.Event ?\n firstEvent :\n (this.compatibilityTracksAppender?.getLegacyEvent(firstEvent) || null);\n secondEvent = secondEvent instanceof TraceEngine.Legacy.Event ?\n secondEvent :\n (this.compatibilityTracksAppender?.getLegacyEvent(secondEvent) || null);\n if (!firstEvent || !secondEvent) {\n return 0;\n }\n return TraceEngine.Legacy.Event.compareStartTime(firstEvent, secondEvent);\n });\n return result;\n }\n\n private appendSyncEvents(\n track: TimelineModel.TimelineModel.Track|null, events: TraceEngine.Legacy.Event[], title: string|null,\n style: PerfUI.FlameChart.GroupStyle|null, entryType: EntryType, selectable: boolean,\n expanded?: boolean): PerfUI.FlameChart.Group|null {\n if (!events.length) {\n return null;\n }\n if (!this.legacyPerformanceModel || !this.legacyTimelineModel) {\n return null;\n }\n const openEvents = [];\n const ignoreListingEnabled = Root.Runtime.experiments.isEnabled('ignoreListJSFramesOnTimeline');\n let maxStackDepth = 0;\n let group: PerfUI.FlameChart.Group|null = null;\n if (track && track.type === TimelineModel.TimelineModel.TrackType.MainThread) {\n group = this.appendHeader((title as string), (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n group.track = track;\n }\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n const {duration: eventDuration} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n // TODO(crbug.com/1386091) this check should happen at the model level.\n // Skip Layout Shifts and TTI events when dealing with the main thread.\n if (this.legacyPerformanceModel) {\n const isInteractiveTime = this.legacyPerformanceModel.timelineModel().isInteractiveTimeEvent(event);\n const isLayoutShift = this.legacyPerformanceModel.timelineModel().isLayoutShiftEvent(event);\n const skippableEvent = isInteractiveTime || isLayoutShift;\n\n if (track && track.type === TimelineModel.TimelineModel.TrackType.MainThread && skippableEvent) {\n continue;\n }\n }\n\n if (!TraceEngine.Types.TraceEvents.isFlowPhase(event.phase)) {\n if (!event.endTime && event.phase !== TraceEngine.Types.TraceEvents.Phase.INSTANT) {\n continue;\n }\n if (TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase)) {\n continue;\n }\n if (!ActiveFilters.instance().isVisible(event)) {\n continue;\n }\n }\n // Handle events belonging to a stack. E.g. A call stack in the main thread flame chart.\n while (openEvents.length &&\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n ((openEvents[openEvents.length - 1] as TraceEngine.Legacy.Event).endTime) <= event.startTime) {\n openEvents.pop();\n }\n this.#eventToDisallowRoot.set(event, false);\n if (ignoreListingEnabled && this.isIgnoreListedEvent(event)) {\n const parent = openEvents[openEvents.length - 1];\n if (parent && this.#eventToDisallowRoot.get(parent)) {\n continue;\n }\n this.#eventToDisallowRoot.set(event, true);\n }\n if (!group && title) {\n group = this.appendHeader(title, (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n if (selectable) {\n group.track = track;\n }\n }\n\n const level = this.currentLevel + openEvents.length;\n const index = this.appendEvent(event, level);\n if (openEvents.length) {\n this.entryParent[index] = (openEvents[openEvents.length - 1] as TraceEngine.Legacy.Event);\n }\n\n const trackIsMainThreadMainFrame =\n Boolean(track?.forMainFrame && track?.type === TimelineModel.TimelineModel.TrackType.MainThread);\n // If we are dealing with the Main Thread, find any long tasks and add\n // the candy striping to them. Doing it here avoids having to do another\n // pass through the events at a later point.\n if (trackIsMainThreadMainFrame && event.name === TimelineModel.TimelineModel.RecordType.Task &&\n TraceEngine.Helpers.Timing.millisecondsToMicroseconds(eventDuration) >\n TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD) {\n this.#addDecorationToEvent(index, {\n type: 'CANDY',\n startAtTime: TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD,\n });\n }\n maxStackDepth = Math.max(maxStackDepth, openEvents.length + 1);\n if (event.endTime) {\n openEvents.push(event);\n }\n }\n this.entryTypeByLevel.length = this.currentLevel + maxStackDepth;\n this.entryTypeByLevel.fill(entryType, this.currentLevel);\n this.currentLevel += maxStackDepth;\n return group;\n }\n\n isIgnoreListedEvent(event: TraceEngine.Legacy.CompatibleTraceEvent): boolean {\n if (TraceEngine.Legacy.eventIsFromNewEngine(event) && TraceEngine.Types.TraceEvents.isProfileCall(event)) {\n return this.isIgnoreListedURL(event.callFrame.url as Platform.DevToolsPath.UrlString);\n }\n return false;\n }\n\n private isIgnoreListedURL(url: Platform.DevToolsPath.UrlString): boolean {\n return Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url);\n }\n\n private appendAsyncEventsGroup(\n track: TimelineModel.TimelineModel.Track|null, title: string|null, events: TraceEngine.Legacy.AsyncEvent[],\n style: PerfUI.FlameChart.GroupStyle|null, entryType: EntryType, selectable: boolean,\n expanded?: boolean): PerfUI.FlameChart.Group|null {\n if (!events.length) {\n return null;\n }\n const lastUsedTimeByLevel: number[] = [];\n let group: PerfUI.FlameChart.Group|null = null;\n for (let i = 0; i < events.length; ++i) {\n const asyncEvent = events[i];\n if (!this.legacyPerformanceModel || !ActiveFilters.instance().isVisible(asyncEvent)) {\n continue;\n }\n if (!group && title) {\n group = this.appendHeader(title, (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n if (selectable) {\n group.track = track;\n }\n }\n const startTime = asyncEvent.startTime;\n let level;\n for (level = 0; level < lastUsedTimeByLevel.length && lastUsedTimeByLevel[level] > startTime; ++level) {\n }\n this.appendAsyncEvent(asyncEvent, this.currentLevel + level);\n lastUsedTimeByLevel[level] = (asyncEvent.endTime as number);\n }\n this.entryTypeByLevel.length = this.currentLevel + lastUsedTimeByLevel.length;\n this.entryTypeByLevel.fill(entryType, this.currentLevel);\n this.currentLevel += lastUsedTimeByLevel.length;\n return group;\n }\n\n getEntryTypeForLevel(level: number): EntryType {\n return this.entryTypeByLevel[level];\n }\n\n private appendFrames(): void {\n if (!this.legacyPerformanceModel || !this.timelineDataInternal || !this.legacyTimelineModel ||\n !this.traceEngineData) {\n return;\n }\n\n // TODO: Long term we want to move both the Frames track and the screenshots\n // track into the TrackAppender system. However right now the frames track\n // expects data in a different form to how the new engine parses frame\n // information. Therefore we have migrated the screenshots to use the new\n // data model in place without creating a new TrackAppender. When we can\n // migrate the frames track to the new appender system, we can migrate the\n // screnshots then as well.\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(this.traceEngineData);\n const hasScreenshots = filmStrip.frames.length > 0;\n\n this.framesHeader.collapsible = hasScreenshots;\n const expanded = Root.Runtime.Runtime.queryParam('flamechart-force-expand') === 'frames';\n\n this.appendHeader(i18nString(UIStrings.frames), this.framesHeader, false /* selectable */, expanded);\n\n this.entryTypeByLevel[this.currentLevel] = EntryType.Frame;\n for (const frame of this.traceEngineData.Frames.frames) {\n this.#appendNewEngineFrame(frame);\n }\n ++this.currentLevel;\n\n if (!hasScreenshots) {\n return;\n }\n this.#appendScreenshots(filmStrip);\n }\n\n #appendScreenshots(filmStrip: TraceEngine.Extras.FilmStrip.Data): void {\n if (!this.timelineDataInternal || !this.legacyTimelineModel) {\n return;\n }\n this.appendHeader('', this.screenshotsHeader, false /* selectable */);\n this.entryTypeByLevel[this.currentLevel] = EntryType.Screenshot;\n let prevTimestamp: TraceEngine.Types.Timing.MilliSeconds|undefined = undefined;\n\n for (const filmStripFrame of filmStrip.frames) {\n const screenshotTimeInMilliSeconds =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(filmStripFrame.screenshotEvent.ts);\n this.entryData.push(filmStripFrame.screenshotEvent);\n (this.timelineDataInternal.entryLevels as number[]).push(this.currentLevel);\n (this.timelineDataInternal.entryStartTimes as number[]).push(screenshotTimeInMilliSeconds);\n if (prevTimestamp) {\n (this.timelineDataInternal.entryTotalTimes as number[]).push(screenshotTimeInMilliSeconds - prevTimestamp);\n }\n prevTimestamp = screenshotTimeInMilliSeconds;\n }\n if (filmStrip.frames.length && prevTimestamp !== undefined) {\n // Set the total time of the final screenshot so it takes up the remainder of the trace.\n (this.timelineDataInternal.entryTotalTimes as number[])\n .push(this.legacyTimelineModel.maximumRecordTime() - prevTimestamp);\n }\n ++this.currentLevel;\n }\n\n private entryType(entryIndex: number): EntryType {\n return this.entryTypeByLevel[(this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData)\n .entryLevels[entryIndex]];\n }\n\n prepareHighlightedEntryInfo(entryIndex: number): Element|null {\n let time = '';\n let title;\n let warningElements: Element[] = [];\n let nameSpanTimelineInfoTime = 'timeline-info-time';\n\n const additionalContent: HTMLElement[] = [];\n\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.TrackAppender) {\n if (!this.compatibilityTracksAppender) {\n return null;\n }\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const highlightedEntryInfo = this.compatibilityTracksAppender.highlightedEntryInfo(event, eventLevel);\n title = highlightedEntryInfo.title;\n time = highlightedEntryInfo.formattedTime;\n warningElements = highlightedEntryInfo.warningElements || warningElements;\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(event)) {\n const breakdown = new Components.InteractionBreakdown.InteractionBreakdown();\n breakdown.entry = event;\n additionalContent.push(breakdown);\n }\n } else if (entryType === EntryType.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n const totalTime = event.duration;\n const selfTime = event.selfTime;\n const eps = 1e-6;\n if (typeof totalTime === 'number') {\n time = Math.abs(totalTime - selfTime) > eps && selfTime > eps ?\n i18nString(UIStrings.sSelfS, {\n PH1: i18n.TimeUtilities.millisToString(totalTime, true),\n PH2: i18n.TimeUtilities.millisToString(selfTime, true),\n }) :\n i18n.TimeUtilities.millisToString(totalTime, true);\n }\n title = this.entryTitle(entryIndex);\n\n } else if (entryType === EntryType.Frame) {\n const frame = (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame);\n time = i18n.TimeUtilities.preciseMillisToString(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration), 1);\n\n if (frame.idle) {\n title = i18nString(UIStrings.idleFrame);\n } else if (frame.dropped) {\n if (frame.isPartial) {\n title = i18nString(UIStrings.partiallyPresentedFrame);\n } else {\n title = i18nString(UIStrings.droppedFrame);\n }\n nameSpanTimelineInfoTime = 'timeline-info-warning';\n } else {\n title = i18nString(UIStrings.frame);\n }\n } else {\n return null;\n }\n\n const element = document.createElement('div');\n const root = UI.Utils.createShadowRootWithCoreStyles(element, {\n cssFile: [timelineFlamechartPopoverStyles],\n delegatesFocus: undefined,\n });\n const contents = root.createChild('div', 'timeline-flamechart-popover');\n contents.createChild('span', nameSpanTimelineInfoTime).textContent = time;\n contents.createChild('span', 'timeline-info-title').textContent = title;\n if (warningElements) {\n for (const warningElement of warningElements) {\n warningElement.classList.add('timeline-info-warning');\n contents.appendChild(warningElement);\n }\n }\n for (const elem of additionalContent) {\n contents.appendChild(elem);\n }\n return element;\n }\n\n entryColor(entryIndex: number): string {\n function patchColorAndCache(cache: Map, key: KEY, lookupColor: (arg0: KEY) => string): string {\n let color = cache.get(key);\n if (color) {\n return color;\n }\n const parsedColor = lookupColor(key);\n if (!parsedColor) {\n throw new Error('Could not parse color from entry');\n }\n color = parsedColor;\n cache.set(key, color);\n return (color);\n }\n\n if (!this.legacyPerformanceModel || !this.legacyTimelineModel) {\n return '';\n }\n\n const entryTypes = EntryType;\n const entryType = this.entryType(entryIndex);\n if (entryType === entryTypes.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n if (this.legacyTimelineModel.isGenericTrace()) {\n return this.genericTraceEventColor(event);\n }\n if (this.legacyPerformanceModel.timelineModel().isMarkerEvent(event)) {\n return TimelineUIUtils.markerStyleForEvent(event).color;\n }\n if (!TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase) && this.colorForEvent) {\n return this.colorForEvent(event);\n }\n const category = TimelineUIUtils.eventStyle(event).category;\n return patchColorAndCache(this.asyncColorByCategory, category, () => category.getComputedColorValue());\n }\n if (entryType === entryTypes.Frame) {\n return 'white';\n }\n if (entryType === entryTypes.TrackAppender) {\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n return this.compatibilityTracksAppender?.colorForEvent(event, eventLevel) || '';\n }\n return '';\n }\n\n private genericTraceEventColor(event: TraceEngine.Legacy.Event): string {\n const key = event.categoriesString || event.name;\n return key ? `hsl(${Platform.StringUtilities.hashCode(key) % 300 + 30}, 40%, 70%)` : '#ccc';\n }\n\n private preparePatternCanvas(): void {\n // Set the candy stripe pattern to 17px so it repeats well.\n const size = 17;\n this.droppedFramePatternCanvas.width = size;\n this.droppedFramePatternCanvas.height = size;\n\n this.partialFramePatternCanvas.width = size;\n this.partialFramePatternCanvas.height = size;\n\n const ctx = this.droppedFramePatternCanvas.getContext('2d');\n if (ctx) {\n // Make a dense solid-line pattern.\n ctx.translate(size * 0.5, size * 0.5);\n ctx.rotate(Math.PI * 0.25);\n ctx.translate(-size * 0.5, -size * 0.5);\n\n ctx.fillStyle = 'rgb(255, 255, 255)';\n for (let x = -size; x < size * 2; x += 3) {\n ctx.fillRect(x, -size, 1, size * 3);\n }\n }\n\n const ctx2 = this.partialFramePatternCanvas.getContext('2d');\n if (ctx2) {\n // Make a sparse dashed-line pattern.\n ctx2.strokeStyle = 'rgb(255, 255, 255)';\n ctx2.lineWidth = 2;\n ctx2.beginPath();\n ctx2.moveTo(17, 0);\n ctx2.lineTo(10, 7);\n ctx2.moveTo(8, 9);\n ctx2.lineTo(2, 15);\n ctx2.stroke();\n }\n }\n\n private drawFrame(\n entryIndex: number, context: CanvasRenderingContext2D, text: string|null, barX: number, barY: number,\n barWidth: number, barHeight: number): void {\n const hPadding = 1;\n const frame = (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame);\n barX += hPadding;\n barWidth -= 2 * hPadding;\n if (frame.idle) {\n context.fillStyle = 'white';\n } else if (frame.dropped) {\n if (frame.isPartial) {\n // For partially presented frame boxes, paint a yellow background with\n // a sparse white dashed-line pattern overlay.\n context.fillStyle = '#f0e442';\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const overlay = context.createPattern(this.partialFramePatternCanvas, 'repeat');\n context.fillStyle = overlay || context.fillStyle;\n } else {\n // For dropped frame boxes, paint a red background with a dense white\n // solid-line pattern overlay.\n context.fillStyle = '#f08080';\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const overlay = context.createPattern(this.droppedFramePatternCanvas, 'repeat');\n context.fillStyle = overlay || context.fillStyle;\n }\n } else {\n context.fillStyle = '#d7f0d1';\n }\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const frameDurationText = i18n.TimeUtilities.preciseMillisToString(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration), 1);\n const textWidth = context.measureText(frameDurationText).width;\n if (textWidth <= barWidth) {\n context.fillStyle = this.textColor(entryIndex);\n context.fillText(frameDurationText, barX + (barWidth - textWidth) / 2, barY + barHeight - 4);\n }\n }\n\n private async drawScreenshot(\n entryIndex: number, context: CanvasRenderingContext2D, barX: number, barY: number, barWidth: number,\n barHeight: number): Promise {\n const screenshot = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventSnapshot);\n if (!this.screenshotImageCache.has(screenshot)) {\n this.screenshotImageCache.set(screenshot, null);\n const data = screenshot.args.snapshot;\n const image = await UI.UIUtils.loadImageFromData(data);\n this.screenshotImageCache.set(screenshot, image);\n this.dispatchEventToListeners(Events.DataChanged);\n return;\n }\n\n const image = this.screenshotImageCache.get(screenshot);\n if (!image) {\n return;\n }\n const imageX = barX + 1;\n const imageY = barY + 1;\n const imageHeight = barHeight - 2;\n const scale = imageHeight / image.naturalHeight;\n const imageWidth = Math.floor(image.naturalWidth * scale);\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n context.clip();\n context.drawImage(image, imageX, imageY, imageWidth, imageHeight);\n context.strokeStyle = '#ccc';\n context.strokeRect(imageX - 0.5, imageY - 0.5, Math.min(barWidth - 1, imageWidth + 1), imageHeight);\n context.restore();\n }\n\n decorateEntry(\n entryIndex: number, context: CanvasRenderingContext2D, text: string|null, barX: number, barY: number,\n barWidth: number, barHeight: number, unclippedBarX: number, timeToPixelRatio: number): boolean {\n const entryType = this.entryType(entryIndex);\n\n if (entryType === EntryType.Frame) {\n this.drawFrame(entryIndex, context, text, barX, barY, barWidth, barHeight);\n return true;\n }\n\n if (entryType === EntryType.Screenshot) {\n void this.drawScreenshot(entryIndex, context, barX, barY, barWidth, barHeight);\n return true;\n }\n\n if (entryType === EntryType.TrackAppender) {\n const entry = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(entry)) {\n this.#drawInteractionEventWithWhiskers(\n context, entryIndex, text, entry, barX, barY, unclippedBarX, barWidth, barHeight, timeToPixelRatio);\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Draws the left and right whiskers around an interaction in the timeline.\n * @param context - the canvas that will be drawn onto\n * @param entryIndex\n * @param entryTitle - the title of the entry\n * @param entry - the entry itself\n * @param barX - the starting X pixel position of the bar representing this event. This is clipped: if the bar is off the left side of the screen, this value will be 0\n * @param barY - the starting Y pixel position of the bar representing this event.\n * @param unclippedBarXStartPixel - the starting X pixel position of the bar representing this event, not clipped. This means if the bar is off the left of the screen this will be a negative number.\n * @param barWidth - the width of the full bar in pixels\n * @param barHeight - the height of the full bar in pixels\n * @param timeToPixelRatio - the ratio required to convert a millisecond time to a pixel value.\n **/\n #drawInteractionEventWithWhiskers(\n context: CanvasRenderingContext2D, entryIndex: number, entryTitle: string|null,\n entry: TraceEngine.Types.TraceEvents.SyntheticInteractionEvent, barX: number, barY: number,\n unclippedBarXStartPixel: number, barWidth: number, barHeight: number, timeToPixelRatio: number): void {\n /**\n * An interaction is drawn with whiskers as so:\n * |----------[=======]-------------|\n * => The left whisker is the event's start time (event.ts)\n * => The box start is the event's processingStart time\n * => The box end is the event's processingEnd time\n * => The right whisker is the event's end time (event.ts + event.dur)\n *\n * When we draw the event in the InteractionsAppender, we draw a huge box\n * that spans the entire of the above. So here we need to draw over the\n * rectangle that is outside of {processingStart, processingEnd} and\n * replace it with the whiskers.\n * TODO(crbug.com/1495248): rework how we draw whiskers to avoid this inefficiency\n */\n\n const beginTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(entry.ts);\n const entireBarEndXPixel = barX + barWidth;\n\n function timeToPixel(time: TraceEngine.Types.Timing.MicroSeconds): number {\n const timeMilli = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(time);\n return Math.floor(unclippedBarXStartPixel + (timeMilli - beginTime) * timeToPixelRatio);\n }\n\n context.save();\n\n // Clear portions of initial rect to prepare for the ticks.\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n let desiredBoxStartX = timeToPixel(entry.processingStart);\n const desiredBoxEndX = timeToPixel(entry.processingEnd);\n\n // If the entry has no processing time, ensure the box is 1px wide so at least it is visible.\n if (entry.processingEnd - entry.processingStart === 0) {\n desiredBoxStartX -= 1;\n }\n\n context.fillRect(barX, barY - 0.5, desiredBoxStartX - barX, barHeight);\n context.fillRect(desiredBoxEndX, barY - 0.5, entireBarEndXPixel - desiredBoxEndX, barHeight);\n\n // Draws left and right whiskers\n function drawTick(begin: number, end: number, y: number): void {\n const tickHeightPx = 6;\n context.moveTo(begin, y - tickHeightPx / 2);\n context.lineTo(begin, y + tickHeightPx / 2);\n context.moveTo(begin, y);\n context.lineTo(end, y);\n }\n\n // The left whisker starts at the enty timestamp, and continues until the start of the box (processingStart).\n const leftWhiskerX = timeToPixel(entry.ts);\n // The right whisker ends at (entry.ts + entry.dur). We draw the line from the end of the box (processingEnd).\n const rightWhiskerX = timeToPixel(TraceEngine.Types.Timing.MicroSeconds(entry.ts + entry.dur));\n context.beginPath();\n context.lineWidth = 1;\n context.strokeStyle = '#ccc';\n const lineY = Math.floor(barY + barHeight / 2) + 0.5;\n const leftTick = leftWhiskerX + 0.5;\n const rightTick = rightWhiskerX - 0.5;\n drawTick(leftTick, desiredBoxStartX, lineY);\n drawTick(rightTick, desiredBoxEndX, lineY);\n context.stroke();\n\n if (entryTitle) {\n // BarX will be set to 0 if the start of the box if off the screen to the\n // left. If this happens, the desiredBoxStartX will be negative. In that\n // case, we fallback to the BarX. This ensures that even if the box\n // starts off-screen, we draw the text at the first visible on screen\n // pixels, so the user can still see the event's title.\n const textStartX = desiredBoxStartX > 0 ? desiredBoxStartX : barX;\n context.font = this.#font;\n const textWidth = UI.UIUtils.measureTextWidth(context, entryTitle);\n\n // These numbers are duplicated from FlameChart.ts.\n const textPadding = 5;\n const textBaseline = 5;\n\n // Only draw the text if it can fit in the amount of box that is visible.\n if (textWidth <= desiredBoxEndX - textStartX + textPadding) {\n context.fillStyle = this.textColor(entryIndex);\n context.fillText(entryTitle, textStartX + textPadding, barY + barHeight - textBaseline);\n }\n }\n context.restore();\n }\n\n forceDecoration(entryIndex: number): boolean {\n const entryTypes = EntryType;\n const entryType = this.entryType(entryIndex);\n if (entryType === entryTypes.Frame) {\n return true;\n }\n if (entryType === entryTypes.Screenshot) {\n return true;\n }\n\n if (entryType === entryTypes.Event) {\n // TODO: this entryType can no longer exist as all tracks are now\n // migrated to appenders. This can be removed as part of the old engine\n // removal.\n return false;\n }\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(event)) {\n // We draw interactions with whiskers, which are done via the\n // decorateEntry() method, hence we always want to force these to be\n // decorated.\n return true;\n }\n return Boolean(this.traceEngineData?.Warnings.perEvent.get(event));\n }\n\n private appendHeader(title: string, style: PerfUI.FlameChart.GroupStyle, selectable: boolean, expanded?: boolean):\n PerfUI.FlameChart.Group {\n const group =\n ({startLevel: this.currentLevel, name: title, style: style, selectable: selectable, expanded} as\n PerfUI.FlameChart.Group);\n (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData).groups.push(group);\n return group;\n }\n\n private appendEvent(event: TraceEngine.Legacy.Event, level: number): number {\n const index = this.entryData.length;\n this.entryData.push(event);\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n timelineData.entryLevels[index] = level;\n timelineData.entryTotalTimes[index] = event.duration || InstantEventVisibleDurationMs;\n timelineData.entryStartTimes[index] = event.startTime;\n return index;\n }\n\n private appendAsyncEvent(asyncEvent: TraceEngine.Legacy.AsyncEvent, level: number): void {\n const steps = asyncEvent.steps;\n // If we have past steps, put the end event for each range rather than start one.\n const eventOffset =\n steps.length > 1 && steps[1].phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_PAST ? 1 : 0;\n for (let i = 0; i < steps.length - 1; ++i) {\n const index = this.entryData.length;\n this.entryData.push(steps[i + eventOffset]);\n const startTime = steps[i].startTime;\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n timelineData.entryLevels[index] = level;\n timelineData.entryTotalTimes[index] = steps[i + 1].startTime - startTime;\n timelineData.entryStartTimes[index] = startTime;\n }\n }\n\n #appendNewEngineFrame(frame: TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame): void {\n const index = this.entryData.length;\n this.entryData.push(frame);\n const durationMilliseconds = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration);\n this.entryIndexToTitle[index] = i18n.TimeUtilities.millisToString(durationMilliseconds, true);\n if (!this.timelineDataInternal) {\n return;\n }\n this.timelineDataInternal.entryLevels[index] = this.currentLevel;\n this.timelineDataInternal.entryTotalTimes[index] = durationMilliseconds;\n this.timelineDataInternal.entryStartTimes[index] =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.startTime);\n }\n\n createSelection(entryIndex: number): TimelineSelection|null {\n const entryType = this.entryType(entryIndex);\n let timelineSelection: TimelineSelection|null = null;\n const entry = this.entryData[entryIndex];\n if (entry && TimelineFlameChartDataProvider.isEntryRegularEvent(entry)) {\n timelineSelection = TimelineSelection.fromTraceEvent(entry);\n } else if (entryType === EntryType.Frame) {\n timelineSelection = TimelineSelection.fromFrame(\n (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame));\n }\n if (timelineSelection) {\n this.lastSelection = new Selection(timelineSelection, entryIndex);\n }\n return timelineSelection;\n }\n\n formatValue(value: number, precision?: number): string {\n return i18n.TimeUtilities.preciseMillisToString(value, precision);\n }\n\n canJumpToEntry(_entryIndex: number): boolean {\n return false;\n }\n\n entryIndexForSelection(selection: TimelineSelection|null): number {\n if (!selection || TimelineSelection.isRangeSelection(selection.object) ||\n TimelineSelection.isSyntheticNetworkRequestDetailsEventSelection(selection.object)) {\n return -1;\n }\n\n if (this.lastSelection && this.lastSelection.timelineSelection.object === selection.object) {\n return this.lastSelection.entryIndex;\n }\n const index = this.entryData.indexOf(selection.object);\n if (index !== -1) {\n this.lastSelection = new Selection(selection, index);\n }\n return index;\n }\n\n getIndexForEvent(targetEvent: TraceEngine.Types.TraceEvents.TraceEventData): number|null {\n // Gets the index for the given event by walking through the array of entryData.\n // This may seem inefficient - but we have seen that by building up large\n // maps keyed by trace events that this has a significant impact on the\n // performance of the panel.\n // Therefore, we strike a middle ground: look up the event the first time,\n // but then cache the result.\n const fromCache = this.#eventIndexByEvent.get(targetEvent);\n if (fromCache) {\n return fromCache;\n }\n const index = this.entryData.indexOf(targetEvent);\n const result = index > -1 ? index : null;\n this.#eventIndexByEvent.set(targetEvent, result);\n return result;\n }\n\n buildFlowForInitiator(entryIndex: number): boolean {\n if (this.lastInitiatorEntry === entryIndex) {\n return false;\n }\n if (!this.traceEngineData) {\n return false;\n }\n if (!this.timelineDataInternal) {\n return false;\n }\n if (!this.compatibilityTracksAppender) {\n return false;\n }\n\n const entryType = this.entryType(entryIndex);\n if (entryType !== EntryType.TrackAppender) {\n return false;\n }\n const event = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n if (!TraceEngine.Legacy.eventIsFromNewEngine(event)) {\n // TODO: as part of the old engine removal, we need to redefine the Event\n // type to teach the code that only new engine events can be selected by\n // the user.\n return false;\n }\n // Reset to clear any previous arrows from the last event.\n this.timelineDataInternal.flowStartTimes = [];\n this.timelineDataInternal.flowStartLevels = [];\n this.timelineDataInternal.flowEndTimes = [];\n this.timelineDataInternal.flowEndLevels = [];\n\n this.lastInitiatorEntry = entryIndex;\n\n const initiatorPairs = eventInitiatorPairsToDraw(\n this.traceEngineData,\n event,\n );\n if (initiatorPairs.length === 0) {\n return false;\n }\n for (const pair of initiatorPairs) {\n const eventIndex = this.getIndexForEvent(pair.event);\n const initiatorIndex = this.getIndexForEvent(pair.initiator);\n if (eventIndex === null || initiatorIndex === null) {\n continue;\n }\n const {startTime} = TraceEngine.Legacy.timesForEventInMilliseconds(pair.event);\n const {endTime: initiatorEndTime, startTime: initiatorStartTime} =\n TraceEngine.Legacy.timesForEventInMilliseconds(pair.initiator);\n\n const td = this.timelineDataInternal;\n td.flowStartTimes.push(initiatorEndTime || initiatorStartTime);\n td.flowStartLevels.push(td.entryLevels[initiatorIndex]);\n td.flowEndTimes.push(startTime);\n td.flowEndLevels.push(td.entryLevels[eventIndex]);\n }\n return true;\n }\n\n eventByIndex(entryIndex: number): TraceEngine.Legacy.CompatibleTraceEvent|null {\n if (entryIndex < 0) {\n return null;\n }\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.TrackAppender) {\n return this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n }\n if (entryType === EntryType.Event) {\n return this.entryData[entryIndex] as TraceEngine.Legacy.Event;\n }\n return null;\n }\n\n setEventColorMapping(colorForEvent: (arg0: TraceEngine.Legacy.Event) => string): void {\n this.colorForEvent = colorForEvent;\n }\n\n // Included only for layout tests.\n // TODO(crbug.com/1386091): Fix/port layout tests and remove.\n get performanceModel(): PerformanceModel|null {\n return this.legacyPerformanceModel;\n }\n}\n\nexport const InstantEventVisibleDurationMs = 0.001;\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum Events {\n DataChanged = 'DataChanged',\n}\n\nexport type EventTypes = {\n [Events.DataChanged]: void,\n};\n\n// an entry is a trace event, they are classified into \"entry types\"\n// because some events are rendered differently. For example, screenshot\n// events are rendered as images. Checks for entry types allow to have\n// different styles, names, etc. for events that look differently.\n// In the future we won't have this checks: instead we will forward\n// the event to the corresponding \"track appender\" and it will determine\n// how the event shall be rendered.\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum EntryType {\n Frame = 'Frame',\n Event = 'Event',\n TrackAppender = 'TrackAppender',\n Screenshot = 'Screenshot',\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineFlameChartView.d.ts b/public/panels/timeline/TimelineFlameChartView.d.ts index 1e80d72a8..4288788d8 100644 --- a/public/panels/timeline/TimelineFlameChartView.d.ts +++ b/public/panels/timeline/TimelineFlameChartView.d.ts @@ -32,13 +32,11 @@ export declare class TimelineFlameChartView extends UI.Widget.VBox implements Pe private needsResizeToPreferredHeights?; private selectedSearchResult?; private searchRegex?; - private selectedGroupName; constructor(delegate: TimelineModeViewDelegate); onEntriesModified(): void; isNetworkTrackShownForTests(): boolean; updateColorMapper(): void; - private onWindowChanged; - windowChanged(windowStartTime: number, windowEndTime: number, animate: boolean): void; + windowChanged(windowStartTime: TraceEngine.Types.Timing.MilliSeconds, windowEndTime: TraceEngine.Types.Timing.MilliSeconds, animate: boolean): void; updateRangeSelection(startTime: number, endTime: number): void; getMainFlameChart(): PerfUI.FlameChart.FlameChart; updateSelectedGroup(flameChart: PerfUI.FlameChart.FlameChart, group: PerfUI.FlameChart.Group | null): void; diff --git a/public/panels/timeline/TimelineFlameChartView.js b/public/panels/timeline/TimelineFlameChartView.js index 5b6cc0c90..a486ab89e 100644 --- a/public/panels/timeline/TimelineFlameChartView.js +++ b/public/panels/timeline/TimelineFlameChartView.js @@ -4,7 +4,6 @@ import * as Common from '../../core/common/common.js'; import * as i18n from '../../core/i18n/i18n.js'; import * as Platform from '../../core/platform/platform.js'; -import * as Root from '../../core/root/root.js'; import * as SDK from '../../core/sdk/sdk.js'; import * as Bindings from '../../models/bindings/bindings.js'; import * as TimelineModel from '../../models/timeline_model/timeline_model.js'; @@ -13,7 +12,6 @@ import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js'; import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; import { CountersGraph } from './CountersGraph.js'; -import { Events as PerformanceModelEvents } from './PerformanceModel.js'; import { TimelineDetailsView } from './TimelineDetailsView.js'; import { TimelineRegExp } from './TimelineFilters.js'; import { Events as TimelineFlameChartDataProviderEvents, TimelineFlameChartDataProvider, } from './TimelineFlameChartDataProvider.js'; @@ -65,8 +63,8 @@ export class TimelineFlameChartView extends UI.Widget.VBox { selectedSearchResult; searchRegex; #traceEngineData; - #currentBreadcrumbTimeWindow; - selectedGroupName = null; + #selectedGroupName = null; + #onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this); constructor(delegate) { super(); this.element.classList.add('timeline-flamechart'); @@ -132,15 +130,30 @@ export class TimelineFlameChartView extends UI.Widget.VBox { this.groupBySetting = Common.Settings.Settings.instance().createSetting('timelineTreeGroupBy', AggregatedTimelineTreeView.GroupBy.None); this.groupBySetting.addChangeListener(this.updateColorMapper, this); this.updateColorMapper(); + TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound); + } + #onTraceBoundsChange(event) { + if (event.updateType === 'MINIMAP_BOUNDS') { + // If the update type was a changing of the minimap bounds, we do not + // need to redraw the timeline. + return; + } + const visibleWindow = event.state.milli.timelineTraceWindow; + const shouldAnimate = Boolean(event.options.shouldAnimate); + this.mainFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max, shouldAnimate); + this.networkDataProvider.setWindowTimes(visibleWindow.min, visibleWindow.max); + this.networkFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max, shouldAnimate); + this.updateSearchResults(false, false); } onEntriesModified() { if (!this.model) { return; } this.mainDataProvider.timelineData(true); - const window = this.model.window(); - if (window) { - this.mainFlameChart.setWindowTimes(window.left, window.right); + const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (traceBoundsState) { + const visibleWindow = traceBoundsState.milli.timelineTraceWindow; + this.mainFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max); } this.mainFlameChart.update(); } @@ -154,30 +167,7 @@ export class TimelineFlameChartView extends UI.Widget.VBox { this.mainDataProvider.setEventColorMapping(TimelineUIUtils.eventColor); this.mainFlameChart.update(); } - onWindowChanged(event) { - const { window, animate } = event.data; - if (event.data.breadcrumbWindow) { - this.#currentBreadcrumbTimeWindow = event.data.breadcrumbWindow; - } - else { - this.#currentBreadcrumbTimeWindow = undefined; - } - // If breadcrumbs are not activated, update window times at all times, - // If breadcrumbs exist, do not update to window times outside the breadcrumb - const isWindowWithinBreadcrumb = (this.#currentBreadcrumbTimeWindow && - !(this.#currentBreadcrumbTimeWindow.min > window.left || - this.#currentBreadcrumbTimeWindow.max < window.right)); - if (!this.#currentBreadcrumbTimeWindow || isWindowWithinBreadcrumb) { - this.mainFlameChart.setWindowTimes(window.left, window.right, animate); - this.networkDataProvider.setWindowTimes(window.left, window.right); - this.networkFlameChart.setWindowTimes(window.left, window.right, animate); - } - this.updateSearchResults(false, false); - } windowChanged(windowStartTime, windowEndTime, animate) { - if (this.model) { - this.model.setWindow({ left: windowStartTime, right: windowEndTime }, animate, this.#currentBreadcrumbTimeWindow); - } TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(TraceEngine.Types.Timing.MilliSeconds(windowStartTime), TraceEngine.Types.Timing.MilliSeconds(windowEndTime)), { shouldAnimate: animate }); } updateRangeSelection(startTime, endTime) { @@ -187,10 +177,10 @@ export class TimelineFlameChartView extends UI.Widget.VBox { return this.mainFlameChart; } updateSelectedGroup(flameChart, group) { - if (flameChart !== this.mainFlameChart || this.selectedGroupName === group?.name) { + if (flameChart !== this.mainFlameChart || this.#selectedGroupName === group?.name) { return; } - this.selectedGroupName = group?.name || null; + this.#selectedGroupName = group?.name || null; this.#selectedEvents = group ? this.mainDataProvider.groupTreeEvents(group) : null; this.#updateDetailViews(); } @@ -198,6 +188,7 @@ export class TimelineFlameChartView extends UI.Widget.VBox { if (model === this.model) { return; } + this.#selectedGroupName = null; this.#traceEngineData = newTraceEngineData; Common.EventTarget.removeEventListeners(this.eventListeners); this.model = model; @@ -205,17 +196,16 @@ export class TimelineFlameChartView extends UI.Widget.VBox { this.mainDataProvider.setModel(this.model, newTraceEngineData, isCpuProfile); this.networkDataProvider.setModel(newTraceEngineData); this.#reset(); - if (this.model) { - this.eventListeners = [ - this.model.addEventListener(PerformanceModelEvents.WindowChanged, this.onWindowChanged, this), - ]; - const window = this.model.window(); - this.mainFlameChart.setWindowTimes(window.left, window.right); - this.networkDataProvider.setWindowTimes(window.left, window.right); - this.networkFlameChart.setWindowTimes(window.left, window.right); - this.updateSearchResults(false, false); - this.updateColorMapper(); - } + const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (!traceBoundsState) { + throw new Error('TimelineFlameChartView could not set the window bounds.'); + } + const visibleWindow = traceBoundsState.milli.timelineTraceWindow; + this.mainFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max); + this.networkDataProvider.setWindowTimes(visibleWindow.min, visibleWindow.max); + this.networkFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max); + this.updateSearchResults(false, false); + this.updateColorMapper(); this.#updateFlameCharts(); } #reset() { @@ -233,7 +223,7 @@ export class TimelineFlameChartView extends UI.Widget.VBox { this.updateSearchResults(false, false); } #updateDetailViews() { - this.countersView.setModel(this.model, this.#traceEngineData, this.#selectedEvents); + this.countersView.setModel(this.#traceEngineData, this.#selectedEvents); // TODO(crbug.com/1459265): Change to await after migration work. void this.detailsView.setModel(this.model, this.#traceEngineData, this.#selectedEvents); } @@ -317,7 +307,7 @@ export class TimelineFlameChartView extends UI.Widget.VBox { } onEntrySelected(dataProvider, event) { const entryIndex = event.data; - if (Root.Runtime.experiments.isEnabled('timelineEventInitiators') && dataProvider === this.mainDataProvider) { + if (dataProvider === this.mainDataProvider) { if (this.mainDataProvider.buildFlowForInitiator(entryIndex)) { this.mainFlameChart.scheduleUpdate(); } @@ -367,6 +357,10 @@ export class TimelineFlameChartView extends UI.Widget.VBox { } } updateSearchResults(shouldJump, jumpBackwards) { + const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (!traceBoundsState) { + return; + } const oldSelectedSearchResult = this.selectedSearchResult; delete this.selectedSearchResult; this.searchResults = []; @@ -374,8 +368,8 @@ export class TimelineFlameChartView extends UI.Widget.VBox { return; } const regExpFilter = new TimelineRegExp(this.searchRegex); - const window = this.model.window(); - this.searchResults = this.mainDataProvider.search(window.left, window.right, regExpFilter); + const visibleWindow = traceBoundsState.milli.timelineTraceWindow; + this.searchResults = this.mainDataProvider.search(visibleWindow.min, visibleWindow.max, regExpFilter); this.searchableView.updateSearchMatchesCount(this.searchResults.length); if (!shouldJump || !this.searchResults.length) { return; diff --git a/public/panels/timeline/TimelineFlameChartView.js.map b/public/panels/timeline/TimelineFlameChartView.js.map index 9e00069d9..5aa63a5ac 100644 --- a/public/panels/timeline/TimelineFlameChartView.js.map +++ b/public/panels/timeline/TimelineFlameChartView.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineFlameChartView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineFlameChartView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AA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C,CAAC;YAC1C,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACzC,OAAO,CAAC,MAAM,EAAE,CAAC;SAClB;QACD,OAAO,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC;CACF;AAED,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,sBAAW,CAAA;AACb,CAAC,EAFW,OAAO,KAAP,OAAO,QAElB","sourcesContent":["// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {CountersGraph} from './CountersGraph.js';\nimport {Events as PerformanceModelEvents, type PerformanceModel, type WindowChangedEvent} from './PerformanceModel.js';\nimport {TimelineDetailsView} from './TimelineDetailsView.js';\nimport {TimelineRegExp} from './TimelineFilters.js';\nimport {\n Events as TimelineFlameChartDataProviderEvents,\n TimelineFlameChartDataProvider,\n} from './TimelineFlameChartDataProvider.js';\nimport {TimelineFlameChartNetworkDataProvider} from './TimelineFlameChartNetworkDataProvider.js';\nimport {type TimelineModeViewDelegate} from './TimelinePanel.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport {AggregatedTimelineTreeView} from './TimelineTreeView.js';\nimport {type TimelineMarkerStyle, TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Flame Chart View of the Performance panel\n *@example {Frame} PH1\n *@example {10ms} PH2\n */\n sAtS: '{PH1} at {PH2}',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineFlameChartView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class TimelineFlameChartView extends UI.Widget.VBox implements PerfUI.FlameChart.FlameChartDelegate,\n UI.SearchableView.Searchable {\n private readonly delegate: TimelineModeViewDelegate;\n private model: PerformanceModel|null;\n private searchResults!: number[]|undefined;\n private eventListeners: Common.EventTarget.EventDescriptor[];\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly showMemoryGraphSetting: Common.Settings.Setting;\n private readonly networkSplitWidget: UI.SplitWidget.SplitWidget;\n private mainDataProvider: TimelineFlameChartDataProvider;\n private readonly mainFlameChart: PerfUI.FlameChart.FlameChart;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly networkFlameChartGroupExpansionSetting: Common.Settings.Setting;\n private networkDataProvider: TimelineFlameChartNetworkDataProvider;\n private readonly networkFlameChart: PerfUI.FlameChart.FlameChart;\n private readonly networkPane: UI.Widget.VBox;\n private readonly splitResizer: HTMLElement;\n private readonly chartSplitWidget: UI.SplitWidget.SplitWidget;\n private readonly countersView: CountersGraph;\n private readonly detailsSplitWidget: UI.SplitWidget.SplitWidget;\n private readonly detailsView: TimelineDetailsView;\n private readonly onMainEntrySelected: (event: Common.EventTarget.EventTargetEvent) => void;\n private readonly onNetworkEntrySelected: (event: Common.EventTarget.EventTargetEvent) => void;\n private readonly boundRefresh: () => void;\n #selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[]|null;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly groupBySetting: Common.Settings.Setting;\n private searchableView!: UI.SearchableView.SearchableView;\n private needsResizeToPreferredHeights?: boolean;\n private selectedSearchResult?: number;\n private searchRegex?: RegExp;\n #traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null;\n #currentBreadcrumbTimeWindow?: TraceEngine.Types.Timing.TraceWindowMicroSeconds;\n private selectedGroupName: string|null = null;\n constructor(delegate: TimelineModeViewDelegate) {\n super();\n this.element.classList.add('timeline-flamechart');\n this.delegate = delegate;\n this.model = null;\n this.eventListeners = [];\n this.#traceEngineData = null;\n\n this.showMemoryGraphSetting = Common.Settings.Settings.instance().createSetting('timelineShowMemory', false);\n\n // Create main and network flamecharts.\n this.networkSplitWidget = new UI.SplitWidget.SplitWidget(false, false, 'timelineFlamechartMainView', 150);\n\n // Ensure that the network panel & resizer appears above the main thread.\n this.networkSplitWidget.sidebarElement().style.zIndex = '120';\n\n const mainViewGroupExpansionSetting =\n Common.Settings.Settings.instance().createSetting('timelineFlamechartMainViewGroupExpansion', {});\n this.mainDataProvider = new TimelineFlameChartDataProvider();\n this.mainDataProvider.addEventListener(\n TimelineFlameChartDataProviderEvents.DataChanged, () => this.mainFlameChart.scheduleUpdate());\n this.mainFlameChart = new PerfUI.FlameChart.FlameChart(this.mainDataProvider, this, mainViewGroupExpansionSetting);\n this.mainFlameChart.alwaysShowVerticalScroll();\n this.mainFlameChart.enableRuler(false);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.TreeModified, event => {\n this.mainDataProvider.modifyTree(event.data.group, event.data.node, event.data.action, this.mainFlameChart);\n });\n\n this.networkFlameChartGroupExpansionSetting =\n Common.Settings.Settings.instance().createSetting('timelineFlamechartNetworkViewGroupExpansion', {});\n this.networkDataProvider = new TimelineFlameChartNetworkDataProvider();\n this.networkFlameChart =\n new PerfUI.FlameChart.FlameChart(this.networkDataProvider, this, this.networkFlameChartGroupExpansionSetting);\n this.networkFlameChart.alwaysShowVerticalScroll();\n\n this.networkPane = new UI.Widget.VBox();\n this.networkPane.setMinimumSize(23, 23);\n this.networkFlameChart.show(this.networkPane.element);\n this.splitResizer = this.networkPane.element.createChild('div', 'timeline-flamechart-resizer');\n this.networkSplitWidget.hideDefaultResizer(true);\n this.networkSplitWidget.installResizer(this.splitResizer);\n this.networkSplitWidget.setMainWidget(this.mainFlameChart);\n this.networkSplitWidget.setSidebarWidget(this.networkPane);\n\n // Create counters chart splitter.\n this.chartSplitWidget = new UI.SplitWidget.SplitWidget(false, true, 'timelineCountersSplitViewState');\n this.countersView = new CountersGraph(this.delegate);\n this.chartSplitWidget.setMainWidget(this.networkSplitWidget);\n this.chartSplitWidget.setSidebarWidget(this.countersView);\n this.chartSplitWidget.hideDefaultResizer();\n this.chartSplitWidget.installResizer((this.countersView.resizerElement() as Element));\n this.updateCountersGraphToggle();\n\n // Create top level properties splitter.\n this.detailsSplitWidget = new UI.SplitWidget.SplitWidget(false, true, 'timelinePanelDetailsSplitViewState');\n this.detailsSplitWidget.element.classList.add('timeline-details-split');\n this.detailsView = new TimelineDetailsView(delegate);\n this.detailsSplitWidget.installResizer(this.detailsView.headerElement());\n this.detailsSplitWidget.setMainWidget(this.chartSplitWidget);\n this.detailsSplitWidget.setSidebarWidget(this.detailsView);\n this.detailsSplitWidget.show(this.element);\n\n this.onMainEntrySelected = this.onEntrySelected.bind(this, this.mainDataProvider);\n this.onNetworkEntrySelected = this.onEntrySelected.bind(this, this.networkDataProvider);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntrySelected, this.onMainEntrySelected, this);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntryInvoked, this.onMainEntrySelected, this);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntriesModified, this.onEntriesModified, this);\n this.networkFlameChart.addEventListener(PerfUI.FlameChart.Events.EntrySelected, this.onNetworkEntrySelected, this);\n this.networkFlameChart.addEventListener(PerfUI.FlameChart.Events.EntryInvoked, this.onNetworkEntrySelected, this);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntryHighlighted, this.onEntryHighlighted, this);\n\n this.boundRefresh = this.#reset.bind(this);\n this.#selectedEvents = null;\n\n this.mainDataProvider.setEventColorMapping(TimelineUIUtils.eventColor);\n this.groupBySetting = Common.Settings.Settings.instance().createSetting(\n 'timelineTreeGroupBy', AggregatedTimelineTreeView.GroupBy.None);\n this.groupBySetting.addChangeListener(this.updateColorMapper, this);\n this.updateColorMapper();\n }\n\n onEntriesModified(): void {\n if (!this.model) {\n return;\n }\n this.mainDataProvider.timelineData(true);\n const window = this.model.window();\n if (window) {\n this.mainFlameChart.setWindowTimes(window.left, window.right);\n }\n this.mainFlameChart.update();\n }\n\n isNetworkTrackShownForTests(): boolean {\n return this.networkSplitWidget.showMode() !== UI.SplitWidget.ShowMode.OnlyMain;\n }\n\n updateColorMapper(): void {\n if (!this.model) {\n return;\n }\n this.mainDataProvider.setEventColorMapping(TimelineUIUtils.eventColor);\n this.mainFlameChart.update();\n }\n\n private onWindowChanged(event: Common.EventTarget.EventTargetEvent): void {\n const {window, animate} = event.data;\n\n if (event.data.breadcrumbWindow) {\n this.#currentBreadcrumbTimeWindow = event.data.breadcrumbWindow;\n } else {\n this.#currentBreadcrumbTimeWindow = undefined;\n }\n\n // If breadcrumbs are not activated, update window times at all times,\n // If breadcrumbs exist, do not update to window times outside the breadcrumb\n const isWindowWithinBreadcrumb =\n (this.#currentBreadcrumbTimeWindow &&\n !(this.#currentBreadcrumbTimeWindow.min > window.left ||\n this.#currentBreadcrumbTimeWindow.max < window.right));\n if (!this.#currentBreadcrumbTimeWindow || isWindowWithinBreadcrumb) {\n this.mainFlameChart.setWindowTimes(window.left, window.right, animate);\n this.networkDataProvider.setWindowTimes(window.left, window.right);\n this.networkFlameChart.setWindowTimes(window.left, window.right, animate);\n }\n\n this.updateSearchResults(false, false);\n }\n\n windowChanged(windowStartTime: number, windowEndTime: number, animate: boolean): void {\n if (this.model) {\n this.model.setWindow({left: windowStartTime, right: windowEndTime}, animate, this.#currentBreadcrumbTimeWindow);\n }\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n TraceEngine.Types.Timing.MilliSeconds(windowStartTime),\n TraceEngine.Types.Timing.MilliSeconds(windowEndTime),\n ),\n {shouldAnimate: animate},\n );\n }\n\n updateRangeSelection(startTime: number, endTime: number): void {\n this.delegate.select(TimelineSelection.fromRange(startTime, endTime));\n }\n\n getMainFlameChart(): PerfUI.FlameChart.FlameChart {\n return this.mainFlameChart;\n }\n\n updateSelectedGroup(flameChart: PerfUI.FlameChart.FlameChart, group: PerfUI.FlameChart.Group|null): void {\n if (flameChart !== this.mainFlameChart || this.selectedGroupName === group?.name) {\n return;\n }\n this.selectedGroupName = group?.name || null;\n this.#selectedEvents = group ? this.mainDataProvider.groupTreeEvents(group) : null;\n this.#updateDetailViews();\n }\n\n setModel(\n model: PerformanceModel|null, newTraceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n isCpuProfile = false): void {\n if (model === this.model) {\n return;\n }\n this.#traceEngineData = newTraceEngineData;\n Common.EventTarget.removeEventListeners(this.eventListeners);\n this.model = model;\n this.#selectedEvents = null;\n this.mainDataProvider.setModel(this.model, newTraceEngineData, isCpuProfile);\n this.networkDataProvider.setModel(newTraceEngineData);\n this.#reset();\n if (this.model) {\n this.eventListeners = [\n this.model.addEventListener(PerformanceModelEvents.WindowChanged, this.onWindowChanged, this),\n ];\n const window = this.model.window();\n this.mainFlameChart.setWindowTimes(window.left, window.right);\n this.networkDataProvider.setWindowTimes(window.left, window.right);\n this.networkFlameChart.setWindowTimes(window.left, window.right);\n this.updateSearchResults(false, false);\n this.updateColorMapper();\n }\n this.#updateFlameCharts();\n }\n\n #reset(): void {\n if (this.networkDataProvider.isEmpty()) {\n this.mainFlameChart.enableRuler(true);\n this.networkSplitWidget.hideSidebar();\n } else {\n this.mainFlameChart.enableRuler(false);\n this.networkSplitWidget.showBoth();\n this.resizeToPreferredHeights();\n }\n this.mainFlameChart.reset();\n this.networkFlameChart.reset();\n this.updateSearchResults(false, false);\n }\n\n #updateDetailViews(): void {\n this.countersView.setModel(this.model, this.#traceEngineData, this.#selectedEvents);\n // TODO(crbug.com/1459265): Change to await after migration work.\n void this.detailsView.setModel(this.model, this.#traceEngineData, this.#selectedEvents);\n }\n\n #updateFlameCharts(): void {\n this.mainFlameChart.scheduleUpdate();\n this.networkFlameChart.scheduleUpdate();\n }\n\n private onEntryHighlighted(commonEvent: Common.EventTarget.EventTargetEvent): void {\n SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();\n const entryIndex = commonEvent.data;\n // TODO(crbug.com/1431166): explore how we can make highlighting agnostic\n // and take either legacy events, or new trace engine events. Currently if\n // this highlight comes from a TrackAppender, we create a new legacy event\n // from the event payload, mainly to satisfy this method.\n const event = this.mainDataProvider.eventByIndex(entryIndex);\n if (!event) {\n return;\n }\n const target = this.model && this.model.timelineModel().targetByEvent(event);\n if (!target) {\n return;\n }\n let backendNodeIds;\n\n // Events for tracks that are migrated to the new engine won't use\n // TimelineModel.TimelineData.\n if (event instanceof TraceEngine.Legacy.Event) {\n const timelineData = TimelineModel.TimelineModel.EventOnTimelineData.forEvent(event);\n backendNodeIds = timelineData.backendNodeIds;\n } else if (TraceEngine.Types.TraceEvents.isTraceEventLayoutShift(event)) {\n const impactedNodes = event.args.data?.impacted_nodes ?? [];\n backendNodeIds = impactedNodes.map(node => node.node_id);\n }\n\n if (!backendNodeIds) {\n return;\n }\n for (let i = 0; i < backendNodeIds.length; ++i) {\n new SDK.DOMModel.DeferredDOMNode(target, backendNodeIds[i]).highlight();\n }\n }\n\n highlightEvent(event: TraceEngine.Legacy.Event|null): void {\n const entryIndex =\n event ? this.mainDataProvider.entryIndexForSelection(TimelineSelection.fromTraceEvent(event)) : -1;\n if (entryIndex >= 0) {\n this.mainFlameChart.highlightEntry(entryIndex);\n } else {\n this.mainFlameChart.hideHighlight();\n }\n }\n\n override willHide(): void {\n this.networkFlameChartGroupExpansionSetting.removeChangeListener(this.resizeToPreferredHeights, this);\n this.showMemoryGraphSetting.removeChangeListener(this.updateCountersGraphToggle, this);\n Bindings.IgnoreListManager.IgnoreListManager.instance().removeChangeListener(this.boundRefresh);\n }\n\n override wasShown(): void {\n this.networkFlameChartGroupExpansionSetting.addChangeListener(this.resizeToPreferredHeights, this);\n this.showMemoryGraphSetting.addChangeListener(this.updateCountersGraphToggle, this);\n Bindings.IgnoreListManager.IgnoreListManager.instance().addChangeListener(this.boundRefresh);\n if (this.needsResizeToPreferredHeights) {\n this.resizeToPreferredHeights();\n }\n this.#updateFlameCharts();\n }\n\n private updateCountersGraphToggle(): void {\n if (this.showMemoryGraphSetting.get()) {\n this.chartSplitWidget.showBoth();\n } else {\n this.chartSplitWidget.hideSidebar();\n }\n }\n\n setSelection(selection: TimelineSelection|null): void {\n let index = this.mainDataProvider.entryIndexForSelection(selection);\n this.mainFlameChart.setSelectedEntry(index);\n index = this.networkDataProvider.entryIndexForSelection(selection);\n this.networkFlameChart.setSelectedEntry(index);\n if (this.detailsView) {\n // TODO(crbug.com/1459265): Change to await after migration work.\n void this.detailsView.setSelection(selection);\n }\n }\n\n private onEntrySelected(\n dataProvider: PerfUI.FlameChart.FlameChartDataProvider,\n event: Common.EventTarget.EventTargetEvent): void {\n const entryIndex = event.data;\n if (Root.Runtime.experiments.isEnabled('timelineEventInitiators') && dataProvider === this.mainDataProvider) {\n if (this.mainDataProvider.buildFlowForInitiator(entryIndex)) {\n this.mainFlameChart.scheduleUpdate();\n }\n }\n this.delegate.select((dataProvider as TimelineFlameChartNetworkDataProvider | TimelineFlameChartDataProvider)\n .createSelection(entryIndex));\n }\n\n resizeToPreferredHeights(): void {\n if (!this.isShowing()) {\n this.needsResizeToPreferredHeights = true;\n return;\n }\n this.needsResizeToPreferredHeights = false;\n this.networkPane.element.classList.toggle(\n 'timeline-network-resizer-disabled', !this.networkDataProvider.isExpanded());\n this.networkSplitWidget.setSidebarSize(\n this.networkDataProvider.preferredHeight() + this.splitResizer.clientHeight + PerfUI.FlameChart.RulerHeight +\n 2);\n }\n\n setSearchableView(searchableView: UI.SearchableView.SearchableView): void {\n this.searchableView = searchableView;\n }\n\n // UI.SearchableView.Searchable implementation\n\n jumpToNextSearchResult(): void {\n if (!this.searchResults || !this.searchResults.length) {\n return;\n }\n const index =\n typeof this.selectedSearchResult !== 'undefined' ? this.searchResults.indexOf(this.selectedSearchResult) : -1;\n this.selectSearchResult(Platform.NumberUtilities.mod(index + 1, this.searchResults.length));\n }\n\n jumpToPreviousSearchResult(): void {\n if (!this.searchResults || !this.searchResults.length) {\n return;\n }\n const index =\n typeof this.selectedSearchResult !== 'undefined' ? this.searchResults.indexOf(this.selectedSearchResult) : 0;\n this.selectSearchResult(Platform.NumberUtilities.mod(index - 1, this.searchResults.length));\n }\n\n supportsCaseSensitiveSearch(): boolean {\n return true;\n }\n\n supportsRegexSearch(): boolean {\n return true;\n }\n\n private selectSearchResult(index: number): void {\n this.searchableView.updateCurrentMatchIndex(index);\n if (this.searchResults) {\n this.selectedSearchResult = this.searchResults[index];\n this.delegate.select(this.mainDataProvider.createSelection(this.selectedSearchResult));\n }\n }\n\n private updateSearchResults(shouldJump: boolean, jumpBackwards?: boolean): void {\n const oldSelectedSearchResult = (this.selectedSearchResult as number);\n delete this.selectedSearchResult;\n this.searchResults = [];\n if (!this.searchRegex || !this.model) {\n return;\n }\n const regExpFilter = new TimelineRegExp(this.searchRegex);\n const window = this.model.window();\n this.searchResults = this.mainDataProvider.search(window.left, window.right, regExpFilter);\n this.searchableView.updateSearchMatchesCount(this.searchResults.length);\n if (!shouldJump || !this.searchResults.length) {\n return;\n }\n let selectedIndex = this.searchResults.indexOf(oldSelectedSearchResult);\n if (selectedIndex === -1) {\n selectedIndex = jumpBackwards ? this.searchResults.length - 1 : 0;\n }\n this.selectSearchResult(selectedIndex);\n }\n\n /**\n * Returns the indexes of the elements that matched the most recent\n * query. Elements are indexed by the data provider and correspond\n * to their position in the data provider entry data array.\n * Public only for tests.\n */\n getSearchResults(): number[]|undefined {\n return this.searchResults;\n }\n\n onSearchCanceled(): void {\n if (typeof this.selectedSearchResult !== 'undefined') {\n this.delegate.select(null);\n }\n delete this.searchResults;\n delete this.selectedSearchResult;\n delete this.searchRegex;\n }\n\n performSearch(searchConfig: UI.SearchableView.SearchConfig, shouldJump: boolean, jumpBackwards?: boolean): void {\n this.searchRegex = searchConfig.toSearchRegex().regex;\n this.updateSearchResults(shouldJump, jumpBackwards);\n }\n}\n\nexport class Selection {\n timelineSelection: TimelineSelection;\n entryIndex: number;\n constructor(selection: TimelineSelection, entryIndex: number) {\n this.timelineSelection = selection;\n this.entryIndex = entryIndex;\n }\n}\n\nexport const FlameChartStyle = {\n textColor: '#333',\n};\n\nexport class TimelineFlameChartMarker implements PerfUI.FlameChart.FlameChartMarker {\n private readonly startTimeInternal: number;\n private readonly startOffset: number;\n private style: TimelineMarkerStyle;\n constructor(startTime: number, startOffset: number, style: TimelineMarkerStyle) {\n this.startTimeInternal = startTime;\n this.startOffset = startOffset;\n this.style = style;\n }\n\n startTime(): number {\n return this.startTimeInternal;\n }\n\n color(): string {\n return this.style.color;\n }\n\n title(): string|null {\n if (this.style.lowPriority) {\n return null;\n }\n const startTime = i18n.TimeUtilities.millisToString(this.startOffset);\n return i18nString(UIStrings.sAtS, {PH1: this.style.title, PH2: startTime});\n }\n\n draw(context: CanvasRenderingContext2D, x: number, height: number, pixelsPerMillisecond: number): void {\n const lowPriorityVisibilityThresholdInPixelsPerMs = 4;\n\n if (this.style.lowPriority && pixelsPerMillisecond < lowPriorityVisibilityThresholdInPixelsPerMs) {\n return;\n }\n\n context.save();\n if (this.style.tall) {\n context.strokeStyle = this.style.color;\n context.lineWidth = this.style.lineWidth;\n context.translate(this.style.lineWidth < 1 || (this.style.lineWidth & 1) ? 0.5 : 0, 0.5);\n context.beginPath();\n context.moveTo(x, 0);\n context.setLineDash(this.style.dashStyle);\n context.lineTo(x, context.canvas.height);\n context.stroke();\n }\n context.restore();\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ColorBy {\n URL = 'URL',\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineFlameChartView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineFlameChartView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6CAA6C,CAAC;AAC3E,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,MAAM,IAAI,oCAAoC,EAC9C,8BAA8B,GAC/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAC,qCAAqC,EAAC,MAAM,4CAA4C,CAAC;AAEjG,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,0BAA0B,EAAC,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAA2B,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAE/E,MAAM,SAAS,GAAG;IAChB;;;;OAIG;IACH,IAAI,EAAE,gBAAgB;CACvB,C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AAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YACzF,OAAO,CAAC,SAAS,EAAE,CAAC;YACpB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACrB,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAC1C,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACzC,OAAO,CAAC,MAAM,EAAE,CAAC;SAClB;QACD,OAAO,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC;CACF;AAED,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,sBAAW,CAAA;AACb,CAAC,EAFW,OAAO,KAAP,OAAO,QAElB","sourcesContent":["// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {CountersGraph} from './CountersGraph.js';\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {TimelineDetailsView} from './TimelineDetailsView.js';\nimport {TimelineRegExp} from './TimelineFilters.js';\nimport {\n Events as TimelineFlameChartDataProviderEvents,\n TimelineFlameChartDataProvider,\n} from './TimelineFlameChartDataProvider.js';\nimport {TimelineFlameChartNetworkDataProvider} from './TimelineFlameChartNetworkDataProvider.js';\nimport {type TimelineModeViewDelegate} from './TimelinePanel.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport {AggregatedTimelineTreeView} from './TimelineTreeView.js';\nimport {type TimelineMarkerStyle, TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Flame Chart View of the Performance panel\n *@example {Frame} PH1\n *@example {10ms} PH2\n */\n sAtS: '{PH1} at {PH2}',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineFlameChartView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class TimelineFlameChartView extends UI.Widget.VBox implements PerfUI.FlameChart.FlameChartDelegate,\n UI.SearchableView.Searchable {\n private readonly delegate: TimelineModeViewDelegate;\n private model: PerformanceModel|null;\n private searchResults!: number[]|undefined;\n private eventListeners: Common.EventTarget.EventDescriptor[];\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly showMemoryGraphSetting: Common.Settings.Setting;\n private readonly networkSplitWidget: UI.SplitWidget.SplitWidget;\n private mainDataProvider: TimelineFlameChartDataProvider;\n private readonly mainFlameChart: PerfUI.FlameChart.FlameChart;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly networkFlameChartGroupExpansionSetting: Common.Settings.Setting;\n private networkDataProvider: TimelineFlameChartNetworkDataProvider;\n private readonly networkFlameChart: PerfUI.FlameChart.FlameChart;\n private readonly networkPane: UI.Widget.VBox;\n private readonly splitResizer: HTMLElement;\n private readonly chartSplitWidget: UI.SplitWidget.SplitWidget;\n private readonly countersView: CountersGraph;\n private readonly detailsSplitWidget: UI.SplitWidget.SplitWidget;\n private readonly detailsView: TimelineDetailsView;\n private readonly onMainEntrySelected: (event: Common.EventTarget.EventTargetEvent) => void;\n private readonly onNetworkEntrySelected: (event: Common.EventTarget.EventTargetEvent) => void;\n private readonly boundRefresh: () => void;\n #selectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[]|null;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly groupBySetting: Common.Settings.Setting;\n private searchableView!: UI.SearchableView.SearchableView;\n private needsResizeToPreferredHeights?: boolean;\n private selectedSearchResult?: number;\n private searchRegex?: RegExp;\n #traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null;\n #selectedGroupName: string|null = null;\n #onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this);\n constructor(delegate: TimelineModeViewDelegate) {\n super();\n this.element.classList.add('timeline-flamechart');\n this.delegate = delegate;\n this.model = null;\n this.eventListeners = [];\n this.#traceEngineData = null;\n\n this.showMemoryGraphSetting = Common.Settings.Settings.instance().createSetting('timelineShowMemory', false);\n\n // Create main and network flamecharts.\n this.networkSplitWidget = new UI.SplitWidget.SplitWidget(false, false, 'timelineFlamechartMainView', 150);\n\n // Ensure that the network panel & resizer appears above the main thread.\n this.networkSplitWidget.sidebarElement().style.zIndex = '120';\n\n const mainViewGroupExpansionSetting =\n Common.Settings.Settings.instance().createSetting('timelineFlamechartMainViewGroupExpansion', {});\n this.mainDataProvider = new TimelineFlameChartDataProvider();\n this.mainDataProvider.addEventListener(\n TimelineFlameChartDataProviderEvents.DataChanged, () => this.mainFlameChart.scheduleUpdate());\n this.mainFlameChart = new PerfUI.FlameChart.FlameChart(this.mainDataProvider, this, mainViewGroupExpansionSetting);\n this.mainFlameChart.alwaysShowVerticalScroll();\n this.mainFlameChart.enableRuler(false);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.TreeModified, event => {\n this.mainDataProvider.modifyTree(event.data.group, event.data.node, event.data.action, this.mainFlameChart);\n });\n\n this.networkFlameChartGroupExpansionSetting =\n Common.Settings.Settings.instance().createSetting('timelineFlamechartNetworkViewGroupExpansion', {});\n this.networkDataProvider = new TimelineFlameChartNetworkDataProvider();\n this.networkFlameChart =\n new PerfUI.FlameChart.FlameChart(this.networkDataProvider, this, this.networkFlameChartGroupExpansionSetting);\n this.networkFlameChart.alwaysShowVerticalScroll();\n\n this.networkPane = new UI.Widget.VBox();\n this.networkPane.setMinimumSize(23, 23);\n this.networkFlameChart.show(this.networkPane.element);\n this.splitResizer = this.networkPane.element.createChild('div', 'timeline-flamechart-resizer');\n this.networkSplitWidget.hideDefaultResizer(true);\n this.networkSplitWidget.installResizer(this.splitResizer);\n this.networkSplitWidget.setMainWidget(this.mainFlameChart);\n this.networkSplitWidget.setSidebarWidget(this.networkPane);\n\n // Create counters chart splitter.\n this.chartSplitWidget = new UI.SplitWidget.SplitWidget(false, true, 'timelineCountersSplitViewState');\n this.countersView = new CountersGraph(this.delegate);\n this.chartSplitWidget.setMainWidget(this.networkSplitWidget);\n this.chartSplitWidget.setSidebarWidget(this.countersView);\n this.chartSplitWidget.hideDefaultResizer();\n this.chartSplitWidget.installResizer((this.countersView.resizerElement() as Element));\n this.updateCountersGraphToggle();\n\n // Create top level properties splitter.\n this.detailsSplitWidget = new UI.SplitWidget.SplitWidget(false, true, 'timelinePanelDetailsSplitViewState');\n this.detailsSplitWidget.element.classList.add('timeline-details-split');\n this.detailsView = new TimelineDetailsView(delegate);\n this.detailsSplitWidget.installResizer(this.detailsView.headerElement());\n this.detailsSplitWidget.setMainWidget(this.chartSplitWidget);\n this.detailsSplitWidget.setSidebarWidget(this.detailsView);\n this.detailsSplitWidget.show(this.element);\n\n this.onMainEntrySelected = this.onEntrySelected.bind(this, this.mainDataProvider);\n this.onNetworkEntrySelected = this.onEntrySelected.bind(this, this.networkDataProvider);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntrySelected, this.onMainEntrySelected, this);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntryInvoked, this.onMainEntrySelected, this);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntriesModified, this.onEntriesModified, this);\n this.networkFlameChart.addEventListener(PerfUI.FlameChart.Events.EntrySelected, this.onNetworkEntrySelected, this);\n this.networkFlameChart.addEventListener(PerfUI.FlameChart.Events.EntryInvoked, this.onNetworkEntrySelected, this);\n this.mainFlameChart.addEventListener(PerfUI.FlameChart.Events.EntryHighlighted, this.onEntryHighlighted, this);\n\n this.boundRefresh = this.#reset.bind(this);\n this.#selectedEvents = null;\n\n this.mainDataProvider.setEventColorMapping(TimelineUIUtils.eventColor);\n this.groupBySetting = Common.Settings.Settings.instance().createSetting(\n 'timelineTreeGroupBy', AggregatedTimelineTreeView.GroupBy.None);\n this.groupBySetting.addChangeListener(this.updateColorMapper, this);\n this.updateColorMapper();\n\n TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound);\n }\n\n #onTraceBoundsChange(event: TraceBounds.TraceBounds.StateChangedEvent): void {\n if (event.updateType === 'MINIMAP_BOUNDS') {\n // If the update type was a changing of the minimap bounds, we do not\n // need to redraw the timeline.\n return;\n }\n\n const visibleWindow = event.state.milli.timelineTraceWindow;\n const shouldAnimate = Boolean(event.options.shouldAnimate);\n this.mainFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max, shouldAnimate);\n this.networkDataProvider.setWindowTimes(visibleWindow.min, visibleWindow.max);\n this.networkFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max, shouldAnimate);\n this.updateSearchResults(false, false);\n }\n\n onEntriesModified(): void {\n if (!this.model) {\n return;\n }\n this.mainDataProvider.timelineData(true);\n const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (traceBoundsState) {\n const visibleWindow = traceBoundsState.milli.timelineTraceWindow;\n this.mainFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max);\n }\n this.mainFlameChart.update();\n }\n\n isNetworkTrackShownForTests(): boolean {\n return this.networkSplitWidget.showMode() !== UI.SplitWidget.ShowMode.OnlyMain;\n }\n\n updateColorMapper(): void {\n if (!this.model) {\n return;\n }\n this.mainDataProvider.setEventColorMapping(TimelineUIUtils.eventColor);\n this.mainFlameChart.update();\n }\n\n windowChanged(\n windowStartTime: TraceEngine.Types.Timing.MilliSeconds, windowEndTime: TraceEngine.Types.Timing.MilliSeconds,\n animate: boolean): void {\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n TraceEngine.Types.Timing.MilliSeconds(windowStartTime),\n TraceEngine.Types.Timing.MilliSeconds(windowEndTime),\n ),\n {shouldAnimate: animate},\n );\n }\n\n updateRangeSelection(startTime: number, endTime: number): void {\n this.delegate.select(TimelineSelection.fromRange(startTime, endTime));\n }\n\n getMainFlameChart(): PerfUI.FlameChart.FlameChart {\n return this.mainFlameChart;\n }\n\n updateSelectedGroup(flameChart: PerfUI.FlameChart.FlameChart, group: PerfUI.FlameChart.Group|null): void {\n if (flameChart !== this.mainFlameChart || this.#selectedGroupName === group?.name) {\n return;\n }\n this.#selectedGroupName = group?.name || null;\n this.#selectedEvents = group ? this.mainDataProvider.groupTreeEvents(group) : null;\n this.#updateDetailViews();\n }\n\n setModel(\n model: PerformanceModel|null, newTraceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n isCpuProfile = false): void {\n if (model === this.model) {\n return;\n }\n this.#selectedGroupName = null;\n this.#traceEngineData = newTraceEngineData;\n Common.EventTarget.removeEventListeners(this.eventListeners);\n this.model = model;\n this.#selectedEvents = null;\n this.mainDataProvider.setModel(this.model, newTraceEngineData, isCpuProfile);\n this.networkDataProvider.setModel(newTraceEngineData);\n this.#reset();\n\n const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (!traceBoundsState) {\n throw new Error('TimelineFlameChartView could not set the window bounds.');\n }\n const visibleWindow = traceBoundsState.milli.timelineTraceWindow;\n this.mainFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max);\n this.networkDataProvider.setWindowTimes(visibleWindow.min, visibleWindow.max);\n this.networkFlameChart.setWindowTimes(visibleWindow.min, visibleWindow.max);\n this.updateSearchResults(false, false);\n this.updateColorMapper();\n this.#updateFlameCharts();\n }\n\n #reset(): void {\n if (this.networkDataProvider.isEmpty()) {\n this.mainFlameChart.enableRuler(true);\n this.networkSplitWidget.hideSidebar();\n } else {\n this.mainFlameChart.enableRuler(false);\n this.networkSplitWidget.showBoth();\n this.resizeToPreferredHeights();\n }\n this.mainFlameChart.reset();\n this.networkFlameChart.reset();\n this.updateSearchResults(false, false);\n }\n\n #updateDetailViews(): void {\n this.countersView.setModel(this.#traceEngineData, this.#selectedEvents);\n // TODO(crbug.com/1459265): Change to await after migration work.\n void this.detailsView.setModel(this.model, this.#traceEngineData, this.#selectedEvents);\n }\n\n #updateFlameCharts(): void {\n this.mainFlameChart.scheduleUpdate();\n this.networkFlameChart.scheduleUpdate();\n }\n\n private onEntryHighlighted(commonEvent: Common.EventTarget.EventTargetEvent): void {\n SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();\n const entryIndex = commonEvent.data;\n // TODO(crbug.com/1431166): explore how we can make highlighting agnostic\n // and take either legacy events, or new trace engine events. Currently if\n // this highlight comes from a TrackAppender, we create a new legacy event\n // from the event payload, mainly to satisfy this method.\n const event = this.mainDataProvider.eventByIndex(entryIndex);\n if (!event) {\n return;\n }\n const target = this.model && this.model.timelineModel().targetByEvent(event);\n if (!target) {\n return;\n }\n let backendNodeIds;\n\n // Events for tracks that are migrated to the new engine won't use\n // TimelineModel.TimelineData.\n if (event instanceof TraceEngine.Legacy.Event) {\n const timelineData = TimelineModel.TimelineModel.EventOnTimelineData.forEvent(event);\n backendNodeIds = timelineData.backendNodeIds;\n } else if (TraceEngine.Types.TraceEvents.isTraceEventLayoutShift(event)) {\n const impactedNodes = event.args.data?.impacted_nodes ?? [];\n backendNodeIds = impactedNodes.map(node => node.node_id);\n }\n\n if (!backendNodeIds) {\n return;\n }\n for (let i = 0; i < backendNodeIds.length; ++i) {\n new SDK.DOMModel.DeferredDOMNode(target, backendNodeIds[i]).highlight();\n }\n }\n\n highlightEvent(event: TraceEngine.Legacy.Event|null): void {\n const entryIndex =\n event ? this.mainDataProvider.entryIndexForSelection(TimelineSelection.fromTraceEvent(event)) : -1;\n if (entryIndex >= 0) {\n this.mainFlameChart.highlightEntry(entryIndex);\n } else {\n this.mainFlameChart.hideHighlight();\n }\n }\n\n override willHide(): void {\n this.networkFlameChartGroupExpansionSetting.removeChangeListener(this.resizeToPreferredHeights, this);\n this.showMemoryGraphSetting.removeChangeListener(this.updateCountersGraphToggle, this);\n Bindings.IgnoreListManager.IgnoreListManager.instance().removeChangeListener(this.boundRefresh);\n }\n\n override wasShown(): void {\n this.networkFlameChartGroupExpansionSetting.addChangeListener(this.resizeToPreferredHeights, this);\n this.showMemoryGraphSetting.addChangeListener(this.updateCountersGraphToggle, this);\n Bindings.IgnoreListManager.IgnoreListManager.instance().addChangeListener(this.boundRefresh);\n if (this.needsResizeToPreferredHeights) {\n this.resizeToPreferredHeights();\n }\n this.#updateFlameCharts();\n }\n\n private updateCountersGraphToggle(): void {\n if (this.showMemoryGraphSetting.get()) {\n this.chartSplitWidget.showBoth();\n } else {\n this.chartSplitWidget.hideSidebar();\n }\n }\n\n setSelection(selection: TimelineSelection|null): void {\n let index = this.mainDataProvider.entryIndexForSelection(selection);\n this.mainFlameChart.setSelectedEntry(index);\n index = this.networkDataProvider.entryIndexForSelection(selection);\n this.networkFlameChart.setSelectedEntry(index);\n if (this.detailsView) {\n // TODO(crbug.com/1459265): Change to await after migration work.\n void this.detailsView.setSelection(selection);\n }\n }\n\n private onEntrySelected(\n dataProvider: PerfUI.FlameChart.FlameChartDataProvider,\n event: Common.EventTarget.EventTargetEvent): void {\n const entryIndex = event.data;\n if (dataProvider === this.mainDataProvider) {\n if (this.mainDataProvider.buildFlowForInitiator(entryIndex)) {\n this.mainFlameChart.scheduleUpdate();\n }\n }\n this.delegate.select((dataProvider as TimelineFlameChartNetworkDataProvider | TimelineFlameChartDataProvider)\n .createSelection(entryIndex));\n }\n\n resizeToPreferredHeights(): void {\n if (!this.isShowing()) {\n this.needsResizeToPreferredHeights = true;\n return;\n }\n this.needsResizeToPreferredHeights = false;\n this.networkPane.element.classList.toggle(\n 'timeline-network-resizer-disabled', !this.networkDataProvider.isExpanded());\n this.networkSplitWidget.setSidebarSize(\n this.networkDataProvider.preferredHeight() + this.splitResizer.clientHeight + PerfUI.FlameChart.RulerHeight +\n 2);\n }\n\n setSearchableView(searchableView: UI.SearchableView.SearchableView): void {\n this.searchableView = searchableView;\n }\n\n // UI.SearchableView.Searchable implementation\n\n jumpToNextSearchResult(): void {\n if (!this.searchResults || !this.searchResults.length) {\n return;\n }\n const index =\n typeof this.selectedSearchResult !== 'undefined' ? this.searchResults.indexOf(this.selectedSearchResult) : -1;\n this.selectSearchResult(Platform.NumberUtilities.mod(index + 1, this.searchResults.length));\n }\n\n jumpToPreviousSearchResult(): void {\n if (!this.searchResults || !this.searchResults.length) {\n return;\n }\n const index =\n typeof this.selectedSearchResult !== 'undefined' ? this.searchResults.indexOf(this.selectedSearchResult) : 0;\n this.selectSearchResult(Platform.NumberUtilities.mod(index - 1, this.searchResults.length));\n }\n\n supportsCaseSensitiveSearch(): boolean {\n return true;\n }\n\n supportsRegexSearch(): boolean {\n return true;\n }\n\n private selectSearchResult(index: number): void {\n this.searchableView.updateCurrentMatchIndex(index);\n if (this.searchResults) {\n this.selectedSearchResult = this.searchResults[index];\n this.delegate.select(this.mainDataProvider.createSelection(this.selectedSearchResult));\n }\n }\n\n private updateSearchResults(shouldJump: boolean, jumpBackwards?: boolean): void {\n const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (!traceBoundsState) {\n return;\n }\n\n const oldSelectedSearchResult = (this.selectedSearchResult as number);\n delete this.selectedSearchResult;\n this.searchResults = [];\n if (!this.searchRegex || !this.model) {\n return;\n }\n const regExpFilter = new TimelineRegExp(this.searchRegex);\n const visibleWindow = traceBoundsState.milli.timelineTraceWindow;\n this.searchResults = this.mainDataProvider.search(visibleWindow.min, visibleWindow.max, regExpFilter);\n this.searchableView.updateSearchMatchesCount(this.searchResults.length);\n if (!shouldJump || !this.searchResults.length) {\n return;\n }\n let selectedIndex = this.searchResults.indexOf(oldSelectedSearchResult);\n if (selectedIndex === -1) {\n selectedIndex = jumpBackwards ? this.searchResults.length - 1 : 0;\n }\n this.selectSearchResult(selectedIndex);\n }\n\n /**\n * Returns the indexes of the elements that matched the most recent\n * query. Elements are indexed by the data provider and correspond\n * to their position in the data provider entry data array.\n * Public only for tests.\n */\n getSearchResults(): number[]|undefined {\n return this.searchResults;\n }\n\n onSearchCanceled(): void {\n if (typeof this.selectedSearchResult !== 'undefined') {\n this.delegate.select(null);\n }\n delete this.searchResults;\n delete this.selectedSearchResult;\n delete this.searchRegex;\n }\n\n performSearch(searchConfig: UI.SearchableView.SearchConfig, shouldJump: boolean, jumpBackwards?: boolean): void {\n this.searchRegex = searchConfig.toSearchRegex().regex;\n this.updateSearchResults(shouldJump, jumpBackwards);\n }\n}\n\nexport class Selection {\n timelineSelection: TimelineSelection;\n entryIndex: number;\n constructor(selection: TimelineSelection, entryIndex: number) {\n this.timelineSelection = selection;\n this.entryIndex = entryIndex;\n }\n}\n\nexport const FlameChartStyle = {\n textColor: '#333',\n};\n\nexport class TimelineFlameChartMarker implements PerfUI.FlameChart.FlameChartMarker {\n private readonly startTimeInternal: number;\n private readonly startOffset: number;\n private style: TimelineMarkerStyle;\n constructor(startTime: number, startOffset: number, style: TimelineMarkerStyle) {\n this.startTimeInternal = startTime;\n this.startOffset = startOffset;\n this.style = style;\n }\n\n startTime(): number {\n return this.startTimeInternal;\n }\n\n color(): string {\n return this.style.color;\n }\n\n title(): string|null {\n if (this.style.lowPriority) {\n return null;\n }\n const startTime = i18n.TimeUtilities.millisToString(this.startOffset);\n return i18nString(UIStrings.sAtS, {PH1: this.style.title, PH2: startTime});\n }\n\n draw(context: CanvasRenderingContext2D, x: number, height: number, pixelsPerMillisecond: number): void {\n const lowPriorityVisibilityThresholdInPixelsPerMs = 4;\n\n if (this.style.lowPriority && pixelsPerMillisecond < lowPriorityVisibilityThresholdInPixelsPerMs) {\n return;\n }\n\n context.save();\n if (this.style.tall) {\n context.strokeStyle = this.style.color;\n context.lineWidth = this.style.lineWidth;\n context.translate(this.style.lineWidth < 1 || (this.style.lineWidth & 1) ? 0.5 : 0, 0.5);\n context.beginPath();\n context.moveTo(x, 0);\n context.setLineDash(this.style.dashStyle);\n context.lineTo(x, context.canvas.height);\n context.stroke();\n }\n context.restore();\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum ColorBy {\n URL = 'URL',\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineHistoryManager.d.ts b/public/panels/timeline/TimelineHistoryManager.d.ts index bb18717cb..6c17ad111 100644 --- a/public/panels/timeline/TimelineHistoryManager.d.ts +++ b/public/panels/timeline/TimelineHistoryManager.d.ts @@ -1,4 +1,4 @@ -import type * as TraceEngine from '../../models/trace/trace.js'; +import * as TraceEngine from '../../models/trace/trace.js'; import * as UI from '../../ui/legacy/legacy.js'; import { type PerformanceModel } from './PerformanceModel.js'; import { type TimelineMiniMap } from './TimelineMiniMap.js'; @@ -10,6 +10,7 @@ export interface NewHistoryRecordingData { data: RecordingData; filmStripForPreview: TraceEngine.Extras.FilmStrip.Data | null; traceParsedData: TraceEngine.Handlers.Types.TraceParseData; + startTime: number | null; } export declare class TimelineHistoryManager { #private; @@ -20,7 +21,7 @@ export declare class TimelineHistoryManager { private readonly allOverviews; private totalHeight; private enabled; - private lastActiveModel; + private lastActiveTraceIndex; constructor(minimapComponent?: TimelineMiniMap); addRecording(newInput: NewHistoryRecordingData): void; setEnabled(enabled: boolean): void; @@ -31,34 +32,37 @@ export declare class TimelineHistoryManager { navigate(direction: number): RecordingData | null; private setCurrentModel; private updateState; - static previewElement(performanceModel: PerformanceModel): Element; + static previewElement(traceDataIndex: number): Element; private static coarseAge; private title; - private buildPreview; - private buildTextDetails; - private buildScreenshotThumbnail; - private buildOverview; - private static dataForModel; + private static dataForTraceIndex; } export declare const maxRecordings = 5; export declare const previewWidth = 450; -export declare class DropDown implements UI.ListControl.ListDelegate { +export interface PreviewData { + preview: Element; + time: Element; + lastUsed: number; + startTime: number | null; + title: string; +} +export declare class DropDown implements UI.ListControl.ListDelegate { private readonly glassPane; private readonly listControl; private readonly focusRestorer; private selectionDone; - constructor(models: PerformanceModel[]); - static show(models: PerformanceModel[], currentModel: PerformanceModel, anchor: Element): Promise; + constructor(availableTraceDataIndexes: number[]); + static show(availableTraceDataIndexes: number[], activeTraceDataIndex: number, anchor: Element): Promise; static cancelIfShowing(): void; private show; private onMouseMove; private onClick; private onKeyDown; private close; - createElementForItem(item: PerformanceModel): Element; - heightForItem(_item: PerformanceModel): number; - isItemSelectable(_item: PerformanceModel): boolean; - selectedItemChanged(from: PerformanceModel | null, to: PerformanceModel | null, fromElement: Element | null, toElement: Element | null): void; + createElementForItem(traceDataIndex: number): Element; + heightForItem(_traceDataIndex: number): number; + isItemSelectable(_traceDataIndex: number): boolean; + selectedItemChanged(from: number | null, to: number | null, fromElement: Element | null, toElement: Element | null): void; updateSelectedItemARIA(_fromElement: Element | null, _toElement: Element | null): boolean; private static instance; } @@ -67,9 +71,3 @@ export declare class ToolbarButton extends UI.Toolbar.ToolbarItem { constructor(action: UI.ActionRegistration.Action); setText(text: string): void; } -export interface PreviewData { - preview: Element; - time: Element; - lastUsed: number; - title: string; -} diff --git a/public/panels/timeline/TimelineHistoryManager.js b/public/panels/timeline/TimelineHistoryManager.js index 41e92265d..1ff006eb7 100644 --- a/public/panels/timeline/TimelineHistoryManager.js +++ b/public/panels/timeline/TimelineHistoryManager.js @@ -4,6 +4,7 @@ import * as Common from '../../core/common/common.js'; import * as i18n from '../../core/i18n/i18n.js'; import * as Platform from '../../core/platform/platform.js'; +import * as TraceEngine from '../../models/trace/trace.js'; import * as UI from '../../ui/legacy/legacy.js'; import { TimelineEventOverviewCPUActivity, TimelineEventOverviewNetwork, TimelineEventOverviewResponsiveness, } from './TimelineEventOverview.js'; import timelineHistoryManagerStyles from './timelineHistoryManager.css.js'; @@ -60,7 +61,7 @@ export class TimelineHistoryManager { allOverviews; totalHeight; enabled; - lastActiveModel; + lastActiveTraceIndex = null; #minimapComponent; constructor(minimapComponent) { this.recordings = []; @@ -100,15 +101,16 @@ export class TimelineHistoryManager { ]; this.totalHeight = this.allOverviews.reduce((acc, entry) => acc + entry.height, 0); this.enabled = true; - this.lastActiveModel = null; } addRecording(newInput) { const { legacyModel, traceParseDataIndex } = newInput.data; const filmStrip = newInput.filmStripForPreview; - this.lastActiveModel = legacyModel; + this.lastActiveTraceIndex = traceParseDataIndex; this.recordings.unshift({ legacyModel: legacyModel, traceParseDataIndex }); - this.buildPreview(legacyModel, newInput.traceParsedData, filmStrip); - const modelTitle = this.title(legacyModel); + // Order is important: this needs to happen first because lots of the + // subsequent code depends on us storing the preview data into the map. + this.#buildAndStorePreviewData(traceParseDataIndex, newInput.traceParsedData, filmStrip, newInput.startTime); + const modelTitle = this.title(traceParseDataIndex); this.buttonInternal.setText(modelTitle); const buttonTitle = this.action.title(); UI.ARIAUtils.setLabel(this.buttonInternal.element, i18nString(UIStrings.currentSessionSS, { PH1: modelTitle, PH2: buttonTitle })); @@ -116,10 +118,10 @@ export class TimelineHistoryManager { if (this.recordings.length <= maxRecordings) { return; } - const modelUsedMoreTimeAgo = this.recordings.reduce((a, b) => lastUsedTime(a.legacyModel) < lastUsedTime(b.legacyModel) ? a : b); + const modelUsedMoreTimeAgo = this.recordings.reduce((a, b) => lastUsedTime(a.traceParseDataIndex) < lastUsedTime(b.traceParseDataIndex) ? a : b); this.recordings.splice(this.recordings.indexOf(modelUsedMoreTimeAgo), 1); - function lastUsedTime(model) { - const data = TimelineHistoryManager.dataForModel(model); + function lastUsedTime(index) { + const data = TimelineHistoryManager.dataForTraceIndex(index); if (!data) { throw new Error('Unable to find data for model'); } @@ -135,7 +137,7 @@ export class TimelineHistoryManager { } clear() { this.recordings = []; - this.lastActiveModel = null; + this.lastActiveTraceIndex = null; this.updateState(); this.buttonInternal.setText(i18nString(UIStrings.noRecordings)); this.nextNumberByDomain.clear(); @@ -145,42 +147,42 @@ export class TimelineHistoryManager { return null; } // DropDown.show() function finishes when the dropdown menu is closed via selection or losing focus - const legacyModel = await DropDown.show(this.recordings.map(recording => recording.legacyModel), this.lastActiveModel, this.buttonInternal.element); - if (!legacyModel) { + const activeTraceIndex = await DropDown.show(this.recordings.map(recording => recording.traceParseDataIndex), this.lastActiveTraceIndex, this.buttonInternal.element); + if (activeTraceIndex === null) { return null; } - const index = this.recordings.findIndex(recording => recording.legacyModel === legacyModel); + const index = this.recordings.findIndex(recording => recording.traceParseDataIndex === activeTraceIndex); if (index < 0) { console.assert(false, 'selected recording not found'); return null; } - this.setCurrentModel(legacyModel); + this.setCurrentModel(activeTraceIndex); return this.recordings[index]; } cancelIfShowing() { DropDown.cancelIfShowing(); } navigate(direction) { - if (!this.enabled || !this.lastActiveModel) { + if (!this.enabled || this.lastActiveTraceIndex === null) { return null; } - const index = this.recordings.findIndex(recording => recording.legacyModel === this.lastActiveModel); + const index = this.recordings.findIndex(recording => recording.traceParseDataIndex === this.lastActiveTraceIndex); if (index < 0) { return null; } const newIndex = Platform.NumberUtilities.clamp(index + direction, 0, this.recordings.length - 1); - const legacyModel = this.recordings[newIndex].legacyModel; - this.setCurrentModel(legacyModel); + const { traceParseDataIndex } = this.recordings[newIndex]; + this.setCurrentModel(traceParseDataIndex); return this.recordings[newIndex]; } - setCurrentModel(model) { - const data = TimelineHistoryManager.dataForModel(model); + setCurrentModel(index) { + const data = TimelineHistoryManager.dataForTraceIndex(index); if (!data) { throw new Error('Unable to find data for model'); } data.lastUsed = Date.now(); - this.lastActiveModel = model; - const modelTitle = this.title(model); + this.lastActiveTraceIndex = index; + const modelTitle = this.title(index); const buttonTitle = this.action.title(); this.buttonInternal.setText(modelTitle); UI.ARIAUtils.setLabel(this.buttonInternal.element, i18nString(UIStrings.currentSessionSS, { PH1: modelTitle, PH2: buttonTitle })); @@ -188,12 +190,12 @@ export class TimelineHistoryManager { updateState() { this.action.setEnabled(this.recordings.length > 1 && this.enabled); } - static previewElement(performanceModel) { - const data = TimelineHistoryManager.dataForModel(performanceModel); + static previewElement(traceDataIndex) { + const data = TimelineHistoryManager.dataForTraceIndex(traceDataIndex); if (!data) { throw new Error('Unable to find data for model'); } - const startedAt = performanceModel.recordStartTime(); + const startedAt = data.startTime; data.time.textContent = startedAt ? i18nString(UIStrings.sAgo, { PH1: TimelineHistoryManager.coarseAge(startedAt) }) : ''; return data.preview; @@ -210,47 +212,52 @@ export class TimelineHistoryManager { const hours = Math.round(minutes / 60); return i18nString(UIStrings.sH, { PH1: hours }); } - title(performanceModel) { - const data = TimelineHistoryManager.dataForModel(performanceModel); + title(index) { + const data = TimelineHistoryManager.dataForTraceIndex(index); if (!data) { throw new Error('Unable to find data for model'); } return data.title; } - buildPreview(performanceModel, traceParsedData, filmStrip) { - const parsedURL = Common.ParsedURL.ParsedURL.fromString(performanceModel.timelineModel().pageURL()); + #buildAndStorePreviewData(traceParseDataIndex, traceParsedData, filmStrip, startTime) { + const parsedURL = Common.ParsedURL.ParsedURL.fromString(traceParsedData.Meta.mainFrameURL); const domain = parsedURL ? parsedURL.host : ''; - const title = performanceModel.tracingModel().title() || domain; - const sequenceNumber = this.nextNumberByDomain.get(title) || 1; - const titleWithSequenceNumber = i18nString(UIStrings.sD, { PH1: title, PH2: sequenceNumber }); - this.nextNumberByDomain.set(title, sequenceNumber + 1); + const sequenceNumber = this.nextNumberByDomain.get(domain) || 1; + const titleWithSequenceNumber = i18nString(UIStrings.sD, { PH1: domain, PH2: sequenceNumber }); + this.nextNumberByDomain.set(domain, sequenceNumber + 1); const timeElement = document.createElement('span'); const preview = document.createElement('div'); preview.classList.add('preview-item'); preview.classList.add('vbox'); - const data = { preview, title: titleWithSequenceNumber, time: timeElement, lastUsed: Date.now() }; - modelToPerformanceData.set(performanceModel, data); - preview.appendChild(this.buildTextDetails(performanceModel, title, timeElement)); + const data = { + preview, + title: titleWithSequenceNumber, + time: timeElement, + lastUsed: Date.now(), + startTime, + }; + traceDataIndexToPerformancePreviewData.set(traceParseDataIndex, data); + preview.appendChild(this.#buildTextDetails(traceParsedData, domain, timeElement)); const screenshotAndOverview = preview.createChild('div', 'hbox'); - screenshotAndOverview.appendChild(this.buildScreenshotThumbnail(filmStrip)); - screenshotAndOverview.appendChild(this.buildOverview(performanceModel, traceParsedData)); + screenshotAndOverview.appendChild(this.#buildScreenshotThumbnail(filmStrip)); + screenshotAndOverview.appendChild(this.#buildOverview(traceParsedData)); return data.preview; } - buildTextDetails(performanceModel, title, timeElement) { + #buildTextDetails(traceParsedData, title, timeElement) { const container = document.createElement('div'); container.classList.add('text-details'); container.classList.add('hbox'); const nameSpan = container.createChild('span', 'name'); nameSpan.textContent = title; UI.ARIAUtils.setLabel(nameSpan, title); - const tracingModel = performanceModel.tracingModel(); - const duration = i18n.TimeUtilities.millisToString(tracingModel.maximumRecordTime() - tracingModel.minimumRecordTime(), false); + const bounds = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(traceParsedData.Meta.traceBounds); + const duration = i18n.TimeUtilities.millisToString(bounds.range, false); const timeContainer = container.createChild('span', 'time'); timeContainer.appendChild(document.createTextNode(duration)); timeContainer.appendChild(timeElement); return container; } - buildScreenshotThumbnail(filmStrip) { + #buildScreenshotThumbnail(filmStrip) { const container = document.createElement('div'); container.classList.add('screenshot-thumb'); const thumbnailAspectRatio = 3 / 2; @@ -270,7 +277,7 @@ export class TimelineHistoryManager { }); return container; } - buildOverview(performanceModel, traceParsedData) { + #buildOverview(traceParsedData) { const container = document.createElement('div'); const dPR = window.devicePixelRatio; container.style.width = previewWidth + 'px'; @@ -281,7 +288,7 @@ export class TimelineHistoryManager { const ctx = canvas.getContext('2d'); let yOffset = 0; for (const overview of this.allOverviews) { - const timelineOverviewComponent = overview.constructor(traceParsedData, performanceModel); + const timelineOverviewComponent = overview.constructor(traceParsedData); timelineOverviewComponent.update(); if (ctx) { ctx.drawImage(timelineOverviewComponent.context().canvas, 0, yOffset, dPR * previewWidth, overview.height * dPR); @@ -290,19 +297,21 @@ export class TimelineHistoryManager { } return container; } - static dataForModel(model) { - return modelToPerformanceData.get(model) || null; + static dataForTraceIndex(index) { + return traceDataIndexToPerformancePreviewData.get(index) || null; } } export const maxRecordings = 5; export const previewWidth = 450; -const modelToPerformanceData = new WeakMap(); +// The reason we store a global map is because the Dropdown component needs to +// be able to read the preview data in order to show a preview in the dropdown. +const traceDataIndexToPerformancePreviewData = new Map(); export class DropDown { glassPane; listControl; focusRestorer; selectionDone; - constructor(models) { + constructor(availableTraceDataIndexes) { this.glassPane = new UI.GlassPane.GlassPane(); this.glassPane.setSizeBehavior("MeasureContent" /* UI.GlassPane.SizeBehavior.MeasureContent */); this.glassPane.setOutsideClickCallback(() => this.close(null)); @@ -315,10 +324,9 @@ export class DropDown { }); const contentElement = shadowRoot.createChild('div', 'drop-down'); const listModel = new UI.ListModel.ListModel(); - this.listControl = - new UI.ListControl.ListControl(listModel, this, UI.ListControl.ListMode.NonViewport); + this.listControl = new UI.ListControl.ListControl(listModel, this, UI.ListControl.ListMode.NonViewport); this.listControl.element.addEventListener('mousemove', this.onMouseMove.bind(this), false); - listModel.replaceAll(models); + listModel.replaceAll(availableTraceDataIndexes); UI.ARIAUtils.markAsMenu(this.listControl.element); UI.ARIAUtils.setLabel(this.listControl.element, i18nString(UIStrings.selectTimelineSession)); contentElement.appendChild(this.listControl.element); @@ -327,12 +335,12 @@ export class DropDown { this.focusRestorer = new UI.UIUtils.ElementFocusRestorer(this.listControl.element); this.selectionDone = null; } - static show(models, currentModel, anchor) { + static show(availableTraceDataIndexes, activeTraceDataIndex, anchor) { if (DropDown.instance) { return Promise.resolve(null); } - const instance = new DropDown(models); - return instance.show(anchor, currentModel); + const instance = new DropDown(availableTraceDataIndexes); + return instance.show(anchor, activeTraceDataIndex); } static cancelIfShowing() { if (!DropDown.instance) { @@ -340,12 +348,12 @@ export class DropDown { } DropDown.instance.close(null); } - show(anchor, currentModel) { + show(anchor, activeTraceDataIndex) { DropDown.instance = this; this.glassPane.setContentAnchorBox(anchor.boxInWindow()); this.glassPane.show(this.glassPane.contentElement.ownerDocument); this.listControl.element.focus(); - this.listControl.selectItem(currentModel); + this.listControl.selectItem(activeTraceDataIndex); return new Promise(fulfill => { this.selectionDone = fulfill; }); @@ -353,7 +361,7 @@ export class DropDown { onMouseMove(event) { const node = event.target.enclosingNodeOrSelfWithClass('preview-item'); const listItem = node && this.listControl.itemForNode(node); - if (!listItem) { + if (listItem === null) { return; } this.listControl.selectItem(listItem); @@ -380,25 +388,25 @@ export class DropDown { } event.consume(true); } - close(model) { + close(traceIndex) { if (this.selectionDone) { - this.selectionDone(model); + this.selectionDone(traceIndex); } this.focusRestorer.restore(); this.glassPane.hide(); DropDown.instance = null; } - createElementForItem(item) { - const element = TimelineHistoryManager.previewElement(item); + createElementForItem(traceDataIndex) { + const element = TimelineHistoryManager.previewElement(traceDataIndex); UI.ARIAUtils.markAsMenuItem(element); element.classList.remove('selected'); return element; } - heightForItem(_item) { + heightForItem(_traceDataIndex) { console.assert(false, 'Should not be called'); return 0; } - isItemSelectable(_item) { + isItemSelectable(_traceDataIndex) { return true; } selectedItemChanged(from, to, fromElement, toElement) { diff --git a/public/panels/timeline/TimelineHistoryManager.js.map b/public/panels/timeline/TimelineHistoryManager.js.map index 498ad4bef..598ec623b 100644 --- a/public/panels/timeline/TimelineHistoryManager.js.map +++ b/public/panels/timeline/TimelineHistoryManager.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineHistoryManager.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineHistoryManager.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC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AAC;QAC/D,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;QAC3E,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAClC,MAAM,CAAC,gBAAgB,uDAAuC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACpG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,CAAC,IAAY;QAClB,IAAI,CAAC,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC;IACzC,CAAC;CACF","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport type * as TraceEngine from '../../models/trace/trace.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {\n type TimelineEventOverview,\n TimelineEventOverviewCPUActivity,\n TimelineEventOverviewNetwork,\n TimelineEventOverviewResponsiveness,\n} from './TimelineEventOverview.js';\nimport timelineHistoryManagerStyles from './timelineHistoryManager.css.js';\nimport {type TimelineMiniMap} from './TimelineMiniMap.js';\n\nconst UIStrings = {\n /**\n *@description Screen reader label for the Timeline History dropdown button\n *@example {example.com #3} PH1\n *@example {Show recent timeline sessions} PH2\n */\n currentSessionSS: 'Current Session: {PH1}. {PH2}',\n /**\n *@description Text that shows there is no recording\n */\n noRecordings: '(no recordings)',\n /**\n *@description Text in Timeline History Manager of the Performance panel\n *@example {2s} PH1\n */\n sAgo: '({PH1} ago)',\n /**\n *@description Text in Timeline History Manager of the Performance panel\n */\n moments: 'moments',\n /**\n * @description Text in Timeline History Manager of the Performance panel.\n * Placeholder is a number and the 'm' is the short form for 'minutes'.\n * @example {2} PH1\n */\n sM: '{PH1} m',\n /**\n * @description Text in Timeline History Manager of the Performance panel.\n * Placeholder is a number and the 'h' is the short form for 'hours'.\n * @example {2} PH1\n */\n sH: '{PH1} h',\n /**\n *@description Text in Timeline History Manager of the Performance panel\n *@example {example.com} PH1\n *@example {2} PH2\n */\n sD: '{PH1} #{PH2}',\n /**\n *@description Accessible label for the timeline session selection menu\n */\n selectTimelineSession: 'Select Timeline Session',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineHistoryManager.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport type RecordingData = {\n legacyModel: PerformanceModel,\n traceParseDataIndex: number,\n};\n\nexport interface NewHistoryRecordingData {\n // The data we will save to restore later.\n data: RecordingData;\n // We do not store this, but need it to build the thumbnail preview.\n filmStripForPreview: TraceEngine.Extras.FilmStrip.Data|null;\n // Also not stored, but used to create the preview overview for a new trace.\n traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n}\n\nexport class TimelineHistoryManager {\n private recordings: RecordingData[];\n private readonly action: UI.ActionRegistration.Action;\n private readonly nextNumberByDomain: Map;\n private readonly buttonInternal: ToolbarButton;\n private readonly allOverviews: {\n constructor: (traceParsedData: TraceEngine.Handlers.Types.TraceParseData, performanceModel: PerformanceModel) =>\n TimelineEventOverview,\n height: number,\n }[];\n private totalHeight: number;\n private enabled: boolean;\n private lastActiveModel: PerformanceModel|null;\n #minimapComponent?: TimelineMiniMap;\n constructor(minimapComponent?: TimelineMiniMap) {\n this.recordings = [];\n this.#minimapComponent = minimapComponent;\n this.action = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.show-history');\n this.nextNumberByDomain = new Map();\n this.buttonInternal = new ToolbarButton(this.action);\n\n UI.ARIAUtils.markAsMenuButton(this.buttonInternal.element);\n this.clear();\n\n // Attempt to reuse the overviews coming from the panel's minimap\n // before creating new instances.\n this.allOverviews = [\n {\n\n constructor: (traceParsedData): TimelineEventOverviewResponsiveness => {\n const responsivenessOverviewFromMinimap =\n this.#minimapComponent?.getControls().find(\n control => control instanceof TimelineEventOverviewResponsiveness) as\n TimelineEventOverviewResponsiveness;\n return responsivenessOverviewFromMinimap || new TimelineEventOverviewResponsiveness(traceParsedData);\n },\n height: 3,\n },\n {\n constructor: (traceParsedData): TimelineEventOverviewCPUActivity => {\n const cpuOverviewFromMinimap =\n this.#minimapComponent?.getControls().find(\n control => control instanceof TimelineEventOverviewCPUActivity) as TimelineEventOverviewCPUActivity;\n if (cpuOverviewFromMinimap) {\n return cpuOverviewFromMinimap;\n }\n return new TimelineEventOverviewCPUActivity(traceParsedData);\n },\n height: 20,\n },\n {\n constructor: (traceParsedData): TimelineEventOverviewNetwork => {\n const networkOverviewFromMinimap =\n this.#minimapComponent?.getControls().find(control => control instanceof TimelineEventOverviewNetwork) as\n TimelineEventOverviewNetwork;\n return networkOverviewFromMinimap || new TimelineEventOverviewNetwork(traceParsedData);\n },\n height: 8,\n },\n ];\n this.totalHeight = this.allOverviews.reduce((acc, entry) => acc + entry.height, 0);\n this.enabled = true;\n this.lastActiveModel = null;\n }\n\n addRecording(newInput: NewHistoryRecordingData): void {\n const {legacyModel, traceParseDataIndex} = newInput.data;\n const filmStrip = newInput.filmStripForPreview;\n this.lastActiveModel = legacyModel;\n this.recordings.unshift({legacyModel: legacyModel, traceParseDataIndex});\n\n this.buildPreview(legacyModel, newInput.traceParsedData, filmStrip);\n const modelTitle = this.title(legacyModel);\n this.buttonInternal.setText(modelTitle);\n const buttonTitle = this.action.title();\n UI.ARIAUtils.setLabel(\n this.buttonInternal.element, i18nString(UIStrings.currentSessionSS, {PH1: modelTitle, PH2: buttonTitle}));\n this.updateState();\n if (this.recordings.length <= maxRecordings) {\n return;\n }\n const modelUsedMoreTimeAgo =\n this.recordings.reduce((a, b) => lastUsedTime(a.legacyModel) < lastUsedTime(b.legacyModel) ? a : b);\n this.recordings.splice(this.recordings.indexOf(modelUsedMoreTimeAgo), 1);\n\n function lastUsedTime(model: PerformanceModel): number {\n const data = TimelineHistoryManager.dataForModel(model);\n if (!data) {\n throw new Error('Unable to find data for model');\n }\n return data.lastUsed;\n }\n }\n\n setEnabled(enabled: boolean): void {\n this.enabled = enabled;\n this.updateState();\n }\n\n button(): ToolbarButton {\n return this.buttonInternal;\n }\n\n clear(): void {\n this.recordings = [];\n this.lastActiveModel = null;\n this.updateState();\n this.buttonInternal.setText(i18nString(UIStrings.noRecordings));\n this.nextNumberByDomain.clear();\n }\n\n async showHistoryDropDown(): Promise {\n if (this.recordings.length < 2 || !this.enabled) {\n return null;\n }\n\n // DropDown.show() function finishes when the dropdown menu is closed via selection or losing focus\n const legacyModel = await DropDown.show(\n this.recordings.map(recording => recording.legacyModel), (this.lastActiveModel as PerformanceModel),\n this.buttonInternal.element);\n if (!legacyModel) {\n return null;\n }\n const index = this.recordings.findIndex(recording => recording.legacyModel === legacyModel);\n if (index < 0) {\n console.assert(false, 'selected recording not found');\n return null;\n }\n this.setCurrentModel(legacyModel);\n return this.recordings[index];\n }\n\n cancelIfShowing(): void {\n DropDown.cancelIfShowing();\n }\n\n navigate(direction: number): RecordingData|null {\n if (!this.enabled || !this.lastActiveModel) {\n return null;\n }\n const index = this.recordings.findIndex(recording => recording.legacyModel === this.lastActiveModel);\n if (index < 0) {\n return null;\n }\n const newIndex = Platform.NumberUtilities.clamp(index + direction, 0, this.recordings.length - 1);\n const legacyModel = this.recordings[newIndex].legacyModel;\n this.setCurrentModel(legacyModel);\n return this.recordings[newIndex];\n }\n\n private setCurrentModel(model: PerformanceModel): void {\n const data = TimelineHistoryManager.dataForModel(model);\n if (!data) {\n throw new Error('Unable to find data for model');\n }\n data.lastUsed = Date.now();\n this.lastActiveModel = model;\n const modelTitle = this.title(model);\n const buttonTitle = this.action.title();\n this.buttonInternal.setText(modelTitle);\n UI.ARIAUtils.setLabel(\n this.buttonInternal.element, i18nString(UIStrings.currentSessionSS, {PH1: modelTitle, PH2: buttonTitle}));\n }\n\n private updateState(): void {\n this.action.setEnabled(this.recordings.length > 1 && this.enabled);\n }\n\n static previewElement(performanceModel: PerformanceModel): Element {\n const data = TimelineHistoryManager.dataForModel(performanceModel);\n if (!data) {\n throw new Error('Unable to find data for model');\n }\n const startedAt = performanceModel.recordStartTime();\n data.time.textContent =\n startedAt ? i18nString(UIStrings.sAgo, {PH1: TimelineHistoryManager.coarseAge(startedAt)}) : '';\n return data.preview;\n }\n\n private static coarseAge(time: number): string {\n const seconds = Math.round((Date.now() - time) / 1000);\n if (seconds < 50) {\n return i18nString(UIStrings.moments);\n }\n const minutes = Math.round(seconds / 60);\n if (minutes < 50) {\n return i18nString(UIStrings.sM, {PH1: minutes});\n }\n const hours = Math.round(minutes / 60);\n return i18nString(UIStrings.sH, {PH1: hours});\n }\n\n private title(performanceModel: PerformanceModel): string {\n const data = TimelineHistoryManager.dataForModel(performanceModel);\n if (!data) {\n throw new Error('Unable to find data for model');\n }\n return data.title;\n }\n\n private buildPreview(\n performanceModel: PerformanceModel, traceParsedData: TraceEngine.Handlers.Types.TraceParseData,\n filmStrip: TraceEngine.Extras.FilmStrip.Data|null): HTMLDivElement {\n const parsedURL = Common.ParsedURL.ParsedURL.fromString(performanceModel.timelineModel().pageURL());\n const domain = parsedURL ? parsedURL.host : '';\n const title = performanceModel.tracingModel().title() || domain;\n\n const sequenceNumber = this.nextNumberByDomain.get(title) || 1;\n const titleWithSequenceNumber = i18nString(UIStrings.sD, {PH1: title, PH2: sequenceNumber});\n this.nextNumberByDomain.set(title, sequenceNumber + 1);\n const timeElement = document.createElement('span');\n\n const preview = document.createElement('div');\n preview.classList.add('preview-item');\n preview.classList.add('vbox');\n const data = {preview, title: titleWithSequenceNumber, time: timeElement, lastUsed: Date.now()};\n modelToPerformanceData.set(performanceModel, data);\n\n preview.appendChild(this.buildTextDetails(performanceModel, title, timeElement));\n const screenshotAndOverview = preview.createChild('div', 'hbox');\n screenshotAndOverview.appendChild(this.buildScreenshotThumbnail(filmStrip));\n screenshotAndOverview.appendChild(this.buildOverview(performanceModel, traceParsedData));\n return data.preview;\n }\n\n private buildTextDetails(performanceModel: PerformanceModel, title: string, timeElement: Element): Element {\n const container = document.createElement('div');\n container.classList.add('text-details');\n container.classList.add('hbox');\n const nameSpan = container.createChild('span', 'name');\n nameSpan.textContent = title;\n UI.ARIAUtils.setLabel(nameSpan, title);\n const tracingModel = performanceModel.tracingModel();\n const duration =\n i18n.TimeUtilities.millisToString(tracingModel.maximumRecordTime() - tracingModel.minimumRecordTime(), false);\n const timeContainer = container.createChild('span', 'time');\n timeContainer.appendChild(document.createTextNode(duration));\n timeContainer.appendChild(timeElement);\n return container;\n }\n\n private buildScreenshotThumbnail(filmStrip: TraceEngine.Extras.FilmStrip.Data|null): Element {\n const container = document.createElement('div');\n container.classList.add('screenshot-thumb');\n const thumbnailAspectRatio = 3 / 2;\n container.style.width = this.totalHeight * thumbnailAspectRatio + 'px';\n container.style.height = this.totalHeight + 'px';\n if (!filmStrip) {\n return container;\n }\n const lastFrame = filmStrip.frames.at(-1);\n if (!lastFrame) {\n return container;\n }\n void UI.UIUtils.loadImageFromData(lastFrame.screenshotAsString).then(img => {\n if (img) {\n container.appendChild(img);\n }\n });\n return container;\n }\n\n private buildOverview(performanceModel: PerformanceModel, traceParsedData: TraceEngine.Handlers.Types.TraceParseData):\n Element {\n const container = document.createElement('div');\n const dPR = window.devicePixelRatio;\n container.style.width = previewWidth + 'px';\n container.style.height = this.totalHeight + 'px';\n const canvas = (container.createChild('canvas') as HTMLCanvasElement);\n canvas.width = dPR * previewWidth;\n canvas.height = dPR * this.totalHeight;\n\n const ctx = canvas.getContext('2d');\n let yOffset = 0;\n\n for (const overview of this.allOverviews) {\n const timelineOverviewComponent = overview.constructor(traceParsedData, performanceModel);\n timelineOverviewComponent.update();\n if (ctx) {\n ctx.drawImage(\n timelineOverviewComponent.context().canvas, 0, yOffset, dPR * previewWidth, overview.height * dPR);\n }\n yOffset += overview.height * dPR;\n }\n return container;\n }\n\n private static dataForModel(model: PerformanceModel): PreviewData|null {\n return modelToPerformanceData.get(model) || null;\n }\n}\n\nexport const maxRecordings = 5;\nexport const previewWidth = 450;\nconst modelToPerformanceData = new WeakMap();\n\nexport class DropDown implements UI.ListControl.ListDelegate {\n private readonly glassPane: UI.GlassPane.GlassPane;\n private readonly listControl: UI.ListControl.ListControl;\n private readonly focusRestorer: UI.UIUtils.ElementFocusRestorer;\n private selectionDone: ((arg0: PerformanceModel|null) => void)|null;\n\n constructor(models: PerformanceModel[]) {\n this.glassPane = new UI.GlassPane.GlassPane();\n this.glassPane.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);\n this.glassPane.setOutsideClickCallback(() => this.close(null));\n this.glassPane.setPointerEventsBehavior(UI.GlassPane.PointerEventsBehavior.BlockedByGlassPane);\n this.glassPane.setAnchorBehavior(UI.GlassPane.AnchorBehavior.PreferBottom);\n this.glassPane.element.addEventListener('blur', () => this.close(null));\n\n const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(this.glassPane.contentElement, {\n cssFile: [timelineHistoryManagerStyles],\n delegatesFocus: undefined,\n });\n const contentElement = shadowRoot.createChild('div', 'drop-down');\n\n const listModel = new UI.ListModel.ListModel();\n this.listControl =\n new UI.ListControl.ListControl(listModel, this, UI.ListControl.ListMode.NonViewport);\n this.listControl.element.addEventListener('mousemove', this.onMouseMove.bind(this), false);\n listModel.replaceAll(models);\n\n UI.ARIAUtils.markAsMenu(this.listControl.element);\n UI.ARIAUtils.setLabel(this.listControl.element, i18nString(UIStrings.selectTimelineSession));\n contentElement.appendChild(this.listControl.element);\n contentElement.addEventListener('keydown', this.onKeyDown.bind(this), false);\n contentElement.addEventListener('click', this.onClick.bind(this), false);\n\n this.focusRestorer = new UI.UIUtils.ElementFocusRestorer(this.listControl.element);\n this.selectionDone = null;\n }\n\n static show(models: PerformanceModel[], currentModel: PerformanceModel, anchor: Element):\n Promise {\n if (DropDown.instance) {\n return Promise.resolve((null as PerformanceModel | null));\n }\n const instance = new DropDown(models);\n return instance.show(anchor, currentModel);\n }\n\n static cancelIfShowing(): void {\n if (!DropDown.instance) {\n return;\n }\n DropDown.instance.close(null);\n }\n\n private show(anchor: Element, currentModel: PerformanceModel): Promise {\n DropDown.instance = this;\n this.glassPane.setContentAnchorBox(anchor.boxInWindow());\n this.glassPane.show((this.glassPane.contentElement.ownerDocument as Document));\n this.listControl.element.focus();\n this.listControl.selectItem(currentModel);\n\n return new Promise(fulfill => {\n this.selectionDone = fulfill;\n });\n }\n\n private onMouseMove(event: Event): void {\n const node = (event.target as HTMLElement).enclosingNodeOrSelfWithClass('preview-item');\n const listItem = node && this.listControl.itemForNode(node);\n if (!listItem) {\n return;\n }\n this.listControl.selectItem(listItem);\n }\n\n private onClick(event: Event): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n if (!(event.target).enclosingNodeOrSelfWithClass('preview-item')) {\n return;\n }\n this.close(this.listControl.selectedItem());\n }\n\n private onKeyDown(event: Event): void {\n switch ((event as KeyboardEvent).key) {\n case 'Tab':\n case 'Escape':\n this.close(null);\n break;\n case 'Enter':\n this.close(this.listControl.selectedItem());\n break;\n default:\n return;\n }\n event.consume(true);\n }\n\n private close(model: PerformanceModel|null): void {\n if (this.selectionDone) {\n this.selectionDone(model);\n }\n this.focusRestorer.restore();\n this.glassPane.hide();\n DropDown.instance = null;\n }\n\n createElementForItem(item: PerformanceModel): Element {\n const element = TimelineHistoryManager.previewElement(item);\n UI.ARIAUtils.markAsMenuItem(element);\n element.classList.remove('selected');\n return element;\n }\n\n heightForItem(_item: PerformanceModel): number {\n console.assert(false, 'Should not be called');\n return 0;\n }\n\n isItemSelectable(_item: PerformanceModel): boolean {\n return true;\n }\n\n selectedItemChanged(\n from: PerformanceModel|null, to: PerformanceModel|null, fromElement: Element|null,\n toElement: Element|null): void {\n if (fromElement) {\n fromElement.classList.remove('selected');\n }\n if (toElement) {\n toElement.classList.add('selected');\n }\n }\n\n updateSelectedItemARIA(_fromElement: Element|null, _toElement: Element|null): boolean {\n return false;\n }\n\n private static instance: DropDown|null = null;\n}\n\nexport class ToolbarButton extends UI.Toolbar.ToolbarItem {\n private contentElement: HTMLElement;\n\n constructor(action: UI.ActionRegistration.Action) {\n const element = document.createElement('button');\n element.classList.add('history-dropdown-button');\n super(element);\n this.contentElement = this.element.createChild('span', 'content');\n const dropdownArrowIcon = UI.Icon.Icon.create('triangle-down');\n this.element.appendChild(dropdownArrowIcon);\n this.element.addEventListener('click', () => void action.execute(), false);\n this.setEnabled(action.enabled());\n action.addEventListener(UI.ActionRegistration.Events.Enabled, event => this.setEnabled(event.data));\n this.setTitle(action.title());\n }\n\n setText(text: string): void {\n this.contentElement.textContent = text;\n }\n}\n\nexport interface PreviewData {\n preview: Element;\n time: Element;\n lastUsed: number;\n title: string;\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineHistoryManager.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineHistoryManager.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGhD,OAAO,EAEL,gCAAgC,EAChC,4BAA4B,EAC5B,mCAAmC,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,4BAA4B,MAAM,iCAAiC,CAAC;AAG3E,MAAM,SAAS,GAAG;IAChB;;;;OAIG;IACH,gBAAgB,EAAE,+BAA+B;IACjD;;OAEG;IACH,YAA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,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACpG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,CAAC,IAAY;QAClB,IAAI,CAAC,cAAc,CAAC,WAAW,GAAG,IAAI,CAAC;IACzC,CAAC;CACF","sourcesContent":["// Copyright 2017 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {\n type TimelineEventOverview,\n TimelineEventOverviewCPUActivity,\n TimelineEventOverviewNetwork,\n TimelineEventOverviewResponsiveness,\n} from './TimelineEventOverview.js';\nimport timelineHistoryManagerStyles from './timelineHistoryManager.css.js';\nimport {type TimelineMiniMap} from './TimelineMiniMap.js';\n\nconst UIStrings = {\n /**\n *@description Screen reader label for the Timeline History dropdown button\n *@example {example.com #3} PH1\n *@example {Show recent timeline sessions} PH2\n */\n currentSessionSS: 'Current Session: {PH1}. {PH2}',\n /**\n *@description Text that shows there is no recording\n */\n noRecordings: '(no recordings)',\n /**\n *@description Text in Timeline History Manager of the Performance panel\n *@example {2s} PH1\n */\n sAgo: '({PH1} ago)',\n /**\n *@description Text in Timeline History Manager of the Performance panel\n */\n moments: 'moments',\n /**\n * @description Text in Timeline History Manager of the Performance panel.\n * Placeholder is a number and the 'm' is the short form for 'minutes'.\n * @example {2} PH1\n */\n sM: '{PH1} m',\n /**\n * @description Text in Timeline History Manager of the Performance panel.\n * Placeholder is a number and the 'h' is the short form for 'hours'.\n * @example {2} PH1\n */\n sH: '{PH1} h',\n /**\n *@description Text in Timeline History Manager of the Performance panel\n *@example {example.com} PH1\n *@example {2} PH2\n */\n sD: '{PH1} #{PH2}',\n /**\n *@description Accessible label for the timeline session selection menu\n */\n selectTimelineSession: 'Select Timeline Session',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineHistoryManager.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport type RecordingData = {\n // Store the legacy PerformanceModel. As part of the data migration we aim to\n // remove this entirely.\n legacyModel: PerformanceModel,\n // By storing only the index of this trace, the TimelinePanel can then look\n // up this trace's data (and metadata) via this index.\n traceParseDataIndex: number,\n};\n\nexport interface NewHistoryRecordingData {\n // The data we will save to restore later.\n data: RecordingData;\n // We do not store this, but need it to build the thumbnail preview.\n filmStripForPreview: TraceEngine.Extras.FilmStrip.Data|null;\n // Also not stored, but used to create the preview overview for a new trace.\n traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n // Used for the preview text\n startTime: number|null;\n}\n\nexport class TimelineHistoryManager {\n private recordings: RecordingData[];\n private readonly action: UI.ActionRegistration.Action;\n private readonly nextNumberByDomain: Map;\n private readonly buttonInternal: ToolbarButton;\n private readonly allOverviews: {\n constructor: (traceParsedData: TraceEngine.Handlers.Types.TraceParseData) => TimelineEventOverview,\n height: number,\n }[];\n private totalHeight: number;\n private enabled: boolean;\n private lastActiveTraceIndex: number|null = null;\n #minimapComponent?: TimelineMiniMap;\n constructor(minimapComponent?: TimelineMiniMap) {\n this.recordings = [];\n this.#minimapComponent = minimapComponent;\n this.action = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.show-history');\n this.nextNumberByDomain = new Map();\n this.buttonInternal = new ToolbarButton(this.action);\n\n UI.ARIAUtils.markAsMenuButton(this.buttonInternal.element);\n this.clear();\n\n // Attempt to reuse the overviews coming from the panel's minimap\n // before creating new instances.\n this.allOverviews = [\n {\n\n constructor: (traceParsedData): TimelineEventOverviewResponsiveness => {\n const responsivenessOverviewFromMinimap =\n this.#minimapComponent?.getControls().find(\n control => control instanceof TimelineEventOverviewResponsiveness) as\n TimelineEventOverviewResponsiveness;\n return responsivenessOverviewFromMinimap || new TimelineEventOverviewResponsiveness(traceParsedData);\n },\n height: 3,\n },\n {\n constructor: (traceParsedData): TimelineEventOverviewCPUActivity => {\n const cpuOverviewFromMinimap =\n this.#minimapComponent?.getControls().find(\n control => control instanceof TimelineEventOverviewCPUActivity) as TimelineEventOverviewCPUActivity;\n if (cpuOverviewFromMinimap) {\n return cpuOverviewFromMinimap;\n }\n return new TimelineEventOverviewCPUActivity(traceParsedData);\n },\n height: 20,\n },\n {\n constructor: (traceParsedData): TimelineEventOverviewNetwork => {\n const networkOverviewFromMinimap =\n this.#minimapComponent?.getControls().find(control => control instanceof TimelineEventOverviewNetwork) as\n TimelineEventOverviewNetwork;\n return networkOverviewFromMinimap || new TimelineEventOverviewNetwork(traceParsedData);\n },\n height: 8,\n },\n ];\n this.totalHeight = this.allOverviews.reduce((acc, entry) => acc + entry.height, 0);\n this.enabled = true;\n }\n\n addRecording(newInput: NewHistoryRecordingData): void {\n const {legacyModel, traceParseDataIndex} = newInput.data;\n const filmStrip = newInput.filmStripForPreview;\n this.lastActiveTraceIndex = traceParseDataIndex;\n this.recordings.unshift({legacyModel: legacyModel, traceParseDataIndex});\n\n // Order is important: this needs to happen first because lots of the\n // subsequent code depends on us storing the preview data into the map.\n this.#buildAndStorePreviewData(traceParseDataIndex, newInput.traceParsedData, filmStrip, newInput.startTime);\n\n const modelTitle = this.title(traceParseDataIndex);\n this.buttonInternal.setText(modelTitle);\n const buttonTitle = this.action.title();\n UI.ARIAUtils.setLabel(\n this.buttonInternal.element, i18nString(UIStrings.currentSessionSS, {PH1: modelTitle, PH2: buttonTitle}));\n this.updateState();\n if (this.recordings.length <= maxRecordings) {\n return;\n }\n const modelUsedMoreTimeAgo = this.recordings.reduce(\n (a, b) => lastUsedTime(a.traceParseDataIndex) < lastUsedTime(b.traceParseDataIndex) ? a : b);\n this.recordings.splice(this.recordings.indexOf(modelUsedMoreTimeAgo), 1);\n\n function lastUsedTime(index: number): number {\n const data = TimelineHistoryManager.dataForTraceIndex(index);\n if (!data) {\n throw new Error('Unable to find data for model');\n }\n return data.lastUsed;\n }\n }\n\n setEnabled(enabled: boolean): void {\n this.enabled = enabled;\n this.updateState();\n }\n\n button(): ToolbarButton {\n return this.buttonInternal;\n }\n\n clear(): void {\n this.recordings = [];\n this.lastActiveTraceIndex = null;\n this.updateState();\n this.buttonInternal.setText(i18nString(UIStrings.noRecordings));\n this.nextNumberByDomain.clear();\n }\n\n async showHistoryDropDown(): Promise {\n if (this.recordings.length < 2 || !this.enabled) {\n return null;\n }\n\n // DropDown.show() function finishes when the dropdown menu is closed via selection or losing focus\n const activeTraceIndex = await DropDown.show(\n this.recordings.map(recording => recording.traceParseDataIndex), (this.lastActiveTraceIndex as number),\n this.buttonInternal.element);\n if (activeTraceIndex === null) {\n return null;\n }\n const index = this.recordings.findIndex(recording => recording.traceParseDataIndex === activeTraceIndex);\n if (index < 0) {\n console.assert(false, 'selected recording not found');\n return null;\n }\n this.setCurrentModel(activeTraceIndex);\n return this.recordings[index];\n }\n\n cancelIfShowing(): void {\n DropDown.cancelIfShowing();\n }\n\n navigate(direction: number): RecordingData|null {\n if (!this.enabled || this.lastActiveTraceIndex === null) {\n return null;\n }\n const index = this.recordings.findIndex(recording => recording.traceParseDataIndex === this.lastActiveTraceIndex);\n if (index < 0) {\n return null;\n }\n const newIndex = Platform.NumberUtilities.clamp(index + direction, 0, this.recordings.length - 1);\n const {traceParseDataIndex} = this.recordings[newIndex];\n this.setCurrentModel(traceParseDataIndex);\n return this.recordings[newIndex];\n }\n\n private setCurrentModel(index: number): void {\n const data = TimelineHistoryManager.dataForTraceIndex(index);\n if (!data) {\n throw new Error('Unable to find data for model');\n }\n data.lastUsed = Date.now();\n this.lastActiveTraceIndex = index;\n const modelTitle = this.title(index);\n const buttonTitle = this.action.title();\n this.buttonInternal.setText(modelTitle);\n UI.ARIAUtils.setLabel(\n this.buttonInternal.element, i18nString(UIStrings.currentSessionSS, {PH1: modelTitle, PH2: buttonTitle}));\n }\n\n private updateState(): void {\n this.action.setEnabled(this.recordings.length > 1 && this.enabled);\n }\n\n static previewElement(traceDataIndex: number): Element {\n const data = TimelineHistoryManager.dataForTraceIndex(traceDataIndex);\n if (!data) {\n throw new Error('Unable to find data for model');\n }\n const startedAt = data.startTime;\n data.time.textContent =\n startedAt ? i18nString(UIStrings.sAgo, {PH1: TimelineHistoryManager.coarseAge(startedAt)}) : '';\n return data.preview;\n }\n\n private static coarseAge(time: number): string {\n const seconds = Math.round((Date.now() - time) / 1000);\n if (seconds < 50) {\n return i18nString(UIStrings.moments);\n }\n const minutes = Math.round(seconds / 60);\n if (minutes < 50) {\n return i18nString(UIStrings.sM, {PH1: minutes});\n }\n const hours = Math.round(minutes / 60);\n return i18nString(UIStrings.sH, {PH1: hours});\n }\n\n private title(index: number): string {\n const data = TimelineHistoryManager.dataForTraceIndex(index);\n if (!data) {\n throw new Error('Unable to find data for model');\n }\n return data.title;\n }\n\n #buildAndStorePreviewData(\n traceParseDataIndex: number, traceParsedData: TraceEngine.Handlers.Types.TraceParseData,\n filmStrip: TraceEngine.Extras.FilmStrip.Data|null, startTime: number|null): HTMLDivElement {\n const parsedURL = Common.ParsedURL.ParsedURL.fromString(traceParsedData.Meta.mainFrameURL);\n const domain = parsedURL ? parsedURL.host : '';\n\n const sequenceNumber = this.nextNumberByDomain.get(domain) || 1;\n const titleWithSequenceNumber = i18nString(UIStrings.sD, {PH1: domain, PH2: sequenceNumber});\n this.nextNumberByDomain.set(domain, sequenceNumber + 1);\n const timeElement = document.createElement('span');\n\n const preview = document.createElement('div');\n preview.classList.add('preview-item');\n preview.classList.add('vbox');\n const data = {\n preview,\n title: titleWithSequenceNumber,\n time: timeElement,\n lastUsed: Date.now(),\n startTime,\n };\n traceDataIndexToPerformancePreviewData.set(traceParseDataIndex, data);\n\n preview.appendChild(this.#buildTextDetails(traceParsedData, domain, timeElement));\n const screenshotAndOverview = preview.createChild('div', 'hbox');\n screenshotAndOverview.appendChild(this.#buildScreenshotThumbnail(filmStrip));\n screenshotAndOverview.appendChild(this.#buildOverview(traceParsedData));\n return data.preview;\n }\n\n #buildTextDetails(traceParsedData: TraceEngine.Handlers.Types.TraceParseData, title: string, timeElement: Element):\n Element {\n const container = document.createElement('div');\n container.classList.add('text-details');\n container.classList.add('hbox');\n const nameSpan = container.createChild('span', 'name');\n nameSpan.textContent = title;\n UI.ARIAUtils.setLabel(nameSpan, title);\n const bounds = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(traceParsedData.Meta.traceBounds);\n const duration = i18n.TimeUtilities.millisToString(bounds.range, false);\n const timeContainer = container.createChild('span', 'time');\n timeContainer.appendChild(document.createTextNode(duration));\n timeContainer.appendChild(timeElement);\n return container;\n }\n\n #buildScreenshotThumbnail(filmStrip: TraceEngine.Extras.FilmStrip.Data|null): Element {\n const container = document.createElement('div');\n container.classList.add('screenshot-thumb');\n const thumbnailAspectRatio = 3 / 2;\n container.style.width = this.totalHeight * thumbnailAspectRatio + 'px';\n container.style.height = this.totalHeight + 'px';\n if (!filmStrip) {\n return container;\n }\n const lastFrame = filmStrip.frames.at(-1);\n if (!lastFrame) {\n return container;\n }\n void UI.UIUtils.loadImageFromData(lastFrame.screenshotAsString).then(img => {\n if (img) {\n container.appendChild(img);\n }\n });\n return container;\n }\n\n #buildOverview(traceParsedData: TraceEngine.Handlers.Types.TraceParseData): Element {\n const container = document.createElement('div');\n const dPR = window.devicePixelRatio;\n container.style.width = previewWidth + 'px';\n container.style.height = this.totalHeight + 'px';\n const canvas = (container.createChild('canvas') as HTMLCanvasElement);\n canvas.width = dPR * previewWidth;\n canvas.height = dPR * this.totalHeight;\n\n const ctx = canvas.getContext('2d');\n let yOffset = 0;\n\n for (const overview of this.allOverviews) {\n const timelineOverviewComponent = overview.constructor(traceParsedData);\n timelineOverviewComponent.update();\n if (ctx) {\n ctx.drawImage(\n timelineOverviewComponent.context().canvas, 0, yOffset, dPR * previewWidth, overview.height * dPR);\n }\n yOffset += overview.height * dPR;\n }\n return container;\n }\n\n private static dataForTraceIndex(index: number): PreviewData|null {\n return traceDataIndexToPerformancePreviewData.get(index) || null;\n }\n}\n\nexport const maxRecordings = 5;\nexport const previewWidth = 450;\n// The reason we store a global map is because the Dropdown component needs to\n// be able to read the preview data in order to show a preview in the dropdown.\nconst traceDataIndexToPerformancePreviewData = new Map();\n\nexport interface PreviewData {\n preview: Element;\n time: Element;\n lastUsed: number;\n startTime: number|null;\n title: string;\n}\n\nexport class DropDown implements UI.ListControl.ListDelegate {\n private readonly glassPane: UI.GlassPane.GlassPane;\n private readonly listControl: UI.ListControl.ListControl;\n private readonly focusRestorer: UI.UIUtils.ElementFocusRestorer;\n private selectionDone: ((arg0: number|null) => void)|null;\n\n constructor(availableTraceDataIndexes: number[]) {\n this.glassPane = new UI.GlassPane.GlassPane();\n this.glassPane.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);\n this.glassPane.setOutsideClickCallback(() => this.close(null));\n this.glassPane.setPointerEventsBehavior(UI.GlassPane.PointerEventsBehavior.BlockedByGlassPane);\n this.glassPane.setAnchorBehavior(UI.GlassPane.AnchorBehavior.PreferBottom);\n this.glassPane.element.addEventListener('blur', () => this.close(null));\n\n const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(this.glassPane.contentElement, {\n cssFile: [timelineHistoryManagerStyles],\n delegatesFocus: undefined,\n });\n const contentElement = shadowRoot.createChild('div', 'drop-down');\n\n const listModel = new UI.ListModel.ListModel();\n this.listControl = new UI.ListControl.ListControl(listModel, this, UI.ListControl.ListMode.NonViewport);\n this.listControl.element.addEventListener('mousemove', this.onMouseMove.bind(this), false);\n listModel.replaceAll(availableTraceDataIndexes);\n\n UI.ARIAUtils.markAsMenu(this.listControl.element);\n UI.ARIAUtils.setLabel(this.listControl.element, i18nString(UIStrings.selectTimelineSession));\n contentElement.appendChild(this.listControl.element);\n contentElement.addEventListener('keydown', this.onKeyDown.bind(this), false);\n contentElement.addEventListener('click', this.onClick.bind(this), false);\n\n this.focusRestorer = new UI.UIUtils.ElementFocusRestorer(this.listControl.element);\n this.selectionDone = null;\n }\n\n static show(availableTraceDataIndexes: number[], activeTraceDataIndex: number, anchor: Element):\n Promise {\n if (DropDown.instance) {\n return Promise.resolve(null);\n }\n const instance = new DropDown(availableTraceDataIndexes);\n return instance.show(anchor, activeTraceDataIndex);\n }\n\n static cancelIfShowing(): void {\n if (!DropDown.instance) {\n return;\n }\n DropDown.instance.close(null);\n }\n\n private show(anchor: Element, activeTraceDataIndex: number): Promise {\n DropDown.instance = this;\n this.glassPane.setContentAnchorBox(anchor.boxInWindow());\n this.glassPane.show((this.glassPane.contentElement.ownerDocument as Document));\n this.listControl.element.focus();\n this.listControl.selectItem(activeTraceDataIndex);\n\n return new Promise(fulfill => {\n this.selectionDone = fulfill;\n });\n }\n\n private onMouseMove(event: Event): void {\n const node = (event.target as HTMLElement).enclosingNodeOrSelfWithClass('preview-item');\n const listItem = node && this.listControl.itemForNode(node);\n if (listItem === null) {\n return;\n }\n this.listControl.selectItem(listItem);\n }\n\n private onClick(event: Event): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n if (!(event.target).enclosingNodeOrSelfWithClass('preview-item')) {\n return;\n }\n this.close(this.listControl.selectedItem());\n }\n\n private onKeyDown(event: Event): void {\n switch ((event as KeyboardEvent).key) {\n case 'Tab':\n case 'Escape':\n this.close(null);\n break;\n case 'Enter':\n this.close(this.listControl.selectedItem());\n break;\n default:\n return;\n }\n event.consume(true);\n }\n\n private close(traceIndex: number|null): void {\n if (this.selectionDone) {\n this.selectionDone(traceIndex);\n }\n this.focusRestorer.restore();\n this.glassPane.hide();\n DropDown.instance = null;\n }\n\n createElementForItem(traceDataIndex: number): Element {\n const element = TimelineHistoryManager.previewElement(traceDataIndex);\n UI.ARIAUtils.markAsMenuItem(element);\n element.classList.remove('selected');\n return element;\n }\n\n heightForItem(_traceDataIndex: number): number {\n console.assert(false, 'Should not be called');\n return 0;\n }\n\n isItemSelectable(_traceDataIndex: number): boolean {\n return true;\n }\n\n selectedItemChanged(from: number|null, to: number|null, fromElement: Element|null, toElement: Element|null): void {\n if (fromElement) {\n fromElement.classList.remove('selected');\n }\n if (toElement) {\n toElement.classList.add('selected');\n }\n }\n\n updateSelectedItemARIA(_fromElement: Element|null, _toElement: Element|null): boolean {\n return false;\n }\n\n private static instance: DropDown|null = null;\n}\n\nexport class ToolbarButton extends UI.Toolbar.ToolbarItem {\n private contentElement: HTMLElement;\n\n constructor(action: UI.ActionRegistration.Action) {\n const element = document.createElement('button');\n element.classList.add('history-dropdown-button');\n super(element);\n this.contentElement = this.element.createChild('span', 'content');\n const dropdownArrowIcon = UI.Icon.Icon.create('triangle-down');\n this.element.appendChild(dropdownArrowIcon);\n this.element.addEventListener('click', () => void action.execute(), false);\n this.setEnabled(action.enabled());\n action.addEventListener(UI.ActionRegistration.Events.Enabled, event => this.setEnabled(event.data));\n this.setTitle(action.title());\n }\n\n setText(text: string): void {\n this.contentElement.textContent = text;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineLoader.js b/public/panels/timeline/TimelineLoader.js index b73f6b0f1..7dd97e699 100644 --- a/public/panels/timeline/TimelineLoader.js +++ b/public/panels/timeline/TimelineLoader.js @@ -154,7 +154,8 @@ export class TimelineLoader { this.tracingModel = null; if (this.client) { await this.client.loadingComplete( - /* collectedEvents */ [], /* tracingModel= */ null, /* exclusiveFilter= */ null, /* isCpuProfile= */ false); + /* collectedEvents */ [], /* tracingModel= */ null, /* exclusiveFilter= */ null, /* isCpuProfile= */ false, + /* recordingStartTime= */ null); this.client = null; } if (this.canceledCallback) { @@ -288,7 +289,7 @@ export class TimelineLoader { } this.tracingModel.tracingComplete(); await this.client - .loadingComplete(this.#collectedEvents, this.tracingModel, this.filter, this.isCpuProfile()); + .loadingComplete(this.#collectedEvents, this.tracingModel, this.filter, this.isCpuProfile(), /* recordingStartTime=*/ null); this.#traceFinalizedCallbackForTest?.(); } traceFinalizedForTest() { diff --git a/public/panels/timeline/TimelineLoader.js.map b/public/panels/timeline/TimelineLoader.js.map index 2433beaab..873fe3c6b 100644 --- a/public/panels/timeline/TimelineLoader.js.map +++ b/public/panels/timeline/TimelineLoader.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineLoader.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineLoader.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAGhD,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAI3D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,gCAAgC,EAAE,8CAA8C;IAChF;;OAEG;IACH,+BAA+B,EAAE,uDAAuD;IACxF;;;OAGG;IACH,sBAAsB,EAAE,gCAAgC;IACxD;;OAEG;IACH,yBAAyB,EAAE,0CAA0C;IACrE;;OAEG;IACH,yBAAyB,EAAE,8BAA8B;CAC1D,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,mCAAmC,EAAE,SAAS,CAAC,CAAC;AACzF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IACjB,MAAM,CAAc;IACpB,YAAY,CAAuC;IACnD,gBAAgB,CAAoB;IACpC,KAAK,CAAQ;IACb,MAAM,CAAS;IACf,aAAa,CAAU;IACvB,UAAU,CAAU;IACpB,WA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C9D,uHAAuH;QACvH,IAAI,CAAC,gBAAgB;YACjB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAiE,CAAC,CAAC;IACtG,CAAC;CACF;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IACf,4BAAmB,CAAA;IACnB,8CAAqC,CAAA;IACrC,wCAA+B,CAAA;IAC/B,sCAA6B,CAAA;IAC7B,gEAAuD,CAAA;IACvD,0EAAiE,CAAA;AACnE,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB","sourcesContent":["// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as Platform from '../../core/platform/platform.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nimport {type Client} from './TimelineController.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedTimelineDataUnknownJson: 'Malformed timeline data: Unknown JSON format',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedTimelineInputWrongJson: 'Malformed timeline input, wrong JSON brackets balance',\n /**\n *@description Text in Timeline Loader of the Performance panel\n *@example {Unknown JSON format} PH1\n */\n malformedTimelineDataS: 'Malformed timeline data: {PH1}',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n legacyTimelineFormatIsNot: 'Legacy Timeline format is not supported.',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedCpuProfileFormat: 'Malformed CPU profile format',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineLoader.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n/**\n * This class handles loading traces from file and URL, and from the Lighthouse panel\n * It also handles loading cpuprofiles from file, url and console.profileEnd()\n *\n * Meanwhile, the normal trace recording flow bypasses TimelineLoader entirely,\n * as it's handled from TracingManager => TimelineController.\n */\nexport class TimelineLoader implements Common.StringOutputStream.OutputStream {\n private client: Client|null;\n private tracingModel: TraceEngine.Legacy.TracingModel|null;\n private canceledCallback: (() => void)|null;\n private state: State;\n private buffer: string;\n private firstRawChunk: boolean;\n private firstChunk: boolean;\n private loadedBytes: number;\n private totalSize!: number;\n private readonly jsonTokenizer: TextUtils.TextUtils.BalancedJSONTokenizer;\n private filter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null;\n #collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n\n #traceFinalizedCallbackForTest?: () => void;\n #traceFinalizedPromiseForTest: Promise;\n\n constructor(client: Client, title?: string) {\n this.client = client;\n this.tracingModel = new TraceEngine.Legacy.TracingModel(title);\n this.canceledCallback = null;\n this.state = State.Initial;\n this.buffer = '';\n this.firstRawChunk = true;\n this.firstChunk = true;\n this.loadedBytes = 0;\n this.jsonTokenizer = new TextUtils.TextUtils.BalancedJSONTokenizer(this.writeBalancedJSON.bind(this), true);\n this.filter = null;\n\n this.#traceFinalizedPromiseForTest = new Promise(resolve => {\n this.#traceFinalizedCallbackForTest = resolve;\n });\n }\n\n static async loadFromFile(file: File, client: Client): Promise {\n const loader = new TimelineLoader(client);\n const fileReader = new Bindings.FileUtils.ChunkedFileReader(file, TransferChunkLengthBytes);\n loader.canceledCallback = fileReader.cancel.bind(fileReader);\n loader.totalSize = file.size;\n // We'll resolve and return the loader instance before finalizing the trace.\n setTimeout(async () => {\n const success = await fileReader.read(loader);\n if (!success && fileReader.error()) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loader.reportErrorAndCancelLoading((fileReader.error() as any).message);\n }\n });\n return loader;\n }\n\n static loadFromEvents(events: TraceEngine.TracingManager.EventPayload[], client: Client): TimelineLoader {\n const loader = new TimelineLoader(client);\n window.setTimeout(async () => {\n void loader.addEvents(events);\n });\n return loader;\n }\n\n static getCpuProfileFilter(): TimelineModel.TimelineModelFilter.TimelineVisibleEventsFilter {\n const visibleTypes = [];\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSFrame);\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSIdleFrame);\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSSystemFrame);\n return new TimelineModel.TimelineModelFilter.TimelineVisibleEventsFilter(visibleTypes);\n }\n\n static loadFromCpuProfile(profile: Protocol.Profiler.Profile|null, client: Client, title?: string): TimelineLoader {\n const loader = new TimelineLoader(client, title);\n loader.state = State.LoadingCPUProfileFromRecording;\n\n try {\n const events = TimelineModel.TimelineJSProfile.TimelineJSProfileProcessor.createFakeTraceFromCpuProfile(\n profile, /* tid */ 1, /* injectPageEvent */ true);\n\n loader.filter = TimelineLoader.getCpuProfileFilter();\n\n window.setTimeout(async () => {\n void loader.addEvents(events);\n });\n } catch (e) {\n console.error(e.stack);\n }\n return loader;\n }\n\n static async loadFromURL(url: Platform.DevToolsPath.UrlString, client: Client): Promise {\n const loader = new TimelineLoader(client);\n const stream = new Common.StringOutputStream.StringOutputStream();\n await client.loadingStarted();\n\n const allowRemoteFilePaths =\n Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').get();\n Host.ResourceLoader.loadAsStream(url, null, stream, finishedCallback, allowRemoteFilePaths);\n\n async function finishedCallback(\n success: boolean, _headers: {[x: string]: string},\n errorDescription: Host.ResourceLoader.LoadErrorDescription): Promise {\n if (!success) {\n return loader.reportErrorAndCancelLoading(errorDescription.message);\n }\n const txt = stream.data();\n const trace = JSON.parse(txt);\n if (Array.isArray(trace.nodes)) {\n loader.state = State.LoadingCPUProfileFromFile;\n loader.buffer = txt;\n await loader.close();\n return;\n }\n const events = Array.isArray(trace.traceEvents) ? trace.traceEvents : trace;\n void loader.addEvents(events);\n }\n\n return loader;\n }\n\n async addEvents(events: TraceEngine.TracingManager.EventPayload[]): Promise {\n await this.client?.loadingStarted();\n const eventsPerChunk = 15_000;\n for (let i = 0; i < events.length; i += eventsPerChunk) {\n const chunk = events.slice(i, i + eventsPerChunk);\n this.#collectEvents(chunk);\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(chunk);\n await this.client?.loadingProgress((i + chunk.length) / events.length);\n await new Promise(r => window.setTimeout(r)); // Yield event loop to paint.\n }\n void this.close();\n }\n\n async cancel(): Promise {\n this.tracingModel = null;\n if (this.client) {\n await this.client.loadingComplete(\n /* collectedEvents */[], /* tracingModel= */ null, /* exclusiveFilter= */ null, /* isCpuProfile= */ false);\n this.client = null;\n }\n if (this.canceledCallback) {\n this.canceledCallback();\n }\n }\n\n async write(chunk: string): Promise {\n if (!this.client) {\n return Promise.resolve();\n }\n this.loadedBytes += chunk.length;\n if (this.firstRawChunk) {\n await this.client.loadingStarted();\n // Ensure we paint the loading dialog before continuing\n await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)));\n } else {\n let progress = undefined;\n if (this.totalSize) {\n progress = this.loadedBytes / this.totalSize;\n // For compressed traces, we can't provide a definite progress percentage. So, just keep it moving.\n progress = progress > 1 ? progress - Math.floor(progress) : progress;\n }\n await this.client.loadingProgress(progress);\n }\n this.firstRawChunk = false;\n\n if (this.state === State.Initial) {\n if (chunk.match(/^{(\\s)*\"nodes\":(\\s)*\\[/)) {\n this.state = State.LoadingCPUProfileFromFile;\n } else if (chunk[0] === '{') {\n this.state = State.LookingForEvents;\n } else if (chunk[0] === '[') {\n this.state = State.ReadingEvents;\n } else {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataUnknownJson));\n return Promise.resolve();\n }\n }\n\n if (this.state === State.LoadingCPUProfileFromFile) {\n this.buffer += chunk;\n return Promise.resolve();\n }\n\n if (this.state === State.LookingForEvents) {\n const objectName = '\"traceEvents\":';\n const startPos = this.buffer.length - objectName.length;\n this.buffer += chunk;\n const pos = this.buffer.indexOf(objectName, startPos);\n if (pos === -1) {\n return Promise.resolve();\n }\n chunk = this.buffer.slice(pos + objectName.length);\n this.state = State.ReadingEvents;\n }\n\n if (this.state !== State.ReadingEvents) {\n return Promise.resolve();\n }\n // This is where we actually do the loading of events from JSON: the JSON\n // Tokenizer writes the JSON to a buffer, and then as a callback the\n // writeBalancedJSON method below is invoked. It then parses this chunk\n // of JSON as a set of events, and adds them to the TracingModel via\n // addEvents()\n if (this.jsonTokenizer.write(chunk)) {\n return Promise.resolve();\n }\n this.state = State.SkippingTail;\n if (this.firstChunk) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineInputWrongJson));\n }\n return Promise.resolve();\n }\n\n private writeBalancedJSON(data: string): void {\n let json: string = data + ']';\n\n if (!this.firstChunk) {\n const commaIndex = json.indexOf(',');\n if (commaIndex !== -1) {\n json = json.slice(commaIndex + 1);\n }\n json = '[' + json;\n }\n\n let items;\n try {\n items = (JSON.parse(json) as TraceEngine.TracingManager.EventPayload[]);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: e.toString()}));\n return;\n }\n\n if (this.firstChunk) {\n this.firstChunk = false;\n if (this.looksLikeAppVersion(items[0])) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.legacyTimelineFormatIsNot));\n return;\n }\n }\n\n try {\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(items);\n this.#collectEvents(items);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: e.toString()}));\n }\n }\n\n private reportErrorAndCancelLoading(message?: string): void {\n if (message) {\n Common.Console.Console.instance().error(message);\n }\n void this.cancel();\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private looksLikeAppVersion(item: any): boolean {\n return typeof item === 'string' && item.indexOf('Chrome') !== -1;\n }\n\n async close(): Promise {\n if (!this.client) {\n return;\n }\n await this.client.processingStarted();\n await this.finalizeTrace();\n }\n\n private isCpuProfile(): boolean {\n return this.state === State.LoadingCPUProfileFromFile || this.state === State.LoadingCPUProfileFromRecording;\n }\n\n private async finalizeTrace(): Promise {\n if (this.state === State.LoadingCPUProfileFromFile) {\n this.parseCPUProfileFormat(this.buffer);\n this.buffer = '';\n }\n (this.tracingModel as TraceEngine.Legacy.TracingModel).tracingComplete();\n await (this.client as Client)\n .loadingComplete(this.#collectedEvents, this.tracingModel, this.filter, this.isCpuProfile());\n this.#traceFinalizedCallbackForTest?.();\n }\n\n traceFinalizedForTest(): Promise {\n return this.#traceFinalizedPromiseForTest;\n }\n\n private parseCPUProfileFormat(text: string): void {\n let traceEvents;\n try {\n const profile = JSON.parse(text);\n traceEvents = TimelineModel.TimelineJSProfile.TimelineJSProfileProcessor.createFakeTraceFromCpuProfile(\n profile, /* tid */ 1, /* injectPageEvent */ true);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedCpuProfileFormat));\n return;\n }\n this.filter = TimelineLoader.getCpuProfileFilter();\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(traceEvents);\n this.#collectEvents(traceEvents);\n }\n\n #collectEvents(events: TraceEngine.TracingManager.EventPayload[]): void {\n // Once the old engine is removed, this can be updated to use the types from the new engine and avoid the `as unknown`.\n this.#collectedEvents =\n this.#collectedEvents.concat(events as unknown as TraceEngine.Types.TraceEvents.TraceEventData);\n }\n}\n\nexport const TransferChunkLengthBytes = 5000000;\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum State {\n Initial = 'Initial',\n LookingForEvents = 'LookingForEvents',\n ReadingEvents = 'ReadingEvents',\n SkippingTail = 'SkippingTail',\n LoadingCPUProfileFromFile = 'LoadingCPUProfileFromFile',\n LoadingCPUProfileFromRecording = 'LoadingCPUProfileFromRecording',\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineLoader.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineLoader.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAGhD,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAI3D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,gCAAgC,EAAE,8CAA8C;IAChF;;OAEG;IACH,+BAA+B,EAAE,uDAAuD;IACxF;;;OAGG;IACH,sBAAsB,EAAE,gCAAgC;IACxD;;OAEG;IACH,yBAAyB,EAAE,0CAA0C;IACrE;;OAEG;IACH,yBAAyB,EAAE,8BAA8B;CAC1D,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,mCAAmC,EAAE,SAAS,CAAC,CAAC;AACzF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IACjB,MAAM,CAAc;IACpB,YAAY,CAAuC;IACnD,gBAAgB,CAAoB;IACpC,KAAK,CAAQ;IACb,MAAM,CAAS;IACf,aAAa,CAAU;IACvB,UAAU,CAAU;IACpB,WAAW,CAAS;IACpB,SAAS,CAAU;IACV,aAAa,CAA4C;IAClE,MAAM,CAA6D;I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ACvH,IAAI,CAAC,gBAAgB;YACjB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAiE,CAAC,CAAC;IACtG,CAAC;CACF;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD,wDAAwD;AACxD,+CAA+C;AAC/C,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IACf,4BAAmB,CAAA;IACnB,8CAAqC,CAAA;IACrC,wCAA+B,CAAA;IAC/B,sCAA6B,CAAA;IAC7B,gEAAuD,CAAA;IACvD,0EAAiE,CAAA;AACnE,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB","sourcesContent":["// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as Platform from '../../core/platform/platform.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nimport {type Client} from './TimelineController.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedTimelineDataUnknownJson: 'Malformed timeline data: Unknown JSON format',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedTimelineInputWrongJson: 'Malformed timeline input, wrong JSON brackets balance',\n /**\n *@description Text in Timeline Loader of the Performance panel\n *@example {Unknown JSON format} PH1\n */\n malformedTimelineDataS: 'Malformed timeline data: {PH1}',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n legacyTimelineFormatIsNot: 'Legacy Timeline format is not supported.',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedCpuProfileFormat: 'Malformed CPU profile format',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineLoader.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n/**\n * This class handles loading traces from file and URL, and from the Lighthouse panel\n * It also handles loading cpuprofiles from file, url and console.profileEnd()\n *\n * Meanwhile, the normal trace recording flow bypasses TimelineLoader entirely,\n * as it's handled from TracingManager => TimelineController.\n */\nexport class TimelineLoader implements Common.StringOutputStream.OutputStream {\n private client: Client|null;\n private tracingModel: TraceEngine.Legacy.TracingModel|null;\n private canceledCallback: (() => void)|null;\n private state: State;\n private buffer: string;\n private firstRawChunk: boolean;\n private firstChunk: boolean;\n private loadedBytes: number;\n private totalSize!: number;\n private readonly jsonTokenizer: TextUtils.TextUtils.BalancedJSONTokenizer;\n private filter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null;\n #collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n\n #traceFinalizedCallbackForTest?: () => void;\n #traceFinalizedPromiseForTest: Promise;\n\n constructor(client: Client, title?: string) {\n this.client = client;\n this.tracingModel = new TraceEngine.Legacy.TracingModel(title);\n this.canceledCallback = null;\n this.state = State.Initial;\n this.buffer = '';\n this.firstRawChunk = true;\n this.firstChunk = true;\n this.loadedBytes = 0;\n this.jsonTokenizer = new TextUtils.TextUtils.BalancedJSONTokenizer(this.writeBalancedJSON.bind(this), true);\n this.filter = null;\n\n this.#traceFinalizedPromiseForTest = new Promise(resolve => {\n this.#traceFinalizedCallbackForTest = resolve;\n });\n }\n\n static async loadFromFile(file: File, client: Client): Promise {\n const loader = new TimelineLoader(client);\n const fileReader = new Bindings.FileUtils.ChunkedFileReader(file, TransferChunkLengthBytes);\n loader.canceledCallback = fileReader.cancel.bind(fileReader);\n loader.totalSize = file.size;\n // We'll resolve and return the loader instance before finalizing the trace.\n setTimeout(async () => {\n const success = await fileReader.read(loader);\n if (!success && fileReader.error()) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loader.reportErrorAndCancelLoading((fileReader.error() as any).message);\n }\n });\n return loader;\n }\n\n static loadFromEvents(events: TraceEngine.TracingManager.EventPayload[], client: Client): TimelineLoader {\n const loader = new TimelineLoader(client);\n window.setTimeout(async () => {\n void loader.addEvents(events);\n });\n return loader;\n }\n\n static getCpuProfileFilter(): TimelineModel.TimelineModelFilter.TimelineVisibleEventsFilter {\n const visibleTypes = [];\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSFrame);\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSIdleFrame);\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSSystemFrame);\n return new TimelineModel.TimelineModelFilter.TimelineVisibleEventsFilter(visibleTypes);\n }\n\n static loadFromCpuProfile(profile: Protocol.Profiler.Profile|null, client: Client, title?: string): TimelineLoader {\n const loader = new TimelineLoader(client, title);\n loader.state = State.LoadingCPUProfileFromRecording;\n\n try {\n const events = TimelineModel.TimelineJSProfile.TimelineJSProfileProcessor.createFakeTraceFromCpuProfile(\n profile, /* tid */ 1, /* injectPageEvent */ true);\n\n loader.filter = TimelineLoader.getCpuProfileFilter();\n\n window.setTimeout(async () => {\n void loader.addEvents(events);\n });\n } catch (e) {\n console.error(e.stack);\n }\n return loader;\n }\n\n static async loadFromURL(url: Platform.DevToolsPath.UrlString, client: Client): Promise {\n const loader = new TimelineLoader(client);\n const stream = new Common.StringOutputStream.StringOutputStream();\n await client.loadingStarted();\n\n const allowRemoteFilePaths =\n Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').get();\n Host.ResourceLoader.loadAsStream(url, null, stream, finishedCallback, allowRemoteFilePaths);\n\n async function finishedCallback(\n success: boolean, _headers: {[x: string]: string},\n errorDescription: Host.ResourceLoader.LoadErrorDescription): Promise {\n if (!success) {\n return loader.reportErrorAndCancelLoading(errorDescription.message);\n }\n const txt = stream.data();\n const trace = JSON.parse(txt);\n if (Array.isArray(trace.nodes)) {\n loader.state = State.LoadingCPUProfileFromFile;\n loader.buffer = txt;\n await loader.close();\n return;\n }\n const events = Array.isArray(trace.traceEvents) ? trace.traceEvents : trace;\n void loader.addEvents(events);\n }\n\n return loader;\n }\n\n async addEvents(events: TraceEngine.TracingManager.EventPayload[]): Promise {\n await this.client?.loadingStarted();\n const eventsPerChunk = 15_000;\n for (let i = 0; i < events.length; i += eventsPerChunk) {\n const chunk = events.slice(i, i + eventsPerChunk);\n this.#collectEvents(chunk);\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(chunk);\n await this.client?.loadingProgress((i + chunk.length) / events.length);\n await new Promise(r => window.setTimeout(r)); // Yield event loop to paint.\n }\n void this.close();\n }\n\n async cancel(): Promise {\n this.tracingModel = null;\n if (this.client) {\n await this.client.loadingComplete(\n /* collectedEvents */[], /* tracingModel= */ null, /* exclusiveFilter= */ null, /* isCpuProfile= */ false,\n /* recordingStartTime= */ null);\n this.client = null;\n }\n if (this.canceledCallback) {\n this.canceledCallback();\n }\n }\n\n async write(chunk: string): Promise {\n if (!this.client) {\n return Promise.resolve();\n }\n this.loadedBytes += chunk.length;\n if (this.firstRawChunk) {\n await this.client.loadingStarted();\n // Ensure we paint the loading dialog before continuing\n await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)));\n } else {\n let progress = undefined;\n if (this.totalSize) {\n progress = this.loadedBytes / this.totalSize;\n // For compressed traces, we can't provide a definite progress percentage. So, just keep it moving.\n progress = progress > 1 ? progress - Math.floor(progress) : progress;\n }\n await this.client.loadingProgress(progress);\n }\n this.firstRawChunk = false;\n\n if (this.state === State.Initial) {\n if (chunk.match(/^{(\\s)*\"nodes\":(\\s)*\\[/)) {\n this.state = State.LoadingCPUProfileFromFile;\n } else if (chunk[0] === '{') {\n this.state = State.LookingForEvents;\n } else if (chunk[0] === '[') {\n this.state = State.ReadingEvents;\n } else {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataUnknownJson));\n return Promise.resolve();\n }\n }\n\n if (this.state === State.LoadingCPUProfileFromFile) {\n this.buffer += chunk;\n return Promise.resolve();\n }\n\n if (this.state === State.LookingForEvents) {\n const objectName = '\"traceEvents\":';\n const startPos = this.buffer.length - objectName.length;\n this.buffer += chunk;\n const pos = this.buffer.indexOf(objectName, startPos);\n if (pos === -1) {\n return Promise.resolve();\n }\n chunk = this.buffer.slice(pos + objectName.length);\n this.state = State.ReadingEvents;\n }\n\n if (this.state !== State.ReadingEvents) {\n return Promise.resolve();\n }\n // This is where we actually do the loading of events from JSON: the JSON\n // Tokenizer writes the JSON to a buffer, and then as a callback the\n // writeBalancedJSON method below is invoked. It then parses this chunk\n // of JSON as a set of events, and adds them to the TracingModel via\n // addEvents()\n if (this.jsonTokenizer.write(chunk)) {\n return Promise.resolve();\n }\n this.state = State.SkippingTail;\n if (this.firstChunk) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineInputWrongJson));\n }\n return Promise.resolve();\n }\n\n private writeBalancedJSON(data: string): void {\n let json: string = data + ']';\n\n if (!this.firstChunk) {\n const commaIndex = json.indexOf(',');\n if (commaIndex !== -1) {\n json = json.slice(commaIndex + 1);\n }\n json = '[' + json;\n }\n\n let items;\n try {\n items = (JSON.parse(json) as TraceEngine.TracingManager.EventPayload[]);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: e.toString()}));\n return;\n }\n\n if (this.firstChunk) {\n this.firstChunk = false;\n if (this.looksLikeAppVersion(items[0])) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.legacyTimelineFormatIsNot));\n return;\n }\n }\n\n try {\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(items);\n this.#collectEvents(items);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: e.toString()}));\n }\n }\n\n private reportErrorAndCancelLoading(message?: string): void {\n if (message) {\n Common.Console.Console.instance().error(message);\n }\n void this.cancel();\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private looksLikeAppVersion(item: any): boolean {\n return typeof item === 'string' && item.indexOf('Chrome') !== -1;\n }\n\n async close(): Promise {\n if (!this.client) {\n return;\n }\n await this.client.processingStarted();\n await this.finalizeTrace();\n }\n\n private isCpuProfile(): boolean {\n return this.state === State.LoadingCPUProfileFromFile || this.state === State.LoadingCPUProfileFromRecording;\n }\n\n private async finalizeTrace(): Promise {\n if (this.state === State.LoadingCPUProfileFromFile) {\n this.parseCPUProfileFormat(this.buffer);\n this.buffer = '';\n }\n (this.tracingModel as TraceEngine.Legacy.TracingModel).tracingComplete();\n await (this.client as Client)\n .loadingComplete(\n this.#collectedEvents, this.tracingModel, this.filter, this.isCpuProfile(), /* recordingStartTime=*/ null);\n this.#traceFinalizedCallbackForTest?.();\n }\n\n traceFinalizedForTest(): Promise {\n return this.#traceFinalizedPromiseForTest;\n }\n\n private parseCPUProfileFormat(text: string): void {\n let traceEvents;\n try {\n const profile = JSON.parse(text);\n traceEvents = TimelineModel.TimelineJSProfile.TimelineJSProfileProcessor.createFakeTraceFromCpuProfile(\n profile, /* tid */ 1, /* injectPageEvent */ true);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedCpuProfileFormat));\n return;\n }\n this.filter = TimelineLoader.getCpuProfileFilter();\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(traceEvents);\n this.#collectEvents(traceEvents);\n }\n\n #collectEvents(events: TraceEngine.TracingManager.EventPayload[]): void {\n // Once the old engine is removed, this can be updated to use the types from the new engine and avoid the `as unknown`.\n this.#collectedEvents =\n this.#collectedEvents.concat(events as unknown as TraceEngine.Types.TraceEvents.TraceEventData);\n }\n}\n\nexport const TransferChunkLengthBytes = 5000000;\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum State {\n Initial = 'Initial',\n LookingForEvents = 'LookingForEvents',\n ReadingEvents = 'ReadingEvents',\n SkippingTail = 'SkippingTail',\n LoadingCPUProfileFromFile = 'LoadingCPUProfileFromFile',\n LoadingCPUProfileFromRecording = 'LoadingCPUProfileFromRecording',\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineMiniMap.d.ts b/public/panels/timeline/TimelineMiniMap.d.ts index bb1b171ab..f4bd71b57 100644 --- a/public/panels/timeline/TimelineMiniMap.d.ts +++ b/public/panels/timeline/TimelineMiniMap.d.ts @@ -24,20 +24,18 @@ declare const TimelineMiniMap_base: (new (...args: any[]) => { * This component wraps the generic PerfUI Overview component and configures it * specifically for the Performance Panel, including injecting the CSS we use * to customise how the components render within the Performance Panel. + * + * It is also responsible for listening to events from the OverviewPane to + * update the visible trace window, and when this happens it will update the + * TraceBounds service with the new values. */ export declare class TimelineMiniMap extends TimelineMiniMap_base { #private; breadcrumbsActivated: boolean; breadcrumbs: TimelineComponents.Breadcrumbs.Breadcrumbs | null; constructor(); - activateBreadcrumbs(): void; - breadcrumbWindowBounds(breadcrumbWindow: PerfUI.TimelineOverviewPane.BreadcrumbAddedEvent): PerfUI.TimelineOverviewPane.BreadcrumbAddedEvent; - addBreadcrumb({ startTime, endTime }: PerfUI.TimelineOverviewPane.BreadcrumbAddedEvent): void; - removeBreadcrumb(breadcrumb: TimelineComponents.Breadcrumbs.Breadcrumb): void; wasShown(): void; reset(): void; - setBounds(min: TraceEngine.Types.Timing.MilliSeconds, max: TraceEngine.Types.Timing.MilliSeconds): void; - setWindowTimes(left: number, right: number): void; getControls(): TimelineEventOverview[]; setData(data: OverviewData): void; addInitialBreadcrumb(): void; diff --git a/public/panels/timeline/TimelineMiniMap.js b/public/panels/timeline/TimelineMiniMap.js index a5c8acc9f..e874f3174 100644 --- a/public/panels/timeline/TimelineMiniMap.js +++ b/public/panels/timeline/TimelineMiniMap.js @@ -3,9 +3,8 @@ // found in the LICENSE file. import * as Common from '../../core/common/common.js'; import * as Root from '../../core/root/root.js'; -import * as Helpers from '../../models/trace/helpers/helpers.js'; import * as TraceEngine from '../../models/trace/trace.js'; -import * as TimingTypes from '../../models/trace/types/types.js'; +import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js'; import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as TimelineComponents from './components/components.js'; @@ -16,6 +15,10 @@ import { TimelineUIUtils } from './TimelineUIUtils.js'; * This component wraps the generic PerfUI Overview component and configures it * specifically for the Performance Panel, including injecting the CSS we use * to customise how the components render within the Performance Panel. + * + * It is also responsible for listening to events from the OverviewPane to + * update the visible trace window, and when this happens it will update the + * TraceBounds service with the new values. */ export class TimelineMiniMap extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox) { breadcrumbsActivated = false; @@ -23,85 +26,89 @@ export class TimelineMiniMap extends Common.ObjectWrapper.eventMixin(UI.Widget.V #controls = []; breadcrumbs = null; #breadcrumbsUI; - #minTime = TimingTypes.Timing.MilliSeconds(0); #data = null; + #onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this); constructor() { super(); this.element.classList.add('timeline-minimap'); this.#breadcrumbsUI = new TimelineComponents.BreadcrumbsUI.BreadcrumbsUI(); this.#overviewComponent.show(this.element); - // Push the event up into the parent component so the panel knows when the window is changed. - this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.WindowChanged, event => { - if (this.breadcrumbs) { - this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.WindowChanged, { - ...event.data, - breadcrumb: { - min: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.min + this.#minTime), - max: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.max + this.#minTime), - range: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.max - this.breadcrumbs.lastBreadcrumb.window.min), - }, - }); - } - else { - this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.WindowChanged, event.data); - } + this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.OverviewPaneWindowChanged, event => { + this.#onOverviewPanelWindowChanged(event); }); if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.BREADCRUMBS_PERFORMANCE_PANEL)) { - this.activateBreadcrumbs(); + this.#activateBreadcrumbs(); + } + TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound); + } + #onOverviewPanelWindowChanged(event) { + const traceData = this.#data?.traceParsedData; + if (!traceData) { + return; + } + const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (!traceBoundsState) { + return; + } + const left = (event.data.startTime > 0) ? event.data.startTime : traceBoundsState.milli.entireTraceBounds.min; + const right = Number.isFinite(event.data.endTime) ? event.data.endTime : traceBoundsState.milli.entireTraceBounds.max; + TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(TraceEngine.Types.Timing.MilliSeconds(left), TraceEngine.Types.Timing.MilliSeconds(right)), { + shouldAnimate: true, + }); + } + #onTraceBoundsChange(event) { + if (event.updateType === 'RESET' || event.updateType === 'VISIBLE_WINDOW') { + this.#overviewComponent.setWindowTimes(event.state.milli.timelineTraceWindow.min, event.state.milli.timelineTraceWindow.max); + } + if (event.updateType === 'RESET' || event.updateType === 'MINIMAP_BOUNDS') { + this.#overviewComponent.setBounds(event.state.milli.minimapTraceBounds.min, event.state.milli.minimapTraceBounds.max); } } - activateBreadcrumbs() { + #activateBreadcrumbs() { this.breadcrumbsActivated = true; this.element.prepend(this.#breadcrumbsUI); - this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.BreadcrumbAdded, event => { - this.addBreadcrumb(this.breadcrumbWindowBounds(event.data)); + this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.OverviewPaneBreadcrumbAdded, event => { + this.#addBreadcrumb(event.data); }); this.#breadcrumbsUI.addEventListener(TimelineComponents.BreadcrumbsUI.BreadcrumbRemovedEvent.eventName, event => { const breadcrumb = event.breadcrumb; - this.removeBreadcrumb(breadcrumb); + this.#removeBreadcrumb(breadcrumb); }); this.#overviewComponent.enableCreateBreadcrumbsButton(); } - // If the window sliders are on the edges of the window, the window values are set to 0 or Infity. - // This behaviour is not needed for breadcrumbs so we reset them to the maximum or minimum window boundary. - breadcrumbWindowBounds(breadcrumbWindow) { - breadcrumbWindow.endTime = TraceEngine.Types.Timing.MilliSeconds(Math.min(this.#overviewComponent.overviewCalculator.maximumBoundary(), breadcrumbWindow.endTime)); - breadcrumbWindow.startTime = TraceEngine.Types.Timing.MilliSeconds(Math.max(this.#overviewComponent.overviewCalculator.minimumBoundary(), breadcrumbWindow.startTime)); - return breadcrumbWindow; - } - addBreadcrumb({ startTime, endTime }) { - const startWithoutMin = startTime - this.#minTime; - const endWithoutMin = endTime - this.#minTime; - const traceWindow = { - min: TraceEngine.Types.Timing.MicroSeconds(startWithoutMin), - max: TraceEngine.Types.Timing.MicroSeconds(endWithoutMin), - range: TraceEngine.Types.Timing.MicroSeconds(endWithoutMin - startWithoutMin), + #addBreadcrumb({ startTime, endTime }) { + // The OverviewPane can emit 0 and Infinity as numbers for the range; in + // this case we change them to be the min and max values of the minimap + // bounds. + const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (!traceBoundsState) { + return; + } + const bounds = traceBoundsState.milli.minimapTraceBounds; + const breadcrumbTimes = { + startTime: TraceEngine.Types.Timing.MilliSeconds(Math.max(startTime, bounds.min)), + endTime: TraceEngine.Types.Timing.MilliSeconds(Math.min(endTime, bounds.max)), }; + const newVisibleTraceWindow = TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(breadcrumbTimes.startTime, breadcrumbTimes.endTime); + // When you create a breadcrumb, both the minimap bounds and the visible + // window get set to that breadcrumb's window. + TraceBounds.TraceBounds.BoundsManager.instance().setMiniMapBounds(newVisibleTraceWindow); + TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(newVisibleTraceWindow); if (this.breadcrumbs === null) { - this.breadcrumbs = new TimelineComponents.Breadcrumbs.Breadcrumbs(traceWindow); + this.breadcrumbs = new TimelineComponents.Breadcrumbs.Breadcrumbs(newVisibleTraceWindow); } else { - this.breadcrumbs.add(traceWindow); - this.setBounds(startTime, endTime); - this.#overviewComponent.scheduleUpdate(startTime, endTime); + this.breadcrumbs.add(newVisibleTraceWindow); } this.#breadcrumbsUI.data = { breadcrumb: this.breadcrumbs.initialBreadcrumb, }; - // Dispatch event to update the breadcrumb in TimelineFlameChardView - this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.WindowChanged, { - startTime: startTime, - endTime: endTime, - breadcrumb: { - min: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.min + this.#minTime), - max: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.max + this.#minTime), - range: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.max - this.breadcrumbs.lastBreadcrumb.window.min), - }, - }); } - removeBreadcrumb(breadcrumb) { - const startMSWithMin = TraceEngine.Types.Timing.MilliSeconds(breadcrumb.window.min + this.#minTime); - const endMSWithMin = TraceEngine.Types.Timing.MilliSeconds(breadcrumb.window.max + this.#minTime); + #removeBreadcrumb(breadcrumb) { + // Note this is slightly confusing: when the user clicks on a breadcrumb, + // we do not remove it, but we do remove all of its children, and make it + // the new active breadcrumb. + const visibleTimesMilli = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(breadcrumb.window); if (this.breadcrumbs) { this.breadcrumbs.makeBreadcrumbActive(breadcrumb); // Only the initial breadcrumb is passed in because breadcrumbs are stored in a linked list and breadcrumbsUI component iterates through them @@ -109,9 +116,9 @@ export class TimelineMiniMap extends Common.ObjectWrapper.eventMixin(UI.Widget.V breadcrumb: this.breadcrumbs.initialBreadcrumb, }; } - this.setBounds(startMSWithMin, endMSWithMin); - this.setWindowTimes(startMSWithMin, endMSWithMin); - this.#overviewComponent.scheduleUpdate(startMSWithMin, endMSWithMin); + const newVisibleTraceWindow = TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(visibleTimesMilli.min, visibleTimesMilli.max); + TraceBounds.TraceBounds.BoundsManager.instance().setMiniMapBounds(newVisibleTraceWindow); + TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(newVisibleTraceWindow); } wasShown() { super.wasShown(); @@ -121,18 +128,6 @@ export class TimelineMiniMap extends Common.ObjectWrapper.eventMixin(UI.Widget.V this.#data = null; this.#overviewComponent.reset(); } - setBounds(min, max) { - this.#overviewComponent.setBounds(min, max); - } - setWindowTimes(left, right) { - // If breadcrumbs exist, make sure that selectected window is within timeline boundaries - if (!this.breadcrumbsActivated || - (this.#overviewComponent.overviewCalculator.minimumBoundary() <= TraceEngine.Types.Timing.MilliSeconds(left) && - this.#overviewComponent.overviewCalculator.maximumBoundary() >= - TraceEngine.Types.Timing.MilliSeconds(right))) { - this.#overviewComponent.setWindowTimes(left, right); - } - } #setMarkers(traceParsedData) { const markers = new Map(); const { Meta, PageLoadMetrics } = traceParsedData; @@ -162,9 +157,6 @@ export class TimelineMiniMap extends Common.ObjectWrapper.eventMixin(UI.Widget.V } this.#data = data; this.#controls = []; - if (data.traceParsedData.Meta.traceBounds.min !== undefined) { - this.#minTime = Helpers.Timing.microSecondsToMilliseconds(data.traceParsedData?.Meta.traceBounds.min); - } this.#setMarkers(data.traceParsedData); this.#setNavigationStartEvents(data.traceParsedData); this.#controls.push(new TimelineEventOverviewResponsiveness(data.traceParsedData)); @@ -185,10 +177,11 @@ export class TimelineMiniMap extends Common.ObjectWrapper.eventMixin(UI.Widget.V addInitialBreadcrumb() { // Create first breadcrumb from the initial full window this.breadcrumbs = null; - this.addBreadcrumb(this.breadcrumbWindowBounds({ - startTime: TraceEngine.Types.Timing.MilliSeconds(this.#overviewComponent.overviewCalculator.minimumBoundary()), - endTime: TraceEngine.Types.Timing.MilliSeconds(this.#overviewComponent.overviewCalculator.maximumBoundary()), - })); + const traceBounds = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (!traceBounds) { + return; + } + this.#addBreadcrumb({ startTime: traceBounds.milli.entireTraceBounds.min, endTime: traceBounds.milli.entireTraceBounds.max }); } } //# sourceMappingURL=TimelineMiniMap.js.map \ No newline at end of file diff --git a/public/panels/timeline/TimelineMiniMap.js.map b/public/panels/timeline/TimelineMiniMap.js.map index e7efd64ae..76ed62dad 100644 --- a/public/panels/timeline/TimelineMiniMap.js.map +++ b/public/panels/timeline/TimelineMiniMap.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineMiniMap.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineMiniMap.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,uCAAuC,CAAC;AACjE,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAEL,gCAAgC,EAChC,2BAA2B,EAC3B,4BAA4B,EAC5B,mCAAmC,EACnC,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAWrD;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SACzB,MAAM,CAAC,aAAa,CAAC,UAAU,CAAgE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;IAChH,oBAAoB,GAAY,KAAK,CAAC;IACtC,kBAAkB,GAAG,IAAI,MAAM,CAAC,oBAAoB,CA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IAAI,CAAC;QACxB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,sBAAsB,CAAC;YAC7C,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,EAAE,CAAC;YAC9G,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,EAAE,CAAC;SAC7G,CAAC,CAAC,CAAC;IACN,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Root from '../../core/root/root.js';\nimport * as Helpers from '../../models/trace/helpers/helpers.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TimingTypes from '../../models/trace/types/types.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport * as TimelineComponents from './components/components.js';\nimport {\n type TimelineEventOverview,\n TimelineEventOverviewCPUActivity,\n TimelineEventOverviewMemory,\n TimelineEventOverviewNetwork,\n TimelineEventOverviewResponsiveness,\n TimelineFilmStripOverview,\n} from './TimelineEventOverview.js';\nimport miniMapStyles from './timelineMiniMap.css.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\n\nexport interface OverviewData {\n traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n isCpuProfile?: boolean;\n settings: {\n showScreenshots: boolean,\n showMemory: boolean,\n };\n}\n\n/**\n * This component wraps the generic PerfUI Overview component and configures it\n * specifically for the Performance Panel, including injecting the CSS we use\n * to customise how the components render within the Performance Panel.\n */\nexport class TimelineMiniMap extends\n Common.ObjectWrapper.eventMixin(UI.Widget.VBox) {\n breadcrumbsActivated: boolean = false;\n #overviewComponent = new PerfUI.TimelineOverviewPane.TimelineOverviewPane('timeline');\n #controls: TimelineEventOverview[] = [];\n breadcrumbs: TimelineComponents.Breadcrumbs.Breadcrumbs|null = null;\n #breadcrumbsUI: TimelineComponents.BreadcrumbsUI.BreadcrumbsUI;\n #minTime: TimingTypes.Timing.MilliSeconds = TimingTypes.Timing.MilliSeconds(0);\n #data: OverviewData|null = null;\n\n constructor() {\n super();\n this.element.classList.add('timeline-minimap');\n this.#breadcrumbsUI = new TimelineComponents.BreadcrumbsUI.BreadcrumbsUI();\n\n this.#overviewComponent.show(this.element);\n // Push the event up into the parent component so the panel knows when the window is changed.\n this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.WindowChanged, event => {\n if (this.breadcrumbs) {\n this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.WindowChanged, {\n ...event.data,\n breadcrumb: {\n min: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.min + this.#minTime),\n max: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.max + this.#minTime),\n range: TraceEngine.Types.Timing.MicroSeconds(\n this.breadcrumbs.lastBreadcrumb.window.max - this.breadcrumbs.lastBreadcrumb.window.min),\n },\n });\n } else {\n this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.WindowChanged, event.data);\n }\n });\n\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.BREADCRUMBS_PERFORMANCE_PANEL)) {\n this.activateBreadcrumbs();\n }\n }\n\n activateBreadcrumbs(): void {\n this.breadcrumbsActivated = true;\n this.element.prepend(this.#breadcrumbsUI);\n this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.BreadcrumbAdded, event => {\n this.addBreadcrumb(this.breadcrumbWindowBounds(event.data));\n });\n\n this.#breadcrumbsUI.addEventListener(TimelineComponents.BreadcrumbsUI.BreadcrumbRemovedEvent.eventName, event => {\n const breadcrumb = (event as TimelineComponents.BreadcrumbsUI.BreadcrumbRemovedEvent).breadcrumb;\n this.removeBreadcrumb(breadcrumb);\n });\n this.#overviewComponent.enableCreateBreadcrumbsButton();\n }\n\n // If the window sliders are on the edges of the window, the window values are set to 0 or Infity.\n // This behaviour is not needed for breadcrumbs so we reset them to the maximum or minimum window boundary.\n breadcrumbWindowBounds(breadcrumbWindow: PerfUI.TimelineOverviewPane.BreadcrumbAddedEvent):\n PerfUI.TimelineOverviewPane.BreadcrumbAddedEvent {\n breadcrumbWindow.endTime = TraceEngine.Types.Timing.MilliSeconds(\n Math.min(this.#overviewComponent.overviewCalculator.maximumBoundary(), breadcrumbWindow.endTime));\n breadcrumbWindow.startTime = TraceEngine.Types.Timing.MilliSeconds(\n Math.max(this.#overviewComponent.overviewCalculator.minimumBoundary(), breadcrumbWindow.startTime));\n\n return breadcrumbWindow;\n }\n\n addBreadcrumb({startTime, endTime}: PerfUI.TimelineOverviewPane.BreadcrumbAddedEvent): void {\n const startWithoutMin = startTime - this.#minTime;\n const endWithoutMin = endTime - this.#minTime;\n\n const traceWindow: TraceEngine.Types.Timing.TraceWindowMicroSeconds = {\n min: TraceEngine.Types.Timing.MicroSeconds(startWithoutMin),\n max: TraceEngine.Types.Timing.MicroSeconds(endWithoutMin),\n range: TraceEngine.Types.Timing.MicroSeconds(endWithoutMin - startWithoutMin),\n };\n if (this.breadcrumbs === null) {\n this.breadcrumbs = new TimelineComponents.Breadcrumbs.Breadcrumbs(traceWindow);\n\n } else {\n this.breadcrumbs.add(traceWindow);\n this.setBounds(startTime, endTime);\n this.#overviewComponent.scheduleUpdate(startTime, endTime);\n }\n\n this.#breadcrumbsUI.data = {\n breadcrumb: this.breadcrumbs.initialBreadcrumb,\n };\n\n // Dispatch event to update the breadcrumb in TimelineFlameChardView\n this.dispatchEventToListeners(PerfUI.TimelineOverviewPane.Events.WindowChanged, {\n startTime: startTime,\n endTime: endTime,\n breadcrumb: {\n min: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.min + this.#minTime),\n max: TraceEngine.Types.Timing.MicroSeconds(this.breadcrumbs.lastBreadcrumb.window.max + this.#minTime),\n range: TraceEngine.Types.Timing.MicroSeconds(\n this.breadcrumbs.lastBreadcrumb.window.max - this.breadcrumbs.lastBreadcrumb.window.min),\n },\n });\n }\n\n removeBreadcrumb(breadcrumb: TimelineComponents.Breadcrumbs.Breadcrumb): void {\n const startMSWithMin = TraceEngine.Types.Timing.MilliSeconds(breadcrumb.window.min + this.#minTime);\n const endMSWithMin = TraceEngine.Types.Timing.MilliSeconds(breadcrumb.window.max + this.#minTime);\n\n if (this.breadcrumbs) {\n this.breadcrumbs.makeBreadcrumbActive(breadcrumb);\n // Only the initial breadcrumb is passed in because breadcrumbs are stored in a linked list and breadcrumbsUI component iterates through them\n this.#breadcrumbsUI.data = {\n breadcrumb: this.breadcrumbs.initialBreadcrumb,\n };\n }\n\n this.setBounds(startMSWithMin, endMSWithMin);\n this.setWindowTimes(startMSWithMin, endMSWithMin);\n this.#overviewComponent.scheduleUpdate(startMSWithMin, endMSWithMin);\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([miniMapStyles]);\n }\n\n reset(): void {\n this.#data = null;\n this.#overviewComponent.reset();\n }\n\n setBounds(min: TraceEngine.Types.Timing.MilliSeconds, max: TraceEngine.Types.Timing.MilliSeconds): void {\n this.#overviewComponent.setBounds(min, max);\n }\n\n setWindowTimes(left: number, right: number): void {\n // If breadcrumbs exist, make sure that selectected window is within timeline boundaries\n if (!this.breadcrumbsActivated ||\n (this.#overviewComponent.overviewCalculator.minimumBoundary() <= TraceEngine.Types.Timing.MilliSeconds(left) &&\n this.#overviewComponent.overviewCalculator.maximumBoundary() >=\n TraceEngine.Types.Timing.MilliSeconds(right))) {\n this.#overviewComponent.setWindowTimes(left, right);\n }\n }\n\n #setMarkers(traceParsedData: TraceEngine.Handlers.Types.TraceParseData): void {\n const markers = new Map();\n\n const {Meta, PageLoadMetrics} = traceParsedData;\n\n // Add markers for navigation start times.\n const navStartEvents = Meta.mainFrameNavigations;\n const minTimeInMilliseconds = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(Meta.traceBounds.min);\n\n for (const event of navStartEvents) {\n const {startTime} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n markers.set(startTime, TimelineUIUtils.createEventDivider(event, minTimeInMilliseconds));\n }\n\n // Now add markers for the page load events\n for (const event of PageLoadMetrics.allMarkerEvents) {\n const {startTime} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n markers.set(startTime, TimelineUIUtils.createEventDivider(event, minTimeInMilliseconds));\n }\n\n this.#overviewComponent.setMarkers(markers);\n }\n\n #setNavigationStartEvents(traceParsedData: TraceEngine.Handlers.Types.TraceParseData): void {\n this.#overviewComponent.setNavStartTimes(traceParsedData.Meta.mainFrameNavigations);\n }\n getControls(): TimelineEventOverview[] {\n return this.#controls;\n }\n\n setData(data: OverviewData): void {\n if (this.#data?.traceParsedData === data.traceParsedData) {\n return;\n }\n this.#data = data;\n this.#controls = [];\n if (data.traceParsedData.Meta.traceBounds.min !== undefined) {\n this.#minTime = Helpers.Timing.microSecondsToMilliseconds(data.traceParsedData?.Meta.traceBounds.min);\n }\n\n this.#setMarkers(data.traceParsedData);\n this.#setNavigationStartEvents(data.traceParsedData);\n this.#controls.push(new TimelineEventOverviewResponsiveness(data.traceParsedData));\n this.#controls.push(new TimelineEventOverviewCPUActivity(data.traceParsedData));\n\n this.#controls.push(new TimelineEventOverviewNetwork(data.traceParsedData));\n if (data.settings.showScreenshots) {\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(data.traceParsedData);\n if (filmStrip.frames.length) {\n this.#controls.push(new TimelineFilmStripOverview(filmStrip));\n }\n }\n if (data.settings.showMemory) {\n this.#controls.push(new TimelineEventOverviewMemory(data.traceParsedData));\n }\n this.#overviewComponent.setOverviewControls(this.#controls);\n this.#overviewComponent.showingScreenshots = data.settings.showScreenshots;\n }\n\n addInitialBreadcrumb(): void {\n // Create first breadcrumb from the initial full window\n this.breadcrumbs = null;\n this.addBreadcrumb(this.breadcrumbWindowBounds({\n startTime: TraceEngine.Types.Timing.MilliSeconds(this.#overviewComponent.overviewCalculator.minimumBoundary()),\n endTime: TraceEngine.Types.Timing.MilliSeconds(this.#overviewComponent.overviewCalculator.maximumBoundary()),\n }));\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineMiniMap.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineMiniMap.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6CAA6C,CAAC;AAC3E,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAEL,gCAAgC,EAChC,2BAA2B,EAC3B,4BAA4B,EAC5B,mCAAmC,EACnC,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAWrD;;;;;;;;GAQG;AACH,MAAM,OAAO,eAAgB,SACzB,MAAM,CAAC,aAAa,CAAC,UAAU,CAAgE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;IAChH,oBAAoB,GAAY,KAAK,CAAC;IACtC,kBAAkB,GAAG,IAAI,MAAM,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IACtF,SAAS,GAA4B,EAAE,CAAC;IACxC,WAAW,GAAoD,IAAI,CAAC;IACpE,cAAc,CAAiD;IAC/D,KAAK,GAAsB,IAAI,CAAC;IAEhC,yBAAyB,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C,IAAI,2BAA2B,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;SAC5E;QACD,IAAI,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5D,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;IAC7E,CAAC;IAED,oBAAoB;QAClB,uDAAuD;QACvD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC;QAC7E,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO;SACR;QACD,IAAI,CAAC,cAAc,CACf,EAAC,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,GAAG,EAAC,CAAC,CAAC;IAC9G,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Root from '../../core/root/root.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport * as TimelineComponents from './components/components.js';\nimport {\n type TimelineEventOverview,\n TimelineEventOverviewCPUActivity,\n TimelineEventOverviewMemory,\n TimelineEventOverviewNetwork,\n TimelineEventOverviewResponsiveness,\n TimelineFilmStripOverview,\n} from './TimelineEventOverview.js';\nimport miniMapStyles from './timelineMiniMap.css.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\n\nexport interface OverviewData {\n traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n isCpuProfile?: boolean;\n settings: {\n showScreenshots: boolean,\n showMemory: boolean,\n };\n}\n\n/**\n * This component wraps the generic PerfUI Overview component and configures it\n * specifically for the Performance Panel, including injecting the CSS we use\n * to customise how the components render within the Performance Panel.\n *\n * It is also responsible for listening to events from the OverviewPane to\n * update the visible trace window, and when this happens it will update the\n * TraceBounds service with the new values.\n */\nexport class TimelineMiniMap extends\n Common.ObjectWrapper.eventMixin(UI.Widget.VBox) {\n breadcrumbsActivated: boolean = false;\n #overviewComponent = new PerfUI.TimelineOverviewPane.TimelineOverviewPane('timeline');\n #controls: TimelineEventOverview[] = [];\n breadcrumbs: TimelineComponents.Breadcrumbs.Breadcrumbs|null = null;\n #breadcrumbsUI: TimelineComponents.BreadcrumbsUI.BreadcrumbsUI;\n #data: OverviewData|null = null;\n\n #onTraceBoundsChangeBound = this.#onTraceBoundsChange.bind(this);\n\n constructor() {\n super();\n this.element.classList.add('timeline-minimap');\n this.#breadcrumbsUI = new TimelineComponents.BreadcrumbsUI.BreadcrumbsUI();\n\n this.#overviewComponent.show(this.element);\n\n this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.OverviewPaneWindowChanged, event => {\n this.#onOverviewPanelWindowChanged(event);\n });\n\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.BREADCRUMBS_PERFORMANCE_PANEL)) {\n this.#activateBreadcrumbs();\n }\n\n TraceBounds.TraceBounds.onChange(this.#onTraceBoundsChangeBound);\n }\n\n #onOverviewPanelWindowChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n const traceData = this.#data?.traceParsedData;\n if (!traceData) {\n return;\n }\n\n const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (!traceBoundsState) {\n return;\n }\n\n const left = (event.data.startTime > 0) ? event.data.startTime : traceBoundsState.milli.entireTraceBounds.min;\n const right =\n Number.isFinite(event.data.endTime) ? event.data.endTime : traceBoundsState.milli.entireTraceBounds.max;\n\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n TraceEngine.Types.Timing.MilliSeconds(left),\n TraceEngine.Types.Timing.MilliSeconds(right),\n ),\n {\n shouldAnimate: true,\n },\n );\n }\n\n #onTraceBoundsChange(event: TraceBounds.TraceBounds.StateChangedEvent): void {\n if (event.updateType === 'RESET' || event.updateType === 'VISIBLE_WINDOW') {\n this.#overviewComponent.setWindowTimes(\n event.state.milli.timelineTraceWindow.min, event.state.milli.timelineTraceWindow.max);\n }\n if (event.updateType === 'RESET' || event.updateType === 'MINIMAP_BOUNDS') {\n this.#overviewComponent.setBounds(\n event.state.milli.minimapTraceBounds.min, event.state.milli.minimapTraceBounds.max);\n }\n }\n\n #activateBreadcrumbs(): void {\n this.breadcrumbsActivated = true;\n this.element.prepend(this.#breadcrumbsUI);\n this.#overviewComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.OverviewPaneBreadcrumbAdded, event => {\n this.#addBreadcrumb(event.data);\n });\n\n this.#breadcrumbsUI.addEventListener(TimelineComponents.BreadcrumbsUI.BreadcrumbRemovedEvent.eventName, event => {\n const breadcrumb = (event as TimelineComponents.BreadcrumbsUI.BreadcrumbRemovedEvent).breadcrumb;\n this.#removeBreadcrumb(breadcrumb);\n });\n this.#overviewComponent.enableCreateBreadcrumbsButton();\n }\n\n #addBreadcrumb({startTime, endTime}: PerfUI.TimelineOverviewPane.OverviewPaneBreadcrumbAddedEvent): void {\n // The OverviewPane can emit 0 and Infinity as numbers for the range; in\n // this case we change them to be the min and max values of the minimap\n // bounds.\n const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (!traceBoundsState) {\n return;\n }\n const bounds = traceBoundsState.milli.minimapTraceBounds;\n\n const breadcrumbTimes = {\n startTime: TraceEngine.Types.Timing.MilliSeconds(Math.max(startTime, bounds.min)),\n endTime: TraceEngine.Types.Timing.MilliSeconds(Math.min(endTime, bounds.max)),\n };\n\n const newVisibleTraceWindow =\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(breadcrumbTimes.startTime, breadcrumbTimes.endTime);\n\n // When you create a breadcrumb, both the minimap bounds and the visible\n // window get set to that breadcrumb's window.\n TraceBounds.TraceBounds.BoundsManager.instance().setMiniMapBounds(\n newVisibleTraceWindow,\n );\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n newVisibleTraceWindow,\n );\n\n if (this.breadcrumbs === null) {\n this.breadcrumbs = new TimelineComponents.Breadcrumbs.Breadcrumbs(newVisibleTraceWindow);\n } else {\n this.breadcrumbs.add(newVisibleTraceWindow);\n }\n\n this.#breadcrumbsUI.data = {\n breadcrumb: this.breadcrumbs.initialBreadcrumb,\n };\n }\n\n #removeBreadcrumb(breadcrumb: TimelineComponents.Breadcrumbs.Breadcrumb): void {\n // Note this is slightly confusing: when the user clicks on a breadcrumb,\n // we do not remove it, but we do remove all of its children, and make it\n // the new active breadcrumb.\n const visibleTimesMilli = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(breadcrumb.window);\n if (this.breadcrumbs) {\n this.breadcrumbs.makeBreadcrumbActive(breadcrumb);\n // Only the initial breadcrumb is passed in because breadcrumbs are stored in a linked list and breadcrumbsUI component iterates through them\n this.#breadcrumbsUI.data = {\n breadcrumb: this.breadcrumbs.initialBreadcrumb,\n };\n }\n const newVisibleTraceWindow = TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n visibleTimesMilli.min,\n visibleTimesMilli.max,\n );\n\n TraceBounds.TraceBounds.BoundsManager.instance().setMiniMapBounds(\n newVisibleTraceWindow,\n );\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n newVisibleTraceWindow,\n );\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([miniMapStyles]);\n }\n\n reset(): void {\n this.#data = null;\n this.#overviewComponent.reset();\n }\n\n #setMarkers(traceParsedData: TraceEngine.Handlers.Types.TraceParseData): void {\n const markers = new Map();\n\n const {Meta, PageLoadMetrics} = traceParsedData;\n\n // Add markers for navigation start times.\n const navStartEvents = Meta.mainFrameNavigations;\n const minTimeInMilliseconds = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(Meta.traceBounds.min);\n\n for (const event of navStartEvents) {\n const {startTime} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n markers.set(startTime, TimelineUIUtils.createEventDivider(event, minTimeInMilliseconds));\n }\n\n // Now add markers for the page load events\n for (const event of PageLoadMetrics.allMarkerEvents) {\n const {startTime} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n markers.set(startTime, TimelineUIUtils.createEventDivider(event, minTimeInMilliseconds));\n }\n\n this.#overviewComponent.setMarkers(markers);\n }\n\n #setNavigationStartEvents(traceParsedData: TraceEngine.Handlers.Types.TraceParseData): void {\n this.#overviewComponent.setNavStartTimes(traceParsedData.Meta.mainFrameNavigations);\n }\n\n getControls(): TimelineEventOverview[] {\n return this.#controls;\n }\n\n setData(data: OverviewData): void {\n if (this.#data?.traceParsedData === data.traceParsedData) {\n return;\n }\n this.#data = data;\n this.#controls = [];\n\n this.#setMarkers(data.traceParsedData);\n this.#setNavigationStartEvents(data.traceParsedData);\n this.#controls.push(new TimelineEventOverviewResponsiveness(data.traceParsedData));\n this.#controls.push(new TimelineEventOverviewCPUActivity(data.traceParsedData));\n\n this.#controls.push(new TimelineEventOverviewNetwork(data.traceParsedData));\n if (data.settings.showScreenshots) {\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(data.traceParsedData);\n if (filmStrip.frames.length) {\n this.#controls.push(new TimelineFilmStripOverview(filmStrip));\n }\n }\n if (data.settings.showMemory) {\n this.#controls.push(new TimelineEventOverviewMemory(data.traceParsedData));\n }\n this.#overviewComponent.setOverviewControls(this.#controls);\n this.#overviewComponent.showingScreenshots = data.settings.showScreenshots;\n }\n\n addInitialBreadcrumb(): void {\n // Create first breadcrumb from the initial full window\n this.breadcrumbs = null;\n const traceBounds = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (!traceBounds) {\n return;\n }\n this.#addBreadcrumb(\n {startTime: traceBounds.milli.entireTraceBounds.min, endTime: traceBounds.milli.entireTraceBounds.max});\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelinePanel.d.ts b/public/panels/timeline/TimelinePanel.d.ts index 34ad6c6d6..fb487f808 100644 --- a/public/panels/timeline/TimelinePanel.d.ts +++ b/public/panels/timeline/TimelinePanel.d.ts @@ -70,8 +70,6 @@ export declare class TimelinePanel extends UI.Panel.Panel implements Client, Tim loadFromEvents(events: TraceEngine.TracingManager.EventPayload[]): void; getFlameChart(): TimelineFlameChartView; private loadFromCpuProfile; - private onOverviewWindowChanged; - private onModelWindowChanged; private setState; private createSettingCheckbox; private populateToolbar; @@ -102,7 +100,7 @@ export declare class TimelinePanel extends UI.Panel.Panel implements Client, Tim private onClearButton; private clear; private reset; - private applyFilters; + applyFilters(_perfModel: PerformanceModel | null, exclusiveFilter?: TimelineModel.TimelineModelFilter.TimelineModelFilter | null): void; setModel(model: PerformanceModel | null, exclusiveFilter?: TimelineModel.TimelineModelFilter.TimelineModelFilter | null, traceEngineIndex?: number): void; private recordingStarted; recordingProgress(usage: number): void; @@ -111,7 +109,7 @@ export declare class TimelinePanel extends UI.Panel.Panel implements Client, Tim loadingStarted(): Promise; loadingProgress(progress?: number): Promise; processingStarted(): Promise; - loadingComplete(collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[], tracingModel: TraceEngine.Legacy.TracingModel | null, exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter | null | undefined, isCpuProfile: boolean): Promise; + loadingComplete(collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[], tracingModel: TraceEngine.Legacy.TracingModel | null, exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter | null | undefined, isCpuProfile: boolean, recordingStartTime: number | null): Promise; recordTraceLoadMetric(): void; loadingCompleteForTest(): void; private showRecordingStarted; @@ -120,9 +118,8 @@ export declare class TimelinePanel extends UI.Panel.Panel implements Client, Tim private frameForSelection; jumpToFrame(offset: number): true | undefined; select(selection: TimelineSelection | null): void; - selectEntryAtTime(events: TraceEngine.Legacy.Event[] | null, time: number): void; + selectEntryAtTime(events: TraceEngine.Types.TraceEvents.TraceEventData[] | null, time: number): void; highlightEvent(event: TraceEngine.Legacy.Event | null): void; - private revealTimeRange; private handleDrop; } export declare enum State { @@ -137,7 +134,7 @@ export declare const rowHeight = 18; export declare const headerHeight = 20; export interface TimelineModeViewDelegate { select(selection: TimelineSelection | null): void; - selectEntryAtTime(events: TraceEngine.Legacy.CompatibleTraceEvent[] | null, time: number): void; + selectEntryAtTime(events: TraceEngine.Types.TraceEvents.TraceEventData[] | null, time: number): void; highlightEvent(event: TraceEngine.Legacy.CompatibleTraceEvent | null): void; } export declare class StatusPane extends UI.Widget.VBox { diff --git a/public/panels/timeline/TimelinePanel.js b/public/panels/timeline/TimelinePanel.js index c66e7139d..75bd3c9b5 100644 --- a/public/panels/timeline/TimelinePanel.js +++ b/public/panels/timeline/TimelinePanel.js @@ -43,9 +43,10 @@ import * as PanelFeedback from '../../ui/components/panel_feedback/panel_feedbac import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; import * as UI from '../../ui/legacy/legacy.js'; import * as MobileThrottling from '../mobile_throttling/mobile_throttling.js'; +import { ActiveFilters } from './ActiveFilters.js'; import { TraceLoadEvent } from './BenchmarkEvents.js'; import historyToolbarButtonStyles from './historyToolbarButton.css.js'; -import { Events, PerformanceModel } from './PerformanceModel.js'; +import { PerformanceModel } from './PerformanceModel.js'; import { cpuprofileJsonGenerator, traceJsonGenerator } from './SaveFileFormatter.js'; import { NodeNamesUpdated, SourceMapsResolver } from './SourceMapsResolver.js'; import { TimelineController } from './TimelineController.js'; @@ -260,7 +261,7 @@ export class TimelinePanel extends UI.Panel.Panel { panelToolbar; panelRightToolbar; timelinePane; - #minimapComponent; + #minimapComponent = new TimelineMiniMap(); statusPaneContainer; flameChart; searchableViewInternal; @@ -294,7 +295,6 @@ export class TimelinePanel extends UI.Panel.Panel { #onSourceMapsNodeNamesResolvedBound = this.#onSourceMapsNodeNamesResolved.bind(this); constructor() { super('timeline'); - this.#minimapComponent = new TimelineMiniMap(); const config = TraceEngine.Types.Configuration.DEFAULT; config.experiments.timelineShowAllEvents = Root.Runtime.experiments.isEnabled('timelineShowAllEvents'); config.experiments.timelineV8RuntimeCallStats = Root.Runtime.experiments.isEnabled('timelineV8RuntimeCallStats'); @@ -336,7 +336,6 @@ export class TimelinePanel extends UI.Panel.Panel { const topPaneElement = this.timelinePane.element.createChild('div', 'hbox'); topPaneElement.id = 'timeline-overview-panel'; this.#minimapComponent.show(topPaneElement); - this.#minimapComponent.addEventListener(PerfUI.TimelineOverviewPane.Events.WindowChanged, this.onOverviewWindowChanged.bind(this)); this.statusPaneContainer = this.timelinePane.element.createChild('div', 'status-pane-container fill'); this.createFileSelector(); SDK.TargetManager.TargetManager.instance().addModelListener(SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this); @@ -417,21 +416,6 @@ export class TimelinePanel extends UI.Panel.Panel { this.prepareToLoadTimeline(); this.loader = TimelineLoader.loadFromCpuProfile(profile, this, title); } - onOverviewWindowChanged(event) { - if (!this.performanceModel) { - return; - } - const left = (event.data.startTime > 0) ? event.data.startTime : this.performanceModel.minimumRecordTime(); - const right = Number.isFinite(event.data.endTime) ? event.data.endTime : this.performanceModel.maximumRecordTime(); - this.performanceModel.setWindow({ left, right }, /* animate */ true, event.data.breadcrumb); - TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(TraceEngine.Types.Timing.MilliSeconds(left), TraceEngine.Types.Timing.MilliSeconds(right)), { - shouldAnimate: true, - }); - } - onModelWindowChanged(event) { - const window = event.data.window; - this.#minimapComponent.setWindowTimes(window.left, window.right); - } setState(state) { this.state = state; this.updateTimelineControls(); @@ -617,13 +601,13 @@ export class TimelinePanel extends UI.Panel.Panel { } async showHistory() { const recordingData = await this.#historyManager.showHistoryDropDown(); - if (recordingData && recordingData.legacyModel !== this.performanceModel) { + if (recordingData && recordingData.traceParseDataIndex !== this.#traceEngineActiveTraceIndex) { this.setModel(recordingData.legacyModel, /* exclusiveFilter= */ null, recordingData.traceParseDataIndex); } } navigateHistory(direction) { const recordingData = this.#historyManager.navigate(direction); - if (recordingData && recordingData.legacyModel !== this.performanceModel) { + if (recordingData && recordingData.traceParseDataIndex !== this.#traceEngineActiveTraceIndex) { this.setModel(recordingData.legacyModel, /* exclusiveFilter= */ null, recordingData.traceParseDataIndex); } return true; @@ -893,7 +877,8 @@ export class TimelinePanel extends UI.Panel.Panel { /* no collectedEvents */ [], /* tracingModel= */ null, /* exclusiveFilter= */ null, - /* isCpuProfile= */ false); + /* isCpuProfile= */ false, + /* recordingStartTime= */ null); }); this.statusPane.showPane(this.statusPaneContainer); this.statusPane.updateStatus(i18nString(UIStrings.recordingFailed)); @@ -962,9 +947,6 @@ export class TimelinePanel extends UI.Panel.Panel { } reset() { PerfUI.LineLevelProfile.Performance.instance().reset(); - if (this.performanceModel) { - this.performanceModel.removeEventListener(Events.NamesResolved, this.#onSourceMapsNodeNamesResolved, this); - } if (this.#sourceMapsResolver) { this.#sourceMapsResolver.removeEventListener(NodeNamesUpdated.eventName, this.#onSourceMapsNodeNamesResolvedBound); this.#sourceMapsResolver.uninstall(); @@ -972,64 +954,49 @@ export class TimelinePanel extends UI.Panel.Panel { } this.setModel(null); } - applyFilters(model, exclusiveFilter = null) { - if (model.timelineModel().isGenericTrace() || Root.Runtime.experiments.isEnabled('timelineShowAllEvents')) { + #applyActiveFilters(traceIsGeneric, exclusiveFilter = null) { + if (traceIsGeneric || Root.Runtime.experiments.isEnabled('timelineShowAllEvents')) { return; } - model.setFilters(exclusiveFilter ? [exclusiveFilter] : [TimelineUIUtils.visibleEventsFilter()]); + const newActiveFilters = exclusiveFilter ? [exclusiveFilter] : [ + TimelineUIUtils.visibleEventsFilter(), + ]; + ActiveFilters.instance().setFilters(newActiveFilters); + } + applyFilters(_perfModel, exclusiveFilter = null) { + // TODO: this method is maintained purely for a set of layout tests that + // use it. Once these tests have been replaced or migrated into DevTools + // unit tests, we can remove this applyFilters() method. + // http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js + // http/tests/devtools/a11y-axe-core/performance/performance_event_log_a11y_test.js + // http/tests/devtools/tracing/category-filter.js + // http/tests/devtools/tracing/timeline-js/timeline-open-function-call.js + // http/tests/devtools/tracing/timeline-misc/timeline-filtering-self-time.js + // http/tests/devtools/tracing/timeline-misc/timeline-filtering.js + // http/tests/devtools/tracing/timeline-misc/timeline-range-stats.js + this.#applyActiveFilters(false, exclusiveFilter); } setModel(model, exclusiveFilter = null, traceEngineIndex = -1) { - if (this.performanceModel) { - this.performanceModel.removeEventListener(Events.WindowChanged, this.onModelWindowChanged, this); - } this.performanceModel = model; - if (model) { - this.searchableViewInternal.showWidget(); - this.applyFilters(model, exclusiveFilter); - } - else { - this.searchableViewInternal.hideWidget(); - } this.#traceEngineActiveTraceIndex = traceEngineIndex; const traceParsedData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex); const isCpuProfile = this.#traceEngineModel.metadata(this.#traceEngineActiveTraceIndex)?.dataOrigin === "CPUProfile" /* TraceEngine.Types.File.DataOrigin.CPUProfile */; - this.flameChart.setModel(model, traceParsedData, isCpuProfile); this.#minimapComponent.reset(); + // Order is important: the bounds must be set before we initiate any UI + // rendering. if (traceParsedData) { TraceBounds.TraceBounds.BoundsManager.instance().resetWithNewBounds(traceParsedData.Meta.traceBounds); + this.#applyActiveFilters(traceParsedData.Meta.traceIsGeneric, exclusiveFilter); } if (model) { - model.addEventListener(Events.WindowChanged, this.onModelWindowChanged, this); - PerfUI.LineLevelProfile.Performance.instance().reset(); - this.flameChart.setSelection(null); + this.searchableViewInternal.showWidget(); } - if (traceParsedData) { - // Set the absolute bounds for the minimap. - const traceBoundsMilliSeconds = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(traceParsedData.Meta.traceBounds); - this.#minimapComponent.setBounds(traceBoundsMilliSeconds.min, traceBoundsMilliSeconds.max); - // To calculate the activity we might want to zoom in, we find the last - // main thread. Or we find the CPU Profile thread, for e.g. Node traces. - const mainThreadTypes = [ - "MAIN_THREAD" /* TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD */, - "CPU_PROFILE" /* TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE */, - ]; - const lastMainThread = TraceEngine.Handlers.Threads.threadsInTrace(traceParsedData) - .filter(data => mainThreadTypes.includes(data.type)) - .at(-1); - if (lastMainThread) { - const zoomedInBounds = TraceEngine.Extras.MainThreadActivity.calculateWindow(traceParsedData.Meta.traceBounds, lastMainThread.entries); - const zoomedInMilliseconds = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(zoomedInBounds); - this.#minimapComponent.setWindowTimes(zoomedInMilliseconds.min, zoomedInMilliseconds.max); - TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(zoomedInBounds); - // Temporary to maintain correct old model whilst we work on removing it. - // We need this for now because it is this code that ensures the UI - // does not let the user scroll beyond these bounds. - if (model) { - model.setWindow({ left: zoomedInMilliseconds.min, right: zoomedInMilliseconds.max }); - } - } + else { + this.searchableViewInternal.hideWidget(); } + this.flameChart.setModel(model, traceParsedData, isCpuProfile); + this.flameChart.setSelection(null); // Set up line level profiling with CPU profiles, if we found any. PerfUI.LineLevelProfile.Performance.instance().reset(); if (traceParsedData && traceParsedData.Samples.profilesInProcess.size) { @@ -1046,8 +1013,27 @@ export class TimelinePanel extends UI.Panel.Panel { this.updateOverviewControls(); if (this.flameChart) { this.flameChart.resizeToPreferredHeights(); - if (this.#minimapComponent.breadcrumbsActivated) { - this.#minimapComponent.addInitialBreadcrumb(); + } + // Set the initial zoom: if we are using breadcrumbs we leave the entire + // window visible, but if not we zoom into the biggest period of activity + // (we might want to consider doing the same for breadcrumbs) + if (this.#minimapComponent.breadcrumbsActivated) { + this.#minimapComponent.addInitialBreadcrumb(); + } + else if (traceParsedData) { + // We expect traceParsedData to always exist, this check is to keep TS happy. + // To calculate the activity we might want to zoom in, we find the last + // main thread. Or we find the CPU Profile thread, for e.g. Node traces. + const mainThreadTypes = [ + "MAIN_THREAD" /* TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD */, + "CPU_PROFILE" /* TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE */, + ]; + const lastMainThread = TraceEngine.Handlers.Threads.threadsInTrace(traceParsedData) + .filter(data => mainThreadTypes.includes(data.type)) + .at(-1); + if (lastMainThread) { + const zoomedInBounds = TraceEngine.Extras.MainThreadActivity.calculateWindow(traceParsedData.Meta.traceBounds, lastMainThread.entries); + TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(zoomedInBounds); } } this.updateTimelineControls(); @@ -1109,14 +1095,14 @@ export class TimelinePanel extends UI.Panel.Panel { if (isNode) { const previewSection = new PanelFeedback.PanelFeedback.PanelFeedback(); previewSection.data = { - feedbackUrl: 'https://bugs.chromium.org/p/chromium/issues/detail?id=1354548', - quickStartUrl: 'https://developer.chrome.com/blog/js-profiler-deprecation/', + feedbackUrl: 'https://crbug.com/1354548', + quickStartUrl: 'https://goo.gle/js-profiler-deprecation', quickStartLinkText: i18nString(UIStrings.learnmore), }; centered.appendChild(previewSection); const feedbackButton = new PanelFeedback.FeedbackButton.FeedbackButton(); feedbackButton.data = { - feedbackUrl: 'https://bugs.chromium.org/p/chromium/issues/detail?id=1354548', + feedbackUrl: 'https://crbug.com/1354548', }; centered.appendChild(feedbackButton); } @@ -1162,7 +1148,7 @@ export class TimelinePanel extends UI.Panel.Panel { #onSourceMapsNodeNamesResolved() { this.flameChart.updateColorMapper(); } - async loadingComplete(collectedEvents, tracingModel, exclusiveFilter = null, isCpuProfile) { + async loadingComplete(collectedEvents, tracingModel, exclusiveFilter = null, isCpuProfile, recordingStartTime) { this.#traceEngineModel.resetProcessor(); SourceMapsResolver.clearResolvedNodeNames(); delete this.loader; @@ -1185,7 +1171,7 @@ export class TimelinePanel extends UI.Panel.Panel { // Calling setTracingModel now and setModel so much later, leads to several problems due to addEventListener order being unexpected // TODO(paulirish): Resolve this, or just wait for the death of tracingModel. :) this.performanceModel.setTracingModel(tracingModel, recordingIsFresh), - this.#executeNewTraceEngine(collectedEvents, recordingIsFresh, isCpuProfile, this.performanceModel.recordStartTime()), + this.#executeNewTraceEngine(collectedEvents, recordingIsFresh, isCpuProfile, recordingStartTime), ]); // This code path is only executed when a new trace is recorded/imported, // so we know that the active index will be the size of the model because @@ -1215,6 +1201,7 @@ export class TimelinePanel extends UI.Panel.Panel { }, filmStripForPreview: TraceEngine.Extras.FilmStrip.fromTraceData(traceData), traceParsedData: traceData, + startTime: recordingStartTime ?? null, }); } catch (error) { @@ -1256,7 +1243,7 @@ export class TimelinePanel extends UI.Panel.Panel { } async #executeNewTraceEngine(collectedEvents, isFreshRecording, isCpuProfile, recordStartTime) { const shouldGatherMetadata = isFreshRecording && !isCpuProfile; - const metadata = shouldGatherMetadata ? await TraceEngine.Extras.Metadata.forNewRecording(recordStartTime) : {}; + const metadata = shouldGatherMetadata ? await TraceEngine.Extras.Metadata.forNewRecording(recordStartTime ?? undefined) : {}; metadata.dataOrigin = isCpuProfile ? "CPUProfile" /* TraceEngine.Types.File.DataOrigin.CPUProfile */ : "TraceEvents" /* TraceEngine.Types.File.DataOrigin.TraceEvents */; return this.#traceEngineModel.parse(collectedEvents, { @@ -1330,7 +1317,7 @@ export class TimelinePanel extends UI.Panel.Panel { } jumpToFrame(offset) { const currentFrame = this.selection && this.frameForSelection(this.selection); - if (!currentFrame || !this.performanceModel) { + if (!currentFrame) { return; } const traceData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex); @@ -1341,7 +1328,7 @@ export class TimelinePanel extends UI.Panel.Panel { console.assert(index >= 0, 'Can\'t find current frame in the frame list'); index = Platform.NumberUtilities.clamp(index + offset, 0, traceData.Frames.frames.length - 1); const frame = traceData.Frames.frames[index]; - this.revealTimeRange(TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.startTime), TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.endTime)); + this.#revealTimeRange(TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.startTime), TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.endTime)); this.select(TimelineSelection.fromFrame(frame)); return true; } @@ -1353,14 +1340,18 @@ export class TimelinePanel extends UI.Panel.Panel { if (!events) { return; } + if (events.length === 0) { + this.select(null); + return; + } // Find best match, then backtrack to the first visible entry. - for (let index = Platform.ArrayUtilities.upperBound(events, time, (time, event) => time - event.startTime) - 1; index >= 0; --index) { + for (let index = Platform.ArrayUtilities.upperBound(events, time, (time, event) => time - event.ts) - 1; index >= 0; --index) { const event = events[index]; - const endTime = event.endTime || event.startTime; + const { endTime } = TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(event); if (TraceEngine.Legacy.TracingModel.isTopLevelEvent(event) && endTime < time) { break; } - if (this.performanceModel && this.performanceModel.isVisible(event) && endTime >= time) { + if (ActiveFilters.instance().isVisible(event) && endTime >= time) { this.select(TimelineSelection.fromTraceEvent(event)); return; } @@ -1370,20 +1361,20 @@ export class TimelinePanel extends UI.Panel.Panel { highlightEvent(event) { this.flameChart.highlightEvent(event); } - revealTimeRange(startTime, endTime) { - if (!this.performanceModel) { + #revealTimeRange(startTime, endTime) { + const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state(); + if (!traceBoundsState) { return; } - const window = this.performanceModel.window(); + const traceWindow = traceBoundsState.milli.timelineTraceWindow; let offset = 0; - if (window.right < endTime) { - offset = endTime - window.right; + if (traceWindow.max < endTime) { + offset = endTime - traceWindow.max; } - else if (window.left > startTime) { - offset = startTime - window.left; + else if (traceWindow.min > startTime) { + offset = startTime - traceWindow.min; } - this.performanceModel.setWindow({ left: window.left + offset, right: window.right + offset }, /* animate */ true); - TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(TraceEngine.Types.Timing.MilliSeconds(window.left + offset), TraceEngine.Types.Timing.MilliSeconds(window.right + offset)), { + TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(TraceEngine.Types.Timing.MilliSeconds(traceWindow.min + offset), TraceEngine.Types.Timing.MilliSeconds(traceWindow.max + offset)), { shouldAnimate: true, }); } diff --git a/public/panels/timeline/TimelinePanel.js.map b/public/panels/timeline/TimelinePanel.js.map index 8f1555e7c..130b4b927 100644 --- a/public/panels/timeline/TimelinePanel.js.map +++ b/public/panels/timeline/TimelinePanel.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelinePanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelinePanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAG7C,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6CAA6C,CAAC;AAC3E,OAAO,KAAK,aAAa,MAAM,sDAAsD,CAAC;AACtF,OAAO,KAAK,MAAM,MAAM,+CAA+C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAC,cAAc,EAAC,MAAM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,uBAAuB;gBAC1B,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;gBACzB,OAAO,IAAI,CAAC;YACd,KAAK,6BAA6B;gBAChC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;gBACzB,OAAO,IAAI,CAAC;YACd,KAAK,yBAAyB;gBAC5B,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC1B,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2012 Google Inc. All rights reserved.\n * Copyright (C) 2012 Intel Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport type * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';\nimport * as PanelFeedback from '../../ui/components/panel_feedback/panel_feedback.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';\n\nimport {TraceLoadEvent} from './BenchmarkEvents.js';\nimport historyToolbarButtonStyles from './historyToolbarButton.css.js';\nimport {Events, PerformanceModel, type WindowChangedEvent} from './PerformanceModel.js';\nimport {cpuprofileJsonGenerator, traceJsonGenerator} from './SaveFileFormatter.js';\nimport {NodeNamesUpdated, SourceMapsResolver} from './SourceMapsResolver.js';\nimport {type Client, TimelineController} from './TimelineController.js';\nimport {TimelineFlameChartView} from './TimelineFlameChartView.js';\nimport {TimelineHistoryManager} from './TimelineHistoryManager.js';\nimport {TimelineLoader} from './TimelineLoader.js';\nimport {TimelineMiniMap} from './TimelineMiniMap.js';\nimport timelinePanelStyles from './timelinePanel.css.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport timelineStatusDialogStyles from './timelineStatusDialog.css.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\nimport {UIDevtoolsController} from './UIDevtoolsController.js';\nimport {UIDevtoolsUtils} from './UIDevtoolsUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text that appears when user drag and drop something (for example, a file) in Timeline Panel of the Performance panel\n */\n dropTimelineFileOrUrlHere: 'Drop timeline file or URL here',\n /**\n *@description Title of disable capture jsprofile setting in timeline panel of the performance panel\n */\n disableJavascriptSamples: 'Disable JavaScript samples',\n /**\n *@description Title of capture layers and pictures setting in timeline panel of the performance panel\n */\n enableAdvancedPaint: 'Enable advanced paint instrumentation (slow)',\n /**\n *@description Title of show screenshots setting in timeline panel of the performance panel\n */\n screenshots: 'Screenshots',\n /**\n *@description Text for the memory of the page\n */\n memory: 'Memory',\n /**\n *@description Text to clear content\n */\n clear: 'Clear',\n /**\n *@description Tooltip text that appears when hovering over the largeicon load button\n */\n loadProfile: 'Load profile…',\n /**\n *@description Tooltip text that appears when hovering over the largeicon download button\n */\n saveProfile: 'Save profile…',\n /**\n *@description Text to take screenshots\n */\n captureScreenshots: 'Capture screenshots',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n showMemoryTimeline: 'Show memory timeline',\n /**\n *@description Tooltip text that appears when hovering over the largeicon settings gear in show settings pane setting in timeline panel of the performance panel\n */\n captureSettings: 'Capture settings',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n disablesJavascriptSampling: 'Disables JavaScript sampling, reduces overhead when running against mobile devices',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n capturesAdvancedPaint: 'Captures advanced paint instrumentation, introduces significant performance overhead',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n network: 'Network:',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n cpu: 'CPU:',\n /**\n *@description Title of the 'Network conditions' tool in the bottom drawer\n */\n networkConditions: 'Network conditions',\n /**\n *@description Text in Timeline Panel of the Performance panel\n *@example {wrong format} PH1\n *@example {ERROR_FILE_NOT_FOUND} PH2\n */\n failedToSaveTimelineSS: 'Failed to save timeline: {PH1} ({PH2})',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n CpuThrottlingIsEnabled: '- CPU throttling is enabled',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n NetworkThrottlingIsEnabled: '- Network throttling is enabled',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n HardwareConcurrencyIsEnabled: '- Hardware concurrency override is enabled',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n SignificantOverheadDueToPaint: '- Significant overhead due to paint instrumentation',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n JavascriptSamplingIsDisabled: '- JavaScript sampling is disabled',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n stoppingTimeline: 'Stopping timeline…',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n received: 'Received',\n /**\n *@description Text to close something\n */\n close: 'Close',\n /**\n *@description Text to download the raw trace files after an error\n */\n downloadAfterError: 'Download raw trace events',\n /**\n *@description Status text to indicate the recording has failed in the Performance panel\n */\n recordingFailed: 'Recording failed',\n /**\n * @description Text to indicate the progress of a profile. Informs the user that we are currently\n * creating a peformance profile.\n */\n profiling: 'Profiling…',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n bufferUsage: 'Buffer usage',\n /**\n *@description Text for an option to learn more about something\n */\n learnmore: 'Learn more',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n wasd: 'WASD',\n /**\n *@description Text in Timeline Panel of the Performance panel\n *@example {record} PH1\n *@example {Ctrl + R} PH2\n */\n clickTheRecordButtonSOrHitSTo: 'Click the record button {PH1} or hit {PH2} to start a new recording.',\n /**\n * @description Text in Timeline Panel of the Performance panel\n * @example {reload button} PH1\n * @example {Ctrl + R} PH2\n */\n clickTheReloadButtonSOrHitSTo: 'Click the reload button {PH1} or hit {PH2} to record the page load.',\n /**\n *@description Text in Timeline Panel of the Performance panel\n *@example {Ctrl + U} PH1\n *@example {Learn more} PH2\n */\n afterRecordingSelectAnAreaOf:\n 'After recording, select an area of interest in the overview by dragging. Then, zoom and pan the timeline with the mousewheel or {PH1} keys. {PH2}',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n loadingProfile: 'Loading profile…',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n processingProfile: 'Processing profile…',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n initializingProfiler: 'Initializing profiler…',\n /**\n *@description Text for the status of something\n */\n status: 'Status',\n /**\n *@description Text that refers to the time\n */\n time: 'Time',\n /**\n *@description Text for the description of something\n */\n description: 'Description',\n /**\n *@description Text of an item that stops the running task\n */\n stop: 'Stop',\n /**\n *@description Time text content in Timeline Panel of the Performance panel\n *@example {2.12} PH1\n */\n ssec: '{PH1} sec',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelinePanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet timelinePanelInstance: TimelinePanel;\nlet isNode: boolean;\n\n// TypeScript will presumably get these types at some stage, and when it\n// does these temporary types should be removed.\n// TODO: Remove types when available in TypeScript.\ndeclare global {\n interface FileSystemWritableFileStream extends WritableStream {\n write(data: unknown): Promise;\n close(): Promise;\n }\n\n interface FileSystemHandle {\n createWritable(): Promise;\n }\n\n interface Window {\n showSaveFilePicker(opts: unknown): Promise;\n }\n}\n\nexport class TimelinePanel extends UI.Panel.Panel implements Client, TimelineModeViewDelegate {\n private readonly dropTarget: UI.DropTarget.DropTarget;\n private readonly recordingOptionUIControls: UI.Toolbar.ToolbarItem[];\n private state: State;\n private recordingPageReload: boolean;\n private readonly millisecondsToRecordAfterLoadEvent: number;\n private readonly toggleRecordAction: UI.ActionRegistration.Action;\n private readonly recordReloadAction: UI.ActionRegistration.Action;\n readonly #historyManager: TimelineHistoryManager;\n private performanceModel: PerformanceModel|null;\n private disableCaptureJSProfileSetting: Common.Settings.Setting;\n private readonly captureLayersAndPicturesSetting: Common.Settings.Setting;\n private showScreenshotsSetting: Common.Settings.Setting;\n private showMemorySetting: Common.Settings.Setting;\n private readonly panelToolbar: UI.Toolbar.Toolbar;\n private readonly panelRightToolbar: UI.Toolbar.Toolbar;\n private readonly timelinePane: UI.Widget.VBox;\n readonly #minimapComponent;\n private readonly statusPaneContainer: HTMLElement;\n private readonly flameChart: TimelineFlameChartView;\n private readonly searchableViewInternal: UI.SearchableView.SearchableView;\n private showSettingsPaneButton!: UI.Toolbar.ToolbarSettingToggle;\n private showSettingsPaneSetting!: Common.Settings.Setting;\n private settingsPane!: UI.Widget.Widget;\n private controller!: TimelineController|null;\n private cpuProfiler!: SDK.CPUProfilerModel.CPUProfilerModel|null;\n private clearButton!: UI.Toolbar.ToolbarButton;\n private loadButton!: UI.Toolbar.ToolbarButton;\n private saveButton!: UI.Toolbar.ToolbarButton;\n private statusPane!: StatusPane|null;\n private landingPage!: UI.Widget.Widget;\n private loader?: TimelineLoader;\n private showScreenshotsToolbarCheckbox?: UI.Toolbar.ToolbarItem;\n private showMemoryToolbarCheckbox?: UI.Toolbar.ToolbarItem;\n private networkThrottlingSelect?: UI.Toolbar.ToolbarComboBox;\n private cpuThrottlingSelect?: UI.Toolbar.ToolbarComboBox;\n private fileSelectorElement?: HTMLInputElement;\n private selection?: TimelineSelection|null;\n private traceLoadStart!: TraceEngine.Types.Timing.MilliSeconds|null;\n private primaryPageTargetPromiseCallback = (_target: SDK.Target.Target): void => {};\n // Note: this is technically unused, but we need it to define the promiseCallback function above.\n private primaryPageTargetPromise = new Promise(res => {\n this.primaryPageTargetPromiseCallback = res;\n });\n\n #traceEngineModel: TraceEngine.TraceModel.Model;\n // Tracks the index of the trace that the user is currently viewing.\n #traceEngineActiveTraceIndex = -1;\n #sourceMapsResolver: SourceMapsResolver|null = null;\n #onSourceMapsNodeNamesResolvedBound = this.#onSourceMapsNodeNamesResolved.bind(this);\n\n constructor() {\n super('timeline');\n this.#minimapComponent = new TimelineMiniMap();\n\n const config = TraceEngine.Types.Configuration.DEFAULT;\n config.experiments.timelineShowAllEvents = Root.Runtime.experiments.isEnabled('timelineShowAllEvents');\n config.experiments.timelineV8RuntimeCallStats = Root.Runtime.experiments.isEnabled('timelineV8RuntimeCallStats');\n this.#traceEngineModel = TraceEngine.TraceModel.Model.createWithAllHandlers(config);\n\n this.element.addEventListener('contextmenu', this.contextMenu.bind(this), false);\n this.dropTarget = new UI.DropTarget.DropTarget(\n this.element, [UI.DropTarget.Type.File, UI.DropTarget.Type.URI],\n i18nString(UIStrings.dropTimelineFileOrUrlHere), this.handleDrop.bind(this));\n\n this.recordingOptionUIControls = [];\n this.state = State.Idle;\n this.recordingPageReload = false;\n this.millisecondsToRecordAfterLoadEvent = 5000;\n this.toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.toggle-recording');\n this.recordReloadAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.record-reload');\n\n this.#historyManager = new TimelineHistoryManager(this.#minimapComponent);\n\n this.performanceModel = null;\n this.traceLoadStart = null;\n\n this.disableCaptureJSProfileSetting =\n Common.Settings.Settings.instance().createSetting('timelineDisableJSSampling', false);\n this.disableCaptureJSProfileSetting.setTitle(i18nString(UIStrings.disableJavascriptSamples));\n this.captureLayersAndPicturesSetting =\n Common.Settings.Settings.instance().createSetting('timelineCaptureLayersAndPictures', false);\n this.captureLayersAndPicturesSetting.setTitle(i18nString(UIStrings.enableAdvancedPaint));\n\n this.showScreenshotsSetting =\n Common.Settings.Settings.instance().createSetting('timelineShowScreenshots', isNode ? false : true);\n this.showScreenshotsSetting.setTitle(i18nString(UIStrings.screenshots));\n this.showScreenshotsSetting.addChangeListener(this.updateOverviewControls, this);\n\n this.showMemorySetting = Common.Settings.Settings.instance().createSetting('timelineShowMemory', false);\n this.showMemorySetting.setTitle(i18nString(UIStrings.memory));\n this.showMemorySetting.addChangeListener(this.onModeChanged, this);\n\n const timelineToolbarContainer = this.element.createChild('div', 'timeline-toolbar-container');\n this.panelToolbar = new UI.Toolbar.Toolbar('timeline-main-toolbar', timelineToolbarContainer);\n this.panelToolbar.makeWrappable(true);\n this.panelRightToolbar = new UI.Toolbar.Toolbar('', timelineToolbarContainer);\n if (!isNode) {\n this.createSettingsPane();\n this.updateShowSettingsToolbarButton();\n }\n this.timelinePane = new UI.Widget.VBox();\n this.timelinePane.show(this.element);\n const topPaneElement = this.timelinePane.element.createChild('div', 'hbox');\n topPaneElement.id = 'timeline-overview-panel';\n\n this.#minimapComponent.show(topPaneElement);\n this.#minimapComponent.addEventListener(\n PerfUI.TimelineOverviewPane.Events.WindowChanged, this.onOverviewWindowChanged.bind(this));\n\n this.statusPaneContainer = this.timelinePane.element.createChild('div', 'status-pane-container fill');\n\n this.createFileSelector();\n\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this);\n\n this.flameChart = new TimelineFlameChartView(this);\n this.searchableViewInternal = new UI.SearchableView.SearchableView(this.flameChart, null);\n this.searchableViewInternal.setMinimumSize(0, 100);\n this.searchableViewInternal.element.classList.add('searchable-view');\n this.searchableViewInternal.show(this.timelinePane.element);\n this.flameChart.show(this.searchableViewInternal.element);\n this.flameChart.setSearchableView(this.searchableViewInternal);\n this.searchableViewInternal.hideWidget();\n\n this.onModeChanged();\n this.populateToolbar();\n this.showLandingPage();\n this.updateTimelineControls();\n\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.SuspendStateChanged, this.onSuspendStateChanged, this);\n if (Root.Runtime.experiments.isEnabled('timelineAsConsoleProfileResultPanel')) {\n const profilerModels = SDK.TargetManager.TargetManager.instance().models(SDK.CPUProfilerModel.CPUProfilerModel);\n for (const model of profilerModels) {\n for (const message of model.registeredConsoleProfileMessages) {\n this.consoleProfileFinished(message);\n }\n }\n SDK.TargetManager.TargetManager.instance().observeModels(\n SDK.CPUProfilerModel.CPUProfilerModel,\n {\n modelAdded: (model: SDK.CPUProfilerModel.CPUProfilerModel) => {\n model.addEventListener(\n SDK.CPUProfilerModel.Events.ConsoleProfileFinished, event => this.consoleProfileFinished(event.data));\n },\n modelRemoved: (_model: SDK.CPUProfilerModel.CPUProfilerModel) => {\n\n },\n },\n );\n }\n SDK.TargetManager.TargetManager.instance().observeTargets({\n targetAdded: (target: SDK.Target.Target) => {\n if (target !== SDK.TargetManager.TargetManager.instance().primaryPageTarget()) {\n return;\n }\n this.primaryPageTargetPromiseCallback(target);\n },\n targetRemoved: (_: SDK.Target.Target) => {},\n });\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n isNode: boolean,\n }|undefined = {forceNew: null, isNode: false}): TimelinePanel {\n const {forceNew, isNode: isNodeMode} = opts;\n isNode = isNodeMode;\n\n if (!timelinePanelInstance || forceNew) {\n timelinePanelInstance = new TimelinePanel();\n }\n\n return timelinePanelInstance;\n }\n\n override searchableView(): UI.SearchableView.SearchableView|null {\n return this.searchableViewInternal;\n }\n\n override wasShown(): void {\n super.wasShown();\n UI.Context.Context.instance().setFlavor(TimelinePanel, this);\n this.registerCSSFiles([timelinePanelStyles]);\n // Record the performance tool load time.\n Host.userMetrics.panelLoaded('timeline', 'DevTools.Launch.Timeline');\n }\n\n override willHide(): void {\n UI.Context.Context.instance().setFlavor(TimelinePanel, null);\n this.#historyManager.cancelIfShowing();\n }\n\n loadFromEvents(events: TraceEngine.TracingManager.EventPayload[]): void {\n if (this.state !== State.Idle) {\n return;\n }\n this.prepareToLoadTimeline();\n this.loader = TimelineLoader.loadFromEvents(events, this);\n }\n\n getFlameChart(): TimelineFlameChartView {\n return this.flameChart;\n }\n\n private loadFromCpuProfile(profile: Protocol.Profiler.Profile|null, title?: string): void {\n if (this.state !== State.Idle) {\n return;\n }\n this.prepareToLoadTimeline();\n this.loader = TimelineLoader.loadFromCpuProfile(profile, this, title);\n }\n\n private onOverviewWindowChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n if (!this.performanceModel) {\n return;\n }\n\n const left = (event.data.startTime > 0) ? event.data.startTime : this.performanceModel.minimumRecordTime();\n const right = Number.isFinite(event.data.endTime) ? event.data.endTime : this.performanceModel.maximumRecordTime();\n this.performanceModel.setWindow({left, right}, /* animate */ true, event.data.breadcrumb);\n\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n TraceEngine.Types.Timing.MilliSeconds(left),\n TraceEngine.Types.Timing.MilliSeconds(right),\n ),\n {\n shouldAnimate: true,\n },\n );\n }\n\n private onModelWindowChanged(event: Common.EventTarget.EventTargetEvent): void {\n const window = event.data.window;\n this.#minimapComponent.setWindowTimes(window.left, window.right);\n }\n\n private setState(state: State): void {\n this.state = state;\n this.updateTimelineControls();\n }\n\n private createSettingCheckbox(setting: Common.Settings.Setting, tooltip: string): UI.Toolbar.ToolbarItem {\n const checkboxItem = new UI.Toolbar.ToolbarSettingCheckbox(setting, tooltip);\n this.recordingOptionUIControls.push(checkboxItem);\n return checkboxItem;\n }\n\n private populateToolbar(): void {\n // Record\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction));\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.recordReloadAction));\n this.clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clear), 'clear');\n this.clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => this.onClearButton());\n this.panelToolbar.appendToolbarItem(this.clearButton);\n\n // Load / Save\n this.loadButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.loadProfile), 'import');\n this.loadButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceImported);\n this.selectFileToLoad();\n });\n this.saveButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.saveProfile), 'download');\n this.saveButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceExported);\n void this.saveToFile();\n });\n this.panelToolbar.appendSeparator();\n this.panelToolbar.appendToolbarItem(this.loadButton);\n this.panelToolbar.appendToolbarItem(this.saveButton);\n\n // History\n this.panelToolbar.appendSeparator();\n this.panelToolbar.appendToolbarItem(this.#historyManager.button());\n this.panelToolbar.registerCSSFiles([historyToolbarButtonStyles]);\n this.panelToolbar.appendSeparator();\n\n // View\n this.panelToolbar.appendSeparator();\n if (!isNode) {\n this.showScreenshotsToolbarCheckbox =\n this.createSettingCheckbox(this.showScreenshotsSetting, i18nString(UIStrings.captureScreenshots));\n this.panelToolbar.appendToolbarItem(this.showScreenshotsToolbarCheckbox);\n }\n\n this.showMemoryToolbarCheckbox =\n this.createSettingCheckbox(this.showMemorySetting, i18nString(UIStrings.showMemoryTimeline));\n this.panelToolbar.appendToolbarItem(this.showMemoryToolbarCheckbox);\n\n // GC\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('components.collect-garbage'));\n\n // Settings\n if (!isNode) {\n this.panelRightToolbar.appendSeparator();\n this.panelRightToolbar.appendToolbarItem(this.showSettingsPaneButton);\n }\n }\n\n private createSettingsPane(): void {\n this.showSettingsPaneSetting =\n Common.Settings.Settings.instance().createSetting('timelineShowSettingsToolbar', false);\n this.showSettingsPaneButton = new UI.Toolbar.ToolbarSettingToggle(\n this.showSettingsPaneSetting, 'gear', i18nString(UIStrings.captureSettings), 'gear-filled');\n SDK.NetworkManager.MultitargetNetworkManager.instance().addEventListener(\n SDK.NetworkManager.MultitargetNetworkManager.Events.ConditionsChanged, this.updateShowSettingsToolbarButton,\n this);\n SDK.CPUThrottlingManager.CPUThrottlingManager.instance().addEventListener(\n SDK.CPUThrottlingManager.Events.RateChanged, this.updateShowSettingsToolbarButton, this);\n SDK.CPUThrottlingManager.CPUThrottlingManager.instance().addEventListener(\n SDK.CPUThrottlingManager.Events.HardwareConcurrencyChanged, this.updateShowSettingsToolbarButton, this);\n this.disableCaptureJSProfileSetting.addChangeListener(this.updateShowSettingsToolbarButton, this);\n this.captureLayersAndPicturesSetting.addChangeListener(this.updateShowSettingsToolbarButton, this);\n\n this.settingsPane = new UI.Widget.HBox();\n this.settingsPane.element.classList.add('timeline-settings-pane');\n this.settingsPane.show(this.element);\n\n const captureToolbar = new UI.Toolbar.Toolbar('', this.settingsPane.element);\n captureToolbar.element.classList.add('flex-auto');\n captureToolbar.makeVertical();\n captureToolbar.appendToolbarItem(this.createSettingCheckbox(\n this.disableCaptureJSProfileSetting, i18nString(UIStrings.disablesJavascriptSampling)));\n captureToolbar.appendToolbarItem(\n this.createSettingCheckbox(this.captureLayersAndPicturesSetting, i18nString(UIStrings.capturesAdvancedPaint)));\n\n const throttlingPane = new UI.Widget.VBox();\n throttlingPane.element.classList.add('flex-auto');\n throttlingPane.show(this.settingsPane.element);\n\n const cpuThrottlingToolbar = new UI.Toolbar.Toolbar('', throttlingPane.element);\n cpuThrottlingToolbar.appendText(i18nString(UIStrings.cpu));\n this.cpuThrottlingSelect = MobileThrottling.ThrottlingManager.throttlingManager().createCPUThrottlingSelector();\n cpuThrottlingToolbar.appendToolbarItem(this.cpuThrottlingSelect);\n\n const networkThrottlingToolbar = new UI.Toolbar.Toolbar('', throttlingPane.element);\n networkThrottlingToolbar.appendText(i18nString(UIStrings.network));\n this.networkThrottlingSelect = this.createNetworkConditionsSelect();\n networkThrottlingToolbar.appendToolbarItem(this.networkThrottlingSelect);\n\n const hardwareConcurrencyPane = new UI.Widget.VBox();\n hardwareConcurrencyPane.element.classList.add('flex-auto');\n hardwareConcurrencyPane.show(this.settingsPane.element);\n\n const {toggle, input, reset, warning} =\n MobileThrottling.ThrottlingManager.throttlingManager().createHardwareConcurrencySelector();\n const concurrencyThrottlingToolbar = new UI.Toolbar.Toolbar('', hardwareConcurrencyPane.element);\n concurrencyThrottlingToolbar.registerCSSFiles([timelinePanelStyles]);\n input.element.classList.add('timeline-concurrency-input');\n concurrencyThrottlingToolbar.appendToolbarItem(toggle);\n concurrencyThrottlingToolbar.appendToolbarItem(input);\n concurrencyThrottlingToolbar.appendToolbarItem(reset);\n concurrencyThrottlingToolbar.appendToolbarItem(warning);\n\n this.showSettingsPaneSetting.addChangeListener(this.updateSettingsPaneVisibility.bind(this));\n this.updateSettingsPaneVisibility();\n }\n\n private createNetworkConditionsSelect(): UI.Toolbar.ToolbarComboBox {\n const toolbarItem = new UI.Toolbar.ToolbarComboBox(null, i18nString(UIStrings.networkConditions));\n toolbarItem.setMaxWidth(140);\n MobileThrottling.ThrottlingManager.throttlingManager().decorateSelectWithNetworkThrottling(\n toolbarItem.selectElement());\n return toolbarItem;\n }\n\n private prepareToLoadTimeline(): void {\n console.assert(this.state === State.Idle);\n this.setState(State.Loading);\n if (this.performanceModel) {\n this.performanceModel = null;\n }\n }\n\n private createFileSelector(): void {\n if (this.fileSelectorElement) {\n this.fileSelectorElement.remove();\n }\n this.fileSelectorElement = UI.UIUtils.createFileSelectorElement(this.loadFromFile.bind(this));\n this.timelinePane.element.appendChild(this.fileSelectorElement);\n }\n\n private contextMenu(event: Event): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.appendItemsAtLocation('timelineMenu');\n void contextMenu.show();\n }\n\n async saveToFile(): Promise {\n if (this.state !== State.Idle) {\n return;\n }\n const performanceModel = this.performanceModel;\n if (!performanceModel) {\n return;\n }\n\n const traceEvents = this.#traceEngineModel.traceEvents(this.#traceEngineActiveTraceIndex);\n const metadata = this.#traceEngineModel.metadata(this.#traceEngineActiveTraceIndex);\n if (!traceEvents) {\n return;\n }\n\n const traceStart = Platform.DateUtilities.toISO8601Compact(new Date());\n let fileName: Platform.DevToolsPath.RawPathString;\n if (metadata?.dataOrigin === TraceEngine.Types.File.DataOrigin.CPUProfile) {\n fileName = `CPU-${traceStart}.cpuprofile` as Platform.DevToolsPath.RawPathString;\n } else {\n fileName = `Trace-${traceStart}.json` as Platform.DevToolsPath.RawPathString;\n }\n\n try {\n const handler = await window.showSaveFilePicker({\n suggestedName: fileName,\n });\n const encoder = new TextEncoder();\n\n // TODO(crbug.com/1456818): Extract this logic and add more tests.\n let traceAsString;\n if (metadata?.dataOrigin === TraceEngine.Types.File.DataOrigin.CPUProfile) {\n const profileEvent = traceEvents.find(e => e.name === 'CpuProfile');\n if (!profileEvent || !profileEvent.args?.data) {\n return;\n }\n const profileEventData = profileEvent.args?.data;\n if (profileEventData.hasOwnProperty('cpuProfile')) {\n // TODO(crbug.com/1456799): Currently use a hack way because we can't differentiate\n // cpuprofile from trace events when loading a file.\n // The loader will directly add the fake trace created from CpuProfile to the tracingModel.\n // And there is where the old saving logic saves the cpuprofile.\n // This will be solved when the CPUProfileHandler is done. Then we can directly get it\n // from the new traceEngine\n const profile = (profileEventData as {cpuProfile: Protocol.Profiler.Profile}).cpuProfile;\n traceAsString = cpuprofileJsonGenerator(profile as Protocol.Profiler.Profile);\n }\n } else {\n const formattedTraceIter = traceJsonGenerator(traceEvents, metadata);\n traceAsString = Array.from(formattedTraceIter).join('');\n }\n const buffer = encoder.encode(traceAsString);\n const writable = await handler.createWritable();\n await writable.write(buffer);\n await writable.close();\n } catch (error) {\n console.error(error.stack);\n if (error.name === 'AbortError') {\n // The user cancelled the action, so this is not an error we need to report.\n return;\n }\n Common.Console.Console.instance().error(\n i18nString(UIStrings.failedToSaveTimelineSS, {PH1: error.message, PH2: error.name}));\n }\n }\n\n async showHistory(): Promise {\n const recordingData = await this.#historyManager.showHistoryDropDown();\n if (recordingData && recordingData.legacyModel !== this.performanceModel) {\n this.setModel(recordingData.legacyModel, /* exclusiveFilter= */ null, recordingData.traceParseDataIndex);\n }\n }\n\n navigateHistory(direction: number): boolean {\n const recordingData = this.#historyManager.navigate(direction);\n if (recordingData && recordingData.legacyModel !== this.performanceModel) {\n this.setModel(recordingData.legacyModel, /* exclusiveFilter= */ null, recordingData.traceParseDataIndex);\n }\n return true;\n }\n\n selectFileToLoad(): void {\n if (this.fileSelectorElement) {\n this.fileSelectorElement.click();\n }\n }\n\n async loadFromFile(file: File): Promise {\n if (this.state !== State.Idle) {\n return;\n }\n this.prepareToLoadTimeline();\n this.loader = await TimelineLoader.loadFromFile(file, this);\n this.createFileSelector();\n }\n\n async loadFromURL(url: Platform.DevToolsPath.UrlString): Promise {\n if (this.state !== State.Idle) {\n return;\n }\n this.prepareToLoadTimeline();\n this.loader = await TimelineLoader.loadFromURL(url, this);\n }\n\n private updateOverviewControls(): void {\n const traceParsedData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n const isCpuProfile = this.#traceEngineModel.metadata(this.#traceEngineActiveTraceIndex)?.dataOrigin ===\n TraceEngine.Types.File.DataOrigin.CPUProfile;\n if (!traceParsedData) {\n return;\n }\n\n this.#minimapComponent.setData({\n traceParsedData,\n isCpuProfile,\n settings: {\n showScreenshots: this.showScreenshotsSetting.get(),\n showMemory: this.showMemorySetting.get(),\n },\n });\n }\n\n private onModeChanged(): void {\n this.updateOverviewControls();\n this.doResize();\n this.select(null);\n }\n\n private updateSettingsPaneVisibility(): void {\n if (isNode) {\n return;\n }\n if (this.showSettingsPaneSetting.get()) {\n this.settingsPane.showWidget();\n } else {\n this.settingsPane.hideWidget();\n }\n }\n\n private updateShowSettingsToolbarButton(): void {\n const messages: string[] = [];\n if (SDK.CPUThrottlingManager.CPUThrottlingManager.instance().cpuThrottlingRate() !== 1) {\n messages.push(i18nString(UIStrings.CpuThrottlingIsEnabled));\n }\n if (MobileThrottling.ThrottlingManager.throttlingManager().hardwareConcurrencyOverrideEnabled) {\n messages.push(i18nString(UIStrings.HardwareConcurrencyIsEnabled));\n }\n if (SDK.NetworkManager.MultitargetNetworkManager.instance().isThrottling()) {\n messages.push(i18nString(UIStrings.NetworkThrottlingIsEnabled));\n }\n if (this.captureLayersAndPicturesSetting.get()) {\n messages.push(i18nString(UIStrings.SignificantOverheadDueToPaint));\n }\n if (this.disableCaptureJSProfileSetting.get()) {\n messages.push(i18nString(UIStrings.JavascriptSamplingIsDisabled));\n }\n\n this.showSettingsPaneButton.setDefaultWithRedColor(messages.length > 0);\n this.showSettingsPaneButton.setToggleWithRedColor(messages.length > 0);\n\n if (messages.length) {\n const tooltipElement = document.createElement('div');\n messages.forEach(message => {\n tooltipElement.createChild('div').textContent = message;\n });\n this.showSettingsPaneButton.setTitle(tooltipElement.textContent || '');\n } else {\n this.showSettingsPaneButton.setTitle(i18nString(UIStrings.captureSettings));\n }\n }\n\n private setUIControlsEnabled(enabled: boolean): void {\n this.recordingOptionUIControls.forEach(control => control.setEnabled(enabled));\n }\n\n async #evaluateInspectedURL(): Promise {\n if (!this.controller) {\n return Platform.DevToolsPath.EmptyUrlString;\n }\n\n // target.inspectedURL is reliably populated, however it lacks any url #hash\n const inspectedURL = this.controller.primaryPageTarget.inspectedURL();\n\n // We'll use the navigationHistory to acquire the current URL including hash\n const resourceTreeModel = this.controller.primaryPageTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);\n const navHistory = resourceTreeModel && await resourceTreeModel.navigationHistory();\n if (!resourceTreeModel || !navHistory) {\n return inspectedURL;\n }\n\n const {currentIndex, entries} = navHistory;\n const navigationEntry = entries[currentIndex];\n return navigationEntry.url as Platform.DevToolsPath.UrlString;\n }\n\n async #navigateToAboutBlank(): Promise {\n const aboutBlankNavigationComplete = new Promise(async (resolve, reject) => {\n if (!this.controller) {\n reject('Could not find TimelineController');\n return;\n }\n const target = this.controller.primaryPageTarget;\n const resourceModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);\n if (!resourceModel) {\n reject('Could not load resourceModel');\n return;\n }\n\n // To clear out the page and any state from prior test runs, we\n // navigate to about:blank before initiating the trace recording.\n // Once we have navigated to about:blank, we start recording and\n // then navigate to the original page URL, to ensure we profile the\n // page load.\n function waitForAboutBlank(event: Common.EventTarget.EventTargetEvent):\n void {\n if (event.data.url === 'about:blank') {\n resolve();\n } else {\n reject(`Unexpected navigation to ${event.data.url}`);\n }\n resourceModel?.removeEventListener(SDK.ResourceTreeModel.Events.FrameNavigated, waitForAboutBlank);\n }\n resourceModel.addEventListener(SDK.ResourceTreeModel.Events.FrameNavigated, waitForAboutBlank);\n await resourceModel.navigate('about:blank' as Platform.DevToolsPath.UrlString);\n });\n await aboutBlankNavigationComplete;\n }\n\n async #startCPUProfilingRecording(): Promise {\n try {\n // Only profile the first target devtools connects to. If we profile all target, but this will cause some bugs\n // like time for the function is calculated wrong, because the profiles will be concated and sorted together,\n // so the total time will be amplified.\n // Multiple targets problem might happen when you inspect multiple node servers on different port at same time,\n // or when you let DevTools listen to both locolhost:9229 & 127.0.0.1:9229.\n const firstNodeTarget =\n SDK.TargetManager.TargetManager.instance().targets().find(target => target.type() === SDK.Target.Type.Node);\n if (!firstNodeTarget) {\n throw new Error('Could not load any Node target.');\n }\n if (firstNodeTarget) {\n this.cpuProfiler = firstNodeTarget.model(SDK.CPUProfilerModel.CPUProfilerModel);\n }\n this.setUIControlsEnabled(false);\n this.hideLandingPage();\n if (!this.cpuProfiler) {\n throw new Error('No Node target is found.');\n }\n await SDK.TargetManager.TargetManager.instance().suspendAllTargets('performance-timeline');\n await this.cpuProfiler.startRecording();\n\n this.recordingStarted();\n } catch (e) {\n await this.recordingFailed(e.message);\n }\n }\n\n async #startTraceRecording(): Promise {\n try {\n // We record against the root target, but also need to use the\n // primaryPageTarget to inspect the current URL. For more info, see the\n // JSDoc comment on the TimelineController constructor.\n const rootTarget = SDK.TargetManager.TargetManager.instance().rootTarget();\n const primaryPageTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();\n\n if (!primaryPageTarget) {\n throw new Error('Could not load primary page target.');\n }\n if (!rootTarget) {\n throw new Error('Could not load root target.');\n }\n\n if (UIDevtoolsUtils.isUiDevTools()) {\n this.controller = new UIDevtoolsController(rootTarget, primaryPageTarget, this);\n } else {\n this.controller = new TimelineController(rootTarget, primaryPageTarget, this);\n }\n this.setUIControlsEnabled(false);\n this.hideLandingPage();\n if (!this.controller) {\n throw new Error('Could not create Timeline controller');\n }\n\n const urlToTrace = await this.#evaluateInspectedURL();\n // If we are doing \"Reload & record\", we first navigate the page to\n // about:blank. This is to ensure any data on the timeline from any\n // previous performance recording is lost, avoiding the problem where a\n // timeline will show data & screenshots from a previous page load that\n // was not relevant.\n if (this.recordingPageReload) {\n await this.#navigateToAboutBlank();\n }\n const recordingOptions = {\n enableJSSampling: !this.disableCaptureJSProfileSetting.get(),\n capturePictures: this.captureLayersAndPicturesSetting.get(),\n captureFilmStrip: this.showScreenshotsSetting.get(),\n };\n // Order is important here: we tell the controller to start recording, which enables tracing.\n const response = await this.controller.startRecording(recordingOptions);\n if (response.getError()) {\n throw new Error(response.getError());\n }\n // Once we get here, we know tracing is active.\n // This is when, if the user has hit \"Reload & Record\" that we now need to navigate to the original URL.\n // If the user has just hit \"record\", we don't do any navigating.\n const recordingConfig = this.recordingPageReload ? {navigateToUrl: urlToTrace} : undefined;\n this.recordingStarted(recordingConfig);\n } catch (e) {\n await this.recordingFailed(e.message);\n }\n }\n\n private async startRecording(): Promise {\n console.assert(!this.statusPane, 'Status pane is already opened.');\n this.setState(State.StartPending);\n this.showRecordingStarted();\n\n if (isNode) {\n await this.#startCPUProfilingRecording();\n } else {\n await this.#startTraceRecording();\n }\n }\n\n private async stopRecording(): Promise {\n if (this.statusPane) {\n this.statusPane.finish();\n this.statusPane.updateStatus(i18nString(UIStrings.stoppingTimeline));\n this.statusPane.updateProgressBar(i18nString(UIStrings.received), 0);\n }\n this.setState(State.StopPending);\n if (this.controller) {\n this.performanceModel = this.controller.getPerformanceModel();\n await this.controller.stopRecording();\n this.setUIControlsEnabled(true);\n await this.controller.dispose();\n this.controller = null;\n return;\n }\n if (this.cpuProfiler) {\n const profile = await this.cpuProfiler.stopRecording();\n this.setState(State.Idle);\n this.loadFromCpuProfile(profile);\n\n this.setUIControlsEnabled(true);\n this.cpuProfiler = null;\n\n await SDK.TargetManager.TargetManager.instance().resumeAllTargets();\n }\n }\n\n private async recordingFailed(error: string, rawEvents?: TraceEngine.Types.TraceEvents.TraceEventData[]):\n Promise {\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.statusPane = new StatusPane(\n {\n description: error,\n buttonText: i18nString(UIStrings.close),\n buttonDisabled: false,\n showProgress: undefined,\n showTimer: undefined,\n },\n // When recording failed, we should load null to go back to the landing page.\n async () => {\n this.statusPane?.remove();\n await this.loadingComplete(\n /* no collectedEvents */[],\n /* tracingModel= */ null,\n /* exclusiveFilter= */ null,\n /* isCpuProfile= */ false);\n });\n this.statusPane.showPane(this.statusPaneContainer);\n this.statusPane.updateStatus(i18nString(UIStrings.recordingFailed));\n\n if (rawEvents) {\n this.statusPane.enableDownloadOfEvents(rawEvents);\n }\n\n this.setState(State.RecordingFailed);\n this.performanceModel = null;\n this.traceLoadStart = null;\n this.setUIControlsEnabled(true);\n if (this.controller) {\n await this.controller.dispose();\n this.controller = null;\n }\n // Ensure we resume all targets, otherwise DevTools remains unresponsive in the event of an error.\n void SDK.TargetManager.TargetManager.instance().resumeAllTargets();\n }\n\n private onSuspendStateChanged(): void {\n this.updateTimelineControls();\n }\n\n private consoleProfileFinished(data: SDK.CPUProfilerModel.ProfileFinishedData): void {\n this.loadFromCpuProfile(data.cpuProfile, data.title);\n void UI.InspectorView.InspectorView.instance().showPanel('timeline');\n }\n\n private updateTimelineControls(): void {\n const state = State;\n this.toggleRecordAction.setToggled(this.state === state.Recording);\n this.toggleRecordAction.setEnabled(this.state === state.Recording || this.state === state.Idle);\n this.recordReloadAction.setEnabled(isNode ? false : this.state === state.Idle);\n this.#historyManager.setEnabled(this.state === state.Idle);\n this.clearButton.setEnabled(this.state === state.Idle);\n this.panelToolbar.setEnabled(this.state !== state.Loading);\n this.panelRightToolbar.setEnabled(this.state !== state.Loading);\n this.dropTarget.setEnabled(this.state === state.Idle);\n this.loadButton.setEnabled(this.state === state.Idle);\n this.saveButton.setEnabled(this.state === state.Idle && Boolean(this.performanceModel));\n }\n\n async toggleRecording(): Promise {\n if (this.state === State.Idle) {\n this.recordingPageReload = false;\n await this.startRecording();\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.TimelineStarted);\n } else if (this.state === State.Recording) {\n await this.stopRecording();\n }\n }\n\n recordReload(): void {\n if (this.state !== State.Idle) {\n return;\n }\n this.recordingPageReload = true;\n void this.startRecording();\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.TimelinePageReloadStarted);\n }\n\n private onClearButton(): void {\n this.#historyManager.clear();\n this.clear();\n }\n\n private clear(): void {\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.showLandingPage();\n this.reset();\n }\n\n private reset(): void {\n PerfUI.LineLevelProfile.Performance.instance().reset();\n if (this.performanceModel) {\n this.performanceModel.removeEventListener(Events.NamesResolved, this.#onSourceMapsNodeNamesResolved, this);\n }\n if (this.#sourceMapsResolver) {\n this.#sourceMapsResolver.removeEventListener(\n NodeNamesUpdated.eventName, this.#onSourceMapsNodeNamesResolvedBound);\n this.#sourceMapsResolver.uninstall();\n this.#sourceMapsResolver = null;\n }\n this.setModel(null);\n }\n\n private applyFilters(\n model: PerformanceModel,\n exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null = null): void {\n if (model.timelineModel().isGenericTrace() || Root.Runtime.experiments.isEnabled('timelineShowAllEvents')) {\n return;\n }\n model.setFilters(exclusiveFilter ? [exclusiveFilter] : [TimelineUIUtils.visibleEventsFilter()]);\n }\n\n setModel(\n model: PerformanceModel|null, exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null = null,\n traceEngineIndex: number = -1): void {\n if (this.performanceModel) {\n this.performanceModel.removeEventListener(Events.WindowChanged, this.onModelWindowChanged, this);\n }\n this.performanceModel = model;\n if (model) {\n this.searchableViewInternal.showWidget();\n this.applyFilters(model, exclusiveFilter);\n } else {\n this.searchableViewInternal.hideWidget();\n }\n this.#traceEngineActiveTraceIndex = traceEngineIndex;\n const traceParsedData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n const isCpuProfile = this.#traceEngineModel.metadata(this.#traceEngineActiveTraceIndex)?.dataOrigin ===\n TraceEngine.Types.File.DataOrigin.CPUProfile;\n this.flameChart.setModel(model, traceParsedData, isCpuProfile);\n this.#minimapComponent.reset();\n if (traceParsedData) {\n TraceBounds.TraceBounds.BoundsManager.instance().resetWithNewBounds(\n traceParsedData.Meta.traceBounds,\n );\n }\n if (model) {\n model.addEventListener(Events.WindowChanged, this.onModelWindowChanged, this);\n PerfUI.LineLevelProfile.Performance.instance().reset();\n this.flameChart.setSelection(null);\n }\n\n if (traceParsedData) {\n // Set the absolute bounds for the minimap.\n const traceBoundsMilliSeconds =\n TraceEngine.Helpers.Timing.traceWindowMilliSeconds(traceParsedData.Meta.traceBounds);\n\n this.#minimapComponent.setBounds(traceBoundsMilliSeconds.min, traceBoundsMilliSeconds.max);\n // To calculate the activity we might want to zoom in, we find the last\n // main thread. Or we find the CPU Profile thread, for e.g. Node traces.\n const mainThreadTypes = [\n TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD,\n TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE,\n ];\n const lastMainThread = TraceEngine.Handlers.Threads.threadsInTrace(traceParsedData)\n .filter(data => mainThreadTypes.includes(data.type))\n .at(-1);\n if (lastMainThread) {\n const zoomedInBounds = TraceEngine.Extras.MainThreadActivity.calculateWindow(\n traceParsedData.Meta.traceBounds, lastMainThread.entries);\n\n const zoomedInMilliseconds = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(zoomedInBounds);\n\n this.#minimapComponent.setWindowTimes(zoomedInMilliseconds.min, zoomedInMilliseconds.max);\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(zoomedInBounds);\n\n // Temporary to maintain correct old model whilst we work on removing it.\n // We need this for now because it is this code that ensures the UI\n // does not let the user scroll beyond these bounds.\n if (model) {\n model.setWindow({left: zoomedInMilliseconds.min, right: zoomedInMilliseconds.max});\n }\n }\n }\n // Set up line level profiling with CPU profiles, if we found any.\n PerfUI.LineLevelProfile.Performance.instance().reset();\n if (traceParsedData && traceParsedData.Samples.profilesInProcess.size) {\n const rootTarget = SDK.TargetManager.TargetManager.instance().rootTarget();\n // Gather up all CPU Profiles we found when parsing this trace.\n const cpuProfiles =\n Array.from(traceParsedData.Samples.profilesInProcess).flatMap(([_processId, threadsInProcess]) => {\n const profiles = Array.from(threadsInProcess.values()).map(profileData => profileData.parsedProfile);\n return profiles;\n });\n for (const profile of cpuProfiles) {\n PerfUI.LineLevelProfile.Performance.instance().appendCPUProfile(profile, rootTarget);\n }\n }\n\n this.updateOverviewControls();\n if (this.flameChart) {\n this.flameChart.resizeToPreferredHeights();\n if (this.#minimapComponent.breadcrumbsActivated) {\n this.#minimapComponent.addInitialBreadcrumb();\n }\n }\n this.updateTimelineControls();\n }\n\n private recordingStarted(config?: {navigateToUrl: Platform.DevToolsPath.UrlString}): void {\n if (config && this.recordingPageReload && this.controller) {\n // If the user hit \"Reload & record\", by this point we have:\n // 1. Navigated to about:blank\n // 2. Initiated tracing.\n // We therefore now should navigate back to the original URL that the user wants to profile.\n const resourceModel = this.controller?.primaryPageTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);\n if (!resourceModel) {\n void this.recordingFailed('Could not navigate to original URL');\n return;\n }\n // We don't need to await this because we are purposefully showing UI\n // progress as the page loads & tracing is underway.\n void resourceModel.navigate(config.navigateToUrl);\n }\n\n this.reset();\n this.setState(State.Recording);\n this.showRecordingStarted();\n if (this.statusPane) {\n this.statusPane.enableAndFocusButton();\n this.statusPane.updateStatus(i18nString(UIStrings.profiling));\n this.statusPane.updateProgressBar(i18nString(UIStrings.bufferUsage), 0);\n this.statusPane.startTimer();\n }\n this.hideLandingPage();\n }\n\n recordingProgress(usage: number): void {\n if (this.statusPane) {\n this.statusPane.updateProgressBar(i18nString(UIStrings.bufferUsage), usage * 100);\n }\n }\n\n private showLandingPage(): void {\n this.updateSettingsPaneVisibility();\n if (this.landingPage) {\n this.landingPage.show(this.statusPaneContainer);\n return;\n }\n\n function encloseWithTag(tagName: string, contents: string): HTMLElement {\n const e = document.createElement(tagName);\n e.textContent = contents;\n return e;\n }\n\n const learnMoreNode = UI.XLink.XLink.create(\n 'https://developer.chrome.com/docs/devtools/evaluate-performance/', i18nString(UIStrings.learnmore));\n\n const recordKey = encloseWithTag(\n 'b',\n UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction('timeline.toggle-recording')[0].title());\n const reloadKey = encloseWithTag(\n 'b', UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction('timeline.record-reload')[0].title());\n const navigateNode = encloseWithTag('b', i18nString(UIStrings.wasd));\n\n this.landingPage = new UI.Widget.VBox();\n this.landingPage.contentElement.classList.add('timeline-landing-page', 'fill');\n const centered = this.landingPage.contentElement.createChild('div');\n\n const recordButton = UI.UIUtils.createInlineButton(UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction));\n const reloadButton =\n UI.UIUtils.createInlineButton(UI.Toolbar.Toolbar.createActionButtonForId('timeline.record-reload'));\n\n centered.createChild('p').appendChild(i18n.i18n.getFormatLocalizedString(\n str_, UIStrings.clickTheRecordButtonSOrHitSTo, {PH1: recordButton, PH2: recordKey}));\n\n centered.createChild('p').appendChild(i18n.i18n.getFormatLocalizedString(\n str_, UIStrings.clickTheReloadButtonSOrHitSTo, {PH1: reloadButton, PH2: reloadKey}));\n\n centered.createChild('p').appendChild(i18n.i18n.getFormatLocalizedString(\n str_, UIStrings.afterRecordingSelectAnAreaOf, {PH1: navigateNode, PH2: learnMoreNode}));\n\n if (isNode) {\n const previewSection = new PanelFeedback.PanelFeedback.PanelFeedback();\n previewSection.data = {\n feedbackUrl: 'https://bugs.chromium.org/p/chromium/issues/detail?id=1354548' as Platform.DevToolsPath.UrlString,\n quickStartUrl: 'https://developer.chrome.com/blog/js-profiler-deprecation/' as Platform.DevToolsPath.UrlString,\n quickStartLinkText: i18nString(UIStrings.learnmore),\n };\n centered.appendChild(previewSection);\n const feedbackButton = new PanelFeedback.FeedbackButton.FeedbackButton();\n feedbackButton.data = {\n feedbackUrl: 'https://bugs.chromium.org/p/chromium/issues/detail?id=1354548' as Platform.DevToolsPath.UrlString,\n };\n centered.appendChild(feedbackButton);\n }\n\n this.landingPage.show(this.statusPaneContainer);\n }\n\n private hideLandingPage(): void {\n this.landingPage.detach();\n\n // Hide pane settings in trace view to conserve UI space, but preserve underlying setting.\n this.showSettingsPaneButton?.setToggled(false);\n this.settingsPane?.hideWidget();\n }\n\n async loadingStarted(): Promise {\n this.hideLandingPage();\n\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.statusPane = new StatusPane(\n {\n showProgress: true,\n showTimer: undefined,\n buttonDisabled: undefined,\n buttonText: undefined,\n description: undefined,\n },\n () => this.cancelLoading());\n this.statusPane.showPane(this.statusPaneContainer);\n this.statusPane.updateStatus(i18nString(UIStrings.loadingProfile));\n // FIXME: make loading from backend cancelable as well.\n if (!this.loader) {\n this.statusPane.finish();\n }\n this.traceLoadStart = TraceEngine.Types.Timing.MilliSeconds(performance.now());\n await this.loadingProgress(0);\n }\n\n async loadingProgress(progress?: number): Promise {\n if (typeof progress === 'number' && this.statusPane) {\n this.statusPane.updateProgressBar(i18nString(UIStrings.received), progress * 100);\n }\n }\n\n async processingStarted(): Promise {\n if (this.statusPane) {\n this.statusPane.updateStatus(i18nString(UIStrings.processingProfile));\n }\n }\n\n #onSourceMapsNodeNamesResolved(): void {\n this.flameChart.updateColorMapper();\n }\n\n async loadingComplete(\n collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[],\n tracingModel: TraceEngine.Legacy.TracingModel|null,\n exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null = null,\n isCpuProfile: boolean): Promise {\n this.#traceEngineModel.resetProcessor();\n SourceMapsResolver.clearResolvedNodeNames();\n\n delete this.loader;\n\n // If the user just recorded this trace via the record UI, the state will\n // be StopPending. Whereas if it was an existing trace they loaded via a\n // file, it will be State.Loading. This means we can tell the recording is\n // fresh by checking the state value.\n const recordingIsFresh = this.state === State.StopPending;\n\n this.setState(State.Idle);\n\n if (!tracingModel) {\n this.clear();\n return;\n }\n\n if (!this.performanceModel) {\n this.performanceModel = new PerformanceModel();\n }\n\n try {\n // Run the new engine in parallel with the parsing done in the performanceModel\n await Promise.all([\n // Calling setTracingModel now and setModel so much later, leads to several problems due to addEventListener order being unexpected\n // TODO(paulirish): Resolve this, or just wait for the death of tracingModel. :)\n this.performanceModel.setTracingModel(tracingModel, recordingIsFresh),\n this.#executeNewTraceEngine(\n collectedEvents, recordingIsFresh, isCpuProfile, this.performanceModel.recordStartTime()),\n ]);\n\n // This code path is only executed when a new trace is recorded/imported,\n // so we know that the active index will be the size of the model because\n // the newest trace will be automatically set to active.\n this.#traceEngineActiveTraceIndex = this.#traceEngineModel.size() - 1;\n\n this.setModel(this.performanceModel, exclusiveFilter, this.#traceEngineActiveTraceIndex);\n\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.statusPane = null;\n\n const traceData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n if (!traceData) {\n throw new Error(`Could not get trace data at index ${this.#traceEngineActiveTraceIndex}`);\n }\n\n // Set up SourceMapsResolver to ensure we resolve any function names in\n // profile calls.\n this.#sourceMapsResolver = new SourceMapsResolver(traceData);\n this.#sourceMapsResolver.addEventListener(NodeNamesUpdated.eventName, this.#onSourceMapsNodeNamesResolvedBound);\n await this.#sourceMapsResolver.install();\n\n // We store the Performance Model and the index of the active trace.\n // However we also pass in the full trace data because we use it to build\n // the preview overview thumbnail of the trace that gets shown in the UI.\n this.#historyManager.addRecording({\n data: {\n legacyModel: this.performanceModel,\n traceParseDataIndex: this.#traceEngineActiveTraceIndex,\n },\n filmStripForPreview: TraceEngine.Extras.FilmStrip.fromTraceData(traceData),\n traceParsedData: traceData,\n });\n } catch (error) {\n // Try to get the raw events: if we errored during the parsing stage, it\n // is useful to get access to the raw events to download the trace. This\n // allows us to debug crashes!\n // Because we don't know where the error came from, we wrap it in a\n // try-catch to protect against the tracing model erroring.\n let rawEvents: TraceEngine.Types.TraceEvents.TraceEventData[]|undefined = undefined;\n try {\n rawEvents = tracingModel.allRawEvents() as unknown as TraceEngine.Types.TraceEvents.TraceEventData[];\n } catch {\n }\n\n void this.recordingFailed(error.message, rawEvents);\n console.error(error);\n } finally {\n this.recordTraceLoadMetric();\n }\n }\n\n recordTraceLoadMetric(): void {\n if (!this.traceLoadStart) {\n return;\n }\n const start = this.traceLoadStart;\n // Right *now* is the end of trace parsing and model building, but the flamechart rendering\n // isn't complete yet. To capture that we'll do a rAF+setTimeout to give the most accurate timestamp\n // for the first paint of the flamechart\n requestAnimationFrame(() => {\n setTimeout(() => {\n const end = TraceEngine.Types.Timing.MilliSeconds(performance.now());\n const measure = performance.measure('TraceLoad', {start, end});\n const duration = TraceEngine.Types.Timing.MilliSeconds(measure.duration);\n this.element.dispatchEvent(new TraceLoadEvent(duration));\n Host.userMetrics.performanceTraceLoad(measure);\n }, 0);\n });\n }\n\n async #executeNewTraceEngine(\n collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[], isFreshRecording: boolean, isCpuProfile: boolean,\n recordStartTime?: number): Promise {\n const shouldGatherMetadata = isFreshRecording && !isCpuProfile;\n const metadata = shouldGatherMetadata ? await TraceEngine.Extras.Metadata.forNewRecording(recordStartTime) : {};\n metadata.dataOrigin =\n isCpuProfile ? TraceEngine.Types.File.DataOrigin.CPUProfile : TraceEngine.Types.File.DataOrigin.TraceEvents;\n\n return this.#traceEngineModel.parse(\n collectedEvents,\n {\n metadata,\n isFreshRecording,\n },\n );\n }\n\n loadingCompleteForTest(): void {\n // Not implemented, added only for allowing the TimelineTestRunner\n // to be in sync when a trace load is finished.\n }\n private showRecordingStarted(): void {\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.statusPane = new StatusPane(\n {\n showTimer: true,\n showProgress: true,\n buttonDisabled: true,\n description: undefined,\n buttonText: undefined,\n },\n () => this.stopRecording());\n this.statusPane.showPane(this.statusPaneContainer);\n this.statusPane.updateStatus(i18nString(UIStrings.initializingProfiler));\n }\n\n private cancelLoading(): void {\n if (this.loader) {\n void this.loader.cancel();\n }\n }\n\n private async loadEventFired(\n event: Common.EventTarget\n .EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>):\n Promise {\n if (this.state !== State.Recording || !this.recordingPageReload || !this.controller ||\n this.controller.primaryPageTarget !== event.data.resourceTreeModel.target()) {\n return;\n }\n const controller = this.controller;\n await new Promise(r => window.setTimeout(r, this.millisecondsToRecordAfterLoadEvent));\n\n // Check if we're still in the same recording session.\n if (controller !== this.controller || this.state !== State.Recording) {\n return;\n }\n void this.stopRecording();\n }\n\n private frameForSelection(selection: TimelineSelection): TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame\n |null {\n if (TimelineSelection.isFrameObject(selection.object)) {\n return selection.object;\n }\n if (TimelineSelection.isRangeSelection(selection.object) ||\n TimelineSelection.isSyntheticNetworkRequestDetailsEventSelection(selection.object)) {\n return null;\n }\n if (TimelineSelection.isTraceEventSelection(selection.object)) {\n if (!this.performanceModel) {\n return null;\n }\n const traceData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n if (!traceData) {\n return null;\n }\n // If the user has selected a time range, the frame we want is the last\n // frame in that time window, hence why the window we look for is the\n // endTime to the endTime.\n const endTimeMicro = TraceEngine.Helpers.Timing.millisecondsToMicroseconds(selection.endTime);\n const lastFrameInSelection = TraceEngine.Handlers.ModelHandlers.Frames\n .framesWithinWindow(\n traceData.Frames.frames,\n endTimeMicro,\n endTimeMicro,\n )\n .at(0);\n return lastFrameInSelection || null;\n }\n console.assert(false, 'Should never be reached');\n return null;\n }\n\n jumpToFrame(offset: number): true|undefined {\n const currentFrame = this.selection && this.frameForSelection(this.selection);\n if (!currentFrame || !this.performanceModel) {\n return;\n }\n const traceData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n if (!traceData) {\n return;\n }\n let index = traceData.Frames.frames.indexOf(currentFrame);\n console.assert(index >= 0, 'Can\\'t find current frame in the frame list');\n index = Platform.NumberUtilities.clamp(index + offset, 0, traceData.Frames.frames.length - 1);\n const frame = traceData.Frames.frames[index];\n this.revealTimeRange(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.startTime),\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.endTime));\n this.select(TimelineSelection.fromFrame(frame));\n return true;\n }\n\n select(selection: TimelineSelection|null): void {\n this.selection = selection;\n this.flameChart.setSelection(selection);\n }\n\n selectEntryAtTime(events: TraceEngine.Legacy.Event[]|null, time: number): void {\n if (!events) {\n return;\n }\n // Find best match, then backtrack to the first visible entry.\n for (let index = Platform.ArrayUtilities.upperBound(events, time, (time, event) => time - event.startTime) - 1;\n index >= 0; --index) {\n const event = events[index];\n const endTime = event.endTime || event.startTime;\n if (TraceEngine.Legacy.TracingModel.isTopLevelEvent(event) && endTime < time) {\n break;\n }\n if (this.performanceModel && this.performanceModel.isVisible(event) && endTime >= time) {\n this.select(TimelineSelection.fromTraceEvent(event));\n return;\n }\n }\n this.select(null);\n }\n\n highlightEvent(event: TraceEngine.Legacy.Event|null): void {\n this.flameChart.highlightEvent(event);\n }\n\n private revealTimeRange(\n startTime: TraceEngine.Types.Timing.MilliSeconds, endTime: TraceEngine.Types.Timing.MilliSeconds): void {\n if (!this.performanceModel) {\n return;\n }\n const window = this.performanceModel.window();\n let offset = 0;\n if (window.right < endTime) {\n offset = endTime - window.right;\n } else if (window.left > startTime) {\n offset = startTime - window.left;\n }\n this.performanceModel.setWindow({left: window.left + offset, right: window.right + offset}, /* animate */ true);\n\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n TraceEngine.Types.Timing.MilliSeconds(window.left + offset),\n TraceEngine.Types.Timing.MilliSeconds(window.right + offset),\n ),\n {\n shouldAnimate: true,\n },\n );\n }\n\n private handleDrop(dataTransfer: DataTransfer): void {\n const items = dataTransfer.items;\n if (!items.length) {\n return;\n }\n const item = items[0];\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceImported);\n if (item.kind === 'string') {\n const url = dataTransfer.getData('text/uri-list') as Platform.DevToolsPath.UrlString;\n if (new Common.ParsedURL.ParsedURL(url).isValid) {\n void this.loadFromURL(url);\n }\n } else if (item.kind === 'file') {\n const file = items[0].getAsFile();\n if (!file) {\n return;\n }\n void this.loadFromFile(file);\n }\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum State {\n Idle = 'Idle',\n StartPending = 'StartPending',\n Recording = 'Recording',\n StopPending = 'StopPending',\n Loading = 'Loading',\n RecordingFailed = 'RecordingFailed',\n}\n\n// Define row and header height, should be in sync with styles for timeline graphs.\nexport const rowHeight = 18;\n\nexport const headerHeight = 20;\nexport interface TimelineModeViewDelegate {\n select(selection: TimelineSelection|null): void;\n selectEntryAtTime(events: TraceEngine.Legacy.CompatibleTraceEvent[]|null, time: number): void;\n highlightEvent(event: TraceEngine.Legacy.CompatibleTraceEvent|null): void;\n}\n\nexport class StatusPane extends UI.Widget.VBox {\n private status: HTMLElement;\n private time: Element|undefined;\n private progressLabel!: Element;\n private progressBar!: Element;\n private readonly description: HTMLElement|undefined;\n private button: HTMLButtonElement;\n private downloadTraceButton: HTMLButtonElement;\n private startTime!: number;\n private timeUpdateTimer?: number;\n #rawEvents?: TraceEngine.Types.TraceEvents.TraceEventData[];\n\n constructor(\n options: {\n showTimer?: boolean,\n showProgress?: boolean,\n description?: string,\n buttonText?: string,\n buttonDisabled?: boolean,\n },\n buttonCallback: () => (Promise| void)) {\n super(true);\n\n this.contentElement.classList.add('timeline-status-dialog');\n\n const statusLine = this.contentElement.createChild('div', 'status-dialog-line status');\n statusLine.createChild('div', 'label').textContent = i18nString(UIStrings.status);\n this.status = statusLine.createChild('div', 'content');\n UI.ARIAUtils.markAsStatus(this.status);\n\n if (options.showTimer) {\n const timeLine = this.contentElement.createChild('div', 'status-dialog-line time');\n timeLine.createChild('div', 'label').textContent = i18nString(UIStrings.time);\n this.time = timeLine.createChild('div', 'content');\n }\n\n if (options.showProgress) {\n const progressLine = this.contentElement.createChild('div', 'status-dialog-line progress');\n this.progressLabel = progressLine.createChild('div', 'label');\n this.progressBar = progressLine.createChild('div', 'indicator-container').createChild('div', 'indicator');\n UI.ARIAUtils.markAsProgressBar(this.progressBar);\n }\n\n if (typeof options.description === 'string') {\n const descriptionLine = this.contentElement.createChild('div', 'status-dialog-line description');\n descriptionLine.createChild('div', 'label').textContent = i18nString(UIStrings.description);\n this.description = descriptionLine.createChild('div', 'content');\n this.description.innerText = options.description;\n }\n\n const buttonContainer = this.contentElement.createChild('div', 'stop-button');\n this.downloadTraceButton = UI.UIUtils.createTextButton(i18nString(UIStrings.downloadAfterError), async () => {\n void this.#downloadRawTraceAfterError();\n });\n\n this.downloadTraceButton.disabled = true;\n this.downloadTraceButton.style.visibility = 'hidden';\n\n const buttonText = options.buttonText || i18nString(UIStrings.stop);\n this.button = UI.UIUtils.createTextButton(buttonText, buttonCallback, '', true);\n // Profiling can't be stopped during initialization.\n this.button.disabled = !options.buttonDisabled === false;\n\n buttonContainer.append(this.downloadTraceButton);\n buttonContainer.append(this.button);\n }\n\n finish(): void {\n this.stopTimer();\n this.button.disabled = true;\n }\n\n async #downloadRawTraceAfterError(): Promise {\n if (!this.#rawEvents || this.#rawEvents.length === 0) {\n return;\n }\n const traceStart = Platform.DateUtilities.toISO8601Compact(new Date());\n const fileName = `Trace-Load-Error-${traceStart}.json` as Platform.DevToolsPath.RawPathString;\n const handler = await window.showSaveFilePicker({\n suggestedName: fileName,\n });\n const formattedTraceIter = traceJsonGenerator(this.#rawEvents, {});\n const traceAsString = Array.from(formattedTraceIter).join('');\n const encoder = new TextEncoder();\n const buffer = encoder.encode(traceAsString);\n const writable = await handler.createWritable();\n await writable.write(buffer);\n await writable.close();\n }\n\n enableDownloadOfEvents(rawEvents: TraceEngine.Types.TraceEvents.TraceEventData[]): void {\n this.#rawEvents = rawEvents;\n this.downloadTraceButton.disabled = false;\n this.downloadTraceButton.style.visibility = 'visible';\n }\n\n remove(): void {\n if (this.element.parentNode) {\n (this.element.parentNode as HTMLElement).classList.remove('tinted');\n this.arrangeDialog((this.element.parentNode as HTMLElement));\n }\n this.stopTimer();\n this.element.remove();\n }\n\n showPane(parent: Element): void {\n this.arrangeDialog(parent);\n this.show(parent);\n parent.classList.add('tinted');\n }\n\n enableAndFocusButton(): void {\n this.button.disabled = false;\n this.button.focus();\n }\n\n updateStatus(text: string): void {\n this.status.textContent = text;\n }\n\n updateProgressBar(activity: string, percent: number): void {\n this.progressLabel.textContent = activity;\n (this.progressBar as HTMLElement).style.width = percent.toFixed(1) + '%';\n UI.ARIAUtils.setValueNow(this.progressBar, percent);\n this.updateTimer();\n }\n\n startTimer(): void {\n this.startTime = Date.now();\n this.timeUpdateTimer = window.setInterval(this.updateTimer.bind(this, false), 1000);\n this.updateTimer();\n }\n\n private stopTimer(): void {\n if (!this.timeUpdateTimer) {\n return;\n }\n clearInterval(this.timeUpdateTimer);\n this.updateTimer(true);\n delete this.timeUpdateTimer;\n }\n\n private updateTimer(precise?: boolean): void {\n this.arrangeDialog((this.element.parentNode as HTMLElement));\n if (!this.timeUpdateTimer || !this.time) {\n return;\n }\n const elapsed = (Date.now() - this.startTime) / 1000;\n this.time.textContent = i18nString(UIStrings.ssec, {PH1: elapsed.toFixed(precise ? 1 : 0)});\n }\n\n private arrangeDialog(parent: Element): void {\n const isSmallDialog = parent.clientWidth < 325;\n this.element.classList.toggle('small-dialog', isSmallDialog);\n this.contentElement.classList.toggle('small-dialog', isSmallDialog);\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([timelineStatusDialogStyles]);\n }\n}\n\nlet loadTimelineHandlerInstance: LoadTimelineHandler;\n\nexport class LoadTimelineHandler implements Common.QueryParamHandler.QueryParamHandler {\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): LoadTimelineHandler {\n const {forceNew} = opts;\n if (!loadTimelineHandlerInstance || forceNew) {\n loadTimelineHandlerInstance = new LoadTimelineHandler();\n }\n\n return loadTimelineHandlerInstance;\n }\n\n handleQueryParam(value: string): void {\n void UI.ViewManager.ViewManager.instance().showView('timeline').then(async () => {\n await TimelinePanel.instance().loadFromURL(window.decodeURIComponent(value) as Platform.DevToolsPath.UrlString);\n });\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = context.flavor(TimelinePanel);\n if (panel === null) {\n return false;\n }\n switch (actionId) {\n case 'timeline.toggle-recording':\n void panel.toggleRecording();\n return true;\n case 'timeline.record-reload':\n panel.recordReload();\n return true;\n case 'timeline.save-to-file':\n void panel.saveToFile();\n return true;\n case 'timeline.load-from-file':\n panel.selectFileToLoad();\n return true;\n case 'timeline.jump-to-previous-frame':\n panel.jumpToFrame(-1);\n return true;\n case 'timeline.jump-to-next-frame':\n panel.jumpToFrame(1);\n return true;\n case 'timeline.show-history':\n void panel.showHistory();\n return true;\n case 'timeline.previous-recording':\n panel.navigateHistory(1);\n return true;\n case 'timeline.next-recording':\n panel.navigateHistory(-1);\n return true;\n }\n return false;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelinePanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelinePanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAG7C,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6CAA6C,CAAC;AAC3E,OAAO,KAAK,aA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AC;QAC5C,IAAI,KAAK,KAAK,IAAI,EAAE;YAClB,OAAO,KAAK,CAAC;SACd;QACD,QAAQ,QAAQ,EAAE;YAChB,KAAK,2BAA2B;gBAC9B,KAAK,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC7B,OAAO,IAAI,CAAC;YACd,KAAK,wBAAwB;gBAC3B,KAAK,CAAC,YAAY,EAAE,CAAC;gBACrB,OAAO,IAAI,CAAC;YACd,KAAK,uBAAuB;gBAC1B,KAAK,KAAK,CAAC,UAAU,EAAE,CAAC;gBACxB,OAAO,IAAI,CAAC;YACd,KAAK,yBAAyB;gBAC5B,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBACzB,OAAO,IAAI,CAAC;YACd,KAAK,iCAAiC;gBACpC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC;YACd,KAAK,6BAA6B;gBAChC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;gBACrB,OAAO,IAAI,CAAC;YACd,KAAK,uBAAuB;gBAC1B,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;gBACzB,OAAO,IAAI,CAAC;YACd,KAAK,6BAA6B;gBAChC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;gBACzB,OAAO,IAAI,CAAC;YACd,KAAK,yBAAyB;gBAC5B,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC1B,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2012 Google Inc. All rights reserved.\n * Copyright (C) 2012 Intel Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport type * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';\nimport * as PanelFeedback from '../../ui/components/panel_feedback/panel_feedback.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';\n\nimport {ActiveFilters} from './ActiveFilters.js';\nimport {TraceLoadEvent} from './BenchmarkEvents.js';\nimport historyToolbarButtonStyles from './historyToolbarButton.css.js';\nimport {PerformanceModel} from './PerformanceModel.js';\nimport {cpuprofileJsonGenerator, traceJsonGenerator} from './SaveFileFormatter.js';\nimport {NodeNamesUpdated, SourceMapsResolver} from './SourceMapsResolver.js';\nimport {type Client, TimelineController} from './TimelineController.js';\nimport {TimelineFlameChartView} from './TimelineFlameChartView.js';\nimport {TimelineHistoryManager} from './TimelineHistoryManager.js';\nimport {TimelineLoader} from './TimelineLoader.js';\nimport {TimelineMiniMap} from './TimelineMiniMap.js';\nimport timelinePanelStyles from './timelinePanel.css.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport timelineStatusDialogStyles from './timelineStatusDialog.css.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\nimport {UIDevtoolsController} from './UIDevtoolsController.js';\nimport {UIDevtoolsUtils} from './UIDevtoolsUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text that appears when user drag and drop something (for example, a file) in Timeline Panel of the Performance panel\n */\n dropTimelineFileOrUrlHere: 'Drop timeline file or URL here',\n /**\n *@description Title of disable capture jsprofile setting in timeline panel of the performance panel\n */\n disableJavascriptSamples: 'Disable JavaScript samples',\n /**\n *@description Title of capture layers and pictures setting in timeline panel of the performance panel\n */\n enableAdvancedPaint: 'Enable advanced paint instrumentation (slow)',\n /**\n *@description Title of show screenshots setting in timeline panel of the performance panel\n */\n screenshots: 'Screenshots',\n /**\n *@description Text for the memory of the page\n */\n memory: 'Memory',\n /**\n *@description Text to clear content\n */\n clear: 'Clear',\n /**\n *@description Tooltip text that appears when hovering over the largeicon load button\n */\n loadProfile: 'Load profile…',\n /**\n *@description Tooltip text that appears when hovering over the largeicon download button\n */\n saveProfile: 'Save profile…',\n /**\n *@description Text to take screenshots\n */\n captureScreenshots: 'Capture screenshots',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n showMemoryTimeline: 'Show memory timeline',\n /**\n *@description Tooltip text that appears when hovering over the largeicon settings gear in show settings pane setting in timeline panel of the performance panel\n */\n captureSettings: 'Capture settings',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n disablesJavascriptSampling: 'Disables JavaScript sampling, reduces overhead when running against mobile devices',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n capturesAdvancedPaint: 'Captures advanced paint instrumentation, introduces significant performance overhead',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n network: 'Network:',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n cpu: 'CPU:',\n /**\n *@description Title of the 'Network conditions' tool in the bottom drawer\n */\n networkConditions: 'Network conditions',\n /**\n *@description Text in Timeline Panel of the Performance panel\n *@example {wrong format} PH1\n *@example {ERROR_FILE_NOT_FOUND} PH2\n */\n failedToSaveTimelineSS: 'Failed to save timeline: {PH1} ({PH2})',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n CpuThrottlingIsEnabled: '- CPU throttling is enabled',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n NetworkThrottlingIsEnabled: '- Network throttling is enabled',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n HardwareConcurrencyIsEnabled: '- Hardware concurrency override is enabled',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n SignificantOverheadDueToPaint: '- Significant overhead due to paint instrumentation',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n JavascriptSamplingIsDisabled: '- JavaScript sampling is disabled',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n stoppingTimeline: 'Stopping timeline…',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n received: 'Received',\n /**\n *@description Text to close something\n */\n close: 'Close',\n /**\n *@description Text to download the raw trace files after an error\n */\n downloadAfterError: 'Download raw trace events',\n /**\n *@description Status text to indicate the recording has failed in the Performance panel\n */\n recordingFailed: 'Recording failed',\n /**\n * @description Text to indicate the progress of a profile. Informs the user that we are currently\n * creating a peformance profile.\n */\n profiling: 'Profiling…',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n bufferUsage: 'Buffer usage',\n /**\n *@description Text for an option to learn more about something\n */\n learnmore: 'Learn more',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n wasd: 'WASD',\n /**\n *@description Text in Timeline Panel of the Performance panel\n *@example {record} PH1\n *@example {Ctrl + R} PH2\n */\n clickTheRecordButtonSOrHitSTo: 'Click the record button {PH1} or hit {PH2} to start a new recording.',\n /**\n * @description Text in Timeline Panel of the Performance panel\n * @example {reload button} PH1\n * @example {Ctrl + R} PH2\n */\n clickTheReloadButtonSOrHitSTo: 'Click the reload button {PH1} or hit {PH2} to record the page load.',\n /**\n *@description Text in Timeline Panel of the Performance panel\n *@example {Ctrl + U} PH1\n *@example {Learn more} PH2\n */\n afterRecordingSelectAnAreaOf:\n 'After recording, select an area of interest in the overview by dragging. Then, zoom and pan the timeline with the mousewheel or {PH1} keys. {PH2}',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n loadingProfile: 'Loading profile…',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n processingProfile: 'Processing profile…',\n /**\n *@description Text in Timeline Panel of the Performance panel\n */\n initializingProfiler: 'Initializing profiler…',\n /**\n *@description Text for the status of something\n */\n status: 'Status',\n /**\n *@description Text that refers to the time\n */\n time: 'Time',\n /**\n *@description Text for the description of something\n */\n description: 'Description',\n /**\n *@description Text of an item that stops the running task\n */\n stop: 'Stop',\n /**\n *@description Time text content in Timeline Panel of the Performance panel\n *@example {2.12} PH1\n */\n ssec: '{PH1} sec',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelinePanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet timelinePanelInstance: TimelinePanel;\nlet isNode: boolean;\n\n// TypeScript will presumably get these types at some stage, and when it\n// does these temporary types should be removed.\n// TODO: Remove types when available in TypeScript.\ndeclare global {\n interface FileSystemWritableFileStream extends WritableStream {\n write(data: unknown): Promise;\n close(): Promise;\n }\n\n interface FileSystemHandle {\n createWritable(): Promise;\n }\n\n interface Window {\n showSaveFilePicker(opts: unknown): Promise;\n }\n}\n\nexport class TimelinePanel extends UI.Panel.Panel implements Client, TimelineModeViewDelegate {\n private readonly dropTarget: UI.DropTarget.DropTarget;\n private readonly recordingOptionUIControls: UI.Toolbar.ToolbarItem[];\n private state: State;\n private recordingPageReload: boolean;\n private readonly millisecondsToRecordAfterLoadEvent: number;\n private readonly toggleRecordAction: UI.ActionRegistration.Action;\n private readonly recordReloadAction: UI.ActionRegistration.Action;\n readonly #historyManager: TimelineHistoryManager;\n private performanceModel: PerformanceModel|null;\n private disableCaptureJSProfileSetting: Common.Settings.Setting;\n private readonly captureLayersAndPicturesSetting: Common.Settings.Setting;\n private showScreenshotsSetting: Common.Settings.Setting;\n private showMemorySetting: Common.Settings.Setting;\n private readonly panelToolbar: UI.Toolbar.Toolbar;\n private readonly panelRightToolbar: UI.Toolbar.Toolbar;\n private readonly timelinePane: UI.Widget.VBox;\n readonly #minimapComponent = new TimelineMiniMap();\n private readonly statusPaneContainer: HTMLElement;\n private readonly flameChart: TimelineFlameChartView;\n private readonly searchableViewInternal: UI.SearchableView.SearchableView;\n private showSettingsPaneButton!: UI.Toolbar.ToolbarSettingToggle;\n private showSettingsPaneSetting!: Common.Settings.Setting;\n private settingsPane!: UI.Widget.Widget;\n private controller!: TimelineController|null;\n private cpuProfiler!: SDK.CPUProfilerModel.CPUProfilerModel|null;\n private clearButton!: UI.Toolbar.ToolbarButton;\n private loadButton!: UI.Toolbar.ToolbarButton;\n private saveButton!: UI.Toolbar.ToolbarButton;\n private statusPane!: StatusPane|null;\n private landingPage!: UI.Widget.Widget;\n private loader?: TimelineLoader;\n private showScreenshotsToolbarCheckbox?: UI.Toolbar.ToolbarItem;\n private showMemoryToolbarCheckbox?: UI.Toolbar.ToolbarItem;\n private networkThrottlingSelect?: UI.Toolbar.ToolbarComboBox;\n private cpuThrottlingSelect?: UI.Toolbar.ToolbarComboBox;\n private fileSelectorElement?: HTMLInputElement;\n private selection?: TimelineSelection|null;\n private traceLoadStart!: TraceEngine.Types.Timing.MilliSeconds|null;\n private primaryPageTargetPromiseCallback = (_target: SDK.Target.Target): void => {};\n // Note: this is technically unused, but we need it to define the promiseCallback function above.\n private primaryPageTargetPromise = new Promise(res => {\n this.primaryPageTargetPromiseCallback = res;\n });\n\n #traceEngineModel: TraceEngine.TraceModel.Model;\n // Tracks the index of the trace that the user is currently viewing.\n #traceEngineActiveTraceIndex = -1;\n #sourceMapsResolver: SourceMapsResolver|null = null;\n #onSourceMapsNodeNamesResolvedBound = this.#onSourceMapsNodeNamesResolved.bind(this);\n\n constructor() {\n super('timeline');\n\n const config = TraceEngine.Types.Configuration.DEFAULT;\n config.experiments.timelineShowAllEvents = Root.Runtime.experiments.isEnabled('timelineShowAllEvents');\n config.experiments.timelineV8RuntimeCallStats = Root.Runtime.experiments.isEnabled('timelineV8RuntimeCallStats');\n this.#traceEngineModel = TraceEngine.TraceModel.Model.createWithAllHandlers(config);\n\n this.element.addEventListener('contextmenu', this.contextMenu.bind(this), false);\n this.dropTarget = new UI.DropTarget.DropTarget(\n this.element, [UI.DropTarget.Type.File, UI.DropTarget.Type.URI],\n i18nString(UIStrings.dropTimelineFileOrUrlHere), this.handleDrop.bind(this));\n\n this.recordingOptionUIControls = [];\n this.state = State.Idle;\n this.recordingPageReload = false;\n this.millisecondsToRecordAfterLoadEvent = 5000;\n this.toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.toggle-recording');\n this.recordReloadAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.record-reload');\n\n this.#historyManager = new TimelineHistoryManager(this.#minimapComponent);\n\n this.performanceModel = null;\n this.traceLoadStart = null;\n\n this.disableCaptureJSProfileSetting =\n Common.Settings.Settings.instance().createSetting('timelineDisableJSSampling', false);\n this.disableCaptureJSProfileSetting.setTitle(i18nString(UIStrings.disableJavascriptSamples));\n this.captureLayersAndPicturesSetting =\n Common.Settings.Settings.instance().createSetting('timelineCaptureLayersAndPictures', false);\n this.captureLayersAndPicturesSetting.setTitle(i18nString(UIStrings.enableAdvancedPaint));\n\n this.showScreenshotsSetting =\n Common.Settings.Settings.instance().createSetting('timelineShowScreenshots', isNode ? false : true);\n this.showScreenshotsSetting.setTitle(i18nString(UIStrings.screenshots));\n this.showScreenshotsSetting.addChangeListener(this.updateOverviewControls, this);\n\n this.showMemorySetting = Common.Settings.Settings.instance().createSetting('timelineShowMemory', false);\n this.showMemorySetting.setTitle(i18nString(UIStrings.memory));\n this.showMemorySetting.addChangeListener(this.onModeChanged, this);\n\n const timelineToolbarContainer = this.element.createChild('div', 'timeline-toolbar-container');\n this.panelToolbar = new UI.Toolbar.Toolbar('timeline-main-toolbar', timelineToolbarContainer);\n this.panelToolbar.makeWrappable(true);\n this.panelRightToolbar = new UI.Toolbar.Toolbar('', timelineToolbarContainer);\n if (!isNode) {\n this.createSettingsPane();\n this.updateShowSettingsToolbarButton();\n }\n this.timelinePane = new UI.Widget.VBox();\n this.timelinePane.show(this.element);\n const topPaneElement = this.timelinePane.element.createChild('div', 'hbox');\n topPaneElement.id = 'timeline-overview-panel';\n\n this.#minimapComponent.show(topPaneElement);\n\n this.statusPaneContainer = this.timelinePane.element.createChild('div', 'status-pane-container fill');\n\n this.createFileSelector();\n\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load, this.loadEventFired, this);\n\n this.flameChart = new TimelineFlameChartView(this);\n this.searchableViewInternal = new UI.SearchableView.SearchableView(this.flameChart, null);\n this.searchableViewInternal.setMinimumSize(0, 100);\n this.searchableViewInternal.element.classList.add('searchable-view');\n this.searchableViewInternal.show(this.timelinePane.element);\n this.flameChart.show(this.searchableViewInternal.element);\n this.flameChart.setSearchableView(this.searchableViewInternal);\n this.searchableViewInternal.hideWidget();\n\n this.onModeChanged();\n this.populateToolbar();\n this.showLandingPage();\n this.updateTimelineControls();\n\n SDK.TargetManager.TargetManager.instance().addEventListener(\n SDK.TargetManager.Events.SuspendStateChanged, this.onSuspendStateChanged, this);\n if (Root.Runtime.experiments.isEnabled('timelineAsConsoleProfileResultPanel')) {\n const profilerModels = SDK.TargetManager.TargetManager.instance().models(SDK.CPUProfilerModel.CPUProfilerModel);\n for (const model of profilerModels) {\n for (const message of model.registeredConsoleProfileMessages) {\n this.consoleProfileFinished(message);\n }\n }\n SDK.TargetManager.TargetManager.instance().observeModels(\n SDK.CPUProfilerModel.CPUProfilerModel,\n {\n modelAdded: (model: SDK.CPUProfilerModel.CPUProfilerModel) => {\n model.addEventListener(\n SDK.CPUProfilerModel.Events.ConsoleProfileFinished, event => this.consoleProfileFinished(event.data));\n },\n modelRemoved: (_model: SDK.CPUProfilerModel.CPUProfilerModel) => {\n\n },\n },\n );\n }\n SDK.TargetManager.TargetManager.instance().observeTargets({\n targetAdded: (target: SDK.Target.Target) => {\n if (target !== SDK.TargetManager.TargetManager.instance().primaryPageTarget()) {\n return;\n }\n this.primaryPageTargetPromiseCallback(target);\n },\n targetRemoved: (_: SDK.Target.Target) => {},\n });\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n isNode: boolean,\n }|undefined = {forceNew: null, isNode: false}): TimelinePanel {\n const {forceNew, isNode: isNodeMode} = opts;\n isNode = isNodeMode;\n\n if (!timelinePanelInstance || forceNew) {\n timelinePanelInstance = new TimelinePanel();\n }\n\n return timelinePanelInstance;\n }\n\n override searchableView(): UI.SearchableView.SearchableView|null {\n return this.searchableViewInternal;\n }\n\n override wasShown(): void {\n super.wasShown();\n UI.Context.Context.instance().setFlavor(TimelinePanel, this);\n this.registerCSSFiles([timelinePanelStyles]);\n // Record the performance tool load time.\n Host.userMetrics.panelLoaded('timeline', 'DevTools.Launch.Timeline');\n }\n\n override willHide(): void {\n UI.Context.Context.instance().setFlavor(TimelinePanel, null);\n this.#historyManager.cancelIfShowing();\n }\n\n loadFromEvents(events: TraceEngine.TracingManager.EventPayload[]): void {\n if (this.state !== State.Idle) {\n return;\n }\n this.prepareToLoadTimeline();\n this.loader = TimelineLoader.loadFromEvents(events, this);\n }\n\n getFlameChart(): TimelineFlameChartView {\n return this.flameChart;\n }\n\n private loadFromCpuProfile(profile: Protocol.Profiler.Profile|null, title?: string): void {\n if (this.state !== State.Idle) {\n return;\n }\n this.prepareToLoadTimeline();\n this.loader = TimelineLoader.loadFromCpuProfile(profile, this, title);\n }\n\n private setState(state: State): void {\n this.state = state;\n this.updateTimelineControls();\n }\n\n private createSettingCheckbox(setting: Common.Settings.Setting, tooltip: string): UI.Toolbar.ToolbarItem {\n const checkboxItem = new UI.Toolbar.ToolbarSettingCheckbox(setting, tooltip);\n this.recordingOptionUIControls.push(checkboxItem);\n return checkboxItem;\n }\n\n private populateToolbar(): void {\n // Record\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction));\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.recordReloadAction));\n this.clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clear), 'clear');\n this.clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => this.onClearButton());\n this.panelToolbar.appendToolbarItem(this.clearButton);\n\n // Load / Save\n this.loadButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.loadProfile), 'import');\n this.loadButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceImported);\n this.selectFileToLoad();\n });\n this.saveButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.saveProfile), 'download');\n this.saveButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, _event => {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceExported);\n void this.saveToFile();\n });\n this.panelToolbar.appendSeparator();\n this.panelToolbar.appendToolbarItem(this.loadButton);\n this.panelToolbar.appendToolbarItem(this.saveButton);\n\n // History\n this.panelToolbar.appendSeparator();\n this.panelToolbar.appendToolbarItem(this.#historyManager.button());\n this.panelToolbar.registerCSSFiles([historyToolbarButtonStyles]);\n this.panelToolbar.appendSeparator();\n\n // View\n this.panelToolbar.appendSeparator();\n if (!isNode) {\n this.showScreenshotsToolbarCheckbox =\n this.createSettingCheckbox(this.showScreenshotsSetting, i18nString(UIStrings.captureScreenshots));\n this.panelToolbar.appendToolbarItem(this.showScreenshotsToolbarCheckbox);\n }\n\n this.showMemoryToolbarCheckbox =\n this.createSettingCheckbox(this.showMemorySetting, i18nString(UIStrings.showMemoryTimeline));\n this.panelToolbar.appendToolbarItem(this.showMemoryToolbarCheckbox);\n\n // GC\n this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('components.collect-garbage'));\n\n // Settings\n if (!isNode) {\n this.panelRightToolbar.appendSeparator();\n this.panelRightToolbar.appendToolbarItem(this.showSettingsPaneButton);\n }\n }\n\n private createSettingsPane(): void {\n this.showSettingsPaneSetting =\n Common.Settings.Settings.instance().createSetting('timelineShowSettingsToolbar', false);\n this.showSettingsPaneButton = new UI.Toolbar.ToolbarSettingToggle(\n this.showSettingsPaneSetting, 'gear', i18nString(UIStrings.captureSettings), 'gear-filled');\n SDK.NetworkManager.MultitargetNetworkManager.instance().addEventListener(\n SDK.NetworkManager.MultitargetNetworkManager.Events.ConditionsChanged, this.updateShowSettingsToolbarButton,\n this);\n SDK.CPUThrottlingManager.CPUThrottlingManager.instance().addEventListener(\n SDK.CPUThrottlingManager.Events.RateChanged, this.updateShowSettingsToolbarButton, this);\n SDK.CPUThrottlingManager.CPUThrottlingManager.instance().addEventListener(\n SDK.CPUThrottlingManager.Events.HardwareConcurrencyChanged, this.updateShowSettingsToolbarButton, this);\n this.disableCaptureJSProfileSetting.addChangeListener(this.updateShowSettingsToolbarButton, this);\n this.captureLayersAndPicturesSetting.addChangeListener(this.updateShowSettingsToolbarButton, this);\n\n this.settingsPane = new UI.Widget.HBox();\n this.settingsPane.element.classList.add('timeline-settings-pane');\n this.settingsPane.show(this.element);\n\n const captureToolbar = new UI.Toolbar.Toolbar('', this.settingsPane.element);\n captureToolbar.element.classList.add('flex-auto');\n captureToolbar.makeVertical();\n captureToolbar.appendToolbarItem(this.createSettingCheckbox(\n this.disableCaptureJSProfileSetting, i18nString(UIStrings.disablesJavascriptSampling)));\n captureToolbar.appendToolbarItem(\n this.createSettingCheckbox(this.captureLayersAndPicturesSetting, i18nString(UIStrings.capturesAdvancedPaint)));\n\n const throttlingPane = new UI.Widget.VBox();\n throttlingPane.element.classList.add('flex-auto');\n throttlingPane.show(this.settingsPane.element);\n\n const cpuThrottlingToolbar = new UI.Toolbar.Toolbar('', throttlingPane.element);\n cpuThrottlingToolbar.appendText(i18nString(UIStrings.cpu));\n this.cpuThrottlingSelect = MobileThrottling.ThrottlingManager.throttlingManager().createCPUThrottlingSelector();\n cpuThrottlingToolbar.appendToolbarItem(this.cpuThrottlingSelect);\n\n const networkThrottlingToolbar = new UI.Toolbar.Toolbar('', throttlingPane.element);\n networkThrottlingToolbar.appendText(i18nString(UIStrings.network));\n this.networkThrottlingSelect = this.createNetworkConditionsSelect();\n networkThrottlingToolbar.appendToolbarItem(this.networkThrottlingSelect);\n\n const hardwareConcurrencyPane = new UI.Widget.VBox();\n hardwareConcurrencyPane.element.classList.add('flex-auto');\n hardwareConcurrencyPane.show(this.settingsPane.element);\n\n const {toggle, input, reset, warning} =\n MobileThrottling.ThrottlingManager.throttlingManager().createHardwareConcurrencySelector();\n const concurrencyThrottlingToolbar = new UI.Toolbar.Toolbar('', hardwareConcurrencyPane.element);\n concurrencyThrottlingToolbar.registerCSSFiles([timelinePanelStyles]);\n input.element.classList.add('timeline-concurrency-input');\n concurrencyThrottlingToolbar.appendToolbarItem(toggle);\n concurrencyThrottlingToolbar.appendToolbarItem(input);\n concurrencyThrottlingToolbar.appendToolbarItem(reset);\n concurrencyThrottlingToolbar.appendToolbarItem(warning);\n\n this.showSettingsPaneSetting.addChangeListener(this.updateSettingsPaneVisibility.bind(this));\n this.updateSettingsPaneVisibility();\n }\n\n private createNetworkConditionsSelect(): UI.Toolbar.ToolbarComboBox {\n const toolbarItem = new UI.Toolbar.ToolbarComboBox(null, i18nString(UIStrings.networkConditions));\n toolbarItem.setMaxWidth(140);\n MobileThrottling.ThrottlingManager.throttlingManager().decorateSelectWithNetworkThrottling(\n toolbarItem.selectElement());\n return toolbarItem;\n }\n\n private prepareToLoadTimeline(): void {\n console.assert(this.state === State.Idle);\n this.setState(State.Loading);\n if (this.performanceModel) {\n this.performanceModel = null;\n }\n }\n\n private createFileSelector(): void {\n if (this.fileSelectorElement) {\n this.fileSelectorElement.remove();\n }\n this.fileSelectorElement = UI.UIUtils.createFileSelectorElement(this.loadFromFile.bind(this));\n this.timelinePane.element.appendChild(this.fileSelectorElement);\n }\n\n private contextMenu(event: Event): void {\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.appendItemsAtLocation('timelineMenu');\n void contextMenu.show();\n }\n\n async saveToFile(): Promise {\n if (this.state !== State.Idle) {\n return;\n }\n const performanceModel = this.performanceModel;\n if (!performanceModel) {\n return;\n }\n\n const traceEvents = this.#traceEngineModel.traceEvents(this.#traceEngineActiveTraceIndex);\n const metadata = this.#traceEngineModel.metadata(this.#traceEngineActiveTraceIndex);\n if (!traceEvents) {\n return;\n }\n\n const traceStart = Platform.DateUtilities.toISO8601Compact(new Date());\n let fileName: Platform.DevToolsPath.RawPathString;\n if (metadata?.dataOrigin === TraceEngine.Types.File.DataOrigin.CPUProfile) {\n fileName = `CPU-${traceStart}.cpuprofile` as Platform.DevToolsPath.RawPathString;\n } else {\n fileName = `Trace-${traceStart}.json` as Platform.DevToolsPath.RawPathString;\n }\n\n try {\n const handler = await window.showSaveFilePicker({\n suggestedName: fileName,\n });\n const encoder = new TextEncoder();\n\n // TODO(crbug.com/1456818): Extract this logic and add more tests.\n let traceAsString;\n if (metadata?.dataOrigin === TraceEngine.Types.File.DataOrigin.CPUProfile) {\n const profileEvent = traceEvents.find(e => e.name === 'CpuProfile');\n if (!profileEvent || !profileEvent.args?.data) {\n return;\n }\n const profileEventData = profileEvent.args?.data;\n if (profileEventData.hasOwnProperty('cpuProfile')) {\n // TODO(crbug.com/1456799): Currently use a hack way because we can't differentiate\n // cpuprofile from trace events when loading a file.\n // The loader will directly add the fake trace created from CpuProfile to the tracingModel.\n // And there is where the old saving logic saves the cpuprofile.\n // This will be solved when the CPUProfileHandler is done. Then we can directly get it\n // from the new traceEngine\n const profile = (profileEventData as {cpuProfile: Protocol.Profiler.Profile}).cpuProfile;\n traceAsString = cpuprofileJsonGenerator(profile as Protocol.Profiler.Profile);\n }\n } else {\n const formattedTraceIter = traceJsonGenerator(traceEvents, metadata);\n traceAsString = Array.from(formattedTraceIter).join('');\n }\n const buffer = encoder.encode(traceAsString);\n const writable = await handler.createWritable();\n await writable.write(buffer);\n await writable.close();\n } catch (error) {\n console.error(error.stack);\n if (error.name === 'AbortError') {\n // The user cancelled the action, so this is not an error we need to report.\n return;\n }\n Common.Console.Console.instance().error(\n i18nString(UIStrings.failedToSaveTimelineSS, {PH1: error.message, PH2: error.name}));\n }\n }\n\n async showHistory(): Promise {\n const recordingData = await this.#historyManager.showHistoryDropDown();\n if (recordingData && recordingData.traceParseDataIndex !== this.#traceEngineActiveTraceIndex) {\n this.setModel(recordingData.legacyModel, /* exclusiveFilter= */ null, recordingData.traceParseDataIndex);\n }\n }\n\n navigateHistory(direction: number): boolean {\n const recordingData = this.#historyManager.navigate(direction);\n if (recordingData && recordingData.traceParseDataIndex !== this.#traceEngineActiveTraceIndex) {\n this.setModel(recordingData.legacyModel, /* exclusiveFilter= */ null, recordingData.traceParseDataIndex);\n }\n return true;\n }\n\n selectFileToLoad(): void {\n if (this.fileSelectorElement) {\n this.fileSelectorElement.click();\n }\n }\n\n async loadFromFile(file: File): Promise {\n if (this.state !== State.Idle) {\n return;\n }\n this.prepareToLoadTimeline();\n this.loader = await TimelineLoader.loadFromFile(file, this);\n this.createFileSelector();\n }\n\n async loadFromURL(url: Platform.DevToolsPath.UrlString): Promise {\n if (this.state !== State.Idle) {\n return;\n }\n this.prepareToLoadTimeline();\n this.loader = await TimelineLoader.loadFromURL(url, this);\n }\n\n private updateOverviewControls(): void {\n const traceParsedData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n const isCpuProfile = this.#traceEngineModel.metadata(this.#traceEngineActiveTraceIndex)?.dataOrigin ===\n TraceEngine.Types.File.DataOrigin.CPUProfile;\n if (!traceParsedData) {\n return;\n }\n\n this.#minimapComponent.setData({\n traceParsedData,\n isCpuProfile,\n settings: {\n showScreenshots: this.showScreenshotsSetting.get(),\n showMemory: this.showMemorySetting.get(),\n },\n });\n }\n\n private onModeChanged(): void {\n this.updateOverviewControls();\n this.doResize();\n this.select(null);\n }\n\n private updateSettingsPaneVisibility(): void {\n if (isNode) {\n return;\n }\n if (this.showSettingsPaneSetting.get()) {\n this.settingsPane.showWidget();\n } else {\n this.settingsPane.hideWidget();\n }\n }\n\n private updateShowSettingsToolbarButton(): void {\n const messages: string[] = [];\n if (SDK.CPUThrottlingManager.CPUThrottlingManager.instance().cpuThrottlingRate() !== 1) {\n messages.push(i18nString(UIStrings.CpuThrottlingIsEnabled));\n }\n if (MobileThrottling.ThrottlingManager.throttlingManager().hardwareConcurrencyOverrideEnabled) {\n messages.push(i18nString(UIStrings.HardwareConcurrencyIsEnabled));\n }\n if (SDK.NetworkManager.MultitargetNetworkManager.instance().isThrottling()) {\n messages.push(i18nString(UIStrings.NetworkThrottlingIsEnabled));\n }\n if (this.captureLayersAndPicturesSetting.get()) {\n messages.push(i18nString(UIStrings.SignificantOverheadDueToPaint));\n }\n if (this.disableCaptureJSProfileSetting.get()) {\n messages.push(i18nString(UIStrings.JavascriptSamplingIsDisabled));\n }\n\n this.showSettingsPaneButton.setDefaultWithRedColor(messages.length > 0);\n this.showSettingsPaneButton.setToggleWithRedColor(messages.length > 0);\n\n if (messages.length) {\n const tooltipElement = document.createElement('div');\n messages.forEach(message => {\n tooltipElement.createChild('div').textContent = message;\n });\n this.showSettingsPaneButton.setTitle(tooltipElement.textContent || '');\n } else {\n this.showSettingsPaneButton.setTitle(i18nString(UIStrings.captureSettings));\n }\n }\n\n private setUIControlsEnabled(enabled: boolean): void {\n this.recordingOptionUIControls.forEach(control => control.setEnabled(enabled));\n }\n\n async #evaluateInspectedURL(): Promise {\n if (!this.controller) {\n return Platform.DevToolsPath.EmptyUrlString;\n }\n\n // target.inspectedURL is reliably populated, however it lacks any url #hash\n const inspectedURL = this.controller.primaryPageTarget.inspectedURL();\n\n // We'll use the navigationHistory to acquire the current URL including hash\n const resourceTreeModel = this.controller.primaryPageTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);\n const navHistory = resourceTreeModel && await resourceTreeModel.navigationHistory();\n if (!resourceTreeModel || !navHistory) {\n return inspectedURL;\n }\n\n const {currentIndex, entries} = navHistory;\n const navigationEntry = entries[currentIndex];\n return navigationEntry.url as Platform.DevToolsPath.UrlString;\n }\n\n async #navigateToAboutBlank(): Promise {\n const aboutBlankNavigationComplete = new Promise(async (resolve, reject) => {\n if (!this.controller) {\n reject('Could not find TimelineController');\n return;\n }\n const target = this.controller.primaryPageTarget;\n const resourceModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);\n if (!resourceModel) {\n reject('Could not load resourceModel');\n return;\n }\n\n // To clear out the page and any state from prior test runs, we\n // navigate to about:blank before initiating the trace recording.\n // Once we have navigated to about:blank, we start recording and\n // then navigate to the original page URL, to ensure we profile the\n // page load.\n function waitForAboutBlank(event: Common.EventTarget.EventTargetEvent):\n void {\n if (event.data.url === 'about:blank') {\n resolve();\n } else {\n reject(`Unexpected navigation to ${event.data.url}`);\n }\n resourceModel?.removeEventListener(SDK.ResourceTreeModel.Events.FrameNavigated, waitForAboutBlank);\n }\n resourceModel.addEventListener(SDK.ResourceTreeModel.Events.FrameNavigated, waitForAboutBlank);\n await resourceModel.navigate('about:blank' as Platform.DevToolsPath.UrlString);\n });\n await aboutBlankNavigationComplete;\n }\n\n async #startCPUProfilingRecording(): Promise {\n try {\n // Only profile the first target devtools connects to. If we profile all target, but this will cause some bugs\n // like time for the function is calculated wrong, because the profiles will be concated and sorted together,\n // so the total time will be amplified.\n // Multiple targets problem might happen when you inspect multiple node servers on different port at same time,\n // or when you let DevTools listen to both locolhost:9229 & 127.0.0.1:9229.\n const firstNodeTarget =\n SDK.TargetManager.TargetManager.instance().targets().find(target => target.type() === SDK.Target.Type.Node);\n if (!firstNodeTarget) {\n throw new Error('Could not load any Node target.');\n }\n if (firstNodeTarget) {\n this.cpuProfiler = firstNodeTarget.model(SDK.CPUProfilerModel.CPUProfilerModel);\n }\n this.setUIControlsEnabled(false);\n this.hideLandingPage();\n if (!this.cpuProfiler) {\n throw new Error('No Node target is found.');\n }\n await SDK.TargetManager.TargetManager.instance().suspendAllTargets('performance-timeline');\n await this.cpuProfiler.startRecording();\n\n this.recordingStarted();\n } catch (e) {\n await this.recordingFailed(e.message);\n }\n }\n\n async #startTraceRecording(): Promise {\n try {\n // We record against the root target, but also need to use the\n // primaryPageTarget to inspect the current URL. For more info, see the\n // JSDoc comment on the TimelineController constructor.\n const rootTarget = SDK.TargetManager.TargetManager.instance().rootTarget();\n const primaryPageTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();\n\n if (!primaryPageTarget) {\n throw new Error('Could not load primary page target.');\n }\n if (!rootTarget) {\n throw new Error('Could not load root target.');\n }\n\n if (UIDevtoolsUtils.isUiDevTools()) {\n this.controller = new UIDevtoolsController(rootTarget, primaryPageTarget, this);\n } else {\n this.controller = new TimelineController(rootTarget, primaryPageTarget, this);\n }\n this.setUIControlsEnabled(false);\n this.hideLandingPage();\n if (!this.controller) {\n throw new Error('Could not create Timeline controller');\n }\n\n const urlToTrace = await this.#evaluateInspectedURL();\n // If we are doing \"Reload & record\", we first navigate the page to\n // about:blank. This is to ensure any data on the timeline from any\n // previous performance recording is lost, avoiding the problem where a\n // timeline will show data & screenshots from a previous page load that\n // was not relevant.\n if (this.recordingPageReload) {\n await this.#navigateToAboutBlank();\n }\n const recordingOptions = {\n enableJSSampling: !this.disableCaptureJSProfileSetting.get(),\n capturePictures: this.captureLayersAndPicturesSetting.get(),\n captureFilmStrip: this.showScreenshotsSetting.get(),\n };\n // Order is important here: we tell the controller to start recording, which enables tracing.\n const response = await this.controller.startRecording(recordingOptions);\n if (response.getError()) {\n throw new Error(response.getError());\n }\n // Once we get here, we know tracing is active.\n // This is when, if the user has hit \"Reload & Record\" that we now need to navigate to the original URL.\n // If the user has just hit \"record\", we don't do any navigating.\n const recordingConfig = this.recordingPageReload ? {navigateToUrl: urlToTrace} : undefined;\n this.recordingStarted(recordingConfig);\n } catch (e) {\n await this.recordingFailed(e.message);\n }\n }\n\n private async startRecording(): Promise {\n console.assert(!this.statusPane, 'Status pane is already opened.');\n this.setState(State.StartPending);\n this.showRecordingStarted();\n\n if (isNode) {\n await this.#startCPUProfilingRecording();\n } else {\n await this.#startTraceRecording();\n }\n }\n\n private async stopRecording(): Promise {\n if (this.statusPane) {\n this.statusPane.finish();\n this.statusPane.updateStatus(i18nString(UIStrings.stoppingTimeline));\n this.statusPane.updateProgressBar(i18nString(UIStrings.received), 0);\n }\n this.setState(State.StopPending);\n if (this.controller) {\n this.performanceModel = this.controller.getPerformanceModel();\n await this.controller.stopRecording();\n this.setUIControlsEnabled(true);\n await this.controller.dispose();\n this.controller = null;\n return;\n }\n if (this.cpuProfiler) {\n const profile = await this.cpuProfiler.stopRecording();\n this.setState(State.Idle);\n this.loadFromCpuProfile(profile);\n\n this.setUIControlsEnabled(true);\n this.cpuProfiler = null;\n\n await SDK.TargetManager.TargetManager.instance().resumeAllTargets();\n }\n }\n\n private async recordingFailed(error: string, rawEvents?: TraceEngine.Types.TraceEvents.TraceEventData[]):\n Promise {\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.statusPane = new StatusPane(\n {\n description: error,\n buttonText: i18nString(UIStrings.close),\n buttonDisabled: false,\n showProgress: undefined,\n showTimer: undefined,\n },\n // When recording failed, we should load null to go back to the landing page.\n async () => {\n this.statusPane?.remove();\n await this.loadingComplete(\n /* no collectedEvents */[],\n /* tracingModel= */ null,\n /* exclusiveFilter= */ null,\n /* isCpuProfile= */ false,\n /* recordingStartTime= */ null);\n });\n this.statusPane.showPane(this.statusPaneContainer);\n this.statusPane.updateStatus(i18nString(UIStrings.recordingFailed));\n\n if (rawEvents) {\n this.statusPane.enableDownloadOfEvents(rawEvents);\n }\n\n this.setState(State.RecordingFailed);\n this.performanceModel = null;\n this.traceLoadStart = null;\n this.setUIControlsEnabled(true);\n if (this.controller) {\n await this.controller.dispose();\n this.controller = null;\n }\n // Ensure we resume all targets, otherwise DevTools remains unresponsive in the event of an error.\n void SDK.TargetManager.TargetManager.instance().resumeAllTargets();\n }\n\n private onSuspendStateChanged(): void {\n this.updateTimelineControls();\n }\n\n private consoleProfileFinished(data: SDK.CPUProfilerModel.ProfileFinishedData): void {\n this.loadFromCpuProfile(data.cpuProfile, data.title);\n void UI.InspectorView.InspectorView.instance().showPanel('timeline');\n }\n\n private updateTimelineControls(): void {\n const state = State;\n this.toggleRecordAction.setToggled(this.state === state.Recording);\n this.toggleRecordAction.setEnabled(this.state === state.Recording || this.state === state.Idle);\n this.recordReloadAction.setEnabled(isNode ? false : this.state === state.Idle);\n this.#historyManager.setEnabled(this.state === state.Idle);\n this.clearButton.setEnabled(this.state === state.Idle);\n this.panelToolbar.setEnabled(this.state !== state.Loading);\n this.panelRightToolbar.setEnabled(this.state !== state.Loading);\n this.dropTarget.setEnabled(this.state === state.Idle);\n this.loadButton.setEnabled(this.state === state.Idle);\n this.saveButton.setEnabled(this.state === state.Idle && Boolean(this.performanceModel));\n }\n\n async toggleRecording(): Promise {\n if (this.state === State.Idle) {\n this.recordingPageReload = false;\n await this.startRecording();\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.TimelineStarted);\n } else if (this.state === State.Recording) {\n await this.stopRecording();\n }\n }\n\n recordReload(): void {\n if (this.state !== State.Idle) {\n return;\n }\n this.recordingPageReload = true;\n void this.startRecording();\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.TimelinePageReloadStarted);\n }\n\n private onClearButton(): void {\n this.#historyManager.clear();\n this.clear();\n }\n\n private clear(): void {\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.showLandingPage();\n this.reset();\n }\n\n private reset(): void {\n PerfUI.LineLevelProfile.Performance.instance().reset();\n if (this.#sourceMapsResolver) {\n this.#sourceMapsResolver.removeEventListener(\n NodeNamesUpdated.eventName, this.#onSourceMapsNodeNamesResolvedBound);\n this.#sourceMapsResolver.uninstall();\n this.#sourceMapsResolver = null;\n }\n this.setModel(null);\n }\n\n #applyActiveFilters(\n traceIsGeneric: boolean,\n exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null = null): void {\n if (traceIsGeneric || Root.Runtime.experiments.isEnabled('timelineShowAllEvents')) {\n return;\n }\n\n const newActiveFilters = exclusiveFilter ? [exclusiveFilter] : [\n TimelineUIUtils.visibleEventsFilter(),\n ];\n\n ActiveFilters.instance().setFilters(newActiveFilters);\n }\n\n applyFilters(\n _perfModel: PerformanceModel|null,\n exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null = null): void {\n // TODO: this method is maintained purely for a set of layout tests that\n // use it. Once these tests have been replaced or migrated into DevTools\n // unit tests, we can remove this applyFilters() method.\n // http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js\n // http/tests/devtools/a11y-axe-core/performance/performance_event_log_a11y_test.js\n // http/tests/devtools/tracing/category-filter.js\n // http/tests/devtools/tracing/timeline-js/timeline-open-function-call.js\n // http/tests/devtools/tracing/timeline-misc/timeline-filtering-self-time.js\n // http/tests/devtools/tracing/timeline-misc/timeline-filtering.js\n // http/tests/devtools/tracing/timeline-misc/timeline-range-stats.js\n this.#applyActiveFilters(false, exclusiveFilter);\n }\n\n setModel(\n model: PerformanceModel|null, exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null = null,\n traceEngineIndex: number = -1): void {\n this.performanceModel = model;\n this.#traceEngineActiveTraceIndex = traceEngineIndex;\n const traceParsedData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n const isCpuProfile = this.#traceEngineModel.metadata(this.#traceEngineActiveTraceIndex)?.dataOrigin ===\n TraceEngine.Types.File.DataOrigin.CPUProfile;\n\n this.#minimapComponent.reset();\n // Order is important: the bounds must be set before we initiate any UI\n // rendering.\n if (traceParsedData) {\n TraceBounds.TraceBounds.BoundsManager.instance().resetWithNewBounds(\n traceParsedData.Meta.traceBounds,\n );\n this.#applyActiveFilters(traceParsedData.Meta.traceIsGeneric, exclusiveFilter);\n }\n if (model) {\n this.searchableViewInternal.showWidget();\n } else {\n this.searchableViewInternal.hideWidget();\n }\n this.flameChart.setModel(model, traceParsedData, isCpuProfile);\n this.flameChart.setSelection(null);\n\n // Set up line level profiling with CPU profiles, if we found any.\n PerfUI.LineLevelProfile.Performance.instance().reset();\n if (traceParsedData && traceParsedData.Samples.profilesInProcess.size) {\n const rootTarget = SDK.TargetManager.TargetManager.instance().rootTarget();\n // Gather up all CPU Profiles we found when parsing this trace.\n const cpuProfiles =\n Array.from(traceParsedData.Samples.profilesInProcess).flatMap(([_processId, threadsInProcess]) => {\n const profiles = Array.from(threadsInProcess.values()).map(profileData => profileData.parsedProfile);\n return profiles;\n });\n for (const profile of cpuProfiles) {\n PerfUI.LineLevelProfile.Performance.instance().appendCPUProfile(profile, rootTarget);\n }\n }\n\n this.updateOverviewControls();\n if (this.flameChart) {\n this.flameChart.resizeToPreferredHeights();\n }\n\n // Set the initial zoom: if we are using breadcrumbs we leave the entire\n // window visible, but if not we zoom into the biggest period of activity\n // (we might want to consider doing the same for breadcrumbs)\n if (this.#minimapComponent.breadcrumbsActivated) {\n this.#minimapComponent.addInitialBreadcrumb();\n } else if (traceParsedData) {\n // We expect traceParsedData to always exist, this check is to keep TS happy.\n\n // To calculate the activity we might want to zoom in, we find the last\n // main thread. Or we find the CPU Profile thread, for e.g. Node traces.\n const mainThreadTypes = [\n TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD,\n TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE,\n ];\n const lastMainThread = TraceEngine.Handlers.Threads.threadsInTrace(traceParsedData)\n .filter(data => mainThreadTypes.includes(data.type))\n .at(-1);\n if (lastMainThread) {\n const zoomedInBounds = TraceEngine.Extras.MainThreadActivity.calculateWindow(\n traceParsedData.Meta.traceBounds, lastMainThread.entries);\n\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(zoomedInBounds);\n }\n }\n this.updateTimelineControls();\n }\n\n private recordingStarted(config?: {navigateToUrl: Platform.DevToolsPath.UrlString}): void {\n if (config && this.recordingPageReload && this.controller) {\n // If the user hit \"Reload & record\", by this point we have:\n // 1. Navigated to about:blank\n // 2. Initiated tracing.\n // We therefore now should navigate back to the original URL that the user wants to profile.\n const resourceModel = this.controller?.primaryPageTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);\n if (!resourceModel) {\n void this.recordingFailed('Could not navigate to original URL');\n return;\n }\n // We don't need to await this because we are purposefully showing UI\n // progress as the page loads & tracing is underway.\n void resourceModel.navigate(config.navigateToUrl);\n }\n\n this.reset();\n this.setState(State.Recording);\n this.showRecordingStarted();\n if (this.statusPane) {\n this.statusPane.enableAndFocusButton();\n this.statusPane.updateStatus(i18nString(UIStrings.profiling));\n this.statusPane.updateProgressBar(i18nString(UIStrings.bufferUsage), 0);\n this.statusPane.startTimer();\n }\n this.hideLandingPage();\n }\n\n recordingProgress(usage: number): void {\n if (this.statusPane) {\n this.statusPane.updateProgressBar(i18nString(UIStrings.bufferUsage), usage * 100);\n }\n }\n\n private showLandingPage(): void {\n this.updateSettingsPaneVisibility();\n if (this.landingPage) {\n this.landingPage.show(this.statusPaneContainer);\n return;\n }\n\n function encloseWithTag(tagName: string, contents: string): HTMLElement {\n const e = document.createElement(tagName);\n e.textContent = contents;\n return e;\n }\n\n const learnMoreNode = UI.XLink.XLink.create(\n 'https://developer.chrome.com/docs/devtools/evaluate-performance/', i18nString(UIStrings.learnmore));\n\n const recordKey = encloseWithTag(\n 'b',\n UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction('timeline.toggle-recording')[0].title());\n const reloadKey = encloseWithTag(\n 'b', UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction('timeline.record-reload')[0].title());\n const navigateNode = encloseWithTag('b', i18nString(UIStrings.wasd));\n\n this.landingPage = new UI.Widget.VBox();\n this.landingPage.contentElement.classList.add('timeline-landing-page', 'fill');\n const centered = this.landingPage.contentElement.createChild('div');\n\n const recordButton = UI.UIUtils.createInlineButton(UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction));\n const reloadButton =\n UI.UIUtils.createInlineButton(UI.Toolbar.Toolbar.createActionButtonForId('timeline.record-reload'));\n\n centered.createChild('p').appendChild(i18n.i18n.getFormatLocalizedString(\n str_, UIStrings.clickTheRecordButtonSOrHitSTo, {PH1: recordButton, PH2: recordKey}));\n\n centered.createChild('p').appendChild(i18n.i18n.getFormatLocalizedString(\n str_, UIStrings.clickTheReloadButtonSOrHitSTo, {PH1: reloadButton, PH2: reloadKey}));\n\n centered.createChild('p').appendChild(i18n.i18n.getFormatLocalizedString(\n str_, UIStrings.afterRecordingSelectAnAreaOf, {PH1: navigateNode, PH2: learnMoreNode}));\n\n if (isNode) {\n const previewSection = new PanelFeedback.PanelFeedback.PanelFeedback();\n previewSection.data = {\n feedbackUrl: 'https://crbug.com/1354548' as Platform.DevToolsPath.UrlString,\n quickStartUrl: 'https://goo.gle/js-profiler-deprecation' as Platform.DevToolsPath.UrlString,\n quickStartLinkText: i18nString(UIStrings.learnmore),\n };\n centered.appendChild(previewSection);\n const feedbackButton = new PanelFeedback.FeedbackButton.FeedbackButton();\n feedbackButton.data = {\n feedbackUrl: 'https://crbug.com/1354548' as Platform.DevToolsPath.UrlString,\n };\n centered.appendChild(feedbackButton);\n }\n\n this.landingPage.show(this.statusPaneContainer);\n }\n\n private hideLandingPage(): void {\n this.landingPage.detach();\n\n // Hide pane settings in trace view to conserve UI space, but preserve underlying setting.\n this.showSettingsPaneButton?.setToggled(false);\n this.settingsPane?.hideWidget();\n }\n\n async loadingStarted(): Promise {\n this.hideLandingPage();\n\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.statusPane = new StatusPane(\n {\n showProgress: true,\n showTimer: undefined,\n buttonDisabled: undefined,\n buttonText: undefined,\n description: undefined,\n },\n () => this.cancelLoading());\n this.statusPane.showPane(this.statusPaneContainer);\n this.statusPane.updateStatus(i18nString(UIStrings.loadingProfile));\n // FIXME: make loading from backend cancelable as well.\n if (!this.loader) {\n this.statusPane.finish();\n }\n this.traceLoadStart = TraceEngine.Types.Timing.MilliSeconds(performance.now());\n await this.loadingProgress(0);\n }\n\n async loadingProgress(progress?: number): Promise {\n if (typeof progress === 'number' && this.statusPane) {\n this.statusPane.updateProgressBar(i18nString(UIStrings.received), progress * 100);\n }\n }\n\n async processingStarted(): Promise {\n if (this.statusPane) {\n this.statusPane.updateStatus(i18nString(UIStrings.processingProfile));\n }\n }\n\n #onSourceMapsNodeNamesResolved(): void {\n this.flameChart.updateColorMapper();\n }\n\n async loadingComplete(\n collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[],\n tracingModel: TraceEngine.Legacy.TracingModel|null,\n exclusiveFilter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null = null, isCpuProfile: boolean,\n recordingStartTime: number|null): Promise {\n this.#traceEngineModel.resetProcessor();\n SourceMapsResolver.clearResolvedNodeNames();\n\n delete this.loader;\n\n // If the user just recorded this trace via the record UI, the state will\n // be StopPending. Whereas if it was an existing trace they loaded via a\n // file, it will be State.Loading. This means we can tell the recording is\n // fresh by checking the state value.\n const recordingIsFresh = this.state === State.StopPending;\n\n this.setState(State.Idle);\n\n if (!tracingModel) {\n this.clear();\n return;\n }\n\n if (!this.performanceModel) {\n this.performanceModel = new PerformanceModel();\n }\n\n try {\n // Run the new engine in parallel with the parsing done in the performanceModel\n await Promise.all([\n // Calling setTracingModel now and setModel so much later, leads to several problems due to addEventListener order being unexpected\n // TODO(paulirish): Resolve this, or just wait for the death of tracingModel. :)\n this.performanceModel.setTracingModel(tracingModel, recordingIsFresh),\n this.#executeNewTraceEngine(collectedEvents, recordingIsFresh, isCpuProfile, recordingStartTime),\n ]);\n\n // This code path is only executed when a new trace is recorded/imported,\n // so we know that the active index will be the size of the model because\n // the newest trace will be automatically set to active.\n this.#traceEngineActiveTraceIndex = this.#traceEngineModel.size() - 1;\n\n this.setModel(this.performanceModel, exclusiveFilter, this.#traceEngineActiveTraceIndex);\n\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.statusPane = null;\n\n const traceData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n if (!traceData) {\n throw new Error(`Could not get trace data at index ${this.#traceEngineActiveTraceIndex}`);\n }\n\n // Set up SourceMapsResolver to ensure we resolve any function names in\n // profile calls.\n this.#sourceMapsResolver = new SourceMapsResolver(traceData);\n this.#sourceMapsResolver.addEventListener(NodeNamesUpdated.eventName, this.#onSourceMapsNodeNamesResolvedBound);\n await this.#sourceMapsResolver.install();\n\n // We store the Performance Model and the index of the active trace.\n // However we also pass in the full trace data because we use it to build\n // the preview overview thumbnail of the trace that gets shown in the UI.\n this.#historyManager.addRecording({\n data: {\n legacyModel: this.performanceModel,\n traceParseDataIndex: this.#traceEngineActiveTraceIndex,\n },\n filmStripForPreview: TraceEngine.Extras.FilmStrip.fromTraceData(traceData),\n traceParsedData: traceData,\n startTime: recordingStartTime ?? null,\n });\n } catch (error) {\n // Try to get the raw events: if we errored during the parsing stage, it\n // is useful to get access to the raw events to download the trace. This\n // allows us to debug crashes!\n // Because we don't know where the error came from, we wrap it in a\n // try-catch to protect against the tracing model erroring.\n let rawEvents: TraceEngine.Types.TraceEvents.TraceEventData[]|undefined = undefined;\n try {\n rawEvents = tracingModel.allRawEvents() as unknown as TraceEngine.Types.TraceEvents.TraceEventData[];\n } catch {\n }\n\n void this.recordingFailed(error.message, rawEvents);\n console.error(error);\n } finally {\n this.recordTraceLoadMetric();\n }\n }\n\n recordTraceLoadMetric(): void {\n if (!this.traceLoadStart) {\n return;\n }\n const start = this.traceLoadStart;\n // Right *now* is the end of trace parsing and model building, but the flamechart rendering\n // isn't complete yet. To capture that we'll do a rAF+setTimeout to give the most accurate timestamp\n // for the first paint of the flamechart\n requestAnimationFrame(() => {\n setTimeout(() => {\n const end = TraceEngine.Types.Timing.MilliSeconds(performance.now());\n const measure = performance.measure('TraceLoad', {start, end});\n const duration = TraceEngine.Types.Timing.MilliSeconds(measure.duration);\n this.element.dispatchEvent(new TraceLoadEvent(duration));\n Host.userMetrics.performanceTraceLoad(measure);\n }, 0);\n });\n }\n\n async #executeNewTraceEngine(\n collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[], isFreshRecording: boolean, isCpuProfile: boolean,\n recordStartTime: number|null): Promise {\n const shouldGatherMetadata = isFreshRecording && !isCpuProfile;\n const metadata =\n shouldGatherMetadata ? await TraceEngine.Extras.Metadata.forNewRecording(recordStartTime ?? undefined) : {};\n metadata.dataOrigin =\n isCpuProfile ? TraceEngine.Types.File.DataOrigin.CPUProfile : TraceEngine.Types.File.DataOrigin.TraceEvents;\n\n return this.#traceEngineModel.parse(\n collectedEvents,\n {\n metadata,\n isFreshRecording,\n },\n );\n }\n\n loadingCompleteForTest(): void {\n // Not implemented, added only for allowing the TimelineTestRunner\n // to be in sync when a trace load is finished.\n }\n private showRecordingStarted(): void {\n if (this.statusPane) {\n this.statusPane.remove();\n }\n this.statusPane = new StatusPane(\n {\n showTimer: true,\n showProgress: true,\n buttonDisabled: true,\n description: undefined,\n buttonText: undefined,\n },\n () => this.stopRecording());\n this.statusPane.showPane(this.statusPaneContainer);\n this.statusPane.updateStatus(i18nString(UIStrings.initializingProfiler));\n }\n\n private cancelLoading(): void {\n if (this.loader) {\n void this.loader.cancel();\n }\n }\n\n private async loadEventFired(\n event: Common.EventTarget\n .EventTargetEvent<{resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel, loadTime: number}>):\n Promise {\n if (this.state !== State.Recording || !this.recordingPageReload || !this.controller ||\n this.controller.primaryPageTarget !== event.data.resourceTreeModel.target()) {\n return;\n }\n const controller = this.controller;\n await new Promise(r => window.setTimeout(r, this.millisecondsToRecordAfterLoadEvent));\n\n // Check if we're still in the same recording session.\n if (controller !== this.controller || this.state !== State.Recording) {\n return;\n }\n void this.stopRecording();\n }\n\n private frameForSelection(selection: TimelineSelection): TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame\n |null {\n if (TimelineSelection.isFrameObject(selection.object)) {\n return selection.object;\n }\n if (TimelineSelection.isRangeSelection(selection.object) ||\n TimelineSelection.isSyntheticNetworkRequestDetailsEventSelection(selection.object)) {\n return null;\n }\n if (TimelineSelection.isTraceEventSelection(selection.object)) {\n if (!this.performanceModel) {\n return null;\n }\n const traceData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n if (!traceData) {\n return null;\n }\n // If the user has selected a time range, the frame we want is the last\n // frame in that time window, hence why the window we look for is the\n // endTime to the endTime.\n const endTimeMicro = TraceEngine.Helpers.Timing.millisecondsToMicroseconds(selection.endTime);\n const lastFrameInSelection = TraceEngine.Handlers.ModelHandlers.Frames\n .framesWithinWindow(\n traceData.Frames.frames,\n endTimeMicro,\n endTimeMicro,\n )\n .at(0);\n return lastFrameInSelection || null;\n }\n console.assert(false, 'Should never be reached');\n return null;\n }\n\n jumpToFrame(offset: number): true|undefined {\n const currentFrame = this.selection && this.frameForSelection(this.selection);\n if (!currentFrame) {\n return;\n }\n const traceData = this.#traceEngineModel.traceParsedData(this.#traceEngineActiveTraceIndex);\n if (!traceData) {\n return;\n }\n let index = traceData.Frames.frames.indexOf(currentFrame);\n console.assert(index >= 0, 'Can\\'t find current frame in the frame list');\n index = Platform.NumberUtilities.clamp(index + offset, 0, traceData.Frames.frames.length - 1);\n const frame = traceData.Frames.frames[index];\n this.#revealTimeRange(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.startTime),\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.endTime));\n this.select(TimelineSelection.fromFrame(frame));\n return true;\n }\n\n select(selection: TimelineSelection|null): void {\n this.selection = selection;\n this.flameChart.setSelection(selection);\n }\n\n selectEntryAtTime(events: TraceEngine.Types.TraceEvents.TraceEventData[]|null, time: number): void {\n if (!events) {\n return;\n }\n\n if (events.length === 0) {\n this.select(null);\n return;\n }\n\n // Find best match, then backtrack to the first visible entry.\n for (let index = Platform.ArrayUtilities.upperBound(events, time, (time, event) => time - event.ts) - 1; index >= 0;\n --index) {\n const event = events[index];\n const {endTime} = TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(event);\n if (TraceEngine.Legacy.TracingModel.isTopLevelEvent(event) && endTime < time) {\n break;\n }\n if (ActiveFilters.instance().isVisible(event) && endTime >= time) {\n this.select(TimelineSelection.fromTraceEvent(event));\n return;\n }\n }\n this.select(null);\n }\n\n highlightEvent(event: TraceEngine.Legacy.Event|null): void {\n this.flameChart.highlightEvent(event);\n }\n\n #revealTimeRange(startTime: TraceEngine.Types.Timing.MilliSeconds, endTime: TraceEngine.Types.Timing.MilliSeconds):\n void {\n const traceBoundsState = TraceBounds.TraceBounds.BoundsManager.instance().state();\n if (!traceBoundsState) {\n return;\n }\n const traceWindow = traceBoundsState.milli.timelineTraceWindow;\n\n let offset = 0;\n if (traceWindow.max < endTime) {\n offset = endTime - traceWindow.max;\n } else if (traceWindow.min > startTime) {\n offset = startTime - traceWindow.min;\n }\n TraceBounds.TraceBounds.BoundsManager.instance().setTimelineVisibleWindow(\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n TraceEngine.Types.Timing.MilliSeconds(traceWindow.min + offset),\n TraceEngine.Types.Timing.MilliSeconds(traceWindow.max + offset),\n ),\n {\n shouldAnimate: true,\n },\n );\n }\n\n private handleDrop(dataTransfer: DataTransfer): void {\n const items = dataTransfer.items;\n if (!items.length) {\n return;\n }\n const item = items[0];\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.PerfPanelTraceImported);\n if (item.kind === 'string') {\n const url = dataTransfer.getData('text/uri-list') as Platform.DevToolsPath.UrlString;\n if (new Common.ParsedURL.ParsedURL(url).isValid) {\n void this.loadFromURL(url);\n }\n } else if (item.kind === 'file') {\n const file = items[0].getAsFile();\n if (!file) {\n return;\n }\n void this.loadFromFile(file);\n }\n }\n}\n\n// TODO(crbug.com/1167717): Make this a const enum again\n// eslint-disable-next-line rulesdir/const_enum\nexport enum State {\n Idle = 'Idle',\n StartPending = 'StartPending',\n Recording = 'Recording',\n StopPending = 'StopPending',\n Loading = 'Loading',\n RecordingFailed = 'RecordingFailed',\n}\n\n// Define row and header height, should be in sync with styles for timeline graphs.\nexport const rowHeight = 18;\n\nexport const headerHeight = 20;\nexport interface TimelineModeViewDelegate {\n select(selection: TimelineSelection|null): void;\n selectEntryAtTime(events: TraceEngine.Types.TraceEvents.TraceEventData[]|null, time: number): void;\n highlightEvent(event: TraceEngine.Legacy.CompatibleTraceEvent|null): void;\n}\n\nexport class StatusPane extends UI.Widget.VBox {\n private status: HTMLElement;\n private time: Element|undefined;\n private progressLabel!: Element;\n private progressBar!: Element;\n private readonly description: HTMLElement|undefined;\n private button: HTMLButtonElement;\n private downloadTraceButton: HTMLButtonElement;\n private startTime!: number;\n private timeUpdateTimer?: number;\n #rawEvents?: TraceEngine.Types.TraceEvents.TraceEventData[];\n\n constructor(\n options: {\n showTimer?: boolean,\n showProgress?: boolean,\n description?: string,\n buttonText?: string,\n buttonDisabled?: boolean,\n },\n buttonCallback: () => (Promise| void)) {\n super(true);\n\n this.contentElement.classList.add('timeline-status-dialog');\n\n const statusLine = this.contentElement.createChild('div', 'status-dialog-line status');\n statusLine.createChild('div', 'label').textContent = i18nString(UIStrings.status);\n this.status = statusLine.createChild('div', 'content');\n UI.ARIAUtils.markAsStatus(this.status);\n\n if (options.showTimer) {\n const timeLine = this.contentElement.createChild('div', 'status-dialog-line time');\n timeLine.createChild('div', 'label').textContent = i18nString(UIStrings.time);\n this.time = timeLine.createChild('div', 'content');\n }\n\n if (options.showProgress) {\n const progressLine = this.contentElement.createChild('div', 'status-dialog-line progress');\n this.progressLabel = progressLine.createChild('div', 'label');\n this.progressBar = progressLine.createChild('div', 'indicator-container').createChild('div', 'indicator');\n UI.ARIAUtils.markAsProgressBar(this.progressBar);\n }\n\n if (typeof options.description === 'string') {\n const descriptionLine = this.contentElement.createChild('div', 'status-dialog-line description');\n descriptionLine.createChild('div', 'label').textContent = i18nString(UIStrings.description);\n this.description = descriptionLine.createChild('div', 'content');\n this.description.innerText = options.description;\n }\n\n const buttonContainer = this.contentElement.createChild('div', 'stop-button');\n this.downloadTraceButton = UI.UIUtils.createTextButton(i18nString(UIStrings.downloadAfterError), async () => {\n void this.#downloadRawTraceAfterError();\n });\n\n this.downloadTraceButton.disabled = true;\n this.downloadTraceButton.style.visibility = 'hidden';\n\n const buttonText = options.buttonText || i18nString(UIStrings.stop);\n this.button = UI.UIUtils.createTextButton(buttonText, buttonCallback, '', true);\n // Profiling can't be stopped during initialization.\n this.button.disabled = !options.buttonDisabled === false;\n\n buttonContainer.append(this.downloadTraceButton);\n buttonContainer.append(this.button);\n }\n\n finish(): void {\n this.stopTimer();\n this.button.disabled = true;\n }\n\n async #downloadRawTraceAfterError(): Promise {\n if (!this.#rawEvents || this.#rawEvents.length === 0) {\n return;\n }\n const traceStart = Platform.DateUtilities.toISO8601Compact(new Date());\n const fileName = `Trace-Load-Error-${traceStart}.json` as Platform.DevToolsPath.RawPathString;\n const handler = await window.showSaveFilePicker({\n suggestedName: fileName,\n });\n const formattedTraceIter = traceJsonGenerator(this.#rawEvents, {});\n const traceAsString = Array.from(formattedTraceIter).join('');\n const encoder = new TextEncoder();\n const buffer = encoder.encode(traceAsString);\n const writable = await handler.createWritable();\n await writable.write(buffer);\n await writable.close();\n }\n\n enableDownloadOfEvents(rawEvents: TraceEngine.Types.TraceEvents.TraceEventData[]): void {\n this.#rawEvents = rawEvents;\n this.downloadTraceButton.disabled = false;\n this.downloadTraceButton.style.visibility = 'visible';\n }\n\n remove(): void {\n if (this.element.parentNode) {\n (this.element.parentNode as HTMLElement).classList.remove('tinted');\n this.arrangeDialog((this.element.parentNode as HTMLElement));\n }\n this.stopTimer();\n this.element.remove();\n }\n\n showPane(parent: Element): void {\n this.arrangeDialog(parent);\n this.show(parent);\n parent.classList.add('tinted');\n }\n\n enableAndFocusButton(): void {\n this.button.disabled = false;\n this.button.focus();\n }\n\n updateStatus(text: string): void {\n this.status.textContent = text;\n }\n\n updateProgressBar(activity: string, percent: number): void {\n this.progressLabel.textContent = activity;\n (this.progressBar as HTMLElement).style.width = percent.toFixed(1) + '%';\n UI.ARIAUtils.setValueNow(this.progressBar, percent);\n this.updateTimer();\n }\n\n startTimer(): void {\n this.startTime = Date.now();\n this.timeUpdateTimer = window.setInterval(this.updateTimer.bind(this, false), 1000);\n this.updateTimer();\n }\n\n private stopTimer(): void {\n if (!this.timeUpdateTimer) {\n return;\n }\n clearInterval(this.timeUpdateTimer);\n this.updateTimer(true);\n delete this.timeUpdateTimer;\n }\n\n private updateTimer(precise?: boolean): void {\n this.arrangeDialog((this.element.parentNode as HTMLElement));\n if (!this.timeUpdateTimer || !this.time) {\n return;\n }\n const elapsed = (Date.now() - this.startTime) / 1000;\n this.time.textContent = i18nString(UIStrings.ssec, {PH1: elapsed.toFixed(precise ? 1 : 0)});\n }\n\n private arrangeDialog(parent: Element): void {\n const isSmallDialog = parent.clientWidth < 325;\n this.element.classList.toggle('small-dialog', isSmallDialog);\n this.contentElement.classList.toggle('small-dialog', isSmallDialog);\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([timelineStatusDialogStyles]);\n }\n}\n\nlet loadTimelineHandlerInstance: LoadTimelineHandler;\n\nexport class LoadTimelineHandler implements Common.QueryParamHandler.QueryParamHandler {\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): LoadTimelineHandler {\n const {forceNew} = opts;\n if (!loadTimelineHandlerInstance || forceNew) {\n loadTimelineHandlerInstance = new LoadTimelineHandler();\n }\n\n return loadTimelineHandlerInstance;\n }\n\n handleQueryParam(value: string): void {\n void UI.ViewManager.ViewManager.instance().showView('timeline').then(async () => {\n await TimelinePanel.instance().loadFromURL(window.decodeURIComponent(value) as Platform.DevToolsPath.UrlString);\n });\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = context.flavor(TimelinePanel);\n if (panel === null) {\n return false;\n }\n switch (actionId) {\n case 'timeline.toggle-recording':\n void panel.toggleRecording();\n return true;\n case 'timeline.record-reload':\n panel.recordReload();\n return true;\n case 'timeline.save-to-file':\n void panel.saveToFile();\n return true;\n case 'timeline.load-from-file':\n panel.selectFileToLoad();\n return true;\n case 'timeline.jump-to-previous-frame':\n panel.jumpToFrame(-1);\n return true;\n case 'timeline.jump-to-next-frame':\n panel.jumpToFrame(1);\n return true;\n case 'timeline.show-history':\n void panel.showHistory();\n return true;\n case 'timeline.previous-recording':\n panel.navigateHistory(1);\n return true;\n case 'timeline.next-recording':\n panel.navigateHistory(-1);\n return true;\n }\n return false;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineTreeView.js b/public/panels/timeline/TimelineTreeView.js index ee9b6a5a6..00a638175 100644 --- a/public/panels/timeline/TimelineTreeView.js +++ b/public/panels/timeline/TimelineTreeView.js @@ -10,6 +10,7 @@ import * as TraceEngine from '../../models/trace/trace.js'; import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js'; import * as Components from '../../ui/legacy/components/utils/utils.js'; import * as UI from '../../ui/legacy/legacy.js'; +import { ActiveFilters } from './ActiveFilters.js'; import { TimelineRegExp } from './TimelineFilters.js'; import { TimelineUIUtils } from './TimelineUIUtils.js'; const UIStrings = { @@ -263,10 +264,10 @@ export class TimelineTreeView extends UI.Widget.VBox { this.refreshTree(); } filters() { - return [this.taskFilter, this.textFilterInternal, ...(this.modelInternal ? this.modelInternal.filters() : [])]; + return [this.taskFilter, this.textFilterInternal, ...(ActiveFilters.instance().activeFilters())]; } filtersWithoutTextFilter() { - return [this.taskFilter, ...(this.modelInternal ? this.modelInternal.filters() : [])]; + return [this.taskFilter, ...(ActiveFilters.instance().activeFilters())]; } textFilter() { return this.textFilterInternal; diff --git a/public/panels/timeline/TimelineTreeView.js.map b/public/panels/timeline/TimelineTreeView.js.map index c6028c235..419fa7b49 100644 --- a/public/panels/timeline/TimelineTreeView.js.map +++ b/public/panels/timeline/TimelineTreeView.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineTreeView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineTreeView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGhD,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAErD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,WAAW,EAAE,aAAa;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gBAAgB,CAAC,CAAC;IAC3E,CAAC;CACF;AAED,WAAiB,iBAAiB;IAChC,wDAAwD;IACxD,+CAA+C;IAC/C,IAAY,MAEX;IAFD,WAAY,MAAM;QAChB,+CAAqC,CAAA;IACvC,CAAC,EAFW,MAAM,GAAN,wBAAM,KAAN,wBAAM,QAEjB;AAKH,CAAC,EAVgB,iBAAiB,KAAjB,iBAAiB,QAUjC","sourcesContent":["// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {TimelineRegExp} from './TimelineFilters.js';\nimport {type TimelineSelection} from './TimelineSelection.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text for the performance of something\n */\n performance: 'Performance',\n /**\n *@description Text to filter result items\n */\n filter: 'Filter',\n /**\n *@description Time of a single activity, as opposed to the total time\n */\n selfTime: 'Self Time',\n /**\n *@description Text for the total time of something\n */\n totalTime: 'Total Time',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n activity: 'Activity',\n /**\n *@description Text of a DOM element in Timeline Tree View of the Performance panel\n */\n selectItemForDetails: 'Select item for details.',\n /**\n * @description This message is presented as a tooltip when developers investigate the performance\n * of a page. The tooltip alerts developers that some parts of code in execution were not optimized\n * (made to run faster) and that associated timing information must be considered with this in\n * mind. The placeholder text is the reason the code was not optimized.\n * @example {Optimized too many times} PH1\n */\n notOptimizedS: 'Not optimized: {PH1}',\n /**\n *@description Time in miliseconds\n *@example {30.1} PH1\n */\n fms: '{PH1} ms',\n /**\n *@description Number followed by percent sign\n *@example {20} PH1\n */\n percentPlaceholder: '{PH1} %',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n chromeExtensionsOverhead: '[`Chrome` extensions overhead]',\n /**\n * @description Text in Timeline Tree View of the Performance panel. The text is presented\n * when developers investigate the performance of a page. 'V8 Runtime' labels the time\n * spent in (i.e. runtime) the V8 JavaScript engine.\n */\n vRuntime: '[`V8` Runtime]',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n unattributed: '[unattributed]',\n /**\n *@description Text that refers to one or a group of webpages\n */\n page: 'Page',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n noGrouping: 'No Grouping',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByActivity: 'Group by Activity',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByCategory: 'Group by Category',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByDomain: 'Group by Domain',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByFrame: 'Group by Frame',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupBySubdomain: 'Group by Subdomain',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByUrl: 'Group by URL',\n /**\n *@description Aria-label for grouping combo box in Timeline Details View\n */\n groupBy: 'Group by',\n /**\n *@description Aria-label for filter bar in Call Tree view\n */\n filterCallTree: 'Filter call tree',\n /**\n *@description Aria-label for the filter bar in Bottom-Up view\n */\n filterBottomup: 'Filter bottom-up',\n /**\n * @description Title of the sidebar pane in the Performance panel which shows the stack (call\n * stack) where the program spent the most time (out of all the call stacks) while executing.\n */\n heaviestStack: 'Heaviest stack',\n /**\n * @description Tooltip for the the Heaviest stack sidebar toggle in the Timeline Tree View of the\n * Performance panel. Command to open/show the sidebar.\n */\n showHeaviestStack: 'Show Heaviest stack',\n /**\n * @description Tooltip for the the Heaviest stack sidebar toggle in the Timeline Tree View of the\n * Performance panel. Command to close/hide the sidebar.\n */\n hideHeaviestStack: 'Hide Heaviest stack',\n /**\n * @description Screen reader announcement when the heaviest stack sidebar is shown in the Performance panel.\n */\n heaviestStackShown: 'Heaviest stack sidebar shown',\n /**\n * @description Screen reader announcement when the heaviest stack sidebar is hidden in the Performance panel.\n */\n heaviestStackHidden: 'Heaviest stack sidebar hidden',\n /**\n *@description Data grid name for Timeline Stack data grids\n */\n timelineStack: 'Timeline Stack',\n /**\n /*@description Text to search by matching case of the input button\n */\n matchCase: 'Match Case',\n /**\n *@description Text for searching with regular expression button\n */\n useRegularExpression: 'Use Regular Expression',\n /**\n * @description Text for Match whole word button\n */\n matchWholeWord: 'Match whole word',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineTreeView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class TimelineTreeView extends UI.Widget.VBox implements UI.SearchableView.Searchable {\n modelInternal: PerformanceModel|null;\n #selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[]|null;\n private searchResults: TimelineModel.TimelineProfileTree.Node[];\n linkifier!: Components.Linkifier.Linkifier;\n dataGrid!: DataGrid.SortableDataGrid.SortableDataGrid;\n private lastHoveredProfileNode!: TimelineModel.TimelineProfileTree.Node|null;\n private textFilterInternal!: TimelineRegExp;\n private taskFilter!: TimelineModel.TimelineModelFilter.ExclusiveNameFilter;\n protected startTime!: number;\n protected endTime!: number;\n splitWidget!: UI.SplitWidget.SplitWidget;\n detailsView!: UI.Widget.Widget;\n private searchableView!: UI.SearchableView.SearchableView;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private currentThreadSetting?: Common.Settings.Setting;\n private lastSelectedNodeInternal?: TimelineModel.TimelineProfileTree.Node|null;\n private root?: TimelineModel.TimelineProfileTree.Node;\n private currentResult?: number;\n textFilterUI?: UI.Toolbar.ToolbarInput;\n private caseSensitiveButton: UI.Toolbar.ToolbarToggle|undefined;\n private regexButton: UI.Toolbar.ToolbarToggle|undefined;\n private matchWholeWord: UI.Toolbar.ToolbarToggle|undefined;\n\n #traceParseData: TraceEngine.Handlers.Types.TraceParseData|null = null;\n\n constructor() {\n super();\n this.modelInternal = null;\n this.#selectedEvents = null;\n this.element.classList.add('timeline-tree-view');\n\n this.searchResults = [];\n }\n\n static eventNameForSorting(event: TraceEngine.Legacy.Event): string {\n return event.name + ':@' + TimelineModel.TimelineProfileTree.eventURL(event);\n }\n\n setSearchableView(searchableView: UI.SearchableView.SearchableView): void {\n this.searchableView = searchableView;\n }\n\n setModelWithEvents(\n model: PerformanceModel|null,\n selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[]|null,\n traceParseData: TraceEngine.Handlers.Types.TraceParseData|null = null,\n ): void {\n this.modelInternal = model;\n this.#traceParseData = traceParseData;\n this.#selectedEvents = selectedEvents;\n }\n\n /**\n * This method is included only for preventing layout test failures.\n * TODO(crbug.com/1433692): Port problematic layout tests to unit\n * tests.\n */\n setModel(\n model: PerformanceModel|null,\n track: TimelineModel.TimelineModel.Track|null,\n ): void {\n this.setModelWithEvents(model, track?.eventsForTreeView() || null);\n }\n\n getToolbarInputAccessiblePlaceHolder(): string {\n return '';\n }\n\n model(): PerformanceModel|null {\n return this.modelInternal;\n }\n\n traceParseData(): TraceEngine.Handlers.Types.TraceParseData|null {\n return this.#traceParseData;\n }\n\n init(): void {\n this.linkifier = new Components.Linkifier.Linkifier();\n\n this.taskFilter =\n new TimelineModel.TimelineModelFilter.ExclusiveNameFilter([TimelineModel.TimelineModel.RecordType.Task]);\n this.textFilterInternal = new TimelineRegExp();\n\n this.currentThreadSetting = Common.Settings.Settings.instance().createSetting('timelineTreeCurrentThread', 0);\n this.currentThreadSetting.addChangeListener(this.refreshTree, this);\n\n const columns = ([] as DataGrid.DataGrid.ColumnDescriptor[]);\n this.populateColumns(columns);\n\n this.splitWidget = new UI.SplitWidget.SplitWidget(true, true, 'timelineTreeViewDetailsSplitWidget');\n const mainView = new UI.Widget.VBox();\n const toolbar = new UI.Toolbar.Toolbar('', mainView.element);\n toolbar.makeWrappable(true);\n this.populateToolbar(toolbar);\n\n this.dataGrid = new DataGrid.SortableDataGrid.SortableDataGrid({\n displayName: i18nString(UIStrings.performance),\n columns,\n refreshCallback: undefined,\n editCallback: undefined,\n deleteCallback: undefined,\n });\n this.dataGrid.addEventListener(DataGrid.DataGrid.Events.SortingChanged, this.sortingChanged, this);\n this.dataGrid.element.addEventListener('mousemove', this.onMouseMove.bind(this), true);\n this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.Last);\n this.dataGrid.setRowContextMenuCallback(this.onContextMenu.bind(this));\n this.dataGrid.asWidget().show(mainView.element);\n this.dataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.updateDetailsForSelection, this);\n\n this.detailsView = new UI.Widget.VBox();\n this.detailsView.element.classList.add('timeline-details-view', 'timeline-details-view-body');\n this.splitWidget.setMainWidget(mainView);\n this.splitWidget.setSidebarWidget(this.detailsView);\n this.splitWidget.hideSidebar();\n this.splitWidget.show(this.element);\n this.splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, this.onShowModeChanged, this);\n\n this.lastSelectedNodeInternal;\n }\n\n lastSelectedNode(): TimelineModel.TimelineProfileTree.Node|null|undefined {\n return this.lastSelectedNodeInternal;\n }\n\n updateContents(selection: TimelineSelection): void {\n this.setRange(selection.startTime, selection.endTime);\n }\n\n setRange(startTime: number, endTime: number): void {\n this.startTime = startTime;\n this.endTime = endTime;\n this.refreshTree();\n }\n\n filters(): TimelineModel.TimelineModelFilter.TimelineModelFilter[] {\n return [this.taskFilter, this.textFilterInternal, ...(this.modelInternal ? this.modelInternal.filters() : [])];\n }\n\n filtersWithoutTextFilter(): TimelineModel.TimelineModelFilter.TimelineModelFilter[] {\n return [this.taskFilter, ...(this.modelInternal ? this.modelInternal.filters() : [])];\n }\n\n textFilter(): TimelineRegExp {\n return this.textFilterInternal;\n }\n\n exposePercentages(): boolean {\n return false;\n }\n\n populateToolbar(toolbar: UI.Toolbar.Toolbar): void {\n this.caseSensitiveButton = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.matchCase));\n this.caseSensitiveButton.setText('Aa');\n this.caseSensitiveButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.#toggleFilterButton(this.caseSensitiveButton);\n }, this);\n toolbar.appendToolbarItem(this.caseSensitiveButton);\n\n this.regexButton = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.useRegularExpression));\n this.regexButton.setText('.*');\n this.regexButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.#toggleFilterButton(this.regexButton);\n }, this);\n toolbar.appendToolbarItem(this.regexButton);\n\n this.matchWholeWord = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.matchWholeWord), 'match-whole-word');\n this.matchWholeWord.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.#toggleFilterButton(this.matchWholeWord);\n }, this);\n toolbar.appendToolbarItem(this.matchWholeWord);\n\n const textFilterUI =\n new UI.Toolbar.ToolbarInput(i18nString(UIStrings.filter), this.getToolbarInputAccessiblePlaceHolder());\n this.textFilterUI = textFilterUI;\n textFilterUI.addEventListener(UI.Toolbar.ToolbarInput.Event.TextChanged, this.#filterChanged, this);\n toolbar.appendToolbarItem(textFilterUI);\n }\n\n modelEvents(): TraceEngine.Legacy.CompatibleTraceEvent[] {\n return this.#selectedEvents || [];\n }\n\n onHover(_node: TimelineModel.TimelineProfileTree.Node|null): void {\n }\n\n appendContextMenuItems(_contextMenu: UI.ContextMenu.ContextMenu, _node: TimelineModel.TimelineProfileTree.Node):\n void {\n }\n\n selectProfileNode(treeNode: TimelineModel.TimelineProfileTree.Node, suppressSelectedEvent: boolean): void {\n const pathToRoot = [];\n let node: (TimelineModel.TimelineProfileTree.Node|null)|TimelineModel.TimelineProfileTree.Node = treeNode;\n for (; node; node = node.parent) {\n pathToRoot.push(node);\n }\n for (let i = pathToRoot.length - 1; i > 0; --i) {\n const gridNode = this.dataGridNodeForTreeNode(pathToRoot[i]);\n if (gridNode && gridNode.dataGrid) {\n gridNode.expand();\n }\n }\n const gridNode = this.dataGridNodeForTreeNode(treeNode);\n if (gridNode && gridNode.dataGrid) {\n gridNode.reveal();\n gridNode.select(suppressSelectedEvent);\n }\n }\n\n refreshTree(): void {\n this.linkifier.reset();\n this.dataGrid.rootNode().removeChildren();\n if (!this.modelInternal) {\n this.updateDetailsForSelection();\n return;\n }\n this.root = this.buildTree();\n const children = this.root.children();\n let maxSelfTime = 0;\n let maxTotalTime = 0;\n const totalUsedTime = this.root.totalTime - this.root.selfTime;\n for (const child of children.values()) {\n maxSelfTime = Math.max(maxSelfTime, child.selfTime);\n maxTotalTime = Math.max(maxTotalTime, child.totalTime);\n }\n for (const child of children.values()) {\n // Exclude the idle time off the total calculation.\n const gridNode = new TreeGridNode(child, totalUsedTime, maxSelfTime, maxTotalTime, this);\n this.dataGrid.insertChild(gridNode);\n }\n this.sortingChanged();\n this.updateDetailsForSelection();\n if (this.searchableView) {\n this.searchableView.refreshSearch();\n }\n const rootNode = this.dataGrid.rootNode();\n if (rootNode.children.length > 0) {\n rootNode.children[0].select(/* supressSelectedEvent */ true);\n }\n }\n\n buildTree(): TimelineModel.TimelineProfileTree.Node {\n throw new Error('Not Implemented');\n }\n\n buildTopDownTree(\n doNotAggregate: boolean, groupIdCallback: ((arg0: TraceEngine.Legacy.CompatibleTraceEvent) => string)|null):\n TimelineModel.TimelineProfileTree.Node {\n return new TimelineModel.TimelineProfileTree.TopDownRootNode(\n this.modelEvents(), this.filters(), this.startTime, this.endTime, doNotAggregate, groupIdCallback);\n }\n\n populateColumns(columns: DataGrid.DataGrid.ColumnDescriptor[]): void {\n columns.push(\n ({id: 'self', title: i18nString(UIStrings.selfTime), width: '120px', fixedWidth: true, sortable: true} as\n DataGrid.DataGrid.ColumnDescriptor));\n columns.push(\n ({id: 'total', title: i18nString(UIStrings.totalTime), width: '120px', fixedWidth: true, sortable: true} as\n DataGrid.DataGrid.ColumnDescriptor));\n columns.push(\n ({id: 'activity', title: i18nString(UIStrings.activity), disclosure: true, sortable: true} as\n DataGrid.DataGrid.ColumnDescriptor));\n }\n\n private sortingChanged(): void {\n const columnId = this.dataGrid.sortColumnId();\n if (!columnId) {\n return;\n }\n let sortFunction;\n switch (columnId) {\n case 'startTime':\n sortFunction = compareStartTime;\n break;\n case 'self':\n sortFunction = compareNumericField.bind(null, 'selfTime');\n break;\n case 'total':\n sortFunction = compareNumericField.bind(null, 'totalTime');\n break;\n case 'activity':\n sortFunction = compareName;\n break;\n default:\n console.assert(false, 'Unknown sort field: ' + columnId);\n return;\n }\n this.dataGrid.sortNodes(sortFunction, !this.dataGrid.isSortOrderAscending());\n\n function compareNumericField(\n field: string, a: DataGrid.SortableDataGrid.SortableDataGridNode,\n b: DataGrid.SortableDataGrid.SortableDataGridNode): number {\n const nodeA = (a as TreeGridNode);\n const nodeB = (b as TreeGridNode);\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (nodeA.profileNode as any)[field] - (nodeB.profileNode as any)[field];\n }\n\n function compareStartTime(\n a: DataGrid.SortableDataGrid.SortableDataGridNode,\n b: DataGrid.SortableDataGrid.SortableDataGridNode): number {\n const nodeA = (a as TreeGridNode);\n const nodeB = (b as TreeGridNode);\n const eventA = (nodeA.profileNode.event as TraceEngine.Legacy.Event);\n const eventB = (nodeB.profileNode.event as TraceEngine.Legacy.Event);\n return eventA.startTime - eventB.startTime;\n }\n\n function compareName(\n a: DataGrid.SortableDataGrid.SortableDataGridNode,\n b: DataGrid.SortableDataGrid.SortableDataGridNode): number {\n const nodeA = (a as TreeGridNode);\n const nodeB = (b as TreeGridNode);\n const eventA = (nodeA.profileNode.event as TraceEngine.Legacy.Event);\n const eventB = (nodeB.profileNode.event as TraceEngine.Legacy.Event);\n const nameA = TimelineTreeView.eventNameForSorting(eventA);\n const nameB = TimelineTreeView.eventNameForSorting(eventB);\n return nameA.localeCompare(nameB);\n }\n }\n\n #filterChanged(): void {\n const searchQuery = this.textFilterUI && this.textFilterUI.value();\n const caseSensitive = this.caseSensitiveButton !== undefined && this.caseSensitiveButton.toggled();\n const isRegex = this.regexButton !== undefined && this.regexButton.toggled();\n const matchWholeWord = this.matchWholeWord !== undefined && this.matchWholeWord.toggled();\n\n this.textFilterInternal.setRegExp(\n searchQuery ? Platform.StringUtilities.createSearchRegex(searchQuery, caseSensitive, isRegex, matchWholeWord) :\n null);\n this.refreshTree();\n }\n\n #toggleFilterButton(toggleButton: UI.Toolbar.ToolbarToggle|undefined): void {\n if (toggleButton) {\n toggleButton.setToggled(!toggleButton.toggled());\n }\n\n this.#filterChanged();\n }\n\n private onShowModeChanged(): void {\n if (this.splitWidget.showMode() === UI.SplitWidget.ShowMode.OnlyMain) {\n return;\n }\n this.lastSelectedNodeInternal = undefined;\n this.updateDetailsForSelection();\n }\n\n private updateDetailsForSelection(): void {\n const selectedNode = this.dataGrid.selectedNode ? (this.dataGrid.selectedNode as TreeGridNode).profileNode : null;\n if (selectedNode === this.lastSelectedNodeInternal) {\n return;\n }\n this.lastSelectedNodeInternal = selectedNode;\n if (this.splitWidget.showMode() === UI.SplitWidget.ShowMode.OnlyMain) {\n return;\n }\n this.detailsView.detachChildWidgets();\n this.detailsView.element.removeChildren();\n if (selectedNode && this.showDetailsForNode(selectedNode)) {\n return;\n }\n const banner = this.detailsView.element.createChild('div', 'full-widget-dimmed-banner');\n UI.UIUtils.createTextChild(banner, i18nString(UIStrings.selectItemForDetails));\n }\n\n showDetailsForNode(_node: TimelineModel.TimelineProfileTree.Node): boolean {\n return false;\n }\n\n private onMouseMove(event: Event): void {\n const gridNode = event.target && (event.target instanceof Node) ?\n (this.dataGrid.dataGridNodeFromNode((event.target as Node))) :\n null;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n const profileNode = gridNode && gridNode._profileNode;\n if (profileNode === this.lastHoveredProfileNode) {\n return;\n }\n this.lastHoveredProfileNode = profileNode;\n this.onHover(profileNode);\n }\n\n private onContextMenu(\n contextMenu: UI.ContextMenu.ContextMenu, eventGridNode: DataGrid.DataGrid.DataGridNode): void {\n const gridNode = (eventGridNode as GridNode);\n if (gridNode.linkElement && !contextMenu.containsTarget(gridNode.linkElement)) {\n contextMenu.appendApplicableItems(gridNode.linkElement);\n }\n const profileNode = gridNode.profileNode;\n if (profileNode) {\n this.appendContextMenuItems(contextMenu, profileNode);\n }\n }\n\n dataGridNodeForTreeNode(treeNode: TimelineModel.TimelineProfileTree.Node): GridNode|null {\n return profileNodeToTreeGridNode.get(treeNode) || null;\n }\n\n // UI.SearchableView.Searchable implementation\n\n onSearchCanceled(): void {\n this.searchResults = [];\n this.currentResult = 0;\n }\n\n performSearch(searchConfig: UI.SearchableView.SearchConfig, _shouldJump: boolean, _jumpBackwards?: boolean): void {\n this.searchResults = [];\n this.currentResult = 0;\n if (!this.root) {\n return;\n }\n const searchRegex = searchConfig.toSearchRegex();\n this.searchResults = this.root.searchTree(\n event => TimelineUIUtils.testContentMatching(event, searchRegex.regex, this.#traceParseData || undefined));\n this.searchableView.updateSearchMatchesCount(this.searchResults.length);\n }\n\n jumpToNextSearchResult(): void {\n if (!this.searchResults.length || this.currentResult === undefined) {\n return;\n }\n this.selectProfileNode(this.searchResults[this.currentResult], false);\n this.currentResult = Platform.NumberUtilities.mod(this.currentResult + 1, this.searchResults.length);\n }\n\n jumpToPreviousSearchResult(): void {\n if (!this.searchResults.length || this.currentResult === undefined) {\n return;\n }\n this.selectProfileNode(this.searchResults[this.currentResult], false);\n this.currentResult = Platform.NumberUtilities.mod(this.currentResult - 1, this.searchResults.length);\n }\n\n supportsCaseSensitiveSearch(): boolean {\n return true;\n }\n\n supportsRegexSearch(): boolean {\n return true;\n }\n}\n\nexport class GridNode extends DataGrid.SortableDataGrid.SortableDataGridNode {\n protected populated: boolean;\n profileNode: TimelineModel.TimelineProfileTree.Node;\n protected treeView: TimelineTreeView;\n protected grandTotalTime: number;\n protected maxSelfTime: number;\n protected maxTotalTime: number;\n linkElement: Element|null;\n\n constructor(\n profileNode: TimelineModel.TimelineProfileTree.Node, grandTotalTime: number, maxSelfTime: number,\n maxTotalTime: number, treeView: TimelineTreeView) {\n super(null, false);\n this.populated = false;\n this.profileNode = profileNode;\n this.treeView = treeView;\n this.grandTotalTime = grandTotalTime;\n this.maxSelfTime = maxSelfTime;\n this.maxTotalTime = maxTotalTime;\n this.linkElement = null;\n }\n\n override createCell(columnId: string): HTMLElement {\n if (columnId === 'activity') {\n return this.createNameCell(columnId);\n }\n return this.createValueCell(columnId) || super.createCell(columnId);\n }\n\n private createNameCell(columnId: string): HTMLElement {\n const cell = this.createTD(columnId);\n const container = cell.createChild('div', 'name-container');\n const iconContainer = container.createChild('div', 'activity-icon-container');\n const icon = iconContainer.createChild('div', 'activity-icon');\n const name = container.createChild('div', 'activity-name');\n const event = this.profileNode.event;\n if (this.profileNode.isGroupNode()) {\n const treeView = (this.treeView as AggregatedTimelineTreeView);\n const info = treeView.displayInfoForGroupNode(this.profileNode);\n name.textContent = info.name;\n icon.style.backgroundColor = info.color;\n if (info.icon) {\n iconContainer.insertBefore(info.icon, icon);\n }\n } else if (event) {\n const data = event.args['data'];\n const deoptReason = data && data['deoptReason'];\n if (deoptReason) {\n container.createChild('div', 'activity-warning').title =\n i18nString(UIStrings.notOptimizedS, {PH1: deoptReason});\n }\n\n name.textContent = TimelineUIUtils.eventTitle(event);\n const target = this.treeView.modelInternal?.timelineModel().targetByEvent(event) || null;\n const linkifier = this.treeView.linkifier;\n const isFreshRecording = Boolean(this.treeView.modelInternal?.timelineModel().isFreshRecording());\n this.linkElement = TraceEngine.Legacy.eventIsFromNewEngine(event) ?\n TimelineUIUtils.linkifyTopCallFrame(event, target, linkifier, isFreshRecording) :\n null;\n if (this.linkElement) {\n container.createChild('div', 'activity-link').appendChild(this.linkElement);\n }\n const eventStyle = TimelineUIUtils.eventStyle(event);\n const eventCategory = eventStyle.category;\n UI.ARIAUtils.setLabel(icon, eventCategory.title);\n icon.style.backgroundColor = eventCategory.getComputedColorValue();\n }\n return cell;\n }\n\n private createValueCell(columnId: string): HTMLElement|null {\n if (columnId !== 'self' && columnId !== 'total' && columnId !== 'startTime') {\n return null;\n }\n\n let showPercents = false;\n let value: number;\n let maxTime: number|undefined;\n let event: TraceEngine.Legacy.CompatibleTraceEvent|null;\n switch (columnId) {\n case 'startTime': {\n event = this.profileNode.event;\n const traceParseData = this.treeView.traceParseData();\n if (!traceParseData) {\n throw new Error('Unable to load trace data for tree view');\n }\n const timings = event && TraceEngine.Legacy.timesForEventInMilliseconds(event);\n const startTime = timings?.startTime ?? 0;\n value = startTime - TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceParseData.Meta.traceBounds.min);\n } break;\n case 'self':\n value = this.profileNode.selfTime;\n maxTime = this.maxSelfTime;\n showPercents = true;\n break;\n case 'total':\n value = this.profileNode.totalTime;\n maxTime = this.maxTotalTime;\n showPercents = true;\n break;\n default:\n return null;\n }\n const cell = this.createTD(columnId);\n cell.className = 'numeric-column';\n cell.setAttribute('title', i18nString(UIStrings.fms, {PH1: value.toFixed(4)}));\n const textDiv = cell.createChild('div');\n textDiv.createChild('span').textContent = i18nString(UIStrings.fms, {PH1: value.toFixed(1)});\n\n if (showPercents && this.treeView.exposePercentages()) {\n textDiv.createChild('span', 'percent-column').textContent =\n i18nString(UIStrings.percentPlaceholder, {PH1: (value / this.grandTotalTime * 100).toFixed(1)});\n }\n if (maxTime) {\n textDiv.classList.add('background-percent-bar');\n cell.createChild('div', 'background-bar-container').createChild('div', 'background-bar').style.width =\n (value * 100 / maxTime).toFixed(1) + '%';\n }\n return cell;\n }\n}\n\nexport class TreeGridNode extends GridNode {\n constructor(\n profileNode: TimelineModel.TimelineProfileTree.Node, grandTotalTime: number, maxSelfTime: number,\n maxTotalTime: number, treeView: TimelineTreeView) {\n super(profileNode, grandTotalTime, maxSelfTime, maxTotalTime, treeView);\n this.setHasChildren(this.profileNode.hasChildren());\n profileNodeToTreeGridNode.set(profileNode, this);\n }\n\n override populate(): void {\n if (this.populated) {\n return;\n }\n this.populated = true;\n if (!this.profileNode.children) {\n return;\n }\n for (const node of this.profileNode.children().values()) {\n const gridNode = new TreeGridNode(node, this.grandTotalTime, this.maxSelfTime, this.maxTotalTime, this.treeView);\n this.insertChildOrdered(gridNode);\n }\n }\n}\n\nconst profileNodeToTreeGridNode = new WeakMap();\n\nexport class AggregatedTimelineTreeView extends TimelineTreeView {\n protected readonly groupBySetting: Common.Settings.Setting;\n private readonly stackView: TimelineStackView;\n private executionContextNamesByOrigin = new Map();\n\n constructor() {\n super();\n this.groupBySetting = Common.Settings.Settings.instance().createSetting(\n 'timelineTreeGroupBy', AggregatedTimelineTreeView.GroupBy.None);\n this.groupBySetting.addChangeListener(this.refreshTree.bind(this));\n this.init();\n this.stackView = new TimelineStackView(this);\n this.stackView.addEventListener(TimelineStackView.Events.SelectionChanged, this.onStackViewSelectionChanged, this);\n }\n\n setGroupBySettingForTests(groupBy: AggregatedTimelineTreeView.GroupBy): void {\n this.groupBySetting.set(groupBy);\n }\n override setModelWithEvents(\n model: PerformanceModel|null,\n selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[]|null,\n traceParseData: TraceEngine.Handlers.Types.TraceParseData|null = null,\n ): void {\n super.setModelWithEvents(model, selectedEvents, traceParseData);\n }\n\n /**\n * This method is included only for preventing layout test failures.\n * TODO(crbug.com/1433692): Port problematic layout tests to unit\n * tests.\n */\n override setModel(\n model: PerformanceModel|null,\n track: TimelineModel.TimelineModel.Track|null,\n ): void {\n super.setModel(model, track);\n }\n\n override updateContents(selection: TimelineSelection): void {\n this.updateExtensionResolver();\n super.updateContents(selection);\n const rootNode = this.dataGrid.rootNode();\n if (rootNode.children.length) {\n rootNode.children[0].select(/* suppressSelectedEvent */ true);\n }\n }\n\n private updateExtensionResolver(): void {\n this.executionContextNamesByOrigin = new Map();\n for (const runtimeModel of SDK.TargetManager.TargetManager.instance().models(SDK.RuntimeModel.RuntimeModel)) {\n for (const context of runtimeModel.executionContexts()) {\n this.executionContextNamesByOrigin.set(context.origin, context.name);\n }\n }\n }\n\n private beautifyDomainName(this: AggregatedTimelineTreeView, name: string): string {\n if (AggregatedTimelineTreeView.isExtensionInternalURL(name as Platform.DevToolsPath.UrlString)) {\n name = i18nString(UIStrings.chromeExtensionsOverhead);\n } else if (AggregatedTimelineTreeView.isV8NativeURL(name as Platform.DevToolsPath.UrlString)) {\n name = i18nString(UIStrings.vRuntime);\n } else if (name.startsWith('chrome-extension')) {\n name = this.executionContextNamesByOrigin.get(name as Platform.DevToolsPath.UrlString) || name;\n }\n return name;\n }\n\n displayInfoForGroupNode(node: TimelineModel.TimelineProfileTree.Node): {\n name: string,\n color: string,\n icon: (Element|undefined),\n } {\n const categories = TimelineUIUtils.categories();\n const color = node.id && node.event ? TimelineUIUtils.eventColor(node.event) : categories['other'].color;\n const unattributed = i18nString(UIStrings.unattributed);\n\n const id = typeof node.id === 'symbol' ? undefined : node.id;\n\n switch (this.groupBySetting.get()) {\n case AggregatedTimelineTreeView.GroupBy.Category: {\n const category = id ? categories[id] || categories['other'] : {title: unattributed, color: unattributed};\n return {name: category.title, color: category.color, icon: undefined};\n }\n\n case AggregatedTimelineTreeView.GroupBy.Domain:\n case AggregatedTimelineTreeView.GroupBy.Subdomain: {\n const domainName = id ? this.beautifyDomainName(id) : undefined;\n return {name: domainName || unattributed, color: color, icon: undefined};\n }\n\n case AggregatedTimelineTreeView.GroupBy.EventName: {\n if (!node.event) {\n throw new Error('Unable to find event for group by operation');\n }\n const name = TimelineUIUtils.eventTitle(node.event);\n return {\n name: name,\n color,\n icon: undefined,\n };\n }\n\n case AggregatedTimelineTreeView.GroupBy.URL:\n break;\n\n case AggregatedTimelineTreeView.GroupBy.Frame: {\n if (!this.modelInternal) {\n throw new Error('Unable to find model for group by frame operation');\n }\n const frame = id ? this.modelInternal.timelineModel().pageFrameById(id as Protocol.Page.FrameId) : undefined;\n const frameName = frame ? TimelineUIUtils.displayNameForFrame(frame, 80) : i18nString(UIStrings.page);\n return {name: frameName, color: color, icon: undefined};\n }\n\n default:\n console.assert(false, 'Unexpected grouping type');\n }\n return {name: id || unattributed, color: color, icon: undefined};\n }\n\n override populateToolbar(toolbar: UI.Toolbar.Toolbar): void {\n super.populateToolbar(toolbar);\n const groupBy = AggregatedTimelineTreeView.GroupBy;\n const options = [\n {label: i18nString(UIStrings.noGrouping), value: groupBy.None},\n {label: i18nString(UIStrings.groupByActivity), value: groupBy.EventName},\n {label: i18nString(UIStrings.groupByCategory), value: groupBy.Category},\n {label: i18nString(UIStrings.groupByDomain), value: groupBy.Domain},\n {label: i18nString(UIStrings.groupByFrame), value: groupBy.Frame},\n {label: i18nString(UIStrings.groupBySubdomain), value: groupBy.Subdomain},\n {label: i18nString(UIStrings.groupByUrl), value: groupBy.URL},\n ];\n toolbar.appendToolbarItem(\n new UI.Toolbar.ToolbarSettingComboBox(options, this.groupBySetting, i18nString(UIStrings.groupBy)));\n toolbar.appendSpacer();\n toolbar.appendToolbarItem(this.splitWidget.createShowHideSidebarButton(\n i18nString(UIStrings.showHeaviestStack), i18nString(UIStrings.hideHeaviestStack),\n i18nString(UIStrings.heaviestStackShown), i18nString(UIStrings.heaviestStackHidden)));\n }\n\n private buildHeaviestStack(treeNode: TimelineModel.TimelineProfileTree.Node):\n TimelineModel.TimelineProfileTree.Node[] {\n console.assert(Boolean(treeNode.parent), 'Attempt to build stack for tree root');\n let result: TimelineModel.TimelineProfileTree.Node[] = [];\n // Do not add root to the stack, as it's the tree itself.\n for (let node: TimelineModel.TimelineProfileTree.Node = treeNode; node && node.parent; node = node.parent) {\n result.push(node);\n }\n result = result.reverse();\n for (let node: TimelineModel.TimelineProfileTree.Node = treeNode;\n node && node.children() && node.children().size;) {\n const children = Array.from(node.children().values());\n node = children.reduce((a, b) => a.totalTime > b.totalTime ? a : b);\n result.push(node);\n }\n return result;\n }\n\n override exposePercentages(): boolean {\n return true;\n }\n\n private onStackViewSelectionChanged(): void {\n const treeNode = this.stackView.selectedTreeNode();\n if (treeNode) {\n this.selectProfileNode(treeNode, true);\n }\n }\n\n override showDetailsForNode(node: TimelineModel.TimelineProfileTree.Node): boolean {\n const stack = this.buildHeaviestStack(node);\n this.stackView.setStack(stack, node);\n this.stackView.show(this.detailsView.element);\n return true;\n }\n\n protected groupingFunction(groupBy: string): ((arg0: TraceEngine.Legacy.CompatibleTraceEvent) => string)|null {\n const GroupBy = AggregatedTimelineTreeView.GroupBy;\n switch (groupBy) {\n case GroupBy.None:\n return null;\n case GroupBy.EventName:\n return (event: TraceEngine.Legacy.CompatibleTraceEvent): string => TimelineUIUtils.eventStyle(event).title;\n case GroupBy.Category:\n return (event: TraceEngine.Legacy.CompatibleTraceEvent): string =>\n TimelineUIUtils.eventStyle(event).category.name;\n case GroupBy.Subdomain:\n return this.domainByEvent.bind(this, false);\n case GroupBy.Domain:\n return this.domainByEvent.bind(this, true);\n case GroupBy.URL:\n return (event: TraceEngine.Legacy.CompatibleTraceEvent): string =>\n TimelineModel.TimelineProfileTree.eventURL(event) || '';\n case GroupBy.Frame:\n return (event: TraceEngine.Legacy.CompatibleTraceEvent): string =>\n TimelineModel.TimelineModel.EventOnTimelineData.forEvent(event).frameId || '';\n default:\n console.assert(false, `Unexpected aggregation setting: ${groupBy}`);\n return null;\n }\n }\n\n private domainByEvent(groupSubdomains: boolean, event: TraceEngine.Legacy.CompatibleTraceEvent): string {\n const url = TimelineModel.TimelineProfileTree.eventURL(event);\n if (!url) {\n return '';\n }\n if (AggregatedTimelineTreeView.isExtensionInternalURL(url)) {\n return AggregatedTimelineTreeView.extensionInternalPrefix;\n }\n if (AggregatedTimelineTreeView.isV8NativeURL(url)) {\n return AggregatedTimelineTreeView.v8NativePrefix;\n }\n const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);\n if (!parsedURL) {\n return '';\n }\n if (parsedURL.scheme === 'chrome-extension') {\n return parsedURL.scheme + '://' + parsedURL.host;\n }\n if (!groupSubdomains) {\n return parsedURL.host;\n }\n if (/^[.0-9]+$/.test(parsedURL.host)) {\n return parsedURL.host;\n }\n const domainMatch = /([^.]*\\.)?[^.]*$/.exec(parsedURL.host);\n return domainMatch && domainMatch[0] || '';\n }\n\n override appendContextMenuItems(\n contextMenu: UI.ContextMenu.ContextMenu, node: TimelineModel.TimelineProfileTree.Node): void {\n if (this.groupBySetting.get() !== AggregatedTimelineTreeView.GroupBy.Frame) {\n return;\n }\n if (!node.isGroupNode()) {\n return;\n }\n if (!this.modelInternal) {\n return;\n }\n const frame = this.modelInternal.timelineModel().pageFrameById((node.id as Protocol.Page.FrameId));\n if (!frame || !frame.ownerNode) {\n return;\n }\n contextMenu.appendApplicableItems(frame.ownerNode);\n }\n\n private static isExtensionInternalURL(url: Platform.DevToolsPath.UrlString): boolean {\n return url.startsWith(AggregatedTimelineTreeView.extensionInternalPrefix);\n }\n\n private static isV8NativeURL(url: Platform.DevToolsPath.UrlString): boolean {\n return url.startsWith(AggregatedTimelineTreeView.v8NativePrefix);\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private static readonly extensionInternalPrefix = 'extensions::';\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private static readonly v8NativePrefix = 'native ';\n}\nexport namespace AggregatedTimelineTreeView {\n // TODO(crbug.com/1167717): Make this a const enum again\n // eslint-disable-next-line rulesdir/const_enum\n export enum GroupBy {\n None = 'None',\n EventName = 'EventName',\n Category = 'Category',\n Domain = 'Domain',\n Subdomain = 'Subdomain',\n URL = 'URL',\n Frame = 'Frame',\n }\n}\n\nexport class CallTreeTimelineTreeView extends AggregatedTimelineTreeView {\n constructor() {\n super();\n this.dataGrid.markColumnAsSortedBy('total', DataGrid.DataGrid.Order.Descending);\n }\n\n override getToolbarInputAccessiblePlaceHolder(): string {\n return i18nString(UIStrings.filterCallTree);\n }\n\n override buildTree(): TimelineModel.TimelineProfileTree.Node {\n const grouping = this.groupBySetting.get();\n return this.buildTopDownTree(false, this.groupingFunction(grouping));\n }\n}\n\nexport class BottomUpTimelineTreeView extends AggregatedTimelineTreeView {\n constructor() {\n super();\n this.dataGrid.markColumnAsSortedBy('self', DataGrid.DataGrid.Order.Descending);\n }\n\n override getToolbarInputAccessiblePlaceHolder(): string {\n return i18nString(UIStrings.filterBottomup);\n }\n\n override buildTree(): TimelineModel.TimelineProfileTree.Node {\n return new TimelineModel.TimelineProfileTree.BottomUpRootNode(\n this.modelEvents(), this.textFilter(), this.filtersWithoutTextFilter(), this.startTime, this.endTime,\n this.groupingFunction(this.groupBySetting.get()));\n }\n}\n\nexport class TimelineStackView extends\n Common.ObjectWrapper.eventMixin(UI.Widget.VBox) {\n private readonly treeView: TimelineTreeView;\n private readonly dataGrid: DataGrid.ViewportDataGrid.ViewportDataGrid;\n\n constructor(treeView: TimelineTreeView) {\n super();\n const header = this.element.createChild('div', 'timeline-stack-view-header');\n header.textContent = i18nString(UIStrings.heaviestStack);\n this.treeView = treeView;\n const columns = ([\n {id: 'total', title: i18nString(UIStrings.totalTime), fixedWidth: true, width: '110px'},\n {id: 'activity', title: i18nString(UIStrings.activity)},\n ] as DataGrid.DataGrid.ColumnDescriptor[]);\n this.dataGrid = new DataGrid.ViewportDataGrid.ViewportDataGrid({\n displayName: i18nString(UIStrings.timelineStack),\n columns,\n deleteCallback: undefined,\n editCallback: undefined,\n refreshCallback: undefined,\n });\n this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.Last);\n this.dataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.onSelectionChanged, this);\n this.dataGrid.asWidget().show(this.element);\n }\n\n setStack(stack: TimelineModel.TimelineProfileTree.Node[], selectedNode: TimelineModel.TimelineProfileTree.Node):\n void {\n const rootNode = this.dataGrid.rootNode();\n rootNode.removeChildren();\n let nodeToReveal: GridNode|null = null;\n const totalTime = Math.max.apply(Math, stack.map(node => node.totalTime));\n for (const node of stack) {\n const gridNode = new GridNode(node, totalTime, totalTime, totalTime, this.treeView);\n rootNode.appendChild(gridNode);\n if (node === selectedNode) {\n nodeToReveal = gridNode;\n }\n }\n if (nodeToReveal) {\n nodeToReveal.revealAndSelect();\n }\n }\n\n selectedTreeNode(): TimelineModel.TimelineProfileTree.Node|null {\n const selectedNode = this.dataGrid.selectedNode;\n return selectedNode && (selectedNode as GridNode).profileNode;\n }\n\n private onSelectionChanged(): void {\n this.dispatchEventToListeners(TimelineStackView.Events.SelectionChanged);\n }\n}\n\nexport namespace TimelineStackView {\n // TODO(crbug.com/1167717): Make this a const enum again\n // eslint-disable-next-line rulesdir/const_enum\n export enum Events {\n SelectionChanged = 'SelectionChanged',\n }\n\n export type EventTypes = {\n [Events.SelectionChanged]: void,\n };\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineTreeView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineTreeView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpD,OAAO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gB,CAAC,CAAC;IAC3E,CAAC;CACF;AAED,WAAiB,iBAAiB;IAChC,wDAAwD;IACxD,+CAA+C;IAC/C,IAAY,MAEX;IAFD,WAAY,MAAM;QAChB,+CAAqC,CAAA;IACvC,CAAC,EAFW,MAAM,GAAN,wBAAM,KAAN,wBAAM,QAEjB;AAKH,CAAC,EAVgB,iBAAiB,KAAjB,iBAAiB,QAUjC","sourcesContent":["// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport {ActiveFilters} from './ActiveFilters.js';\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {TimelineRegExp} from './TimelineFilters.js';\nimport {type TimelineSelection} from './TimelineSelection.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text for the performance of something\n */\n performance: 'Performance',\n /**\n *@description Text to filter result items\n */\n filter: 'Filter',\n /**\n *@description Time of a single activity, as opposed to the total time\n */\n selfTime: 'Self Time',\n /**\n *@description Text for the total time of something\n */\n totalTime: 'Total Time',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n activity: 'Activity',\n /**\n *@description Text of a DOM element in Timeline Tree View of the Performance panel\n */\n selectItemForDetails: 'Select item for details.',\n /**\n * @description This message is presented as a tooltip when developers investigate the performance\n * of a page. The tooltip alerts developers that some parts of code in execution were not optimized\n * (made to run faster) and that associated timing information must be considered with this in\n * mind. The placeholder text is the reason the code was not optimized.\n * @example {Optimized too many times} PH1\n */\n notOptimizedS: 'Not optimized: {PH1}',\n /**\n *@description Time in miliseconds\n *@example {30.1} PH1\n */\n fms: '{PH1} ms',\n /**\n *@description Number followed by percent sign\n *@example {20} PH1\n */\n percentPlaceholder: '{PH1} %',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n chromeExtensionsOverhead: '[`Chrome` extensions overhead]',\n /**\n * @description Text in Timeline Tree View of the Performance panel. The text is presented\n * when developers investigate the performance of a page. 'V8 Runtime' labels the time\n * spent in (i.e. runtime) the V8 JavaScript engine.\n */\n vRuntime: '[`V8` Runtime]',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n unattributed: '[unattributed]',\n /**\n *@description Text that refers to one or a group of webpages\n */\n page: 'Page',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n noGrouping: 'No Grouping',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByActivity: 'Group by Activity',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByCategory: 'Group by Category',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByDomain: 'Group by Domain',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByFrame: 'Group by Frame',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupBySubdomain: 'Group by Subdomain',\n /**\n *@description Text in Timeline Tree View of the Performance panel\n */\n groupByUrl: 'Group by URL',\n /**\n *@description Aria-label for grouping combo box in Timeline Details View\n */\n groupBy: 'Group by',\n /**\n *@description Aria-label for filter bar in Call Tree view\n */\n filterCallTree: 'Filter call tree',\n /**\n *@description Aria-label for the filter bar in Bottom-Up view\n */\n filterBottomup: 'Filter bottom-up',\n /**\n * @description Title of the sidebar pane in the Performance panel which shows the stack (call\n * stack) where the program spent the most time (out of all the call stacks) while executing.\n */\n heaviestStack: 'Heaviest stack',\n /**\n * @description Tooltip for the the Heaviest stack sidebar toggle in the Timeline Tree View of the\n * Performance panel. Command to open/show the sidebar.\n */\n showHeaviestStack: 'Show Heaviest stack',\n /**\n * @description Tooltip for the the Heaviest stack sidebar toggle in the Timeline Tree View of the\n * Performance panel. Command to close/hide the sidebar.\n */\n hideHeaviestStack: 'Hide Heaviest stack',\n /**\n * @description Screen reader announcement when the heaviest stack sidebar is shown in the Performance panel.\n */\n heaviestStackShown: 'Heaviest stack sidebar shown',\n /**\n * @description Screen reader announcement when the heaviest stack sidebar is hidden in the Performance panel.\n */\n heaviestStackHidden: 'Heaviest stack sidebar hidden',\n /**\n *@description Data grid name for Timeline Stack data grids\n */\n timelineStack: 'Timeline Stack',\n /**\n /*@description Text to search by matching case of the input button\n */\n matchCase: 'Match Case',\n /**\n *@description Text for searching with regular expression button\n */\n useRegularExpression: 'Use Regular Expression',\n /**\n * @description Text for Match whole word button\n */\n matchWholeWord: 'Match whole word',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineTreeView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport class TimelineTreeView extends UI.Widget.VBox implements UI.SearchableView.Searchable {\n modelInternal: PerformanceModel|null;\n #selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[]|null;\n private searchResults: TimelineModel.TimelineProfileTree.Node[];\n linkifier!: Components.Linkifier.Linkifier;\n dataGrid!: DataGrid.SortableDataGrid.SortableDataGrid;\n private lastHoveredProfileNode!: TimelineModel.TimelineProfileTree.Node|null;\n private textFilterInternal!: TimelineRegExp;\n private taskFilter!: TimelineModel.TimelineModelFilter.ExclusiveNameFilter;\n protected startTime!: number;\n protected endTime!: number;\n splitWidget!: UI.SplitWidget.SplitWidget;\n detailsView!: UI.Widget.Widget;\n private searchableView!: UI.SearchableView.SearchableView;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private currentThreadSetting?: Common.Settings.Setting;\n private lastSelectedNodeInternal?: TimelineModel.TimelineProfileTree.Node|null;\n private root?: TimelineModel.TimelineProfileTree.Node;\n private currentResult?: number;\n textFilterUI?: UI.Toolbar.ToolbarInput;\n private caseSensitiveButton: UI.Toolbar.ToolbarToggle|undefined;\n private regexButton: UI.Toolbar.ToolbarToggle|undefined;\n private matchWholeWord: UI.Toolbar.ToolbarToggle|undefined;\n\n #traceParseData: TraceEngine.Handlers.Types.TraceParseData|null = null;\n\n constructor() {\n super();\n this.modelInternal = null;\n this.#selectedEvents = null;\n this.element.classList.add('timeline-tree-view');\n\n this.searchResults = [];\n }\n\n static eventNameForSorting(event: TraceEngine.Legacy.Event): string {\n return event.name + ':@' + TimelineModel.TimelineProfileTree.eventURL(event);\n }\n\n setSearchableView(searchableView: UI.SearchableView.SearchableView): void {\n this.searchableView = searchableView;\n }\n\n setModelWithEvents(\n model: PerformanceModel|null,\n selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[]|null,\n traceParseData: TraceEngine.Handlers.Types.TraceParseData|null = null,\n ): void {\n this.modelInternal = model;\n this.#traceParseData = traceParseData;\n this.#selectedEvents = selectedEvents;\n }\n\n /**\n * This method is included only for preventing layout test failures.\n * TODO(crbug.com/1433692): Port problematic layout tests to unit\n * tests.\n */\n setModel(\n model: PerformanceModel|null,\n track: TimelineModel.TimelineModel.Track|null,\n ): void {\n this.setModelWithEvents(model, track?.eventsForTreeView() || null);\n }\n\n getToolbarInputAccessiblePlaceHolder(): string {\n return '';\n }\n\n model(): PerformanceModel|null {\n return this.modelInternal;\n }\n\n traceParseData(): TraceEngine.Handlers.Types.TraceParseData|null {\n return this.#traceParseData;\n }\n\n init(): void {\n this.linkifier = new Components.Linkifier.Linkifier();\n\n this.taskFilter =\n new TimelineModel.TimelineModelFilter.ExclusiveNameFilter([TimelineModel.TimelineModel.RecordType.Task]);\n this.textFilterInternal = new TimelineRegExp();\n\n this.currentThreadSetting = Common.Settings.Settings.instance().createSetting('timelineTreeCurrentThread', 0);\n this.currentThreadSetting.addChangeListener(this.refreshTree, this);\n\n const columns = ([] as DataGrid.DataGrid.ColumnDescriptor[]);\n this.populateColumns(columns);\n\n this.splitWidget = new UI.SplitWidget.SplitWidget(true, true, 'timelineTreeViewDetailsSplitWidget');\n const mainView = new UI.Widget.VBox();\n const toolbar = new UI.Toolbar.Toolbar('', mainView.element);\n toolbar.makeWrappable(true);\n this.populateToolbar(toolbar);\n\n this.dataGrid = new DataGrid.SortableDataGrid.SortableDataGrid({\n displayName: i18nString(UIStrings.performance),\n columns,\n refreshCallback: undefined,\n editCallback: undefined,\n deleteCallback: undefined,\n });\n this.dataGrid.addEventListener(DataGrid.DataGrid.Events.SortingChanged, this.sortingChanged, this);\n this.dataGrid.element.addEventListener('mousemove', this.onMouseMove.bind(this), true);\n this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.Last);\n this.dataGrid.setRowContextMenuCallback(this.onContextMenu.bind(this));\n this.dataGrid.asWidget().show(mainView.element);\n this.dataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.updateDetailsForSelection, this);\n\n this.detailsView = new UI.Widget.VBox();\n this.detailsView.element.classList.add('timeline-details-view', 'timeline-details-view-body');\n this.splitWidget.setMainWidget(mainView);\n this.splitWidget.setSidebarWidget(this.detailsView);\n this.splitWidget.hideSidebar();\n this.splitWidget.show(this.element);\n this.splitWidget.addEventListener(UI.SplitWidget.Events.ShowModeChanged, this.onShowModeChanged, this);\n\n this.lastSelectedNodeInternal;\n }\n\n lastSelectedNode(): TimelineModel.TimelineProfileTree.Node|null|undefined {\n return this.lastSelectedNodeInternal;\n }\n\n updateContents(selection: TimelineSelection): void {\n this.setRange(selection.startTime, selection.endTime);\n }\n\n setRange(startTime: number, endTime: number): void {\n this.startTime = startTime;\n this.endTime = endTime;\n this.refreshTree();\n }\n\n filters(): TimelineModel.TimelineModelFilter.TimelineModelFilter[] {\n return [this.taskFilter, this.textFilterInternal, ...(ActiveFilters.instance().activeFilters())];\n }\n\n filtersWithoutTextFilter(): TimelineModel.TimelineModelFilter.TimelineModelFilter[] {\n return [this.taskFilter, ...(ActiveFilters.instance().activeFilters())];\n }\n\n textFilter(): TimelineRegExp {\n return this.textFilterInternal;\n }\n\n exposePercentages(): boolean {\n return false;\n }\n\n populateToolbar(toolbar: UI.Toolbar.Toolbar): void {\n this.caseSensitiveButton = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.matchCase));\n this.caseSensitiveButton.setText('Aa');\n this.caseSensitiveButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.#toggleFilterButton(this.caseSensitiveButton);\n }, this);\n toolbar.appendToolbarItem(this.caseSensitiveButton);\n\n this.regexButton = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.useRegularExpression));\n this.regexButton.setText('.*');\n this.regexButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.#toggleFilterButton(this.regexButton);\n }, this);\n toolbar.appendToolbarItem(this.regexButton);\n\n this.matchWholeWord = new UI.Toolbar.ToolbarToggle(i18nString(UIStrings.matchWholeWord), 'match-whole-word');\n this.matchWholeWord.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, () => {\n this.#toggleFilterButton(this.matchWholeWord);\n }, this);\n toolbar.appendToolbarItem(this.matchWholeWord);\n\n const textFilterUI =\n new UI.Toolbar.ToolbarInput(i18nString(UIStrings.filter), this.getToolbarInputAccessiblePlaceHolder());\n this.textFilterUI = textFilterUI;\n textFilterUI.addEventListener(UI.Toolbar.ToolbarInput.Event.TextChanged, this.#filterChanged, this);\n toolbar.appendToolbarItem(textFilterUI);\n }\n\n modelEvents(): TraceEngine.Legacy.CompatibleTraceEvent[] {\n return this.#selectedEvents || [];\n }\n\n onHover(_node: TimelineModel.TimelineProfileTree.Node|null): void {\n }\n\n appendContextMenuItems(_contextMenu: UI.ContextMenu.ContextMenu, _node: TimelineModel.TimelineProfileTree.Node):\n void {\n }\n\n selectProfileNode(treeNode: TimelineModel.TimelineProfileTree.Node, suppressSelectedEvent: boolean): void {\n const pathToRoot = [];\n let node: (TimelineModel.TimelineProfileTree.Node|null)|TimelineModel.TimelineProfileTree.Node = treeNode;\n for (; node; node = node.parent) {\n pathToRoot.push(node);\n }\n for (let i = pathToRoot.length - 1; i > 0; --i) {\n const gridNode = this.dataGridNodeForTreeNode(pathToRoot[i]);\n if (gridNode && gridNode.dataGrid) {\n gridNode.expand();\n }\n }\n const gridNode = this.dataGridNodeForTreeNode(treeNode);\n if (gridNode && gridNode.dataGrid) {\n gridNode.reveal();\n gridNode.select(suppressSelectedEvent);\n }\n }\n\n refreshTree(): void {\n this.linkifier.reset();\n this.dataGrid.rootNode().removeChildren();\n if (!this.modelInternal) {\n this.updateDetailsForSelection();\n return;\n }\n this.root = this.buildTree();\n const children = this.root.children();\n let maxSelfTime = 0;\n let maxTotalTime = 0;\n const totalUsedTime = this.root.totalTime - this.root.selfTime;\n for (const child of children.values()) {\n maxSelfTime = Math.max(maxSelfTime, child.selfTime);\n maxTotalTime = Math.max(maxTotalTime, child.totalTime);\n }\n for (const child of children.values()) {\n // Exclude the idle time off the total calculation.\n const gridNode = new TreeGridNode(child, totalUsedTime, maxSelfTime, maxTotalTime, this);\n this.dataGrid.insertChild(gridNode);\n }\n this.sortingChanged();\n this.updateDetailsForSelection();\n if (this.searchableView) {\n this.searchableView.refreshSearch();\n }\n const rootNode = this.dataGrid.rootNode();\n if (rootNode.children.length > 0) {\n rootNode.children[0].select(/* supressSelectedEvent */ true);\n }\n }\n\n buildTree(): TimelineModel.TimelineProfileTree.Node {\n throw new Error('Not Implemented');\n }\n\n buildTopDownTree(\n doNotAggregate: boolean, groupIdCallback: ((arg0: TraceEngine.Legacy.CompatibleTraceEvent) => string)|null):\n TimelineModel.TimelineProfileTree.Node {\n return new TimelineModel.TimelineProfileTree.TopDownRootNode(\n this.modelEvents(), this.filters(), this.startTime, this.endTime, doNotAggregate, groupIdCallback);\n }\n\n populateColumns(columns: DataGrid.DataGrid.ColumnDescriptor[]): void {\n columns.push(\n ({id: 'self', title: i18nString(UIStrings.selfTime), width: '120px', fixedWidth: true, sortable: true} as\n DataGrid.DataGrid.ColumnDescriptor));\n columns.push(\n ({id: 'total', title: i18nString(UIStrings.totalTime), width: '120px', fixedWidth: true, sortable: true} as\n DataGrid.DataGrid.ColumnDescriptor));\n columns.push(\n ({id: 'activity', title: i18nString(UIStrings.activity), disclosure: true, sortable: true} as\n DataGrid.DataGrid.ColumnDescriptor));\n }\n\n private sortingChanged(): void {\n const columnId = this.dataGrid.sortColumnId();\n if (!columnId) {\n return;\n }\n let sortFunction;\n switch (columnId) {\n case 'startTime':\n sortFunction = compareStartTime;\n break;\n case 'self':\n sortFunction = compareNumericField.bind(null, 'selfTime');\n break;\n case 'total':\n sortFunction = compareNumericField.bind(null, 'totalTime');\n break;\n case 'activity':\n sortFunction = compareName;\n break;\n default:\n console.assert(false, 'Unknown sort field: ' + columnId);\n return;\n }\n this.dataGrid.sortNodes(sortFunction, !this.dataGrid.isSortOrderAscending());\n\n function compareNumericField(\n field: string, a: DataGrid.SortableDataGrid.SortableDataGridNode,\n b: DataGrid.SortableDataGrid.SortableDataGridNode): number {\n const nodeA = (a as TreeGridNode);\n const nodeB = (b as TreeGridNode);\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (nodeA.profileNode as any)[field] - (nodeB.profileNode as any)[field];\n }\n\n function compareStartTime(\n a: DataGrid.SortableDataGrid.SortableDataGridNode,\n b: DataGrid.SortableDataGrid.SortableDataGridNode): number {\n const nodeA = (a as TreeGridNode);\n const nodeB = (b as TreeGridNode);\n const eventA = (nodeA.profileNode.event as TraceEngine.Legacy.Event);\n const eventB = (nodeB.profileNode.event as TraceEngine.Legacy.Event);\n return eventA.startTime - eventB.startTime;\n }\n\n function compareName(\n a: DataGrid.SortableDataGrid.SortableDataGridNode,\n b: DataGrid.SortableDataGrid.SortableDataGridNode): number {\n const nodeA = (a as TreeGridNode);\n const nodeB = (b as TreeGridNode);\n const eventA = (nodeA.profileNode.event as TraceEngine.Legacy.Event);\n const eventB = (nodeB.profileNode.event as TraceEngine.Legacy.Event);\n const nameA = TimelineTreeView.eventNameForSorting(eventA);\n const nameB = TimelineTreeView.eventNameForSorting(eventB);\n return nameA.localeCompare(nameB);\n }\n }\n\n #filterChanged(): void {\n const searchQuery = this.textFilterUI && this.textFilterUI.value();\n const caseSensitive = this.caseSensitiveButton !== undefined && this.caseSensitiveButton.toggled();\n const isRegex = this.regexButton !== undefined && this.regexButton.toggled();\n const matchWholeWord = this.matchWholeWord !== undefined && this.matchWholeWord.toggled();\n\n this.textFilterInternal.setRegExp(\n searchQuery ? Platform.StringUtilities.createSearchRegex(searchQuery, caseSensitive, isRegex, matchWholeWord) :\n null);\n this.refreshTree();\n }\n\n #toggleFilterButton(toggleButton: UI.Toolbar.ToolbarToggle|undefined): void {\n if (toggleButton) {\n toggleButton.setToggled(!toggleButton.toggled());\n }\n\n this.#filterChanged();\n }\n\n private onShowModeChanged(): void {\n if (this.splitWidget.showMode() === UI.SplitWidget.ShowMode.OnlyMain) {\n return;\n }\n this.lastSelectedNodeInternal = undefined;\n this.updateDetailsForSelection();\n }\n\n private updateDetailsForSelection(): void {\n const selectedNode = this.dataGrid.selectedNode ? (this.dataGrid.selectedNode as TreeGridNode).profileNode : null;\n if (selectedNode === this.lastSelectedNodeInternal) {\n return;\n }\n this.lastSelectedNodeInternal = selectedNode;\n if (this.splitWidget.showMode() === UI.SplitWidget.ShowMode.OnlyMain) {\n return;\n }\n this.detailsView.detachChildWidgets();\n this.detailsView.element.removeChildren();\n if (selectedNode && this.showDetailsForNode(selectedNode)) {\n return;\n }\n const banner = this.detailsView.element.createChild('div', 'full-widget-dimmed-banner');\n UI.UIUtils.createTextChild(banner, i18nString(UIStrings.selectItemForDetails));\n }\n\n showDetailsForNode(_node: TimelineModel.TimelineProfileTree.Node): boolean {\n return false;\n }\n\n private onMouseMove(event: Event): void {\n const gridNode = event.target && (event.target instanceof Node) ?\n (this.dataGrid.dataGridNodeFromNode((event.target as Node))) :\n null;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n const profileNode = gridNode && gridNode._profileNode;\n if (profileNode === this.lastHoveredProfileNode) {\n return;\n }\n this.lastHoveredProfileNode = profileNode;\n this.onHover(profileNode);\n }\n\n private onContextMenu(\n contextMenu: UI.ContextMenu.ContextMenu, eventGridNode: DataGrid.DataGrid.DataGridNode): void {\n const gridNode = (eventGridNode as GridNode);\n if (gridNode.linkElement && !contextMenu.containsTarget(gridNode.linkElement)) {\n contextMenu.appendApplicableItems(gridNode.linkElement);\n }\n const profileNode = gridNode.profileNode;\n if (profileNode) {\n this.appendContextMenuItems(contextMenu, profileNode);\n }\n }\n\n dataGridNodeForTreeNode(treeNode: TimelineModel.TimelineProfileTree.Node): GridNode|null {\n return profileNodeToTreeGridNode.get(treeNode) || null;\n }\n\n // UI.SearchableView.Searchable implementation\n\n onSearchCanceled(): void {\n this.searchResults = [];\n this.currentResult = 0;\n }\n\n performSearch(searchConfig: UI.SearchableView.SearchConfig, _shouldJump: boolean, _jumpBackwards?: boolean): void {\n this.searchResults = [];\n this.currentResult = 0;\n if (!this.root) {\n return;\n }\n const searchRegex = searchConfig.toSearchRegex();\n this.searchResults = this.root.searchTree(\n event => TimelineUIUtils.testContentMatching(event, searchRegex.regex, this.#traceParseData || undefined));\n this.searchableView.updateSearchMatchesCount(this.searchResults.length);\n }\n\n jumpToNextSearchResult(): void {\n if (!this.searchResults.length || this.currentResult === undefined) {\n return;\n }\n this.selectProfileNode(this.searchResults[this.currentResult], false);\n this.currentResult = Platform.NumberUtilities.mod(this.currentResult + 1, this.searchResults.length);\n }\n\n jumpToPreviousSearchResult(): void {\n if (!this.searchResults.length || this.currentResult === undefined) {\n return;\n }\n this.selectProfileNode(this.searchResults[this.currentResult], false);\n this.currentResult = Platform.NumberUtilities.mod(this.currentResult - 1, this.searchResults.length);\n }\n\n supportsCaseSensitiveSearch(): boolean {\n return true;\n }\n\n supportsRegexSearch(): boolean {\n return true;\n }\n}\n\nexport class GridNode extends DataGrid.SortableDataGrid.SortableDataGridNode {\n protected populated: boolean;\n profileNode: TimelineModel.TimelineProfileTree.Node;\n protected treeView: TimelineTreeView;\n protected grandTotalTime: number;\n protected maxSelfTime: number;\n protected maxTotalTime: number;\n linkElement: Element|null;\n\n constructor(\n profileNode: TimelineModel.TimelineProfileTree.Node, grandTotalTime: number, maxSelfTime: number,\n maxTotalTime: number, treeView: TimelineTreeView) {\n super(null, false);\n this.populated = false;\n this.profileNode = profileNode;\n this.treeView = treeView;\n this.grandTotalTime = grandTotalTime;\n this.maxSelfTime = maxSelfTime;\n this.maxTotalTime = maxTotalTime;\n this.linkElement = null;\n }\n\n override createCell(columnId: string): HTMLElement {\n if (columnId === 'activity') {\n return this.createNameCell(columnId);\n }\n return this.createValueCell(columnId) || super.createCell(columnId);\n }\n\n private createNameCell(columnId: string): HTMLElement {\n const cell = this.createTD(columnId);\n const container = cell.createChild('div', 'name-container');\n const iconContainer = container.createChild('div', 'activity-icon-container');\n const icon = iconContainer.createChild('div', 'activity-icon');\n const name = container.createChild('div', 'activity-name');\n const event = this.profileNode.event;\n if (this.profileNode.isGroupNode()) {\n const treeView = (this.treeView as AggregatedTimelineTreeView);\n const info = treeView.displayInfoForGroupNode(this.profileNode);\n name.textContent = info.name;\n icon.style.backgroundColor = info.color;\n if (info.icon) {\n iconContainer.insertBefore(info.icon, icon);\n }\n } else if (event) {\n const data = event.args['data'];\n const deoptReason = data && data['deoptReason'];\n if (deoptReason) {\n container.createChild('div', 'activity-warning').title =\n i18nString(UIStrings.notOptimizedS, {PH1: deoptReason});\n }\n\n name.textContent = TimelineUIUtils.eventTitle(event);\n const target = this.treeView.modelInternal?.timelineModel().targetByEvent(event) || null;\n const linkifier = this.treeView.linkifier;\n const isFreshRecording = Boolean(this.treeView.modelInternal?.timelineModel().isFreshRecording());\n this.linkElement = TraceEngine.Legacy.eventIsFromNewEngine(event) ?\n TimelineUIUtils.linkifyTopCallFrame(event, target, linkifier, isFreshRecording) :\n null;\n if (this.linkElement) {\n container.createChild('div', 'activity-link').appendChild(this.linkElement);\n }\n const eventStyle = TimelineUIUtils.eventStyle(event);\n const eventCategory = eventStyle.category;\n UI.ARIAUtils.setLabel(icon, eventCategory.title);\n icon.style.backgroundColor = eventCategory.getComputedColorValue();\n }\n return cell;\n }\n\n private createValueCell(columnId: string): HTMLElement|null {\n if (columnId !== 'self' && columnId !== 'total' && columnId !== 'startTime') {\n return null;\n }\n\n let showPercents = false;\n let value: number;\n let maxTime: number|undefined;\n let event: TraceEngine.Legacy.CompatibleTraceEvent|null;\n switch (columnId) {\n case 'startTime': {\n event = this.profileNode.event;\n const traceParseData = this.treeView.traceParseData();\n if (!traceParseData) {\n throw new Error('Unable to load trace data for tree view');\n }\n const timings = event && TraceEngine.Legacy.timesForEventInMilliseconds(event);\n const startTime = timings?.startTime ?? 0;\n value = startTime - TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceParseData.Meta.traceBounds.min);\n } break;\n case 'self':\n value = this.profileNode.selfTime;\n maxTime = this.maxSelfTime;\n showPercents = true;\n break;\n case 'total':\n value = this.profileNode.totalTime;\n maxTime = this.maxTotalTime;\n showPercents = true;\n break;\n default:\n return null;\n }\n const cell = this.createTD(columnId);\n cell.className = 'numeric-column';\n cell.setAttribute('title', i18nString(UIStrings.fms, {PH1: value.toFixed(4)}));\n const textDiv = cell.createChild('div');\n textDiv.createChild('span').textContent = i18nString(UIStrings.fms, {PH1: value.toFixed(1)});\n\n if (showPercents && this.treeView.exposePercentages()) {\n textDiv.createChild('span', 'percent-column').textContent =\n i18nString(UIStrings.percentPlaceholder, {PH1: (value / this.grandTotalTime * 100).toFixed(1)});\n }\n if (maxTime) {\n textDiv.classList.add('background-percent-bar');\n cell.createChild('div', 'background-bar-container').createChild('div', 'background-bar').style.width =\n (value * 100 / maxTime).toFixed(1) + '%';\n }\n return cell;\n }\n}\n\nexport class TreeGridNode extends GridNode {\n constructor(\n profileNode: TimelineModel.TimelineProfileTree.Node, grandTotalTime: number, maxSelfTime: number,\n maxTotalTime: number, treeView: TimelineTreeView) {\n super(profileNode, grandTotalTime, maxSelfTime, maxTotalTime, treeView);\n this.setHasChildren(this.profileNode.hasChildren());\n profileNodeToTreeGridNode.set(profileNode, this);\n }\n\n override populate(): void {\n if (this.populated) {\n return;\n }\n this.populated = true;\n if (!this.profileNode.children) {\n return;\n }\n for (const node of this.profileNode.children().values()) {\n const gridNode = new TreeGridNode(node, this.grandTotalTime, this.maxSelfTime, this.maxTotalTime, this.treeView);\n this.insertChildOrdered(gridNode);\n }\n }\n}\n\nconst profileNodeToTreeGridNode = new WeakMap();\n\nexport class AggregatedTimelineTreeView extends TimelineTreeView {\n protected readonly groupBySetting: Common.Settings.Setting;\n private readonly stackView: TimelineStackView;\n private executionContextNamesByOrigin = new Map();\n\n constructor() {\n super();\n this.groupBySetting = Common.Settings.Settings.instance().createSetting(\n 'timelineTreeGroupBy', AggregatedTimelineTreeView.GroupBy.None);\n this.groupBySetting.addChangeListener(this.refreshTree.bind(this));\n this.init();\n this.stackView = new TimelineStackView(this);\n this.stackView.addEventListener(TimelineStackView.Events.SelectionChanged, this.onStackViewSelectionChanged, this);\n }\n\n setGroupBySettingForTests(groupBy: AggregatedTimelineTreeView.GroupBy): void {\n this.groupBySetting.set(groupBy);\n }\n override setModelWithEvents(\n model: PerformanceModel|null,\n selectedEvents: TraceEngine.Legacy.CompatibleTraceEvent[]|null,\n traceParseData: TraceEngine.Handlers.Types.TraceParseData|null = null,\n ): void {\n super.setModelWithEvents(model, selectedEvents, traceParseData);\n }\n\n /**\n * This method is included only for preventing layout test failures.\n * TODO(crbug.com/1433692): Port problematic layout tests to unit\n * tests.\n */\n override setModel(\n model: PerformanceModel|null,\n track: TimelineModel.TimelineModel.Track|null,\n ): void {\n super.setModel(model, track);\n }\n\n override updateContents(selection: TimelineSelection): void {\n this.updateExtensionResolver();\n super.updateContents(selection);\n const rootNode = this.dataGrid.rootNode();\n if (rootNode.children.length) {\n rootNode.children[0].select(/* suppressSelectedEvent */ true);\n }\n }\n\n private updateExtensionResolver(): void {\n this.executionContextNamesByOrigin = new Map();\n for (const runtimeModel of SDK.TargetManager.TargetManager.instance().models(SDK.RuntimeModel.RuntimeModel)) {\n for (const context of runtimeModel.executionContexts()) {\n this.executionContextNamesByOrigin.set(context.origin, context.name);\n }\n }\n }\n\n private beautifyDomainName(this: AggregatedTimelineTreeView, name: string): string {\n if (AggregatedTimelineTreeView.isExtensionInternalURL(name as Platform.DevToolsPath.UrlString)) {\n name = i18nString(UIStrings.chromeExtensionsOverhead);\n } else if (AggregatedTimelineTreeView.isV8NativeURL(name as Platform.DevToolsPath.UrlString)) {\n name = i18nString(UIStrings.vRuntime);\n } else if (name.startsWith('chrome-extension')) {\n name = this.executionContextNamesByOrigin.get(name as Platform.DevToolsPath.UrlString) || name;\n }\n return name;\n }\n\n displayInfoForGroupNode(node: TimelineModel.TimelineProfileTree.Node): {\n name: string,\n color: string,\n icon: (Element|undefined),\n } {\n const categories = TimelineUIUtils.categories();\n const color = node.id && node.event ? TimelineUIUtils.eventColor(node.event) : categories['other'].color;\n const unattributed = i18nString(UIStrings.unattributed);\n\n const id = typeof node.id === 'symbol' ? undefined : node.id;\n\n switch (this.groupBySetting.get()) {\n case AggregatedTimelineTreeView.GroupBy.Category: {\n const category = id ? categories[id] || categories['other'] : {title: unattributed, color: unattributed};\n return {name: category.title, color: category.color, icon: undefined};\n }\n\n case AggregatedTimelineTreeView.GroupBy.Domain:\n case AggregatedTimelineTreeView.GroupBy.Subdomain: {\n const domainName = id ? this.beautifyDomainName(id) : undefined;\n return {name: domainName || unattributed, color: color, icon: undefined};\n }\n\n case AggregatedTimelineTreeView.GroupBy.EventName: {\n if (!node.event) {\n throw new Error('Unable to find event for group by operation');\n }\n const name = TimelineUIUtils.eventTitle(node.event);\n return {\n name: name,\n color,\n icon: undefined,\n };\n }\n\n case AggregatedTimelineTreeView.GroupBy.URL:\n break;\n\n case AggregatedTimelineTreeView.GroupBy.Frame: {\n if (!this.modelInternal) {\n throw new Error('Unable to find model for group by frame operation');\n }\n const frame = id ? this.modelInternal.timelineModel().pageFrameById(id as Protocol.Page.FrameId) : undefined;\n const frameName = frame ? TimelineUIUtils.displayNameForFrame(frame, 80) : i18nString(UIStrings.page);\n return {name: frameName, color: color, icon: undefined};\n }\n\n default:\n console.assert(false, 'Unexpected grouping type');\n }\n return {name: id || unattributed, color: color, icon: undefined};\n }\n\n override populateToolbar(toolbar: UI.Toolbar.Toolbar): void {\n super.populateToolbar(toolbar);\n const groupBy = AggregatedTimelineTreeView.GroupBy;\n const options = [\n {label: i18nString(UIStrings.noGrouping), value: groupBy.None},\n {label: i18nString(UIStrings.groupByActivity), value: groupBy.EventName},\n {label: i18nString(UIStrings.groupByCategory), value: groupBy.Category},\n {label: i18nString(UIStrings.groupByDomain), value: groupBy.Domain},\n {label: i18nString(UIStrings.groupByFrame), value: groupBy.Frame},\n {label: i18nString(UIStrings.groupBySubdomain), value: groupBy.Subdomain},\n {label: i18nString(UIStrings.groupByUrl), value: groupBy.URL},\n ];\n toolbar.appendToolbarItem(\n new UI.Toolbar.ToolbarSettingComboBox(options, this.groupBySetting, i18nString(UIStrings.groupBy)));\n toolbar.appendSpacer();\n toolbar.appendToolbarItem(this.splitWidget.createShowHideSidebarButton(\n i18nString(UIStrings.showHeaviestStack), i18nString(UIStrings.hideHeaviestStack),\n i18nString(UIStrings.heaviestStackShown), i18nString(UIStrings.heaviestStackHidden)));\n }\n\n private buildHeaviestStack(treeNode: TimelineModel.TimelineProfileTree.Node):\n TimelineModel.TimelineProfileTree.Node[] {\n console.assert(Boolean(treeNode.parent), 'Attempt to build stack for tree root');\n let result: TimelineModel.TimelineProfileTree.Node[] = [];\n // Do not add root to the stack, as it's the tree itself.\n for (let node: TimelineModel.TimelineProfileTree.Node = treeNode; node && node.parent; node = node.parent) {\n result.push(node);\n }\n result = result.reverse();\n for (let node: TimelineModel.TimelineProfileTree.Node = treeNode;\n node && node.children() && node.children().size;) {\n const children = Array.from(node.children().values());\n node = children.reduce((a, b) => a.totalTime > b.totalTime ? a : b);\n result.push(node);\n }\n return result;\n }\n\n override exposePercentages(): boolean {\n return true;\n }\n\n private onStackViewSelectionChanged(): void {\n const treeNode = this.stackView.selectedTreeNode();\n if (treeNode) {\n this.selectProfileNode(treeNode, true);\n }\n }\n\n override showDetailsForNode(node: TimelineModel.TimelineProfileTree.Node): boolean {\n const stack = this.buildHeaviestStack(node);\n this.stackView.setStack(stack, node);\n this.stackView.show(this.detailsView.element);\n return true;\n }\n\n protected groupingFunction(groupBy: string): ((arg0: TraceEngine.Legacy.CompatibleTraceEvent) => string)|null {\n const GroupBy = AggregatedTimelineTreeView.GroupBy;\n switch (groupBy) {\n case GroupBy.None:\n return null;\n case GroupBy.EventName:\n return (event: TraceEngine.Legacy.CompatibleTraceEvent): string => TimelineUIUtils.eventStyle(event).title;\n case GroupBy.Category:\n return (event: TraceEngine.Legacy.CompatibleTraceEvent): string =>\n TimelineUIUtils.eventStyle(event).category.name;\n case GroupBy.Subdomain:\n return this.domainByEvent.bind(this, false);\n case GroupBy.Domain:\n return this.domainByEvent.bind(this, true);\n case GroupBy.URL:\n return (event: TraceEngine.Legacy.CompatibleTraceEvent): string =>\n TimelineModel.TimelineProfileTree.eventURL(event) || '';\n case GroupBy.Frame:\n return (event: TraceEngine.Legacy.CompatibleTraceEvent): string =>\n TimelineModel.TimelineModel.EventOnTimelineData.forEvent(event).frameId || '';\n default:\n console.assert(false, `Unexpected aggregation setting: ${groupBy}`);\n return null;\n }\n }\n\n private domainByEvent(groupSubdomains: boolean, event: TraceEngine.Legacy.CompatibleTraceEvent): string {\n const url = TimelineModel.TimelineProfileTree.eventURL(event);\n if (!url) {\n return '';\n }\n if (AggregatedTimelineTreeView.isExtensionInternalURL(url)) {\n return AggregatedTimelineTreeView.extensionInternalPrefix;\n }\n if (AggregatedTimelineTreeView.isV8NativeURL(url)) {\n return AggregatedTimelineTreeView.v8NativePrefix;\n }\n const parsedURL = Common.ParsedURL.ParsedURL.fromString(url);\n if (!parsedURL) {\n return '';\n }\n if (parsedURL.scheme === 'chrome-extension') {\n return parsedURL.scheme + '://' + parsedURL.host;\n }\n if (!groupSubdomains) {\n return parsedURL.host;\n }\n if (/^[.0-9]+$/.test(parsedURL.host)) {\n return parsedURL.host;\n }\n const domainMatch = /([^.]*\\.)?[^.]*$/.exec(parsedURL.host);\n return domainMatch && domainMatch[0] || '';\n }\n\n override appendContextMenuItems(\n contextMenu: UI.ContextMenu.ContextMenu, node: TimelineModel.TimelineProfileTree.Node): void {\n if (this.groupBySetting.get() !== AggregatedTimelineTreeView.GroupBy.Frame) {\n return;\n }\n if (!node.isGroupNode()) {\n return;\n }\n if (!this.modelInternal) {\n return;\n }\n const frame = this.modelInternal.timelineModel().pageFrameById((node.id as Protocol.Page.FrameId));\n if (!frame || !frame.ownerNode) {\n return;\n }\n contextMenu.appendApplicableItems(frame.ownerNode);\n }\n\n private static isExtensionInternalURL(url: Platform.DevToolsPath.UrlString): boolean {\n return url.startsWith(AggregatedTimelineTreeView.extensionInternalPrefix);\n }\n\n private static isV8NativeURL(url: Platform.DevToolsPath.UrlString): boolean {\n return url.startsWith(AggregatedTimelineTreeView.v8NativePrefix);\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private static readonly extensionInternalPrefix = 'extensions::';\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private static readonly v8NativePrefix = 'native ';\n}\nexport namespace AggregatedTimelineTreeView {\n // TODO(crbug.com/1167717): Make this a const enum again\n // eslint-disable-next-line rulesdir/const_enum\n export enum GroupBy {\n None = 'None',\n EventName = 'EventName',\n Category = 'Category',\n Domain = 'Domain',\n Subdomain = 'Subdomain',\n URL = 'URL',\n Frame = 'Frame',\n }\n}\n\nexport class CallTreeTimelineTreeView extends AggregatedTimelineTreeView {\n constructor() {\n super();\n this.dataGrid.markColumnAsSortedBy('total', DataGrid.DataGrid.Order.Descending);\n }\n\n override getToolbarInputAccessiblePlaceHolder(): string {\n return i18nString(UIStrings.filterCallTree);\n }\n\n override buildTree(): TimelineModel.TimelineProfileTree.Node {\n const grouping = this.groupBySetting.get();\n return this.buildTopDownTree(false, this.groupingFunction(grouping));\n }\n}\n\nexport class BottomUpTimelineTreeView extends AggregatedTimelineTreeView {\n constructor() {\n super();\n this.dataGrid.markColumnAsSortedBy('self', DataGrid.DataGrid.Order.Descending);\n }\n\n override getToolbarInputAccessiblePlaceHolder(): string {\n return i18nString(UIStrings.filterBottomup);\n }\n\n override buildTree(): TimelineModel.TimelineProfileTree.Node {\n return new TimelineModel.TimelineProfileTree.BottomUpRootNode(\n this.modelEvents(), this.textFilter(), this.filtersWithoutTextFilter(), this.startTime, this.endTime,\n this.groupingFunction(this.groupBySetting.get()));\n }\n}\n\nexport class TimelineStackView extends\n Common.ObjectWrapper.eventMixin(UI.Widget.VBox) {\n private readonly treeView: TimelineTreeView;\n private readonly dataGrid: DataGrid.ViewportDataGrid.ViewportDataGrid;\n\n constructor(treeView: TimelineTreeView) {\n super();\n const header = this.element.createChild('div', 'timeline-stack-view-header');\n header.textContent = i18nString(UIStrings.heaviestStack);\n this.treeView = treeView;\n const columns = ([\n {id: 'total', title: i18nString(UIStrings.totalTime), fixedWidth: true, width: '110px'},\n {id: 'activity', title: i18nString(UIStrings.activity)},\n ] as DataGrid.DataGrid.ColumnDescriptor[]);\n this.dataGrid = new DataGrid.ViewportDataGrid.ViewportDataGrid({\n displayName: i18nString(UIStrings.timelineStack),\n columns,\n deleteCallback: undefined,\n editCallback: undefined,\n refreshCallback: undefined,\n });\n this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.Last);\n this.dataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this.onSelectionChanged, this);\n this.dataGrid.asWidget().show(this.element);\n }\n\n setStack(stack: TimelineModel.TimelineProfileTree.Node[], selectedNode: TimelineModel.TimelineProfileTree.Node):\n void {\n const rootNode = this.dataGrid.rootNode();\n rootNode.removeChildren();\n let nodeToReveal: GridNode|null = null;\n const totalTime = Math.max.apply(Math, stack.map(node => node.totalTime));\n for (const node of stack) {\n const gridNode = new GridNode(node, totalTime, totalTime, totalTime, this.treeView);\n rootNode.appendChild(gridNode);\n if (node === selectedNode) {\n nodeToReveal = gridNode;\n }\n }\n if (nodeToReveal) {\n nodeToReveal.revealAndSelect();\n }\n }\n\n selectedTreeNode(): TimelineModel.TimelineProfileTree.Node|null {\n const selectedNode = this.dataGrid.selectedNode;\n return selectedNode && (selectedNode as GridNode).profileNode;\n }\n\n private onSelectionChanged(): void {\n this.dispatchEventToListeners(TimelineStackView.Events.SelectionChanged);\n }\n}\n\nexport namespace TimelineStackView {\n // TODO(crbug.com/1167717): Make this a const enum again\n // eslint-disable-next-line rulesdir/const_enum\n export enum Events {\n SelectionChanged = 'SelectionChanged',\n }\n\n export type EventTypes = {\n [Events.SelectionChanged]: void,\n };\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/components/BreadcrumbsUI.js b/public/panels/timeline/components/BreadcrumbsUI.js index cd65813be..061f2b9ae 100644 --- a/public/panels/timeline/components/BreadcrumbsUI.js +++ b/public/panels/timeline/components/BreadcrumbsUI.js @@ -20,12 +20,7 @@ export class BreadcrumbsUI extends HTMLElement { static litTagName = LitHtml.literal `devtools-breadcrumbs-ui`; #shadow = this.attachShadow({ mode: 'open' }); #boundRender = this.#render.bind(this); - #traceWindow = { - min: TraceEngine.Types.Timing.MicroSeconds(0), - max: TraceEngine.Types.Timing.MicroSeconds(0), - range: TraceEngine.Types.Timing.MicroSeconds(0), - }; - #breadcrumb = { window: this.#traceWindow, child: null }; + #breadcrumb = null; connectedCallback() { this.#shadow.adoptedStyleSheets = [breadcrumbsUIStyles]; } @@ -37,13 +32,14 @@ export class BreadcrumbsUI extends HTMLElement { this.dispatchEvent(new BreadcrumbRemovedEvent(breadcrumb)); } #renderElement(breadcrumb, index) { + const breadcrumbRange = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(breadcrumb.window.range); // clang-format off return html ` ${breadcrumb.child !== null ? @@ -56,12 +52,16 @@ export class BreadcrumbsUI extends HTMLElement { }}>` : ''} `; + // clang-format on } #render() { + // clang-format off const output = html ` - `; + ${this.#breadcrumb === null ? html `` : html ``} + `; + // clang-format on render(output, this.#shadow, { host: this }); } } diff --git a/public/panels/timeline/components/BreadcrumbsUI.js.map b/public/panels/timeline/components/BreadcrumbsUI.js.map index 156db02a8..0c38567f1 100644 --- a/public/panels/timeline/components/BreadcrumbsUI.js.map +++ b/public/panels/timeline/components/BreadcrumbsUI.js.map @@ -1 +1 @@ -{"version":3,"file":"BreadcrumbsUI.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/timeline/components/BreadcrumbsUI.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,WAAW,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EAAkB,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACrE,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AAEzD,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;AAM/B,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAG5B;IAFnB,MAAM,CAAU,SAAS,GAAG,mBAAmB,CAAC;IAEhD,YAAmB,UAAsB;QACvC,KAAK,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QADvB,eAAU,GAAV,UAAU,CAAY;IAEzC,CAAC;;AAGH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C,MAAM,CAAU,UAAU,GAAG,OAAO,CAAC,OAAO,CAAA,yBAAyB,CAAC;IAC7D,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,EAAC,IAAI,EAAE,M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AO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC1D,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;;;YAG7C,UAAU,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAA;eACD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,UAAU;gBAC1C,QAAQ,EAAE,eAAe;gBACzB,KAAK,EAAE,qBAAqB;gBAC5B,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;aACa,GAAG;YAChC,CAAC,CAAC,EAAE;OACT,CAAC;IACN,CAAC;IAED,OAAO;QACL,MAAM,MAAM,GAAG,IAAI,CAAA;;QAEf,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;aAClG,CAAC;QACR,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IAC/C,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as TraceEngine from '../../../models/trace/trace.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\n\nimport {type Breadcrumb, flattenBreadcrumbs} from './Breadcrumbs.js';\nimport breadcrumbsUIStyles from './breadcrumbsUI.css.js';\n\nconst {render, html} = LitHtml;\n\nexport interface BreadcrumbsUIData {\n breadcrumb: Breadcrumb;\n}\n\nexport class BreadcrumbRemovedEvent extends Event {\n static readonly eventName = 'breadcrumbremoved';\n\n constructor(public breadcrumb: Breadcrumb) {\n super(BreadcrumbRemovedEvent.eventName);\n }\n}\n\nexport class BreadcrumbsUI extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-breadcrumbs-ui`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n readonly #boundRender = this.#render.bind(this);\n readonly #traceWindow: TraceEngine.Types.Timing.TraceWindowMicroSeconds = {\n min: TraceEngine.Types.Timing.MicroSeconds(0),\n max: TraceEngine.Types.Timing.MicroSeconds(0),\n range: TraceEngine.Types.Timing.MicroSeconds(0),\n };\n #breadcrumb: Breadcrumb = {window: this.#traceWindow, child: null};\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [breadcrumbsUIStyles];\n }\n\n set data(data: BreadcrumbsUIData) {\n this.#breadcrumb = data.breadcrumb;\n void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);\n }\n\n #removeBreadcrumb(breadcrumb: Breadcrumb): void {\n this.dispatchEvent(new BreadcrumbRemovedEvent(breadcrumb));\n }\n\n #renderElement(breadcrumb: Breadcrumb, index: number): LitHtml.TemplateResult {\n // clang-format off\n return html`\n
this.#removeBreadcrumb(breadcrumb)}>\n \n ${(index === 0) ?\n `Full range (${(breadcrumb.window.range).toFixed(2)}ms)` :\n `${(breadcrumb.window.range).toFixed(2)}ms`}\n \n
\n ${breadcrumb.child !== null ?\n html`\n <${IconButton.Icon.Icon.litTagName} .data=${{\n iconName: 'chevron-right',\n color: 'var(--icon-default)',\n width: '16px',\n height: '16px',\n } as IconButton.Icon.IconData}>`\n : ''}\n `;\n }\n\n #render(): void {\n const output = html`\n
\n ${flattenBreadcrumbs(this.#breadcrumb).map((breadcrumb, index) => this.#renderElement(breadcrumb, index))}\n
`;\n render(output, this.#shadow, {host: this});\n }\n}\n\nComponentHelpers.CustomElements.defineComponent('devtools-breadcrumbs-ui', BreadcrumbsUI);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-breadcrumbs-ui': BreadcrumbsUI;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"BreadcrumbsUI.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/timeline/components/BreadcrumbsUI.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,WAAW,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EAAkB,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACrE,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AAEzD,MAAM,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;AAM/B,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAG5B;IAFnB,MAAM,CAAU,SAAS,GAAG,mBAAmB,CAAC;IAEhD,YAAmB,UAAsB;QACvC,KAAK,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;QADvB,eAAU,GAAV,UAAU,CAAY;IAEzC,CAAC;;AAGH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C,MAAM,CAAU,UAAU,GAAG,OAAO,CAAC,OAAO,CAAA,yBAAyB,CAAC;IAC7D,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;IAC5C,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,WAAW,GAAoB,IAAI,CAAC;IAEpC,iBAAiB;QACf,IAAI,CAAC,OAAO,CAAC,kBAAkB,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,IAAI,CAAC,IAAuB;QAC9B,I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AAI,CAAA,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;UACvC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;aACpG;KACR,CAAC;QACF,kBAAkB;QAClB,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IAC7C,CAAC;;AAGH,gBAAgB,CAAC,cAAc,CAAC,eAAe,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as TraceEngine from '../../../models/trace/trace.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as IconButton from '../../../ui/components/icon_button/icon_button.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\n\nimport {type Breadcrumb, flattenBreadcrumbs} from './Breadcrumbs.js';\nimport breadcrumbsUIStyles from './breadcrumbsUI.css.js';\n\nconst {render, html} = LitHtml;\n\nexport interface BreadcrumbsUIData {\n breadcrumb: Breadcrumb;\n}\n\nexport class BreadcrumbRemovedEvent extends Event {\n static readonly eventName = 'breadcrumbremoved';\n\n constructor(public breadcrumb: Breadcrumb) {\n super(BreadcrumbRemovedEvent.eventName);\n }\n}\n\nexport class BreadcrumbsUI extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-breadcrumbs-ui`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n readonly #boundRender = this.#render.bind(this);\n #breadcrumb: Breadcrumb|null = null;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [breadcrumbsUIStyles];\n }\n\n set data(data: BreadcrumbsUIData) {\n this.#breadcrumb = data.breadcrumb;\n void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);\n }\n\n #removeBreadcrumb(breadcrumb: Breadcrumb): void {\n this.dispatchEvent(new BreadcrumbRemovedEvent(breadcrumb));\n }\n\n #renderElement(breadcrumb: Breadcrumb, index: number): LitHtml.LitTemplate {\n const breadcrumbRange = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(breadcrumb.window.range);\n // clang-format off\n return html`\n
this.#removeBreadcrumb(breadcrumb)}>\n \n ${(index === 0) ?\n `Full range (${breadcrumbRange.toFixed(2)}ms)` :\n `${breadcrumbRange.toFixed(2)}ms`}\n \n
\n ${breadcrumb.child !== null ?\n html`\n <${IconButton.Icon.Icon.litTagName} .data=${{\n iconName: 'chevron-right',\n color: 'var(--icon-default)',\n width: '16px',\n height: '16px',\n } as IconButton.Icon.IconData}>`\n : ''}\n `;\n // clang-format on\n }\n\n #render(): void {\n // clang-format off\n const output = html`\n ${this.#breadcrumb === null ? html`` : html`
\n ${flattenBreadcrumbs(this.#breadcrumb).map((breadcrumb, index) => this.#renderElement(breadcrumb, index))}\n
`}\n `;\n // clang-format on\n render(output, this.#shadow, {host: this});\n }\n}\n\nComponentHelpers.CustomElements.defineComponent('devtools-breadcrumbs-ui', BreadcrumbsUI);\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface HTMLElementTagNameMap {\n 'devtools-breadcrumbs-ui': BreadcrumbsUI;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/timeline-tsconfig.json b/public/panels/timeline/timeline-tsconfig.json index 4a5d98669..478e6ea7c 100644 --- a/public/panels/timeline/timeline-tsconfig.json +++ b/public/panels/timeline/timeline-tsconfig.json @@ -29,6 +29,7 @@ "useUnknownInCatchVariables": false }, "files": [ + "../../../../../../front_end/panels/timeline/ActiveFilters.ts", "../../../../../../front_end/panels/timeline/AnimationsTrackAppender.ts", "../../../../../../front_end/panels/timeline/AppenderUtils.ts", "../../../../../../front_end/panels/timeline/BenchmarkEvents.ts", diff --git a/public/panels/web_audio/AudioContextSelector.d.ts b/public/panels/web_audio/AudioContextSelector.d.ts index cf4ea5790..f73d49718 100644 --- a/public/panels/web_audio/AudioContextSelector.d.ts +++ b/public/panels/web_audio/AudioContextSelector.d.ts @@ -1,6 +1,6 @@ import * as Common from '../../core/common/common.js'; -import * as UI from '../../ui/legacy/legacy.js'; import type * as Protocol from '../../generated/protocol.js'; +import * as UI from '../../ui/legacy/legacy.js'; export declare class AudioContextSelector extends Common.ObjectWrapper.ObjectWrapper implements UI.SoftDropDown.Delegate { private readonly placeholderText; private readonly items; diff --git a/public/panels/web_audio/AudioContextSelector.js b/public/panels/web_audio/AudioContextSelector.js index b27324064..9975a6740 100644 --- a/public/panels/web_audio/AudioContextSelector.js +++ b/public/panels/web_audio/AudioContextSelector.js @@ -29,7 +29,7 @@ export class AudioContextSelector extends Common.ObjectWrapper.ObjectWrapper { super(); this.placeholderText = i18nString(UIStrings.noRecordings); this.items = new UI.ListModel.ListModel(); - this.dropDown = new UI.SoftDropDown.SoftDropDown(this.items, this); + this.dropDown = new UI.SoftDropDown.SoftDropDown(this.items, this, 'audio-context'); this.dropDown.setPlaceholderText(this.placeholderText); this.toolbarItemInternal = new UI.Toolbar.ToolbarItem(this.dropDown.element); this.toolbarItemInternal.setEnabled(false); diff --git a/public/panels/web_audio/AudioContextSelector.js.map b/public/panels/web_audio/AudioContextSelector.js.map index 76e8c8964..4e57ad27d 100644 --- a/public/panels/web_audio/AudioContextSelector.js.map +++ b/public/panels/web_audio/AudioContextSelector.js.map @@ -1 +1 @@ -{"version":3,"file":"AudioContextSelector.js","sourceRoot":"","sources":["../../../../../../front_end/panels/web_audio/AudioContextSelector.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OA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B,CAClB,IAA6C,EAAE,EAA2C,EAC1F,WAAyB,EAAE,SAAuB;QACpD,IAAI,WAAW,EAAE;YACf,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;SAC7C;QACD,IAAI,SAAS,EAAE;YACb,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;SACxC;IACH,CAAC;IAED,gBAAgB,CAAC,KAAyC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,CAAC,IAA6C;QACxD,IAAI,CAAC,IAAI,EAAE;YACT,OAAO;SACR;QAED,iDAAiD;QACjD,IAAI,CAAC,IAAI,CAAC,uBAAuB,IAAI,IAAI,CAAC,uBAAuB,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS,EAAE;YAC9F,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;YACpC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAC,CAAC,CAAC,CAAC;SACpG;QAED,IAAI,CAAC,wBAAwB,iDAAyB,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,OAA2C;QAClD,OAAO,GAAG,OAAO,CAAC,WAAW,KAAK,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACpE,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;CACF","sourcesContent":["// Copyright 2019 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport audioContextSelectorStyles from './audioContextSelector.css.js';\n\nimport type * as Protocol from '../../generated/protocol.js';\n\nconst UIStrings = {\n /**\n *@description Text that shows there is no recording\n */\n noRecordings: '(no recordings)',\n /**\n *@description Label prefix for an audio context selection\n *@example {realtime (1e03ec)} PH1\n */\n audioContextS: 'Audio context: {PH1}',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/web_audio/AudioContextSelector.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class AudioContextSelector extends Common.ObjectWrapper.ObjectWrapper implements\n UI.SoftDropDown.Delegate {\n private readonly placeholderText: Platform.UIString.LocalizedString;\n private readonly items: UI.ListModel.ListModel;\n private readonly dropDown: UI.SoftDropDown.SoftDropDown;\n private readonly toolbarItemInternal: UI.Toolbar.ToolbarItem;\n private selectedContextInternal: Protocol.WebAudio.BaseAudioContext|null;\n constructor() {\n super();\n\n this.placeholderText = i18nString(UIStrings.noRecordings);\n\n this.items = new UI.ListModel.ListModel();\n\n this.dropDown = new UI.SoftDropDown.SoftDropDown(this.items, this);\n this.dropDown.setPlaceholderText(this.placeholderText);\n\n this.toolbarItemInternal = new UI.Toolbar.ToolbarItem(this.dropDown.element);\n this.toolbarItemInternal.setEnabled(false);\n this.toolbarItemInternal.setTitle(i18nString(UIStrings.audioContextS, {PH1: this.placeholderText}));\n this.items.addEventListener(UI.ListModel.Events.ItemsReplaced, this.onListItemReplaced, this);\n this.toolbarItemInternal.element.classList.add('toolbar-has-dropdown');\n\n this.selectedContextInternal = null;\n }\n\n private onListItemReplaced(): void {\n const hasItems = Boolean(this.items.length);\n this.toolbarItemInternal.setEnabled(hasItems);\n if (!hasItems) {\n this.toolbarItemInternal.setTitle(i18nString(UIStrings.audioContextS, {PH1: this.placeholderText}));\n }\n }\n\n contextCreated({data: context}: Common.EventTarget.EventTargetEvent): void {\n this.items.insert(this.items.length, context);\n\n // Select if this is the first item.\n if (this.items.length === 1) {\n this.dropDown.selectItem(context);\n }\n }\n\n contextDestroyed({data: contextId}: Common.EventTarget.EventTargetEvent): void {\n const contextIndex =\n this.items.findIndex((context: Protocol.WebAudio.BaseAudioContext): boolean => context.contextId === contextId);\n if (contextIndex > -1) {\n this.items.remove(contextIndex);\n }\n }\n\n contextChanged({data: changedContext}: Common.EventTarget.EventTargetEvent):\n void {\n const contextIndex = this.items.findIndex(\n (context: Protocol.WebAudio.BaseAudioContext): boolean => context.contextId === changedContext.contextId);\n if (contextIndex > -1) {\n this.items.replace(contextIndex, changedContext);\n\n // If the changed context is currently selected by user. Re-select it\n // because the actual element is replaced with a new one.\n if (this.selectedContextInternal && this.selectedContextInternal.contextId === changedContext.contextId) {\n this.dropDown.selectItem(changedContext);\n }\n }\n }\n\n createElementForItem(item: Protocol.WebAudio.BaseAudioContext): Element {\n const element = document.createElement('div');\n const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(\n element, {cssFile: [audioContextSelectorStyles], delegatesFocus: undefined});\n const title = shadowRoot.createChild('div', 'title');\n UI.UIUtils.createTextChild(title, Platform.StringUtilities.trimEndWithMaxLength(this.titleFor(item), 100));\n return element;\n }\n\n selectedContext(): Protocol.WebAudio.BaseAudioContext|null {\n if (!this.selectedContextInternal) {\n return null;\n }\n\n return this.selectedContextInternal;\n }\n\n highlightedItemChanged(\n from: Protocol.WebAudio.BaseAudioContext|null, to: Protocol.WebAudio.BaseAudioContext|null,\n fromElement: Element|null, toElement: Element|null): void {\n if (fromElement) {\n fromElement.classList.remove('highlighted');\n }\n if (toElement) {\n toElement.classList.add('highlighted');\n }\n }\n\n isItemSelectable(_item: Protocol.WebAudio.BaseAudioContext): boolean {\n return true;\n }\n\n itemSelected(item: Protocol.WebAudio.BaseAudioContext|null): void {\n if (!item) {\n return;\n }\n\n // It's possible that no context is selected yet.\n if (!this.selectedContextInternal || this.selectedContextInternal.contextId !== item.contextId) {\n this.selectedContextInternal = item;\n this.toolbarItemInternal.setTitle(i18nString(UIStrings.audioContextS, {PH1: this.titleFor(item)}));\n }\n\n this.dispatchEventToListeners(Events.ContextSelected, item);\n }\n\n reset(): void {\n this.items.replaceAll([]);\n }\n\n titleFor(context: Protocol.WebAudio.BaseAudioContext): string {\n return `${context.contextType} (${context.contextId.substr(-6)})`;\n }\n\n toolbarItem(): UI.Toolbar.ToolbarItem {\n return this.toolbarItemInternal;\n }\n}\n\nexport const enum Events {\n ContextSelected = 'ContextSelected',\n}\n\nexport type EventTypes = {\n [Events.ContextSelected]: Protocol.WebAudio.BaseAudioContext|null,\n};\n"]} \ No newline at end of file +{"version":3,"file":"AudioContextSelector.js","sourceRoot":"","sources":["../../../../../../front_end/panels/web_audio/AudioContextSelector.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAE5D,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AAEvE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,YAAY,EAAE,iBAAiB;IAC/B;;;OAGG;IACH,aAAa,EAAE,sBAAsB;CACtC,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,0CAA0C,EAAE,SAAS,CAAC,CAAC;AAChG,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,MAAM,OAAO,oBAAqB,SAAQ,MAAM,CAAC,aAAa,CAAC,aAAyB;IAErE,eAAe,CAAoC;IACnD,KAAK,CAA6D;IAClE,QAAQ,CAAmE;IAC3E,mBAAmB,CAAyB;IACrD,uBAAuB,CAA0C;IACzE;QACE,KAA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mB,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAC,CAAC,CAAC,CAAC;SACpG;QAED,IAAI,CAAC,wBAAwB,iDAAyB,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,OAA2C;QAClD,OAAO,GAAG,OAAO,CAAC,WAAW,KAAK,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACpE,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;CACF","sourcesContent":["// Copyright 2019 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport audioContextSelectorStyles from './audioContextSelector.css.js';\n\nconst UIStrings = {\n /**\n *@description Text that shows there is no recording\n */\n noRecordings: '(no recordings)',\n /**\n *@description Label prefix for an audio context selection\n *@example {realtime (1e03ec)} PH1\n */\n audioContextS: 'Audio context: {PH1}',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/web_audio/AudioContextSelector.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class AudioContextSelector extends Common.ObjectWrapper.ObjectWrapper implements\n UI.SoftDropDown.Delegate {\n private readonly placeholderText: Platform.UIString.LocalizedString;\n private readonly items: UI.ListModel.ListModel;\n private readonly dropDown: UI.SoftDropDown.SoftDropDown;\n private readonly toolbarItemInternal: UI.Toolbar.ToolbarItem;\n private selectedContextInternal: Protocol.WebAudio.BaseAudioContext|null;\n constructor() {\n super();\n\n this.placeholderText = i18nString(UIStrings.noRecordings);\n\n this.items = new UI.ListModel.ListModel();\n\n this.dropDown = new UI.SoftDropDown.SoftDropDown(this.items, this, 'audio-context');\n this.dropDown.setPlaceholderText(this.placeholderText);\n\n this.toolbarItemInternal = new UI.Toolbar.ToolbarItem(this.dropDown.element);\n this.toolbarItemInternal.setEnabled(false);\n this.toolbarItemInternal.setTitle(i18nString(UIStrings.audioContextS, {PH1: this.placeholderText}));\n this.items.addEventListener(UI.ListModel.Events.ItemsReplaced, this.onListItemReplaced, this);\n this.toolbarItemInternal.element.classList.add('toolbar-has-dropdown');\n\n this.selectedContextInternal = null;\n }\n\n private onListItemReplaced(): void {\n const hasItems = Boolean(this.items.length);\n this.toolbarItemInternal.setEnabled(hasItems);\n if (!hasItems) {\n this.toolbarItemInternal.setTitle(i18nString(UIStrings.audioContextS, {PH1: this.placeholderText}));\n }\n }\n\n contextCreated({data: context}: Common.EventTarget.EventTargetEvent): void {\n this.items.insert(this.items.length, context);\n\n // Select if this is the first item.\n if (this.items.length === 1) {\n this.dropDown.selectItem(context);\n }\n }\n\n contextDestroyed({data: contextId}: Common.EventTarget.EventTargetEvent): void {\n const contextIndex =\n this.items.findIndex((context: Protocol.WebAudio.BaseAudioContext): boolean => context.contextId === contextId);\n if (contextIndex > -1) {\n this.items.remove(contextIndex);\n }\n }\n\n contextChanged({data: changedContext}: Common.EventTarget.EventTargetEvent):\n void {\n const contextIndex = this.items.findIndex(\n (context: Protocol.WebAudio.BaseAudioContext): boolean => context.contextId === changedContext.contextId);\n if (contextIndex > -1) {\n this.items.replace(contextIndex, changedContext);\n\n // If the changed context is currently selected by user. Re-select it\n // because the actual element is replaced with a new one.\n if (this.selectedContextInternal && this.selectedContextInternal.contextId === changedContext.contextId) {\n this.dropDown.selectItem(changedContext);\n }\n }\n }\n\n createElementForItem(item: Protocol.WebAudio.BaseAudioContext): Element {\n const element = document.createElement('div');\n const shadowRoot = UI.Utils.createShadowRootWithCoreStyles(\n element, {cssFile: [audioContextSelectorStyles], delegatesFocus: undefined});\n const title = shadowRoot.createChild('div', 'title');\n UI.UIUtils.createTextChild(title, Platform.StringUtilities.trimEndWithMaxLength(this.titleFor(item), 100));\n return element;\n }\n\n selectedContext(): Protocol.WebAudio.BaseAudioContext|null {\n if (!this.selectedContextInternal) {\n return null;\n }\n\n return this.selectedContextInternal;\n }\n\n highlightedItemChanged(\n from: Protocol.WebAudio.BaseAudioContext|null, to: Protocol.WebAudio.BaseAudioContext|null,\n fromElement: Element|null, toElement: Element|null): void {\n if (fromElement) {\n fromElement.classList.remove('highlighted');\n }\n if (toElement) {\n toElement.classList.add('highlighted');\n }\n }\n\n isItemSelectable(_item: Protocol.WebAudio.BaseAudioContext): boolean {\n return true;\n }\n\n itemSelected(item: Protocol.WebAudio.BaseAudioContext|null): void {\n if (!item) {\n return;\n }\n\n // It's possible that no context is selected yet.\n if (!this.selectedContextInternal || this.selectedContextInternal.contextId !== item.contextId) {\n this.selectedContextInternal = item;\n this.toolbarItemInternal.setTitle(i18nString(UIStrings.audioContextS, {PH1: this.titleFor(item)}));\n }\n\n this.dispatchEventToListeners(Events.ContextSelected, item);\n }\n\n reset(): void {\n this.items.replaceAll([]);\n }\n\n titleFor(context: Protocol.WebAudio.BaseAudioContext): string {\n return `${context.contextType} (${context.contextId.substr(-6)})`;\n }\n\n toolbarItem(): UI.Toolbar.ToolbarItem {\n return this.toolbarItemInternal;\n }\n}\n\nexport const enum Events {\n ContextSelected = 'ContextSelected',\n}\n\nexport type EventTypes = {\n [Events.ContextSelected]: Protocol.WebAudio.BaseAudioContext|null,\n};\n"]} \ No newline at end of file diff --git a/public/panels/web_audio/WebAudioView.d.ts b/public/panels/web_audio/WebAudioView.d.ts index de7e48a1b..9875fab9d 100644 --- a/public/panels/web_audio/WebAudioView.d.ts +++ b/public/panels/web_audio/WebAudioView.d.ts @@ -9,9 +9,6 @@ export declare class WebAudioView extends UI.ThrottledWidget.ThrottledWidget imp private readonly landingPage; private readonly summaryBarContainer; constructor(); - static instance(opts?: { - forceNew: null; - }): WebAudioView; wasShown(): void; willHide(): void; modelAdded(webAudioModel: WebAudioModel): void; diff --git a/public/panels/web_audio/WebAudioView.js b/public/panels/web_audio/WebAudioView.js index 4371b2745..91ca0be29 100644 --- a/public/panels/web_audio/WebAudioView.js +++ b/public/panels/web_audio/WebAudioView.js @@ -1,13 +1,14 @@ // Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import webAudioStyles from './webAudio.css.js'; import * as i18n from '../../core/i18n/i18n.js'; import * as SDK from '../../core/sdk/sdk.js'; import * as UI from '../../ui/legacy/legacy.js'; -import * as GraphVisualizer from './graph_visualizer/graph_visualizer.js'; +import * as VisualLogging from '../../ui/visual_logging/visual_logging.js'; import { ContextDetailBuilder, ContextSummaryBuilder } from './AudioContextContentBuilder.js'; import { AudioContextSelector } from './AudioContextSelector.js'; +import * as GraphVisualizer from './graph_visualizer/graph_visualizer.js'; +import webAudioStyles from './webAudio.css.js'; import { WebAudioModel } from './WebAudioModel.js'; const UIStrings = { /** @@ -17,7 +18,6 @@ const UIStrings = { }; const str_ = i18n.i18n.registerUIStrings('panels/web_audio/WebAudioView.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); -let webAudioViewInstance; export class WebAudioView extends UI.ThrottledWidget.ThrottledWidget { contextSelector; contentContainer; @@ -27,6 +27,7 @@ export class WebAudioView extends UI.ThrottledWidget.ThrottledWidget { summaryBarContainer; constructor() { super(true, 1000); + this.element.setAttribute('jslog', `${VisualLogging.panel().context('web_audio')}`); this.element.classList.add('web-audio-drawer'); // Creates the toolbar. const toolbarContainer = this.contentElement.createChild('div', 'web-audio-toolbar-container vbox'); @@ -60,13 +61,6 @@ export class WebAudioView extends UI.ThrottledWidget.ThrottledWidget { }); SDK.TargetManager.TargetManager.instance().observeModels(WebAudioModel, this); } - static instance(opts = { forceNew: null }) { - const { forceNew } = opts; - if (!webAudioViewInstance || forceNew) { - webAudioViewInstance = new WebAudioView(); - } - return webAudioViewInstance; - } wasShown() { super.wasShown(); this.registerCSSFiles([webAudioStyles]); diff --git a/public/panels/web_audio/WebAudioView.js.map b/public/panels/web_audio/WebAudioView.js.map index 90a647c9e..c025aa066 100644 --- a/public/panels/web_audio/WebAudioView.js.map +++ b/public/panels/web_audio/WebAudioView.js.map @@ -1 +1 @@ -{"version":3,"file":"WebAudioView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/web_audio/WebAudioView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEhD,OAAO,KAAK,eAAe,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAC,oBAAoB,EAAE,qBAAqB,EAAC,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAC,oBAAoB,EAA2B,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAwB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAExE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,8BAA8B,EAAE,0DAA0D;CAC3F,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;AACxF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,IAAI,oBAAkC,CAAC;AACvC,MAAM,OAAO,YAAa,SAAQ,EAAE,CAAC,eAAe,CAAC,eAAe;IAEjD,eAAe,CAAuB;IACtC,gBAAgB,CAAc;IAC9B,mBAA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WAAW,EAAE,CAAC,CAAC;IACrE,CAAC;IAEO,eAAe;QACrB,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC;IAC5C,CAAC;IAEO,KAAK,CAAC,gBAAgB;QAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC;QACvD,IAAI,CAAC,OAAO,EAAE;YACZ,IAAI,CAAC,eAAe,EAAE,CAAC;YACvB,OAAO;SACR;QAED,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;YACpF,8CAA8C;YAC9C,IAAI,OAAO,CAAC,WAAW,KAAK,UAAU,EAAE;gBACtC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;oBACpD,SAAS;iBACV;gBACD,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;gBACxE,IAAI,YAAY,EAAE;oBAChB,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;iBACxD;aACF;iBAAM;gBACL,IAAI,CAAC,eAAe,EAAE,CAAC;aACxB;SACF;IACH,CAAC;CACF","sourcesContent":["// Copyright 2019 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport webAudioStyles from './webAudio.css.js';\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as GraphVisualizer from './graph_visualizer/graph_visualizer.js';\n\nimport {ContextDetailBuilder, ContextSummaryBuilder} from './AudioContextContentBuilder.js';\nimport {AudioContextSelector, Events as SelectorEvents} from './AudioContextSelector.js';\nimport {Events as ModelEvents, WebAudioModel} from './WebAudioModel.js';\n\nconst UIStrings = {\n /**\n *@description Text in Web Audio View\n */\n openAPageThatUsesWebAudioApiTo: 'Open a page that uses Web Audio API to start monitoring.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/web_audio/WebAudioView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet webAudioViewInstance: WebAudioView;\nexport class WebAudioView extends UI.ThrottledWidget.ThrottledWidget implements\n SDK.TargetManager.SDKModelObserver {\n private readonly contextSelector: AudioContextSelector;\n private readonly contentContainer: HTMLElement;\n private readonly detailViewContainer: HTMLElement;\n private graphManager: GraphVisualizer.GraphManager.GraphManager;\n private readonly landingPage: UI.Widget.VBox;\n private readonly summaryBarContainer: HTMLElement;\n constructor() {\n super(true, 1000);\n this.element.classList.add('web-audio-drawer');\n\n // Creates the toolbar.\n const toolbarContainer = this.contentElement.createChild('div', 'web-audio-toolbar-container vbox');\n this.contextSelector = new AudioContextSelector();\n const toolbar = new UI.Toolbar.Toolbar('web-audio-toolbar', toolbarContainer);\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('components.collect-garbage'));\n toolbar.appendSeparator();\n toolbar.appendToolbarItem(this.contextSelector.toolbarItem());\n\n // Create content container\n this.contentContainer = this.contentElement.createChild('div', 'web-audio-content-container vbox flex-auto');\n\n // Creates the detail view.\n this.detailViewContainer = this.contentContainer.createChild('div', 'web-audio-details-container vbox flex-auto');\n\n this.graphManager = new GraphVisualizer.GraphManager.GraphManager();\n\n // Creates the landing page.\n this.landingPage = new UI.Widget.VBox();\n this.landingPage.contentElement.classList.add('web-audio-landing-page', 'fill');\n this.landingPage.contentElement.appendChild(UI.Fragment.html`\n
\n

${i18nString(UIStrings.openAPageThatUsesWebAudioApiTo)}

\n
\n `);\n this.landingPage.show(this.detailViewContainer);\n\n // Creates the summary bar.\n this.summaryBarContainer = this.contentContainer.createChild('div', 'web-audio-summary-container');\n\n this.contextSelector.addEventListener(\n SelectorEvents.ContextSelected,\n (event: Common.EventTarget.EventTargetEvent): void => {\n const context = event.data;\n if (context) {\n this.updateDetailView(context);\n }\n void this.doUpdate();\n });\n\n SDK.TargetManager.TargetManager.instance().observeModels(WebAudioModel, this);\n }\n\n static instance(opts = {forceNew: null}): WebAudioView {\n const {forceNew} = opts;\n if (!webAudioViewInstance || forceNew) {\n webAudioViewInstance = new WebAudioView();\n }\n\n return webAudioViewInstance;\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([webAudioStyles]);\n for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {\n this.addEventListeners(model);\n }\n }\n\n override willHide(): void {\n for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {\n this.removeEventListeners(model);\n }\n }\n\n modelAdded(webAudioModel: WebAudioModel): void {\n if (this.isShowing()) {\n this.addEventListeners(webAudioModel);\n }\n }\n\n modelRemoved(webAudioModel: WebAudioModel): void {\n this.removeEventListeners(webAudioModel);\n }\n\n override async doUpdate(): Promise {\n await this.pollRealtimeData();\n this.update();\n }\n\n private addEventListeners(webAudioModel: WebAudioModel): void {\n webAudioModel.ensureEnabled();\n webAudioModel.addEventListener(ModelEvents.ContextCreated, this.contextCreated, this);\n webAudioModel.addEventListener(ModelEvents.ContextDestroyed, this.contextDestroyed, this);\n webAudioModel.addEventListener(ModelEvents.ContextChanged, this.contextChanged, this);\n webAudioModel.addEventListener(ModelEvents.ModelReset, this.reset, this);\n webAudioModel.addEventListener(ModelEvents.ModelSuspend, this.suspendModel, this);\n webAudioModel.addEventListener(ModelEvents.AudioListenerCreated, this.audioListenerCreated, this);\n webAudioModel.addEventListener(ModelEvents.AudioListenerWillBeDestroyed, this.audioListenerWillBeDestroyed, this);\n webAudioModel.addEventListener(ModelEvents.AudioNodeCreated, this.audioNodeCreated, this);\n webAudioModel.addEventListener(ModelEvents.AudioNodeWillBeDestroyed, this.audioNodeWillBeDestroyed, this);\n webAudioModel.addEventListener(ModelEvents.AudioParamCreated, this.audioParamCreated, this);\n webAudioModel.addEventListener(ModelEvents.AudioParamWillBeDestroyed, this.audioParamWillBeDestroyed, this);\n webAudioModel.addEventListener(ModelEvents.NodesConnected, this.nodesConnected, this);\n webAudioModel.addEventListener(ModelEvents.NodesDisconnected, this.nodesDisconnected, this);\n webAudioModel.addEventListener(ModelEvents.NodeParamConnected, this.nodeParamConnected, this);\n webAudioModel.addEventListener(ModelEvents.NodeParamDisconnected, this.nodeParamDisconnected, this);\n }\n\n private removeEventListeners(webAudioModel: WebAudioModel): void {\n webAudioModel.removeEventListener(ModelEvents.ContextCreated, this.contextCreated, this);\n webAudioModel.removeEventListener(ModelEvents.ContextDestroyed, this.contextDestroyed, this);\n webAudioModel.removeEventListener(ModelEvents.ContextChanged, this.contextChanged, this);\n webAudioModel.removeEventListener(ModelEvents.ModelReset, this.reset, this);\n webAudioModel.removeEventListener(ModelEvents.ModelSuspend, this.suspendModel, this);\n webAudioModel.removeEventListener(ModelEvents.AudioListenerCreated, this.audioListenerCreated, this);\n webAudioModel.removeEventListener(\n ModelEvents.AudioListenerWillBeDestroyed, this.audioListenerWillBeDestroyed, this);\n webAudioModel.removeEventListener(ModelEvents.AudioNodeCreated, this.audioNodeCreated, this);\n webAudioModel.removeEventListener(ModelEvents.AudioNodeWillBeDestroyed, this.audioNodeWillBeDestroyed, this);\n webAudioModel.removeEventListener(ModelEvents.AudioParamCreated, this.audioParamCreated, this);\n webAudioModel.removeEventListener(ModelEvents.AudioParamWillBeDestroyed, this.audioParamWillBeDestroyed, this);\n webAudioModel.removeEventListener(ModelEvents.NodesConnected, this.nodesConnected, this);\n webAudioModel.removeEventListener(ModelEvents.NodesDisconnected, this.nodesDisconnected, this);\n webAudioModel.removeEventListener(ModelEvents.NodeParamConnected, this.nodeParamConnected, this);\n webAudioModel.removeEventListener(ModelEvents.NodeParamDisconnected, this.nodeParamDisconnected, this);\n }\n\n private contextCreated(event: Common.EventTarget.EventTargetEvent): void {\n const context = event.data;\n this.graphManager.createContext(context.contextId);\n this.contextSelector.contextCreated(event);\n }\n\n private contextDestroyed(event: Common.EventTarget.EventTargetEvent): void {\n const contextId = event.data;\n this.graphManager.destroyContext(contextId);\n this.contextSelector.contextDestroyed(event);\n }\n\n private contextChanged(event: Common.EventTarget.EventTargetEvent): void {\n const context = event.data;\n if (!this.graphManager.hasContext(context.contextId)) {\n return;\n }\n\n this.contextSelector.contextChanged(event);\n }\n\n private reset(): void {\n if (this.landingPage.isShowing()) {\n this.landingPage.detach();\n }\n this.contextSelector.reset();\n this.detailViewContainer.removeChildren();\n this.landingPage.show(this.detailViewContainer);\n this.graphManager.clearGraphs();\n }\n\n private suspendModel(): void {\n this.graphManager.clearGraphs();\n }\n\n private audioListenerCreated(event: Common.EventTarget.EventTargetEvent): void {\n const listener = event.data;\n const graph = this.graphManager.getGraph(listener.contextId);\n if (!graph) {\n return;\n }\n graph.addNode({\n nodeId: listener.listenerId,\n nodeType: 'Listener',\n numberOfInputs: 0,\n numberOfOutputs: 0,\n });\n }\n\n private audioListenerWillBeDestroyed(\n event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, listenerId} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.removeNode(listenerId);\n }\n\n private audioNodeCreated(event: Common.EventTarget.EventTargetEvent): void {\n const node = event.data;\n const graph = this.graphManager.getGraph(node.contextId);\n if (!graph) {\n return;\n }\n graph.addNode({\n nodeId: node.nodeId,\n nodeType: node.nodeType,\n numberOfInputs: node.numberOfInputs,\n numberOfOutputs: node.numberOfOutputs,\n });\n }\n\n private audioNodeWillBeDestroyed(\n event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, nodeId} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.removeNode(nodeId);\n }\n\n private audioParamCreated(event: Common.EventTarget.EventTargetEvent): void {\n const param = event.data;\n const graph = this.graphManager.getGraph(param.contextId);\n if (!graph) {\n return;\n }\n graph.addParam({\n paramId: param.paramId,\n paramType: param.paramType,\n nodeId: param.nodeId,\n });\n }\n\n private audioParamWillBeDestroyed(\n event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, paramId} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.removeParam(paramId);\n }\n\n private nodesConnected(event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, sourceId, destinationId, sourceOutputIndex, destinationInputIndex} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.addNodeToNodeConnection({\n sourceId,\n destinationId,\n sourceOutputIndex,\n destinationInputIndex,\n });\n }\n\n private nodesDisconnected(event: Common.EventTarget.EventTargetEvent):\n void {\n const {contextId, sourceId, destinationId, sourceOutputIndex, destinationInputIndex} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.removeNodeToNodeConnection({\n sourceId,\n destinationId,\n sourceOutputIndex,\n destinationInputIndex,\n });\n }\n\n private nodeParamConnected(event: Common.EventTarget.EventTargetEvent):\n void {\n const {contextId, sourceId, destinationId, sourceOutputIndex} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n // Since the destinationId is AudioParamId, we need to find the nodeId as the\n // real destinationId.\n const nodeId = graph.getNodeIdByParamId(destinationId);\n if (!nodeId) {\n return;\n }\n graph.addNodeToParamConnection({\n sourceId,\n destinationId: nodeId,\n sourceOutputIndex,\n destinationParamId: destinationId,\n });\n }\n\n private nodeParamDisconnected(\n event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, sourceId, destinationId, sourceOutputIndex} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n // Since the destinationId is AudioParamId, we need to find the nodeId as the\n // real destinationId.\n const nodeId = graph.getNodeIdByParamId(destinationId);\n if (!nodeId) {\n return;\n }\n graph.removeNodeToParamConnection({\n sourceId,\n destinationId: nodeId,\n sourceOutputIndex,\n destinationParamId: destinationId,\n });\n }\n\n private updateDetailView(context: Protocol.WebAudio.BaseAudioContext): void {\n if (this.landingPage.isShowing()) {\n this.landingPage.detach();\n }\n const detailBuilder = new ContextDetailBuilder(context);\n this.detailViewContainer.removeChildren();\n this.detailViewContainer.appendChild(detailBuilder.getFragment());\n }\n\n private updateSummaryBar(contextId: string, contextRealtimeData: Protocol.WebAudio.ContextRealtimeData): void {\n const summaryBuilder = new ContextSummaryBuilder(contextId, contextRealtimeData);\n this.summaryBarContainer.removeChildren();\n this.summaryBarContainer.appendChild(summaryBuilder.getFragment());\n }\n\n private clearSummaryBar(): void {\n this.summaryBarContainer.removeChildren();\n }\n\n private async pollRealtimeData(): Promise {\n const context = this.contextSelector.selectedContext();\n if (!context) {\n this.clearSummaryBar();\n return;\n }\n\n for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {\n // Display summary only for real-time context.\n if (context.contextType === 'realtime') {\n if (!this.graphManager.hasContext(context.contextId)) {\n continue;\n }\n const realtimeData = await model.requestRealtimeData(context.contextId);\n if (realtimeData) {\n this.updateSummaryBar(context.contextId, realtimeData);\n }\n } else {\n this.clearSummaryBar();\n }\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"WebAudioView.js","sourceRoot":"","sources":["../../../../../../front_end/panels/web_audio/WebAudioView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAC,oBAAoB,EAAE,qBAAqB,EAAC,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAC,oBAAoB,EAA2B,MAAM,2BAA2B,CAAC;AACzF,OAAO,KAAK,eAAe,MAAM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2019 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport {ContextDetailBuilder, ContextSummaryBuilder} from './AudioContextContentBuilder.js';\nimport {AudioContextSelector, Events as SelectorEvents} from './AudioContextSelector.js';\nimport * as GraphVisualizer from './graph_visualizer/graph_visualizer.js';\nimport webAudioStyles from './webAudio.css.js';\nimport {Events as ModelEvents, WebAudioModel} from './WebAudioModel.js';\n\nconst UIStrings = {\n /**\n *@description Text in Web Audio View\n */\n openAPageThatUsesWebAudioApiTo: 'Open a page that uses Web Audio API to start monitoring.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/web_audio/WebAudioView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class WebAudioView extends UI.ThrottledWidget.ThrottledWidget implements\n SDK.TargetManager.SDKModelObserver {\n private readonly contextSelector: AudioContextSelector;\n private readonly contentContainer: HTMLElement;\n private readonly detailViewContainer: HTMLElement;\n private graphManager: GraphVisualizer.GraphManager.GraphManager;\n private readonly landingPage: UI.Widget.VBox;\n private readonly summaryBarContainer: HTMLElement;\n constructor() {\n super(true, 1000);\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('web_audio')}`);\n this.element.classList.add('web-audio-drawer');\n\n // Creates the toolbar.\n const toolbarContainer = this.contentElement.createChild('div', 'web-audio-toolbar-container vbox');\n this.contextSelector = new AudioContextSelector();\n const toolbar = new UI.Toolbar.Toolbar('web-audio-toolbar', toolbarContainer);\n toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButtonForId('components.collect-garbage'));\n toolbar.appendSeparator();\n toolbar.appendToolbarItem(this.contextSelector.toolbarItem());\n\n // Create content container\n this.contentContainer = this.contentElement.createChild('div', 'web-audio-content-container vbox flex-auto');\n\n // Creates the detail view.\n this.detailViewContainer = this.contentContainer.createChild('div', 'web-audio-details-container vbox flex-auto');\n\n this.graphManager = new GraphVisualizer.GraphManager.GraphManager();\n\n // Creates the landing page.\n this.landingPage = new UI.Widget.VBox();\n this.landingPage.contentElement.classList.add('web-audio-landing-page', 'fill');\n this.landingPage.contentElement.appendChild(UI.Fragment.html`\n
\n

${i18nString(UIStrings.openAPageThatUsesWebAudioApiTo)}

\n
\n `);\n this.landingPage.show(this.detailViewContainer);\n\n // Creates the summary bar.\n this.summaryBarContainer = this.contentContainer.createChild('div', 'web-audio-summary-container');\n\n this.contextSelector.addEventListener(\n SelectorEvents.ContextSelected,\n (event: Common.EventTarget.EventTargetEvent): void => {\n const context = event.data;\n if (context) {\n this.updateDetailView(context);\n }\n void this.doUpdate();\n });\n\n SDK.TargetManager.TargetManager.instance().observeModels(WebAudioModel, this);\n }\n\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([webAudioStyles]);\n for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {\n this.addEventListeners(model);\n }\n }\n\n override willHide(): void {\n for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {\n this.removeEventListeners(model);\n }\n }\n\n modelAdded(webAudioModel: WebAudioModel): void {\n if (this.isShowing()) {\n this.addEventListeners(webAudioModel);\n }\n }\n\n modelRemoved(webAudioModel: WebAudioModel): void {\n this.removeEventListeners(webAudioModel);\n }\n\n override async doUpdate(): Promise {\n await this.pollRealtimeData();\n this.update();\n }\n\n private addEventListeners(webAudioModel: WebAudioModel): void {\n webAudioModel.ensureEnabled();\n webAudioModel.addEventListener(ModelEvents.ContextCreated, this.contextCreated, this);\n webAudioModel.addEventListener(ModelEvents.ContextDestroyed, this.contextDestroyed, this);\n webAudioModel.addEventListener(ModelEvents.ContextChanged, this.contextChanged, this);\n webAudioModel.addEventListener(ModelEvents.ModelReset, this.reset, this);\n webAudioModel.addEventListener(ModelEvents.ModelSuspend, this.suspendModel, this);\n webAudioModel.addEventListener(ModelEvents.AudioListenerCreated, this.audioListenerCreated, this);\n webAudioModel.addEventListener(ModelEvents.AudioListenerWillBeDestroyed, this.audioListenerWillBeDestroyed, this);\n webAudioModel.addEventListener(ModelEvents.AudioNodeCreated, this.audioNodeCreated, this);\n webAudioModel.addEventListener(ModelEvents.AudioNodeWillBeDestroyed, this.audioNodeWillBeDestroyed, this);\n webAudioModel.addEventListener(ModelEvents.AudioParamCreated, this.audioParamCreated, this);\n webAudioModel.addEventListener(ModelEvents.AudioParamWillBeDestroyed, this.audioParamWillBeDestroyed, this);\n webAudioModel.addEventListener(ModelEvents.NodesConnected, this.nodesConnected, this);\n webAudioModel.addEventListener(ModelEvents.NodesDisconnected, this.nodesDisconnected, this);\n webAudioModel.addEventListener(ModelEvents.NodeParamConnected, this.nodeParamConnected, this);\n webAudioModel.addEventListener(ModelEvents.NodeParamDisconnected, this.nodeParamDisconnected, this);\n }\n\n private removeEventListeners(webAudioModel: WebAudioModel): void {\n webAudioModel.removeEventListener(ModelEvents.ContextCreated, this.contextCreated, this);\n webAudioModel.removeEventListener(ModelEvents.ContextDestroyed, this.contextDestroyed, this);\n webAudioModel.removeEventListener(ModelEvents.ContextChanged, this.contextChanged, this);\n webAudioModel.removeEventListener(ModelEvents.ModelReset, this.reset, this);\n webAudioModel.removeEventListener(ModelEvents.ModelSuspend, this.suspendModel, this);\n webAudioModel.removeEventListener(ModelEvents.AudioListenerCreated, this.audioListenerCreated, this);\n webAudioModel.removeEventListener(\n ModelEvents.AudioListenerWillBeDestroyed, this.audioListenerWillBeDestroyed, this);\n webAudioModel.removeEventListener(ModelEvents.AudioNodeCreated, this.audioNodeCreated, this);\n webAudioModel.removeEventListener(ModelEvents.AudioNodeWillBeDestroyed, this.audioNodeWillBeDestroyed, this);\n webAudioModel.removeEventListener(ModelEvents.AudioParamCreated, this.audioParamCreated, this);\n webAudioModel.removeEventListener(ModelEvents.AudioParamWillBeDestroyed, this.audioParamWillBeDestroyed, this);\n webAudioModel.removeEventListener(ModelEvents.NodesConnected, this.nodesConnected, this);\n webAudioModel.removeEventListener(ModelEvents.NodesDisconnected, this.nodesDisconnected, this);\n webAudioModel.removeEventListener(ModelEvents.NodeParamConnected, this.nodeParamConnected, this);\n webAudioModel.removeEventListener(ModelEvents.NodeParamDisconnected, this.nodeParamDisconnected, this);\n }\n\n private contextCreated(event: Common.EventTarget.EventTargetEvent): void {\n const context = event.data;\n this.graphManager.createContext(context.contextId);\n this.contextSelector.contextCreated(event);\n }\n\n private contextDestroyed(event: Common.EventTarget.EventTargetEvent): void {\n const contextId = event.data;\n this.graphManager.destroyContext(contextId);\n this.contextSelector.contextDestroyed(event);\n }\n\n private contextChanged(event: Common.EventTarget.EventTargetEvent): void {\n const context = event.data;\n if (!this.graphManager.hasContext(context.contextId)) {\n return;\n }\n\n this.contextSelector.contextChanged(event);\n }\n\n private reset(): void {\n if (this.landingPage.isShowing()) {\n this.landingPage.detach();\n }\n this.contextSelector.reset();\n this.detailViewContainer.removeChildren();\n this.landingPage.show(this.detailViewContainer);\n this.graphManager.clearGraphs();\n }\n\n private suspendModel(): void {\n this.graphManager.clearGraphs();\n }\n\n private audioListenerCreated(event: Common.EventTarget.EventTargetEvent): void {\n const listener = event.data;\n const graph = this.graphManager.getGraph(listener.contextId);\n if (!graph) {\n return;\n }\n graph.addNode({\n nodeId: listener.listenerId,\n nodeType: 'Listener',\n numberOfInputs: 0,\n numberOfOutputs: 0,\n });\n }\n\n private audioListenerWillBeDestroyed(\n event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, listenerId} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.removeNode(listenerId);\n }\n\n private audioNodeCreated(event: Common.EventTarget.EventTargetEvent): void {\n const node = event.data;\n const graph = this.graphManager.getGraph(node.contextId);\n if (!graph) {\n return;\n }\n graph.addNode({\n nodeId: node.nodeId,\n nodeType: node.nodeType,\n numberOfInputs: node.numberOfInputs,\n numberOfOutputs: node.numberOfOutputs,\n });\n }\n\n private audioNodeWillBeDestroyed(\n event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, nodeId} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.removeNode(nodeId);\n }\n\n private audioParamCreated(event: Common.EventTarget.EventTargetEvent): void {\n const param = event.data;\n const graph = this.graphManager.getGraph(param.contextId);\n if (!graph) {\n return;\n }\n graph.addParam({\n paramId: param.paramId,\n paramType: param.paramType,\n nodeId: param.nodeId,\n });\n }\n\n private audioParamWillBeDestroyed(\n event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, paramId} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.removeParam(paramId);\n }\n\n private nodesConnected(event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, sourceId, destinationId, sourceOutputIndex, destinationInputIndex} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.addNodeToNodeConnection({\n sourceId,\n destinationId,\n sourceOutputIndex,\n destinationInputIndex,\n });\n }\n\n private nodesDisconnected(event: Common.EventTarget.EventTargetEvent):\n void {\n const {contextId, sourceId, destinationId, sourceOutputIndex, destinationInputIndex} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n graph.removeNodeToNodeConnection({\n sourceId,\n destinationId,\n sourceOutputIndex,\n destinationInputIndex,\n });\n }\n\n private nodeParamConnected(event: Common.EventTarget.EventTargetEvent):\n void {\n const {contextId, sourceId, destinationId, sourceOutputIndex} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n // Since the destinationId is AudioParamId, we need to find the nodeId as the\n // real destinationId.\n const nodeId = graph.getNodeIdByParamId(destinationId);\n if (!nodeId) {\n return;\n }\n graph.addNodeToParamConnection({\n sourceId,\n destinationId: nodeId,\n sourceOutputIndex,\n destinationParamId: destinationId,\n });\n }\n\n private nodeParamDisconnected(\n event: Common.EventTarget.EventTargetEvent): void {\n const {contextId, sourceId, destinationId, sourceOutputIndex} = event.data;\n const graph = this.graphManager.getGraph(contextId);\n if (!graph) {\n return;\n }\n // Since the destinationId is AudioParamId, we need to find the nodeId as the\n // real destinationId.\n const nodeId = graph.getNodeIdByParamId(destinationId);\n if (!nodeId) {\n return;\n }\n graph.removeNodeToParamConnection({\n sourceId,\n destinationId: nodeId,\n sourceOutputIndex,\n destinationParamId: destinationId,\n });\n }\n\n private updateDetailView(context: Protocol.WebAudio.BaseAudioContext): void {\n if (this.landingPage.isShowing()) {\n this.landingPage.detach();\n }\n const detailBuilder = new ContextDetailBuilder(context);\n this.detailViewContainer.removeChildren();\n this.detailViewContainer.appendChild(detailBuilder.getFragment());\n }\n\n private updateSummaryBar(contextId: string, contextRealtimeData: Protocol.WebAudio.ContextRealtimeData): void {\n const summaryBuilder = new ContextSummaryBuilder(contextId, contextRealtimeData);\n this.summaryBarContainer.removeChildren();\n this.summaryBarContainer.appendChild(summaryBuilder.getFragment());\n }\n\n private clearSummaryBar(): void {\n this.summaryBarContainer.removeChildren();\n }\n\n private async pollRealtimeData(): Promise {\n const context = this.contextSelector.selectedContext();\n if (!context) {\n this.clearSummaryBar();\n return;\n }\n\n for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {\n // Display summary only for real-time context.\n if (context.contextType === 'realtime') {\n if (!this.graphManager.hasContext(context.contextId)) {\n continue;\n }\n const realtimeData = await model.requestRealtimeData(context.contextId);\n if (realtimeData) {\n this.updateSummaryBar(context.contextId, realtimeData);\n }\n } else {\n this.clearSummaryBar();\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/web_audio/web_audio-meta.js b/public/panels/web_audio/web_audio-meta.js index bc2c64d3f..14eed23ec 100644 --- a/public/panels/web_audio/web_audio-meta.js +++ b/public/panels/web_audio/web_audio-meta.js @@ -35,7 +35,7 @@ UI.ViewManager.registerViewExtension({ order: 100, async loadView() { const WebAudio = await loadWebAudioModule(); - return WebAudio.WebAudioView.WebAudioView.instance(); + return new WebAudio.WebAudioView.WebAudioView(); }, tags: [i18nLazyString(UIStrings.audio)], }); diff --git a/public/panels/web_audio/web_audio-meta.js.map b/public/panels/web_audio/web_audio-meta.js.map index bd403be1b..f330bd8ea 100644 --- a/public/panels/web_audio/web_audio-meta.js.map +++ b/public/panels/web_audio/web_audio-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"web_audio-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/web_audio/web_audio-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;OAEG;IACH,YAAY,EAAE,eAAe;CAC9B,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,oCAAoC,EAAE,SAAS,CAAC,CAAC;AAC1F,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,oBAAiD,CAAC;AAEtD,KAAK,UAAU,kBAAkB;IAC/B,IAAI,CAAC,oBAAoB,EAAE;QACzB,oBAAoB,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;KACvD;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,mEAA+C;IACvD,EAAE,EAAE,WAAW;IACf,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC;IACzC,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,YAAY,CAAC;IACrD,WAAW,4DAA0C;IACrD,KAAK,EAAE,GAAG;IACV,KAAK,CAAC,QAAQ;QACZ,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC5C,OAAO,QAAQ,CAAC,YAAY,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;IACvD,CAAC;IACD,IAAI,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;CACxC,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as WebAudio from './web_audio.js';\n\nconst UIStrings = {\n /**\n *@description Title of the WebAudio tool\n */\n webaudio: 'WebAudio',\n /**\n *@description A tags of WebAudio tool that can be searched in the command menu\n */\n audio: 'audio',\n /**\n *@description Command for showing the WebAudio tool\n */\n showWebaudio: 'Show WebAudio',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/web_audio/web_audio-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedWebAudioModule: (typeof WebAudio|undefined);\n\nasync function loadWebAudioModule(): Promise {\n if (!loadedWebAudioModule) {\n loadedWebAudioModule = await import('./web_audio.js');\n }\n return loadedWebAudioModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'web-audio',\n title: i18nLazyString(UIStrings.webaudio),\n commandPrompt: i18nLazyString(UIStrings.showWebaudio),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 100,\n async loadView() {\n const WebAudio = await loadWebAudioModule();\n return WebAudio.WebAudioView.WebAudioView.instance();\n },\n tags: [i18nLazyString(UIStrings.audio)],\n});\n"]} \ No newline at end of file +{"version":3,"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esContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as WebAudio from './web_audio.js';\n\nconst UIStrings = {\n /**\n *@description Title of the WebAudio tool\n */\n webaudio: 'WebAudio',\n /**\n *@description A tags of WebAudio tool that can be searched in the command menu\n */\n audio: 'audio',\n /**\n *@description Command for showing the WebAudio tool\n */\n showWebaudio: 'Show WebAudio',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/web_audio/web_audio-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedWebAudioModule: (typeof WebAudio|undefined);\n\nasync function loadWebAudioModule(): Promise {\n if (!loadedWebAudioModule) {\n loadedWebAudioModule = await import('./web_audio.js');\n }\n return loadedWebAudioModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'web-audio',\n title: i18nLazyString(UIStrings.webaudio),\n commandPrompt: i18nLazyString(UIStrings.showWebaudio),\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n order: 100,\n async loadView() {\n const WebAudio = await loadWebAudioModule();\n return new WebAudio.WebAudioView.WebAudioView();\n },\n tags: [i18nLazyString(UIStrings.audio)],\n});\n"]} \ No newline at end of file diff --git a/public/panels/webauthn/WebauthnPane.d.ts b/public/panels/webauthn/WebauthnPane.d.ts index fa1a586f5..dbf74793a 100644 --- a/public/panels/webauthn/WebauthnPane.d.ts +++ b/public/panels/webauthn/WebauthnPane.d.ts @@ -15,9 +15,6 @@ export declare class WebauthnPaneImpl extends UI.Widget.VBox implements SDK.Targ largeBlobCheckbox: HTMLInputElement | undefined; addAuthenticatorButton: HTMLButtonElement | undefined; constructor(); - static instance(opts?: { - forceNew: boolean; - }): WebauthnPaneImpl; modelAdded(model: SDK.WebAuthnModel.WebAuthnModel): void; modelRemoved(model: SDK.WebAuthnModel.WebAuthnModel): void; ownerViewDisposed(): Promise; diff --git a/public/panels/webauthn/WebauthnPane.js b/public/panels/webauthn/WebauthnPane.js index 91568d147..7a48d84eb 100644 --- a/public/panels/webauthn/WebauthnPane.js +++ b/public/panels/webauthn/WebauthnPane.js @@ -192,7 +192,6 @@ class EmptyDataGridNode extends DataGrid.DataGrid.DataGridNode { element.appendChild(td); } } -let webauthnPaneImplInstance; // We extrapolate this variable as otherwise git detects a private key, even though we // perform string manipulation. If we extract the name, then the regex doesn't match // and we can upload as expected. @@ -239,12 +238,6 @@ export class WebauthnPaneImpl extends UI.Widget.VBox { this.#createNewAuthenticatorSection(); this.#updateVisibility(false); } - static instance(opts) { - if (!webauthnPaneImplInstance || opts?.forceNew) { - webauthnPaneImplInstance = new WebauthnPaneImpl(); - } - return webauthnPaneImplInstance; - } modelAdded(model) { if (model.target() === model.target().outermostTarget()) { this.#model = model; diff --git a/public/panels/webauthn/WebauthnPane.js.map b/public/panels/webauthn/WebauthnPane.js.map index 670535871..14720cd74 100644 --- a/public/panels/webauthn/WebauthnPane.js.map +++ b/public/panels/webauthn/WebauthnPane.js.map @@ -1 +1 @@ -{"version":3,"file":"WebauthnPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/webauthn/WebauthnPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,kBAAkB,MAA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,mBAAmB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,CAAC;QAChG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,aAAsB,EAAQ,EAAE;YAClE,MAAM,MAAM,GAAI,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAsB,CAAC;YAC1F,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO;aACR;YACD,MAAM,CAAC,OAAO,GAAI,aAA6B,CAAC,OAAO,CAAC,eAAe,KAAK,IAAI,CAAC,aAAa,CAAC;QACjG,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,yBAAyB;QAC7B,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,MAAM,EAAE;YACrC,MAAM,IAAI,CAAC,MAAM,CAAC,8BAA8B,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SAC7E;QACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IACQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport webauthnPaneStyles from './webauthnPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Label for button that allows user to download the private key related to a credential.\n */\n export: 'Export',\n /**\n *@description Label for an item to remove something\n */\n remove: 'Remove',\n /**\n *@description Label for empty credentials table.\n *@example {navigator.credentials.create()} PH1\n */\n noCredentialsTryCallingSFromYour: 'No credentials. Try calling {PH1} from your website.',\n /**\n *@description Label for checkbox to toggle the virtual authenticator environment allowing user to interact with software-based virtual authenticators.\n */\n enableVirtualAuthenticator: 'Enable virtual authenticator environment',\n /**\n *@description Label for ID field for credentials.\n */\n id: 'ID',\n /**\n *@description Label for field that describes whether a credential is a resident credential.\n */\n isResident: 'Is Resident',\n /**\n *@description Label for credential field that represents the Relying Party ID that the credential is scoped to.\n */\n rpId: 'RP ID',\n /**\n *@description Label for a column in a table. A field/unique ID that represents the user a credential is mapped to.\n */\n userHandle: 'User Handle',\n /**\n *@description Label for signature counter field for credentials which represents the number of successful assertions.\n * See https://w3c.github.io/webauthn/#signature-counter.\n */\n signCount: 'Signature Count',\n /**\n *@description Label for column with actions for credentials.\n */\n actions: 'Actions',\n /**\n *@description Title for the table that holds the credentials that a authenticator has registered.\n */\n credentials: 'Credentials',\n /**\n *@description Label for the learn more link that is shown before the virtual environment is enabled.\n */\n useWebauthnForPhishingresistant: 'Use WebAuthn for phishing-resistant authentication',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Title for section of interface that allows user to add a new virtual authenticator.\n */\n newAuthenticator: 'New authenticator',\n /**\n *@description Text for security or network protocol\n */\n protocol: 'Protocol',\n /**\n *@description Label for input to select which transport option to use on virtual authenticators, e.g. USB or Bluetooth.\n */\n transport: 'Transport',\n /**\n *@description Label for checkbox that toggles resident key support on virtual authenticators.\n */\n supportsResidentKeys: 'Supports resident keys',\n /**\n *@description Label for checkbox that toggles large blob support on virtual authenticators. Large blobs are opaque data associated\n * with a WebAuthn credential that a website can store, like an SSH certificate or a symmetric encryption key.\n * See https://w3c.github.io/webauthn/#sctn-large-blob-extension\n */\n supportsLargeBlob: 'Supports large blob',\n /**\n *@description Text to add something\n */\n add: 'Add',\n /**\n *@description Label for button to add a new virtual authenticator.\n */\n addAuthenticator: 'Add authenticator',\n /**\n *@description Label for radio button that toggles whether an authenticator is active.\n */\n active: 'Active',\n /**\n *@description Title for button that enables user to customize name of authenticator.\n */\n editName: 'Edit name',\n /**\n *@description Placeholder for the input box to customize name of authenticator.\n */\n enterNewName: 'Enter new name',\n /**\n *@description Title for button that enables user to save name of authenticator after editing it.\n */\n saveName: 'Save name',\n /**\n *@description Title for a user-added virtual authenticator which is uniquely identified with its AUTHENTICATORID.\n *@example {8c7873be-0b13-4996-a794-1521331bbd96} PH1\n */\n authenticatorS: 'Authenticator {PH1}',\n /**\n *@description Name for generated file which user can download. A private key is a secret code which enables encoding and decoding of a credential. .pem is the file extension.\n */\n privateKeypem: 'Private key.pem',\n /**\n *@description Label for field that holds an authenticator's universally unique identifier (UUID).\n */\n uuid: 'UUID',\n /**\n *@description Label for checkbox that toggles user verification support on virtual authenticators.\n */\n supportsUserVerification: 'Supports user verification',\n /**\n *@description Text in Timeline indicating that input has happened recently\n */\n yes: 'Yes',\n /**\n *@description Text in Timeline indicating that input has not happened recently\n */\n no: 'No',\n /**\n *@description Title of radio button that sets an authenticator as active.\n *@example {Authenticator ABCDEF} PH1\n */\n setSAsTheActiveAuthenticator: 'Set {PH1} as the active authenticator',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/webauthn/WebauthnPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst enum Events {\n ExportCredential = 'ExportCredential',\n RemoveCredential = 'RemoveCredential',\n}\n\ntype EventTypes = {\n [Events.ExportCredential]: Protocol.WebAuthn.Credential,\n [Events.RemoveCredential]: Protocol.WebAuthn.Credential,\n};\n\nclass DataGridNode extends DataGrid.DataGrid.DataGridNode {\n constructor(private readonly credential: Protocol.WebAuthn.Credential) {\n super(credential);\n }\n\n override nodeSelfHeight(): number {\n return 24;\n }\n\n override createCell(columnId: string): HTMLElement {\n const cell = super.createCell(columnId);\n UI.Tooltip.Tooltip.install(cell, cell.textContent || '');\n\n if (columnId !== 'actions') {\n return cell;\n }\n\n const exportButton = UI.UIUtils.createTextButton(i18nString(UIStrings.export), (): void => {\n if (this.dataGrid) {\n (this.dataGrid as WebauthnDataGrid).dispatchEventToListeners(Events.ExportCredential, this.credential);\n }\n });\n\n cell.appendChild(exportButton);\n\n const removeButton = UI.UIUtils.createTextButton(i18nString(UIStrings.remove), (): void => {\n if (this.dataGrid) {\n (this.dataGrid as WebauthnDataGrid).dispatchEventToListeners(Events.RemoveCredential, this.credential);\n }\n });\n\n cell.appendChild(removeButton);\n\n return cell;\n }\n}\n\nclass WebauthnDataGridBase extends DataGrid.DataGrid.DataGridImpl {}\nclass WebauthnDataGrid extends Common.ObjectWrapper.eventMixin(\n WebauthnDataGridBase) {}\n\nclass EmptyDataGridNode extends DataGrid.DataGrid.DataGridNode {\n override createCells(element: Element): void {\n element.removeChildren();\n const td = (this.createTDWithClass(DataGrid.DataGrid.Align.Center) as HTMLTableCellElement);\n if (this.dataGrid) {\n td.colSpan = this.dataGrid.visibleColumnsArray.length;\n }\n\n const code = document.createElement('span', {is: 'source-code'});\n code.textContent = 'navigator.credentials.create()';\n code.classList.add('code');\n const message = i18n.i18n.getFormatLocalizedString(str_, UIStrings.noCredentialsTryCallingSFromYour, {PH1: code});\n\n td.appendChild(message);\n element.appendChild(td);\n }\n}\n\ntype AvailableAuthenticatorOptions = Protocol.WebAuthn.VirtualAuthenticatorOptions&{\n active: boolean,\n authenticatorId: Protocol.WebAuthn.AuthenticatorId,\n};\n\nlet webauthnPaneImplInstance: WebauthnPaneImpl;\n\n// We extrapolate this variable as otherwise git detects a private key, even though we\n// perform string manipulation. If we extract the name, then the regex doesn't match\n// and we can upload as expected.\nconst PRIVATE_NAME = 'PRIVATE';\nconst PRIVATE_KEY_HEADER = `-----BEGIN ${PRIVATE_NAME} KEY-----\n`;\nconst PRIVATE_KEY_FOOTER = `-----END ${PRIVATE_NAME} KEY-----`;\n\nconst PROTOCOL_AUTHENTICATOR_VALUES: Protocol.EnumerableEnum = {\n Ctap2: Protocol.WebAuthn.AuthenticatorProtocol.Ctap2,\n U2f: Protocol.WebAuthn.AuthenticatorProtocol.U2f,\n};\n\nexport class WebauthnPaneImpl extends UI.Widget.VBox implements\n SDK.TargetManager.SDKModelObserver {\n #activeAuthId: Protocol.WebAuthn.AuthenticatorId|null = null;\n #hasBeenEnabled = false;\n readonly dataGrids = new Map>();\n #enableCheckbox!: UI.Toolbar.ToolbarCheckbox;\n readonly #availableAuthenticatorSetting: Common.Settings.Setting;\n #model?: SDK.WebAuthnModel.WebAuthnModel;\n #authenticatorsView: HTMLElement;\n #topToolbarContainer: HTMLElement|undefined;\n #topToolbar: UI.Toolbar.Toolbar|undefined;\n #learnMoreView: HTMLElement|undefined;\n #newAuthenticatorSection: HTMLElement|undefined;\n #newAuthenticatorForm: HTMLElement|undefined;\n #protocolSelect: HTMLSelectElement|undefined;\n #transportSelect: HTMLSelectElement|undefined;\n #residentKeyCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n residentKeyCheckbox: HTMLInputElement|undefined;\n #userVerificationCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n #userVerificationCheckbox: HTMLInputElement|undefined;\n #largeBlobCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n largeBlobCheckbox: HTMLInputElement|undefined;\n addAuthenticatorButton: HTMLButtonElement|undefined;\n #isEnabling?: Promise;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('webauthn')}`);\n\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.WebAuthnModel.WebAuthnModel, this, {scoped: true});\n\n this.contentElement.classList.add('webauthn-pane');\n\n this.#availableAuthenticatorSetting =\n Common.Settings.Settings.instance().createSetting(\n 'webauthnAuthenticators', []);\n\n this.#createToolbar();\n this.#authenticatorsView = this.contentElement.createChild('div', 'authenticators-view');\n this.#createNewAuthenticatorSection();\n this.#updateVisibility(false);\n }\n\n static instance(opts?: {forceNew: boolean}): WebauthnPaneImpl {\n if (!webauthnPaneImplInstance || opts?.forceNew) {\n webauthnPaneImplInstance = new WebauthnPaneImpl();\n }\n\n return webauthnPaneImplInstance;\n }\n\n modelAdded(model: SDK.WebAuthnModel.WebAuthnModel): void {\n if (model.target() === model.target().outermostTarget()) {\n this.#model = model;\n }\n }\n\n modelRemoved(model: SDK.WebAuthnModel.WebAuthnModel): void {\n if (model.target() === model.target().outermostTarget()) {\n this.#model = undefined;\n }\n }\n\n async #loadInitialAuthenticators(): Promise {\n let activeAuthenticatorId: Protocol.WebAuthn.AuthenticatorId|null = null;\n const availableAuthenticators = this.#availableAuthenticatorSetting.get();\n for (const options of availableAuthenticators) {\n if (!this.#model) {\n continue;\n }\n\n const authenticatorId = await this.#model.addAuthenticator(options);\n void this.#addAuthenticatorSection(authenticatorId, options);\n // Update the authenticatorIds in the options.\n options.authenticatorId = authenticatorId;\n if (options.active) {\n activeAuthenticatorId = authenticatorId;\n }\n }\n\n // Update the settings to reflect the new authenticatorIds.\n this.#availableAuthenticatorSetting.set(availableAuthenticators);\n if (activeAuthenticatorId) {\n void this.#setActiveAuthenticator(activeAuthenticatorId);\n }\n }\n\n override async ownerViewDisposed(): Promise {\n if (this.#enableCheckbox) {\n this.#enableCheckbox.setChecked(false);\n }\n await this.#setVirtualAuthEnvEnabled(false);\n }\n\n #createToolbar(): void {\n this.#topToolbarContainer = this.contentElement.createChild('div', 'webauthn-toolbar-container');\n this.#topToolbar = new UI.Toolbar.Toolbar('webauthn-toolbar', this.#topToolbarContainer);\n const enableCheckboxTitle = i18nString(UIStrings.enableVirtualAuthenticator);\n this.#enableCheckbox =\n new UI.Toolbar.ToolbarCheckbox(enableCheckboxTitle, enableCheckboxTitle, this.#handleCheckboxToggle.bind(this));\n this.#enableCheckbox.inputElement.setAttribute(\n 'jslog', `${VisualLogging.toggle().track({click: true}).context('virtual-authenticators')}`);\n this.#topToolbar.appendToolbarItem(this.#enableCheckbox);\n }\n\n #createCredentialsDataGrid(authenticatorId: Protocol.WebAuthn.AuthenticatorId):\n DataGrid.DataGrid.DataGridImpl {\n const columns = ([\n {\n id: 'credentialId',\n title: i18nString(UIStrings.id),\n longText: true,\n weight: 24,\n },\n {\n id: 'isResidentCredential',\n title: i18nString(UIStrings.isResident),\n dataType: DataGrid.DataGrid.DataType.Boolean,\n weight: 10,\n },\n {\n id: 'rpId',\n title: i18nString(UIStrings.rpId),\n },\n {\n id: 'userHandle',\n title: i18nString(UIStrings.userHandle),\n },\n {\n id: 'signCount',\n title: i18nString(UIStrings.signCount),\n },\n {id: 'actions', title: i18nString(UIStrings.actions)},\n ] as DataGrid.DataGrid.ColumnDescriptor[]);\n\n const dataGridConfig = {\n displayName: i18nString(UIStrings.credentials),\n columns,\n editCallback: undefined,\n deleteCallback: undefined,\n refreshCallback: undefined,\n };\n const dataGrid = new WebauthnDataGrid(dataGridConfig);\n dataGrid.renderInline();\n dataGrid.setStriped(true);\n dataGrid.addEventListener(Events.ExportCredential, this.#handleExportCredential, this);\n dataGrid.addEventListener(Events.RemoveCredential, this.#handleRemoveCredential.bind(this, authenticatorId));\n dataGrid.rootNode().appendChild(new EmptyDataGridNode());\n\n this.dataGrids.set(authenticatorId, dataGrid);\n\n return dataGrid;\n }\n\n #handleExportCredential({data: credential}: Common.EventTarget.EventTargetEvent): void {\n this.#exportCredential(credential);\n }\n\n #handleRemoveCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: credential,\n }: Common.EventTarget.EventTargetEvent): void {\n void this.#removeCredential(authenticatorId, credential.credentialId);\n }\n\n #addCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: event,\n }: Common.EventTarget.EventTargetEvent): void {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n const emptyNode = dataGrid.rootNode().children.find(node => !Object.keys(node.data).length);\n if (emptyNode) {\n dataGrid.rootNode().removeChild(emptyNode);\n }\n const node = new DataGridNode(event.credential);\n dataGrid.rootNode().appendChild(node);\n }\n\n #updateCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: event,\n }: Common.EventTarget.EventTargetEvent): void {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n const node = dataGrid.rootNode().children.find(node => node.data?.credentialId === event.credential.credentialId);\n if (!node) {\n return;\n }\n node.data = event.credential;\n }\n\n async #setVirtualAuthEnvEnabled(enable: boolean): Promise {\n await this.#isEnabling;\n this.#isEnabling = new Promise(async (resolve: (value: void) => void) => {\n if (enable && !this.#hasBeenEnabled) {\n // Ensures metric is only tracked once per session.\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.VirtualAuthenticatorEnvironmentEnabled);\n this.#hasBeenEnabled = true;\n }\n if (this.#model) {\n await this.#model.setVirtualAuthEnvEnabled(enable);\n }\n\n if (enable) {\n await this.#loadInitialAuthenticators();\n } else {\n this.#removeAuthenticatorSections();\n }\n\n this.#updateVisibility(enable);\n this.#isEnabling = undefined;\n resolve();\n });\n }\n\n #updateVisibility(enabled: boolean): void {\n this.contentElement.classList.toggle('enabled', enabled);\n }\n\n #removeAuthenticatorSections(): void {\n this.#authenticatorsView.innerHTML = '';\n for (const dataGrid of this.dataGrids.values()) {\n dataGrid.asWidget().detach();\n }\n this.dataGrids.clear();\n }\n\n #handleCheckboxToggle(e: MouseEvent): void {\n void this.#setVirtualAuthEnvEnabled((e.target as HTMLInputElement).checked);\n }\n\n #updateEnabledTransportOptions(enabledOptions: Protocol.WebAuthn.AuthenticatorTransport[]): void {\n if (!this.#transportSelect) {\n return;\n }\n\n const prevValue = this.#transportSelect.value;\n this.#transportSelect.removeChildren();\n\n for (const option of enabledOptions) {\n this.#transportSelect.appendChild(new Option(option, option));\n }\n\n // Make sure the currently selected value stays the same.\n this.#transportSelect.value = prevValue;\n // If the new set does not include the previous value.\n if (!this.#transportSelect.value) {\n // Select the first available value.\n this.#transportSelect.selectedIndex = 0;\n }\n }\n\n #updateNewAuthenticatorSectionOptions(): void {\n if (!this.#protocolSelect || !this.residentKeyCheckbox || !this.#userVerificationCheckbox ||\n !this.largeBlobCheckbox) {\n return;\n }\n\n if (this.#protocolSelect.value === Protocol.WebAuthn.AuthenticatorProtocol.Ctap2) {\n this.residentKeyCheckbox.disabled = false;\n this.#userVerificationCheckbox.disabled = false;\n this.largeBlobCheckbox.disabled = !this.residentKeyCheckbox.checked;\n if (this.largeBlobCheckbox.disabled) {\n this.largeBlobCheckbox.checked = false;\n }\n this.#updateEnabledTransportOptions([\n Protocol.WebAuthn.AuthenticatorTransport.Usb,\n Protocol.WebAuthn.AuthenticatorTransport.Ble,\n Protocol.WebAuthn.AuthenticatorTransport.Nfc,\n // TODO (crbug.com/1034663): Toggle cable as option depending on if cablev2 flag is on.\n // Protocol.WebAuthn.AuthenticatorTransport.Cable,\n Protocol.WebAuthn.AuthenticatorTransport.Internal,\n ]);\n } else {\n this.residentKeyCheckbox.checked = false;\n this.residentKeyCheckbox.disabled = true;\n this.#userVerificationCheckbox.checked = false;\n this.#userVerificationCheckbox.disabled = true;\n this.largeBlobCheckbox.checked = false;\n this.largeBlobCheckbox.disabled = true;\n this.#updateEnabledTransportOptions([\n Protocol.WebAuthn.AuthenticatorTransport.Usb,\n Protocol.WebAuthn.AuthenticatorTransport.Ble,\n Protocol.WebAuthn.AuthenticatorTransport.Nfc,\n ]);\n }\n }\n\n #createNewAuthenticatorSection(): void {\n const learnMoreLink = UI.XLink.XLink.create(\n 'https://developers.google.com/web/updates/2018/05/webauthn', i18nString(UIStrings.learnMore));\n learnMoreLink.setAttribute('jslog', `${VisualLogging.link().track({click: true}).context('learn-more')}`);\n this.#learnMoreView = this.contentElement.createChild('div', 'learn-more');\n this.#learnMoreView.appendChild(UI.Fragment.html`\n
\n ${i18nString(UIStrings.useWebauthnForPhishingresistant)}

\n ${learnMoreLink}\n
\n `);\n\n this.#newAuthenticatorSection = this.contentElement.createChild('div', 'new-authenticator-container');\n const newAuthenticatorTitle =\n UI.UIUtils.createLabel(i18nString(UIStrings.newAuthenticator), 'new-authenticator-title');\n this.#newAuthenticatorSection.appendChild(newAuthenticatorTitle);\n this.#newAuthenticatorForm = this.#newAuthenticatorSection.createChild('div', 'new-authenticator-form');\n this.#newAuthenticatorForm.setAttribute('jslog', `${VisualLogging.section().context('new-authenticator')}`);\n\n const protocolGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const transportGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const residentKeyGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const userVerificationGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const largeBlobGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const addButtonGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n\n const protocolSelectTitle = UI.UIUtils.createLabel(i18nString(UIStrings.protocol), 'authenticator-option-label');\n protocolGroup.appendChild(protocolSelectTitle);\n this.#protocolSelect = (protocolGroup.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.#protocolSelect.setAttribute('jslog', `${VisualLogging.dropDown().track({change: true}).context('protocol')}`);\n UI.ARIAUtils.bindLabelToControl(protocolSelectTitle, (this.#protocolSelect as Element));\n Object.values(PROTOCOL_AUTHENTICATOR_VALUES)\n .sort()\n .forEach((option: Protocol.WebAuthn.AuthenticatorProtocol): void => {\n if (this.#protocolSelect) {\n this.#protocolSelect.appendChild(new Option(option, option));\n }\n });\n\n if (this.#protocolSelect) {\n this.#protocolSelect.value = Protocol.WebAuthn.AuthenticatorProtocol.Ctap2;\n }\n\n const transportSelectTitle = UI.UIUtils.createLabel(i18nString(UIStrings.transport), 'authenticator-option-label');\n transportGroup.appendChild(transportSelectTitle);\n this.#transportSelect = (transportGroup.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.#transportSelect.setAttribute(\n 'jslog', `${VisualLogging.dropDown().track({change: true}).context('transport')}`);\n UI.ARIAUtils.bindLabelToControl(transportSelectTitle, (this.#transportSelect as Element));\n // transportSelect will be populated in updateNewAuthenticatorSectionOptions.\n\n this.#residentKeyCheckboxLabel =\n UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.supportsResidentKeys), false, undefined, 'resident-key');\n this.#residentKeyCheckboxLabel.textElement.classList.add('authenticator-option-label');\n residentKeyGroup.appendChild(this.#residentKeyCheckboxLabel.textElement);\n this.residentKeyCheckbox = this.#residentKeyCheckboxLabel.checkboxElement;\n this.residentKeyCheckbox.checked = false;\n this.residentKeyCheckbox.classList.add('authenticator-option-checkbox');\n residentKeyGroup.appendChild(this.#residentKeyCheckboxLabel);\n\n this.#userVerificationCheckboxLabel = UI.UIUtils.CheckboxLabel.create(\n i18nString(UIStrings.supportsUserVerification), false, undefined, 'user-verification');\n this.#userVerificationCheckboxLabel.textElement.classList.add('authenticator-option-label');\n userVerificationGroup.appendChild(this.#userVerificationCheckboxLabel.textElement);\n this.#userVerificationCheckbox = this.#userVerificationCheckboxLabel.checkboxElement;\n this.#userVerificationCheckbox.checked = false;\n this.#userVerificationCheckbox.classList.add('authenticator-option-checkbox');\n userVerificationGroup.appendChild(this.#userVerificationCheckboxLabel);\n\n this.#largeBlobCheckboxLabel =\n UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.supportsLargeBlob), false, undefined, 'large-blob');\n this.#largeBlobCheckboxLabel.textElement.classList.add('authenticator-option-label');\n largeBlobGroup.appendChild(this.#largeBlobCheckboxLabel.textElement);\n this.largeBlobCheckbox = this.#largeBlobCheckboxLabel.checkboxElement;\n this.largeBlobCheckbox.checked = false;\n this.largeBlobCheckbox.classList.add('authenticator-option-checkbox');\n this.largeBlobCheckbox.name = 'large-blob-checkbox';\n largeBlobGroup.appendChild(this.#largeBlobCheckboxLabel);\n\n this.addAuthenticatorButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.add), this.#handleAddAuthenticatorButton.bind(this), '');\n this.addAuthenticatorButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('add-authenticator')}`);\n addButtonGroup.createChild('div', 'authenticator-option-label');\n addButtonGroup.appendChild(this.addAuthenticatorButton);\n const addAuthenticatorTitle = UI.UIUtils.createLabel(i18nString(UIStrings.addAuthenticator), '');\n UI.ARIAUtils.bindLabelToControl(addAuthenticatorTitle, this.addAuthenticatorButton);\n\n this.#updateNewAuthenticatorSectionOptions();\n if (this.#protocolSelect) {\n this.#protocolSelect.addEventListener('change', this.#updateNewAuthenticatorSectionOptions.bind(this));\n }\n if (this.residentKeyCheckbox) {\n this.residentKeyCheckbox.addEventListener('change', this.#updateNewAuthenticatorSectionOptions.bind(this));\n }\n }\n\n async #handleAddAuthenticatorButton(): Promise {\n const options = this.#createOptionsFromCurrentInputs();\n if (this.#model) {\n const authenticatorId = await this.#model.addAuthenticator(options);\n const availableAuthenticators = this.#availableAuthenticatorSetting.get();\n availableAuthenticators.push({authenticatorId, active: true, ...options});\n this.#availableAuthenticatorSetting.set(\n availableAuthenticators.map(a => ({...a, active: a.authenticatorId === authenticatorId})));\n const section = await this.#addAuthenticatorSection(authenticatorId, options);\n const mediaQueryList = window.matchMedia('(prefers-reduced-motion: reduce)');\n const prefersReducedMotion = mediaQueryList.matches;\n section.scrollIntoView({block: 'start', behavior: prefersReducedMotion ? 'auto' : 'smooth'});\n }\n }\n\n async #addAuthenticatorSection(\n authenticatorId: Protocol.WebAuthn.AuthenticatorId,\n options: Protocol.WebAuthn.VirtualAuthenticatorOptions): Promise {\n const section = document.createElement('div');\n section.classList.add('authenticator-section');\n section.setAttribute('data-authenticator-id', authenticatorId);\n section.setAttribute('jslog', `${VisualLogging.section().context('authenticator')}`);\n this.#authenticatorsView.appendChild(section);\n\n const headerElement = section.createChild('div', 'authenticator-section-header');\n const titleElement = headerElement.createChild('div', 'authenticator-section-title');\n UI.ARIAUtils.markAsHeading(titleElement, 2);\n\n await this.#clearActiveAuthenticator();\n const activeButtonContainer = headerElement.createChild('div', 'active-button-container');\n const activeLabel =\n UI.UIUtils.createRadioLabel(`active-authenticator-${authenticatorId}`, i18nString(UIStrings.active));\n activeLabel.radioElement.addEventListener('change', this.#setActiveAuthenticator.bind(this, authenticatorId));\n activeButtonContainer.appendChild(activeLabel);\n (activeLabel.radioElement as HTMLInputElement).checked = true;\n this.#activeAuthId = authenticatorId; // Newly added authenticator is automatically set as active.\n\n const removeButton = headerElement.createChild('button', 'text-button');\n removeButton.textContent = i18nString(UIStrings.remove);\n removeButton.addEventListener('click', this.#removeAuthenticator.bind(this, authenticatorId));\n removeButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('remove-authenticator')}`);\n\n const toolbar = new UI.Toolbar.Toolbar('edit-name-toolbar', titleElement);\n const editName = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.editName), 'edit', undefined, 'edit-name');\n const saveName = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.saveName), 'checkmark', undefined, 'save-name');\n saveName.setVisible(false);\n\n const nameField = (titleElement.createChild('input', 'authenticator-name-field') as HTMLInputElement);\n nameField.placeholder = i18nString(UIStrings.enterNewName);\n nameField.disabled = true;\n nameField.setAttribute('jslog', `${VisualLogging.textField().track({keydown: true}).context('name')}`);\n const userFriendlyName = authenticatorId.slice(-5); // User friendly name defaults to last 5 chars of UUID.\n nameField.value = i18nString(UIStrings.authenticatorS, {PH1: userFriendlyName});\n this.#updateActiveLabelTitle(activeLabel, nameField.value);\n\n editName.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click,\n (): void => this.#handleEditNameButton(titleElement, nameField, editName, saveName));\n saveName.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click,\n (): void => this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel));\n\n nameField.addEventListener(\n 'focusout', (): void => this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel));\n nameField.addEventListener('keydown', (event: KeyboardEvent): void => {\n if (event.key === 'Enter') {\n this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel);\n }\n });\n\n toolbar.appendToolbarItem(editName);\n toolbar.appendToolbarItem(saveName);\n\n this.#createAuthenticatorFields(section, authenticatorId, options);\n\n const label = document.createElement('div');\n label.classList.add('credentials-title');\n label.textContent = i18nString(UIStrings.credentials);\n section.appendChild(label);\n\n const dataGrid = this.#createCredentialsDataGrid(authenticatorId);\n dataGrid.asWidget().show(section);\n if (this.#model) {\n this.#model.addEventListener(\n SDK.WebAuthnModel.Events.CredentialAdded, this.#addCredential.bind(this, authenticatorId));\n this.#model.addEventListener(\n SDK.WebAuthnModel.Events.CredentialAsserted, this.#updateCredential.bind(this, authenticatorId));\n }\n\n return section;\n }\n\n #exportCredential(credential: Protocol.WebAuthn.Credential): void {\n let pem = PRIVATE_KEY_HEADER;\n for (let i = 0; i < credential.privateKey.length; i += 64) {\n pem += credential.privateKey.substring(i, i + 64) + '\\n';\n }\n pem += PRIVATE_KEY_FOOTER;\n\n const link = document.createElement('a');\n link.download = i18nString(UIStrings.privateKeypem);\n link.href = 'data:application/x-pem-file,' + encodeURIComponent(pem);\n link.click();\n }\n\n async #removeCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, credentialId: string): Promise {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n\n // @ts-ignore dataGrid node type is indeterminate.\n dataGrid.rootNode()\n .children\n .find((n: DataGrid.DataGrid.DataGridNode): boolean => n.data.credentialId === credentialId)\n .remove();\n\n if (!dataGrid.rootNode().children.length) {\n dataGrid.rootNode().appendChild(new EmptyDataGridNode());\n }\n\n if (this.#model) {\n await this.#model.removeCredential(authenticatorId, credentialId);\n }\n }\n\n /**\n * Creates the fields describing the authenticator in the front end.\n */\n #createAuthenticatorFields(\n section: Element, authenticatorId: string, options: Protocol.WebAuthn.VirtualAuthenticatorOptions): void {\n const sectionFields = section.createChild('div', 'authenticator-fields');\n const uuidField = sectionFields.createChild('div', 'authenticator-field');\n const protocolField = sectionFields.createChild('div', 'authenticator-field');\n const transportField = sectionFields.createChild('div', 'authenticator-field');\n const srkField = sectionFields.createChild('div', 'authenticator-field');\n const slbField = sectionFields.createChild('div', 'authenticator-field');\n const suvField = sectionFields.createChild('div', 'authenticator-field');\n\n uuidField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.uuid), 'authenticator-option-label'));\n protocolField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.protocol), 'authenticator-option-label'));\n transportField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.transport), 'authenticator-option-label'));\n srkField.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.supportsResidentKeys), 'authenticator-option-label'));\n slbField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.supportsLargeBlob), 'authenticator-option-label'));\n suvField.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.supportsUserVerification), 'authenticator-option-label'));\n\n uuidField.createChild('div', 'authenticator-field-value').textContent = authenticatorId;\n protocolField.createChild('div', 'authenticator-field-value').textContent = options.protocol;\n transportField.createChild('div', 'authenticator-field-value').textContent = options.transport;\n srkField.createChild('div', 'authenticator-field-value').textContent =\n options.hasResidentKey ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n slbField.createChild('div', 'authenticator-field-value').textContent =\n options.hasLargeBlob ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n suvField.createChild('div', 'authenticator-field-value').textContent =\n options.hasUserVerification ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n }\n\n #handleEditNameButton(\n titleElement: Element, nameField: HTMLInputElement, editName: UI.Toolbar.ToolbarButton,\n saveName: UI.Toolbar.ToolbarButton): void {\n nameField.disabled = false;\n titleElement.classList.add('editing-name');\n nameField.focus();\n saveName.setVisible(true);\n editName.setVisible(false);\n }\n\n #handleSaveNameButton(\n titleElement: Element, nameField: HTMLInputElement, editName: UI.Toolbar.ToolbarItem,\n saveName: UI.Toolbar.ToolbarItem, activeLabel: UI.UIUtils.DevToolsRadioButton): void {\n const name = nameField.value;\n if (!name) {\n return;\n }\n nameField.disabled = true;\n titleElement.classList.remove('editing-name');\n editName.setVisible(true);\n saveName.setVisible(false);\n this.#updateActiveLabelTitle(activeLabel, name);\n }\n\n #updateActiveLabelTitle(activeLabel: UI.UIUtils.DevToolsRadioButton, authenticatorName: string): void {\n UI.Tooltip.Tooltip.install(\n activeLabel.radioElement, i18nString(UIStrings.setSAsTheActiveAuthenticator, {PH1: authenticatorName}));\n }\n\n /**\n * Removes both the authenticator and its respective UI element.\n */\n #removeAuthenticator(authenticatorId: Protocol.WebAuthn.AuthenticatorId): void {\n if (this.#authenticatorsView) {\n const child = this.#authenticatorsView.querySelector(`[data-authenticator-id=${CSS.escape(authenticatorId)}]`);\n if (child) {\n child.remove();\n }\n }\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (dataGrid) {\n dataGrid.asWidget().detach();\n this.dataGrids.delete(authenticatorId);\n }\n\n if (this.#model) {\n void this.#model.removeAuthenticator(authenticatorId);\n }\n\n // Update available authenticator setting.\n const prevAvailableAuthenticators = this.#availableAuthenticatorSetting.get();\n const newAvailableAuthenticators = prevAvailableAuthenticators.filter(a => a.authenticatorId !== authenticatorId);\n this.#availableAuthenticatorSetting.set(newAvailableAuthenticators);\n\n if (this.#activeAuthId === authenticatorId) {\n const availableAuthenticatorIds = Array.from(this.dataGrids.keys());\n if (availableAuthenticatorIds.length) {\n void this.#setActiveAuthenticator(availableAuthenticatorIds[0]);\n } else {\n this.#activeAuthId = null;\n }\n }\n }\n\n #createOptionsFromCurrentInputs(): Protocol.WebAuthn.VirtualAuthenticatorOptions {\n // TODO(crbug.com/1034663): Add optionality for isUserVerified param.\n if (!this.#protocolSelect || !this.#transportSelect || !this.residentKeyCheckbox ||\n !this.#userVerificationCheckbox || !this.largeBlobCheckbox) {\n throw new Error('Unable to create options from current inputs');\n }\n\n return {\n protocol: this.#protocolSelect.options[this.#protocolSelect.selectedIndex].value as\n Protocol.WebAuthn.AuthenticatorProtocol,\n ctap2Version: Protocol.WebAuthn.Ctap2Version.Ctap2_1,\n transport: this.#transportSelect.options[this.#transportSelect.selectedIndex].value as\n Protocol.WebAuthn.AuthenticatorTransport,\n hasResidentKey: this.residentKeyCheckbox.checked,\n hasUserVerification: this.#userVerificationCheckbox.checked,\n hasLargeBlob: this.largeBlobCheckbox.checked,\n automaticPresenceSimulation: true,\n isUserVerified: true,\n };\n }\n\n /**\n * Sets the given authenticator as active.\n * Note that a newly added authenticator will automatically be set as active.\n */\n async #setActiveAuthenticator(authenticatorId: Protocol.WebAuthn.AuthenticatorId): Promise {\n await this.#clearActiveAuthenticator();\n if (this.#model) {\n await this.#model.setAutomaticPresenceSimulation(authenticatorId, true);\n }\n this.#activeAuthId = authenticatorId;\n\n const prevAvailableAuthenticators = this.#availableAuthenticatorSetting.get();\n const newAvailableAuthenticators =\n prevAvailableAuthenticators.map(a => ({...a, active: a.authenticatorId === authenticatorId}));\n this.#availableAuthenticatorSetting.set(newAvailableAuthenticators);\n\n this.#updateActiveButtons();\n }\n\n #updateActiveButtons(): void {\n const authenticators = this.#authenticatorsView.getElementsByClassName('authenticator-section');\n Array.from(authenticators).forEach((authenticator: Element): void => {\n const button = (authenticator.querySelector('input.dt-radio-button') as HTMLInputElement);\n if (!button) {\n return;\n }\n button.checked = (authenticator as HTMLElement).dataset.authenticatorId === this.#activeAuthId;\n });\n }\n\n async #clearActiveAuthenticator(): Promise {\n if (this.#activeAuthId && this.#model) {\n await this.#model.setAutomaticPresenceSimulation(this.#activeAuthId, false);\n }\n this.#activeAuthId = null;\n this.#updateActiveButtons();\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([webauthnPaneStyles]);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"WebauthnPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/webauthn/WebauthnPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AA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QAClB,MAAM,cAAc,GAAG,IAAI,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,CAAC;QAChG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,aAAsB,EAAQ,EAAE;YAClE,MAAM,MAAM,GAAI,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAsB,CAAC;YAC1F,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO;aACR;YACD,MAAM,CAAC,OAAO,GAAI,aAA6B,CAAC,OAAO,CAAC,eAAe,KAAK,IAAI,CAAC,aAAa,CAAC;QACjG,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,yBAAyB;QAC7B,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,MAAM,EAAE;YACrC,MAAM,IAAI,CAAC,MAAM,CAAC,8BAA8B,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SAC7E;QACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IACQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport webauthnPaneStyles from './webauthnPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Label for button that allows user to download the private key related to a credential.\n */\n export: 'Export',\n /**\n *@description Label for an item to remove something\n */\n remove: 'Remove',\n /**\n *@description Label for empty credentials table.\n *@example {navigator.credentials.create()} PH1\n */\n noCredentialsTryCallingSFromYour: 'No credentials. Try calling {PH1} from your website.',\n /**\n *@description Label for checkbox to toggle the virtual authenticator environment allowing user to interact with software-based virtual authenticators.\n */\n enableVirtualAuthenticator: 'Enable virtual authenticator environment',\n /**\n *@description Label for ID field for credentials.\n */\n id: 'ID',\n /**\n *@description Label for field that describes whether a credential is a resident credential.\n */\n isResident: 'Is Resident',\n /**\n *@description Label for credential field that represents the Relying Party ID that the credential is scoped to.\n */\n rpId: 'RP ID',\n /**\n *@description Label for a column in a table. A field/unique ID that represents the user a credential is mapped to.\n */\n userHandle: 'User Handle',\n /**\n *@description Label for signature counter field for credentials which represents the number of successful assertions.\n * See https://w3c.github.io/webauthn/#signature-counter.\n */\n signCount: 'Signature Count',\n /**\n *@description Label for column with actions for credentials.\n */\n actions: 'Actions',\n /**\n *@description Title for the table that holds the credentials that a authenticator has registered.\n */\n credentials: 'Credentials',\n /**\n *@description Label for the learn more link that is shown before the virtual environment is enabled.\n */\n useWebauthnForPhishingresistant: 'Use WebAuthn for phishing-resistant authentication',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Title for section of interface that allows user to add a new virtual authenticator.\n */\n newAuthenticator: 'New authenticator',\n /**\n *@description Text for security or network protocol\n */\n protocol: 'Protocol',\n /**\n *@description Label for input to select which transport option to use on virtual authenticators, e.g. USB or Bluetooth.\n */\n transport: 'Transport',\n /**\n *@description Label for checkbox that toggles resident key support on virtual authenticators.\n */\n supportsResidentKeys: 'Supports resident keys',\n /**\n *@description Label for checkbox that toggles large blob support on virtual authenticators. Large blobs are opaque data associated\n * with a WebAuthn credential that a website can store, like an SSH certificate or a symmetric encryption key.\n * See https://w3c.github.io/webauthn/#sctn-large-blob-extension\n */\n supportsLargeBlob: 'Supports large blob',\n /**\n *@description Text to add something\n */\n add: 'Add',\n /**\n *@description Label for button to add a new virtual authenticator.\n */\n addAuthenticator: 'Add authenticator',\n /**\n *@description Label for radio button that toggles whether an authenticator is active.\n */\n active: 'Active',\n /**\n *@description Title for button that enables user to customize name of authenticator.\n */\n editName: 'Edit name',\n /**\n *@description Placeholder for the input box to customize name of authenticator.\n */\n enterNewName: 'Enter new name',\n /**\n *@description Title for button that enables user to save name of authenticator after editing it.\n */\n saveName: 'Save name',\n /**\n *@description Title for a user-added virtual authenticator which is uniquely identified with its AUTHENTICATORID.\n *@example {8c7873be-0b13-4996-a794-1521331bbd96} PH1\n */\n authenticatorS: 'Authenticator {PH1}',\n /**\n *@description Name for generated file which user can download. A private key is a secret code which enables encoding and decoding of a credential. .pem is the file extension.\n */\n privateKeypem: 'Private key.pem',\n /**\n *@description Label for field that holds an authenticator's universally unique identifier (UUID).\n */\n uuid: 'UUID',\n /**\n *@description Label for checkbox that toggles user verification support on virtual authenticators.\n */\n supportsUserVerification: 'Supports user verification',\n /**\n *@description Text in Timeline indicating that input has happened recently\n */\n yes: 'Yes',\n /**\n *@description Text in Timeline indicating that input has not happened recently\n */\n no: 'No',\n /**\n *@description Title of radio button that sets an authenticator as active.\n *@example {Authenticator ABCDEF} PH1\n */\n setSAsTheActiveAuthenticator: 'Set {PH1} as the active authenticator',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/webauthn/WebauthnPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst enum Events {\n ExportCredential = 'ExportCredential',\n RemoveCredential = 'RemoveCredential',\n}\n\ntype EventTypes = {\n [Events.ExportCredential]: Protocol.WebAuthn.Credential,\n [Events.RemoveCredential]: Protocol.WebAuthn.Credential,\n};\n\nclass DataGridNode extends DataGrid.DataGrid.DataGridNode {\n constructor(private readonly credential: Protocol.WebAuthn.Credential) {\n super(credential);\n }\n\n override nodeSelfHeight(): number {\n return 24;\n }\n\n override createCell(columnId: string): HTMLElement {\n const cell = super.createCell(columnId);\n UI.Tooltip.Tooltip.install(cell, cell.textContent || '');\n\n if (columnId !== 'actions') {\n return cell;\n }\n\n const exportButton = UI.UIUtils.createTextButton(i18nString(UIStrings.export), (): void => {\n if (this.dataGrid) {\n (this.dataGrid as WebauthnDataGrid).dispatchEventToListeners(Events.ExportCredential, this.credential);\n }\n });\n\n cell.appendChild(exportButton);\n\n const removeButton = UI.UIUtils.createTextButton(i18nString(UIStrings.remove), (): void => {\n if (this.dataGrid) {\n (this.dataGrid as WebauthnDataGrid).dispatchEventToListeners(Events.RemoveCredential, this.credential);\n }\n });\n\n cell.appendChild(removeButton);\n\n return cell;\n }\n}\n\nclass WebauthnDataGridBase extends DataGrid.DataGrid.DataGridImpl {}\nclass WebauthnDataGrid extends Common.ObjectWrapper.eventMixin(\n WebauthnDataGridBase) {}\n\nclass EmptyDataGridNode extends DataGrid.DataGrid.DataGridNode {\n override createCells(element: Element): void {\n element.removeChildren();\n const td = (this.createTDWithClass(DataGrid.DataGrid.Align.Center) as HTMLTableCellElement);\n if (this.dataGrid) {\n td.colSpan = this.dataGrid.visibleColumnsArray.length;\n }\n\n const code = document.createElement('span', {is: 'source-code'});\n code.textContent = 'navigator.credentials.create()';\n code.classList.add('code');\n const message = i18n.i18n.getFormatLocalizedString(str_, UIStrings.noCredentialsTryCallingSFromYour, {PH1: code});\n\n td.appendChild(message);\n element.appendChild(td);\n }\n}\n\ntype AvailableAuthenticatorOptions = Protocol.WebAuthn.VirtualAuthenticatorOptions&{\n active: boolean,\n authenticatorId: Protocol.WebAuthn.AuthenticatorId,\n};\n\n// We extrapolate this variable as otherwise git detects a private key, even though we\n// perform string manipulation. If we extract the name, then the regex doesn't match\n// and we can upload as expected.\nconst PRIVATE_NAME = 'PRIVATE';\nconst PRIVATE_KEY_HEADER = `-----BEGIN ${PRIVATE_NAME} KEY-----\n`;\nconst PRIVATE_KEY_FOOTER = `-----END ${PRIVATE_NAME} KEY-----`;\n\nconst PROTOCOL_AUTHENTICATOR_VALUES: Protocol.EnumerableEnum = {\n Ctap2: Protocol.WebAuthn.AuthenticatorProtocol.Ctap2,\n U2f: Protocol.WebAuthn.AuthenticatorProtocol.U2f,\n};\n\nexport class WebauthnPaneImpl extends UI.Widget.VBox implements\n SDK.TargetManager.SDKModelObserver {\n #activeAuthId: Protocol.WebAuthn.AuthenticatorId|null = null;\n #hasBeenEnabled = false;\n readonly dataGrids = new Map>();\n #enableCheckbox!: UI.Toolbar.ToolbarCheckbox;\n readonly #availableAuthenticatorSetting: Common.Settings.Setting;\n #model?: SDK.WebAuthnModel.WebAuthnModel;\n #authenticatorsView: HTMLElement;\n #topToolbarContainer: HTMLElement|undefined;\n #topToolbar: UI.Toolbar.Toolbar|undefined;\n #learnMoreView: HTMLElement|undefined;\n #newAuthenticatorSection: HTMLElement|undefined;\n #newAuthenticatorForm: HTMLElement|undefined;\n #protocolSelect: HTMLSelectElement|undefined;\n #transportSelect: HTMLSelectElement|undefined;\n #residentKeyCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n residentKeyCheckbox: HTMLInputElement|undefined;\n #userVerificationCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n #userVerificationCheckbox: HTMLInputElement|undefined;\n #largeBlobCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n largeBlobCheckbox: HTMLInputElement|undefined;\n addAuthenticatorButton: HTMLButtonElement|undefined;\n #isEnabling?: Promise;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel().context('webauthn')}`);\n\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.WebAuthnModel.WebAuthnModel, this, {scoped: true});\n\n this.contentElement.classList.add('webauthn-pane');\n\n this.#availableAuthenticatorSetting =\n Common.Settings.Settings.instance().createSetting(\n 'webauthnAuthenticators', []);\n\n this.#createToolbar();\n this.#authenticatorsView = this.contentElement.createChild('div', 'authenticators-view');\n this.#createNewAuthenticatorSection();\n this.#updateVisibility(false);\n }\n\n modelAdded(model: SDK.WebAuthnModel.WebAuthnModel): void {\n if (model.target() === model.target().outermostTarget()) {\n this.#model = model;\n }\n }\n\n modelRemoved(model: SDK.WebAuthnModel.WebAuthnModel): void {\n if (model.target() === model.target().outermostTarget()) {\n this.#model = undefined;\n }\n }\n\n async #loadInitialAuthenticators(): Promise {\n let activeAuthenticatorId: Protocol.WebAuthn.AuthenticatorId|null = null;\n const availableAuthenticators = this.#availableAuthenticatorSetting.get();\n for (const options of availableAuthenticators) {\n if (!this.#model) {\n continue;\n }\n\n const authenticatorId = await this.#model.addAuthenticator(options);\n void this.#addAuthenticatorSection(authenticatorId, options);\n // Update the authenticatorIds in the options.\n options.authenticatorId = authenticatorId;\n if (options.active) {\n activeAuthenticatorId = authenticatorId;\n }\n }\n\n // Update the settings to reflect the new authenticatorIds.\n this.#availableAuthenticatorSetting.set(availableAuthenticators);\n if (activeAuthenticatorId) {\n void this.#setActiveAuthenticator(activeAuthenticatorId);\n }\n }\n\n override async ownerViewDisposed(): Promise {\n if (this.#enableCheckbox) {\n this.#enableCheckbox.setChecked(false);\n }\n await this.#setVirtualAuthEnvEnabled(false);\n }\n\n #createToolbar(): void {\n this.#topToolbarContainer = this.contentElement.createChild('div', 'webauthn-toolbar-container');\n this.#topToolbar = new UI.Toolbar.Toolbar('webauthn-toolbar', this.#topToolbarContainer);\n const enableCheckboxTitle = i18nString(UIStrings.enableVirtualAuthenticator);\n this.#enableCheckbox =\n new UI.Toolbar.ToolbarCheckbox(enableCheckboxTitle, enableCheckboxTitle, this.#handleCheckboxToggle.bind(this));\n this.#enableCheckbox.inputElement.setAttribute(\n 'jslog', `${VisualLogging.toggle().track({click: true}).context('virtual-authenticators')}`);\n this.#topToolbar.appendToolbarItem(this.#enableCheckbox);\n }\n\n #createCredentialsDataGrid(authenticatorId: Protocol.WebAuthn.AuthenticatorId):\n DataGrid.DataGrid.DataGridImpl {\n const columns = ([\n {\n id: 'credentialId',\n title: i18nString(UIStrings.id),\n longText: true,\n weight: 24,\n },\n {\n id: 'isResidentCredential',\n title: i18nString(UIStrings.isResident),\n dataType: DataGrid.DataGrid.DataType.Boolean,\n weight: 10,\n },\n {\n id: 'rpId',\n title: i18nString(UIStrings.rpId),\n },\n {\n id: 'userHandle',\n title: i18nString(UIStrings.userHandle),\n },\n {\n id: 'signCount',\n title: i18nString(UIStrings.signCount),\n },\n {id: 'actions', title: i18nString(UIStrings.actions)},\n ] as DataGrid.DataGrid.ColumnDescriptor[]);\n\n const dataGridConfig = {\n displayName: i18nString(UIStrings.credentials),\n columns,\n editCallback: undefined,\n deleteCallback: undefined,\n refreshCallback: undefined,\n };\n const dataGrid = new WebauthnDataGrid(dataGridConfig);\n dataGrid.renderInline();\n dataGrid.setStriped(true);\n dataGrid.addEventListener(Events.ExportCredential, this.#handleExportCredential, this);\n dataGrid.addEventListener(Events.RemoveCredential, this.#handleRemoveCredential.bind(this, authenticatorId));\n dataGrid.rootNode().appendChild(new EmptyDataGridNode());\n\n this.dataGrids.set(authenticatorId, dataGrid);\n\n return dataGrid;\n }\n\n #handleExportCredential({data: credential}: Common.EventTarget.EventTargetEvent): void {\n this.#exportCredential(credential);\n }\n\n #handleRemoveCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: credential,\n }: Common.EventTarget.EventTargetEvent): void {\n void this.#removeCredential(authenticatorId, credential.credentialId);\n }\n\n #addCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: event,\n }: Common.EventTarget.EventTargetEvent): void {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n const emptyNode = dataGrid.rootNode().children.find(node => !Object.keys(node.data).length);\n if (emptyNode) {\n dataGrid.rootNode().removeChild(emptyNode);\n }\n const node = new DataGridNode(event.credential);\n dataGrid.rootNode().appendChild(node);\n }\n\n #updateCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: event,\n }: Common.EventTarget.EventTargetEvent): void {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n const node = dataGrid.rootNode().children.find(node => node.data?.credentialId === event.credential.credentialId);\n if (!node) {\n return;\n }\n node.data = event.credential;\n }\n\n async #setVirtualAuthEnvEnabled(enable: boolean): Promise {\n await this.#isEnabling;\n this.#isEnabling = new Promise(async (resolve: (value: void) => void) => {\n if (enable && !this.#hasBeenEnabled) {\n // Ensures metric is only tracked once per session.\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.VirtualAuthenticatorEnvironmentEnabled);\n this.#hasBeenEnabled = true;\n }\n if (this.#model) {\n await this.#model.setVirtualAuthEnvEnabled(enable);\n }\n\n if (enable) {\n await this.#loadInitialAuthenticators();\n } else {\n this.#removeAuthenticatorSections();\n }\n\n this.#updateVisibility(enable);\n this.#isEnabling = undefined;\n resolve();\n });\n }\n\n #updateVisibility(enabled: boolean): void {\n this.contentElement.classList.toggle('enabled', enabled);\n }\n\n #removeAuthenticatorSections(): void {\n this.#authenticatorsView.innerHTML = '';\n for (const dataGrid of this.dataGrids.values()) {\n dataGrid.asWidget().detach();\n }\n this.dataGrids.clear();\n }\n\n #handleCheckboxToggle(e: MouseEvent): void {\n void this.#setVirtualAuthEnvEnabled((e.target as HTMLInputElement).checked);\n }\n\n #updateEnabledTransportOptions(enabledOptions: Protocol.WebAuthn.AuthenticatorTransport[]): void {\n if (!this.#transportSelect) {\n return;\n }\n\n const prevValue = this.#transportSelect.value;\n this.#transportSelect.removeChildren();\n\n for (const option of enabledOptions) {\n this.#transportSelect.appendChild(new Option(option, option));\n }\n\n // Make sure the currently selected value stays the same.\n this.#transportSelect.value = prevValue;\n // If the new set does not include the previous value.\n if (!this.#transportSelect.value) {\n // Select the first available value.\n this.#transportSelect.selectedIndex = 0;\n }\n }\n\n #updateNewAuthenticatorSectionOptions(): void {\n if (!this.#protocolSelect || !this.residentKeyCheckbox || !this.#userVerificationCheckbox ||\n !this.largeBlobCheckbox) {\n return;\n }\n\n if (this.#protocolSelect.value === Protocol.WebAuthn.AuthenticatorProtocol.Ctap2) {\n this.residentKeyCheckbox.disabled = false;\n this.#userVerificationCheckbox.disabled = false;\n this.largeBlobCheckbox.disabled = !this.residentKeyCheckbox.checked;\n if (this.largeBlobCheckbox.disabled) {\n this.largeBlobCheckbox.checked = false;\n }\n this.#updateEnabledTransportOptions([\n Protocol.WebAuthn.AuthenticatorTransport.Usb,\n Protocol.WebAuthn.AuthenticatorTransport.Ble,\n Protocol.WebAuthn.AuthenticatorTransport.Nfc,\n // TODO (crbug.com/1034663): Toggle cable as option depending on if cablev2 flag is on.\n // Protocol.WebAuthn.AuthenticatorTransport.Cable,\n Protocol.WebAuthn.AuthenticatorTransport.Internal,\n ]);\n } else {\n this.residentKeyCheckbox.checked = false;\n this.residentKeyCheckbox.disabled = true;\n this.#userVerificationCheckbox.checked = false;\n this.#userVerificationCheckbox.disabled = true;\n this.largeBlobCheckbox.checked = false;\n this.largeBlobCheckbox.disabled = true;\n this.#updateEnabledTransportOptions([\n Protocol.WebAuthn.AuthenticatorTransport.Usb,\n Protocol.WebAuthn.AuthenticatorTransport.Ble,\n Protocol.WebAuthn.AuthenticatorTransport.Nfc,\n ]);\n }\n }\n\n #createNewAuthenticatorSection(): void {\n const learnMoreLink = UI.XLink.XLink.create(\n 'https://developers.google.com/web/updates/2018/05/webauthn', i18nString(UIStrings.learnMore));\n learnMoreLink.setAttribute('jslog', `${VisualLogging.link().track({click: true}).context('learn-more')}`);\n this.#learnMoreView = this.contentElement.createChild('div', 'learn-more');\n this.#learnMoreView.appendChild(UI.Fragment.html`\n
\n ${i18nString(UIStrings.useWebauthnForPhishingresistant)}

\n ${learnMoreLink}\n
\n `);\n\n this.#newAuthenticatorSection = this.contentElement.createChild('div', 'new-authenticator-container');\n const newAuthenticatorTitle =\n UI.UIUtils.createLabel(i18nString(UIStrings.newAuthenticator), 'new-authenticator-title');\n this.#newAuthenticatorSection.appendChild(newAuthenticatorTitle);\n this.#newAuthenticatorForm = this.#newAuthenticatorSection.createChild('div', 'new-authenticator-form');\n this.#newAuthenticatorForm.setAttribute('jslog', `${VisualLogging.section().context('new-authenticator')}`);\n\n const protocolGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const transportGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const residentKeyGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const userVerificationGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const largeBlobGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const addButtonGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n\n const protocolSelectTitle = UI.UIUtils.createLabel(i18nString(UIStrings.protocol), 'authenticator-option-label');\n protocolGroup.appendChild(protocolSelectTitle);\n this.#protocolSelect = (protocolGroup.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.#protocolSelect.setAttribute('jslog', `${VisualLogging.dropDown().track({change: true}).context('protocol')}`);\n UI.ARIAUtils.bindLabelToControl(protocolSelectTitle, (this.#protocolSelect as Element));\n Object.values(PROTOCOL_AUTHENTICATOR_VALUES)\n .sort()\n .forEach((option: Protocol.WebAuthn.AuthenticatorProtocol): void => {\n if (this.#protocolSelect) {\n this.#protocolSelect.appendChild(new Option(option, option));\n }\n });\n\n if (this.#protocolSelect) {\n this.#protocolSelect.value = Protocol.WebAuthn.AuthenticatorProtocol.Ctap2;\n }\n\n const transportSelectTitle = UI.UIUtils.createLabel(i18nString(UIStrings.transport), 'authenticator-option-label');\n transportGroup.appendChild(transportSelectTitle);\n this.#transportSelect = (transportGroup.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.#transportSelect.setAttribute(\n 'jslog', `${VisualLogging.dropDown().track({change: true}).context('transport')}`);\n UI.ARIAUtils.bindLabelToControl(transportSelectTitle, (this.#transportSelect as Element));\n // transportSelect will be populated in updateNewAuthenticatorSectionOptions.\n\n this.#residentKeyCheckboxLabel =\n UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.supportsResidentKeys), false, undefined, 'resident-key');\n this.#residentKeyCheckboxLabel.textElement.classList.add('authenticator-option-label');\n residentKeyGroup.appendChild(this.#residentKeyCheckboxLabel.textElement);\n this.residentKeyCheckbox = this.#residentKeyCheckboxLabel.checkboxElement;\n this.residentKeyCheckbox.checked = false;\n this.residentKeyCheckbox.classList.add('authenticator-option-checkbox');\n residentKeyGroup.appendChild(this.#residentKeyCheckboxLabel);\n\n this.#userVerificationCheckboxLabel = UI.UIUtils.CheckboxLabel.create(\n i18nString(UIStrings.supportsUserVerification), false, undefined, 'user-verification');\n this.#userVerificationCheckboxLabel.textElement.classList.add('authenticator-option-label');\n userVerificationGroup.appendChild(this.#userVerificationCheckboxLabel.textElement);\n this.#userVerificationCheckbox = this.#userVerificationCheckboxLabel.checkboxElement;\n this.#userVerificationCheckbox.checked = false;\n this.#userVerificationCheckbox.classList.add('authenticator-option-checkbox');\n userVerificationGroup.appendChild(this.#userVerificationCheckboxLabel);\n\n this.#largeBlobCheckboxLabel =\n UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.supportsLargeBlob), false, undefined, 'large-blob');\n this.#largeBlobCheckboxLabel.textElement.classList.add('authenticator-option-label');\n largeBlobGroup.appendChild(this.#largeBlobCheckboxLabel.textElement);\n this.largeBlobCheckbox = this.#largeBlobCheckboxLabel.checkboxElement;\n this.largeBlobCheckbox.checked = false;\n this.largeBlobCheckbox.classList.add('authenticator-option-checkbox');\n this.largeBlobCheckbox.name = 'large-blob-checkbox';\n largeBlobGroup.appendChild(this.#largeBlobCheckboxLabel);\n\n this.addAuthenticatorButton =\n UI.UIUtils.createTextButton(i18nString(UIStrings.add), this.#handleAddAuthenticatorButton.bind(this), '');\n this.addAuthenticatorButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('add-authenticator')}`);\n addButtonGroup.createChild('div', 'authenticator-option-label');\n addButtonGroup.appendChild(this.addAuthenticatorButton);\n const addAuthenticatorTitle = UI.UIUtils.createLabel(i18nString(UIStrings.addAuthenticator), '');\n UI.ARIAUtils.bindLabelToControl(addAuthenticatorTitle, this.addAuthenticatorButton);\n\n this.#updateNewAuthenticatorSectionOptions();\n if (this.#protocolSelect) {\n this.#protocolSelect.addEventListener('change', this.#updateNewAuthenticatorSectionOptions.bind(this));\n }\n if (this.residentKeyCheckbox) {\n this.residentKeyCheckbox.addEventListener('change', this.#updateNewAuthenticatorSectionOptions.bind(this));\n }\n }\n\n async #handleAddAuthenticatorButton(): Promise {\n const options = this.#createOptionsFromCurrentInputs();\n if (this.#model) {\n const authenticatorId = await this.#model.addAuthenticator(options);\n const availableAuthenticators = this.#availableAuthenticatorSetting.get();\n availableAuthenticators.push({authenticatorId, active: true, ...options});\n this.#availableAuthenticatorSetting.set(\n availableAuthenticators.map(a => ({...a, active: a.authenticatorId === authenticatorId})));\n const section = await this.#addAuthenticatorSection(authenticatorId, options);\n const mediaQueryList = window.matchMedia('(prefers-reduced-motion: reduce)');\n const prefersReducedMotion = mediaQueryList.matches;\n section.scrollIntoView({block: 'start', behavior: prefersReducedMotion ? 'auto' : 'smooth'});\n }\n }\n\n async #addAuthenticatorSection(\n authenticatorId: Protocol.WebAuthn.AuthenticatorId,\n options: Protocol.WebAuthn.VirtualAuthenticatorOptions): Promise {\n const section = document.createElement('div');\n section.classList.add('authenticator-section');\n section.setAttribute('data-authenticator-id', authenticatorId);\n section.setAttribute('jslog', `${VisualLogging.section().context('authenticator')}`);\n this.#authenticatorsView.appendChild(section);\n\n const headerElement = section.createChild('div', 'authenticator-section-header');\n const titleElement = headerElement.createChild('div', 'authenticator-section-title');\n UI.ARIAUtils.markAsHeading(titleElement, 2);\n\n await this.#clearActiveAuthenticator();\n const activeButtonContainer = headerElement.createChild('div', 'active-button-container');\n const activeLabel =\n UI.UIUtils.createRadioLabel(`active-authenticator-${authenticatorId}`, i18nString(UIStrings.active));\n activeLabel.radioElement.addEventListener('change', this.#setActiveAuthenticator.bind(this, authenticatorId));\n activeButtonContainer.appendChild(activeLabel);\n (activeLabel.radioElement as HTMLInputElement).checked = true;\n this.#activeAuthId = authenticatorId; // Newly added authenticator is automatically set as active.\n\n const removeButton = headerElement.createChild('button', 'text-button');\n removeButton.textContent = i18nString(UIStrings.remove);\n removeButton.addEventListener('click', this.#removeAuthenticator.bind(this, authenticatorId));\n removeButton.setAttribute(\n 'jslog', `${VisualLogging.action().track({click: true}).context('remove-authenticator')}`);\n\n const toolbar = new UI.Toolbar.Toolbar('edit-name-toolbar', titleElement);\n const editName = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.editName), 'edit', undefined, 'edit-name');\n const saveName = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.saveName), 'checkmark', undefined, 'save-name');\n saveName.setVisible(false);\n\n const nameField = (titleElement.createChild('input', 'authenticator-name-field') as HTMLInputElement);\n nameField.placeholder = i18nString(UIStrings.enterNewName);\n nameField.disabled = true;\n nameField.setAttribute('jslog', `${VisualLogging.textField().track({keydown: true}).context('name')}`);\n const userFriendlyName = authenticatorId.slice(-5); // User friendly name defaults to last 5 chars of UUID.\n nameField.value = i18nString(UIStrings.authenticatorS, {PH1: userFriendlyName});\n this.#updateActiveLabelTitle(activeLabel, nameField.value);\n\n editName.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click,\n (): void => this.#handleEditNameButton(titleElement, nameField, editName, saveName));\n saveName.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click,\n (): void => this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel));\n\n nameField.addEventListener(\n 'focusout', (): void => this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel));\n nameField.addEventListener('keydown', (event: KeyboardEvent): void => {\n if (event.key === 'Enter') {\n this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel);\n }\n });\n\n toolbar.appendToolbarItem(editName);\n toolbar.appendToolbarItem(saveName);\n\n this.#createAuthenticatorFields(section, authenticatorId, options);\n\n const label = document.createElement('div');\n label.classList.add('credentials-title');\n label.textContent = i18nString(UIStrings.credentials);\n section.appendChild(label);\n\n const dataGrid = this.#createCredentialsDataGrid(authenticatorId);\n dataGrid.asWidget().show(section);\n if (this.#model) {\n this.#model.addEventListener(\n SDK.WebAuthnModel.Events.CredentialAdded, this.#addCredential.bind(this, authenticatorId));\n this.#model.addEventListener(\n SDK.WebAuthnModel.Events.CredentialAsserted, this.#updateCredential.bind(this, authenticatorId));\n }\n\n return section;\n }\n\n #exportCredential(credential: Protocol.WebAuthn.Credential): void {\n let pem = PRIVATE_KEY_HEADER;\n for (let i = 0; i < credential.privateKey.length; i += 64) {\n pem += credential.privateKey.substring(i, i + 64) + '\\n';\n }\n pem += PRIVATE_KEY_FOOTER;\n\n const link = document.createElement('a');\n link.download = i18nString(UIStrings.privateKeypem);\n link.href = 'data:application/x-pem-file,' + encodeURIComponent(pem);\n link.click();\n }\n\n async #removeCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, credentialId: string): Promise {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n\n // @ts-ignore dataGrid node type is indeterminate.\n dataGrid.rootNode()\n .children\n .find((n: DataGrid.DataGrid.DataGridNode): boolean => n.data.credentialId === credentialId)\n .remove();\n\n if (!dataGrid.rootNode().children.length) {\n dataGrid.rootNode().appendChild(new EmptyDataGridNode());\n }\n\n if (this.#model) {\n await this.#model.removeCredential(authenticatorId, credentialId);\n }\n }\n\n /**\n * Creates the fields describing the authenticator in the front end.\n */\n #createAuthenticatorFields(\n section: Element, authenticatorId: string, options: Protocol.WebAuthn.VirtualAuthenticatorOptions): void {\n const sectionFields = section.createChild('div', 'authenticator-fields');\n const uuidField = sectionFields.createChild('div', 'authenticator-field');\n const protocolField = sectionFields.createChild('div', 'authenticator-field');\n const transportField = sectionFields.createChild('div', 'authenticator-field');\n const srkField = sectionFields.createChild('div', 'authenticator-field');\n const slbField = sectionFields.createChild('div', 'authenticator-field');\n const suvField = sectionFields.createChild('div', 'authenticator-field');\n\n uuidField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.uuid), 'authenticator-option-label'));\n protocolField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.protocol), 'authenticator-option-label'));\n transportField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.transport), 'authenticator-option-label'));\n srkField.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.supportsResidentKeys), 'authenticator-option-label'));\n slbField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.supportsLargeBlob), 'authenticator-option-label'));\n suvField.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.supportsUserVerification), 'authenticator-option-label'));\n\n uuidField.createChild('div', 'authenticator-field-value').textContent = authenticatorId;\n protocolField.createChild('div', 'authenticator-field-value').textContent = options.protocol;\n transportField.createChild('div', 'authenticator-field-value').textContent = options.transport;\n srkField.createChild('div', 'authenticator-field-value').textContent =\n options.hasResidentKey ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n slbField.createChild('div', 'authenticator-field-value').textContent =\n options.hasLargeBlob ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n suvField.createChild('div', 'authenticator-field-value').textContent =\n options.hasUserVerification ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n }\n\n #handleEditNameButton(\n titleElement: Element, nameField: HTMLInputElement, editName: UI.Toolbar.ToolbarButton,\n saveName: UI.Toolbar.ToolbarButton): void {\n nameField.disabled = false;\n titleElement.classList.add('editing-name');\n nameField.focus();\n saveName.setVisible(true);\n editName.setVisible(false);\n }\n\n #handleSaveNameButton(\n titleElement: Element, nameField: HTMLInputElement, editName: UI.Toolbar.ToolbarItem,\n saveName: UI.Toolbar.ToolbarItem, activeLabel: UI.UIUtils.DevToolsRadioButton): void {\n const name = nameField.value;\n if (!name) {\n return;\n }\n nameField.disabled = true;\n titleElement.classList.remove('editing-name');\n editName.setVisible(true);\n saveName.setVisible(false);\n this.#updateActiveLabelTitle(activeLabel, name);\n }\n\n #updateActiveLabelTitle(activeLabel: UI.UIUtils.DevToolsRadioButton, authenticatorName: string): void {\n UI.Tooltip.Tooltip.install(\n activeLabel.radioElement, i18nString(UIStrings.setSAsTheActiveAuthenticator, {PH1: authenticatorName}));\n }\n\n /**\n * Removes both the authenticator and its respective UI element.\n */\n #removeAuthenticator(authenticatorId: Protocol.WebAuthn.AuthenticatorId): void {\n if (this.#authenticatorsView) {\n const child = this.#authenticatorsView.querySelector(`[data-authenticator-id=${CSS.escape(authenticatorId)}]`);\n if (child) {\n child.remove();\n }\n }\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (dataGrid) {\n dataGrid.asWidget().detach();\n this.dataGrids.delete(authenticatorId);\n }\n\n if (this.#model) {\n void this.#model.removeAuthenticator(authenticatorId);\n }\n\n // Update available authenticator setting.\n const prevAvailableAuthenticators = this.#availableAuthenticatorSetting.get();\n const newAvailableAuthenticators = prevAvailableAuthenticators.filter(a => a.authenticatorId !== authenticatorId);\n this.#availableAuthenticatorSetting.set(newAvailableAuthenticators);\n\n if (this.#activeAuthId === authenticatorId) {\n const availableAuthenticatorIds = Array.from(this.dataGrids.keys());\n if (availableAuthenticatorIds.length) {\n void this.#setActiveAuthenticator(availableAuthenticatorIds[0]);\n } else {\n this.#activeAuthId = null;\n }\n }\n }\n\n #createOptionsFromCurrentInputs(): Protocol.WebAuthn.VirtualAuthenticatorOptions {\n // TODO(crbug.com/1034663): Add optionality for isUserVerified param.\n if (!this.#protocolSelect || !this.#transportSelect || !this.residentKeyCheckbox ||\n !this.#userVerificationCheckbox || !this.largeBlobCheckbox) {\n throw new Error('Unable to create options from current inputs');\n }\n\n return {\n protocol: this.#protocolSelect.options[this.#protocolSelect.selectedIndex].value as\n Protocol.WebAuthn.AuthenticatorProtocol,\n ctap2Version: Protocol.WebAuthn.Ctap2Version.Ctap2_1,\n transport: this.#transportSelect.options[this.#transportSelect.selectedIndex].value as\n Protocol.WebAuthn.AuthenticatorTransport,\n hasResidentKey: this.residentKeyCheckbox.checked,\n hasUserVerification: this.#userVerificationCheckbox.checked,\n hasLargeBlob: this.largeBlobCheckbox.checked,\n automaticPresenceSimulation: true,\n isUserVerified: true,\n };\n }\n\n /**\n * Sets the given authenticator as active.\n * Note that a newly added authenticator will automatically be set as active.\n */\n async #setActiveAuthenticator(authenticatorId: Protocol.WebAuthn.AuthenticatorId): Promise {\n await this.#clearActiveAuthenticator();\n if (this.#model) {\n await this.#model.setAutomaticPresenceSimulation(authenticatorId, true);\n }\n this.#activeAuthId = authenticatorId;\n\n const prevAvailableAuthenticators = this.#availableAuthenticatorSetting.get();\n const newAvailableAuthenticators =\n prevAvailableAuthenticators.map(a => ({...a, active: a.authenticatorId === authenticatorId}));\n this.#availableAuthenticatorSetting.set(newAvailableAuthenticators);\n\n this.#updateActiveButtons();\n }\n\n #updateActiveButtons(): void {\n const authenticators = this.#authenticatorsView.getElementsByClassName('authenticator-section');\n Array.from(authenticators).forEach((authenticator: Element): void => {\n const button = (authenticator.querySelector('input.dt-radio-button') as HTMLInputElement);\n if (!button) {\n return;\n }\n button.checked = (authenticator as HTMLElement).dataset.authenticatorId === this.#activeAuthId;\n });\n }\n\n async #clearActiveAuthenticator(): Promise {\n if (this.#activeAuthId && this.#model) {\n await this.#model.setAutomaticPresenceSimulation(this.#activeAuthId, false);\n }\n this.#activeAuthId = null;\n this.#updateActiveButtons();\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([webauthnPaneStyles]);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/webauthn/webauthn-meta.js b/public/panels/webauthn/webauthn-meta.js index c45765ee4..ef7f2d9f2 100644 --- a/public/panels/webauthn/webauthn-meta.js +++ b/public/panels/webauthn/webauthn-meta.js @@ -31,7 +31,7 @@ UI.ViewManager.registerViewExtension({ persistence: "closeable" /* UI.ViewManager.ViewPersistence.CLOSEABLE */, async loadView() { const Webauthn = await loadWebauthnModule(); - return Webauthn.WebauthnPane.WebauthnPaneImpl.instance(); + return new Webauthn.WebauthnPane.WebauthnPaneImpl(); }, }); //# sourceMappingURL=webauthn-meta.js.map \ No newline at end of file diff --git a/public/panels/webauthn/webauthn-meta.js.map b/public/panels/webauthn/webauthn-meta.js.map index 03bd23526..fd899ffbc 100644 --- a/public/panels/webauthn/webauthn-meta.js.map +++ b/public/panels/webauthn/webauthn-meta.js.map @@ -1 +1 @@ -{"version":3,"file":"webauthn-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/webauthn/webauthn-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,YAAY,EAAE,eAAe;CAC9B,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;AACxF,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,oBAAiD,CAAC;AAEtD,KAAK,UAAU,kBAAkB;IAC/B,IAAI,CAAC,oBAAoB,EAAE;QACzB,oBAAoB,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC;KACtD;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,mEAA+C;IACvD,EAAE,EAAE,eAAe;IACnB,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC;IACzC,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,YAAY,CAAC;IACrD,KAAK,EAAE,GAAG;IACV,WAAW,4DAA0C;IACrD,KAAK,CAAC,QAAQ;QACZ,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC5C,OAAO,QAAQ,CAAC,YAAY,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;IAC3D,CAAC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Webauthn from './webauthn.js';\n\nconst UIStrings = {\n /**\n *@description Title of WebAuthn tab in bottom drawer.\n */\n webauthn: 'WebAuthn',\n /**\n *@description Command for showing the WebAuthn tab in bottom drawer.\n */\n showWebauthn: 'Show WebAuthn',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/webauthn/webauthn-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedWebauthnModule: (typeof Webauthn|undefined);\n\nasync function loadWebauthnModule(): Promise {\n if (!loadedWebauthnModule) {\n loadedWebauthnModule = await import('./webauthn.js');\n }\n return loadedWebauthnModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'webauthn-pane',\n title: i18nLazyString(UIStrings.webauthn),\n commandPrompt: i18nLazyString(UIStrings.showWebauthn),\n order: 100,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const Webauthn = await loadWebauthnModule();\n return Webauthn.WebauthnPane.WebauthnPaneImpl.instance();\n },\n});\n"]} \ No newline at end of file +{"version":3,"file":"webauthn-meta.js","sourceRoot":"","sources":["../../../../../../front_end/panels/webauthn/webauthn-meta.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAIhD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,YAAY,EAAE,eAAe;CAC9B,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;AACxF,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAExF,IAAI,oBAAiD,CAAC;AAEtD,KAAK,UAAU,kBAAkB;IAC/B,IAAI,CAAC,oBAAoB,EAAE;QACzB,oBAAoB,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC;KACtD;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC;IACnC,QAAQ,mEAA+C;IACvD,EAAE,EAAE,eAAe;IACnB,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC;IACzC,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,YAAY,CAAC;IACrD,KAAK,EAAE,GAAG;IACV,WAAW,4DAA0C;IACrD,KAAK,CAAC,QAAQ;QACZ,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC5C,OAAO,IAAI,QAAQ,CAAC,YAAY,CAAC,gBAAgB,EAAE,CAAC;IACtD,CAAC;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as UI from '../../ui/legacy/legacy.js';\n\nimport type * as Webauthn from './webauthn.js';\n\nconst UIStrings = {\n /**\n *@description Title of WebAuthn tab in bottom drawer.\n */\n webauthn: 'WebAuthn',\n /**\n *@description Command for showing the WebAuthn tab in bottom drawer.\n */\n showWebauthn: 'Show WebAuthn',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/webauthn/webauthn-meta.ts', UIStrings);\nconst i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);\n\nlet loadedWebauthnModule: (typeof Webauthn|undefined);\n\nasync function loadWebauthnModule(): Promise {\n if (!loadedWebauthnModule) {\n loadedWebauthnModule = await import('./webauthn.js');\n }\n return loadedWebauthnModule;\n}\n\nUI.ViewManager.registerViewExtension({\n location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,\n id: 'webauthn-pane',\n title: i18nLazyString(UIStrings.webauthn),\n commandPrompt: i18nLazyString(UIStrings.showWebauthn),\n order: 100,\n persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,\n async loadView() {\n const Webauthn = await loadWebauthnModule();\n return new Webauthn.WebauthnPane.WebauthnPaneImpl();\n },\n});\n"]} \ No newline at end of file diff --git a/public/services/trace_bounds/TraceBounds.d.ts b/public/services/trace_bounds/TraceBounds.d.ts index 009ddded5..dab489be9 100644 --- a/public/services/trace_bounds/TraceBounds.d.ts +++ b/public/services/trace_bounds/TraceBounds.d.ts @@ -10,6 +10,8 @@ export declare class StateChangedEvent extends Event { shouldAnimate?: boolean; }); } +export declare function onChange(cb: (event: StateChangedEvent) => void): void; +export declare function removeListener(cb: (event: StateChangedEvent) => void): void; export interface State { readonly micro: Readonly>; readonly milli: Readonly>; diff --git a/public/services/trace_bounds/TraceBounds.js b/public/services/trace_bounds/TraceBounds.js index 79b677f9a..014a676b2 100644 --- a/public/services/trace_bounds/TraceBounds.js +++ b/public/services/trace_bounds/TraceBounds.js @@ -15,6 +15,17 @@ export class StateChangedEvent extends Event { this.options = options; } } +// Exposed as a shortcut to BoundsManager.instance().addEventListener, which +// also takes care of type-casting the event to StateChangedEvent. +export function onChange(cb) { + BoundsManager.instance().addEventListener(StateChangedEvent.eventName, + // Cast the callback as TS doesn't know that these events will emit + // StateChangedEvent types. + cb); +} +export function removeListener(cb) { + BoundsManager.instance().removeEventListener(StateChangedEvent.eventName, cb); +} export class BoundsManager extends EventTarget { static instance(opts = { forceNew: null }) { const forceNew = Boolean(opts.forceNew); @@ -89,6 +100,11 @@ export class BoundsManager extends EventTarget { // Minimum timeline visible window range is 1 millisecond. return; } + // Ensure that the setTimelineVisibleWindow can never go outside the bounds of the minimap bounds. + newWindow.min = + TraceEngine.Types.Timing.MicroSeconds(Math.max(this.#currentState.minimapTraceBounds.min, newWindow.min)); + newWindow.max = + TraceEngine.Types.Timing.MicroSeconds(Math.min(this.#currentState.minimapTraceBounds.max, newWindow.max)); this.#currentState.timelineTraceWindow = newWindow; this.dispatchEvent(new StateChangedEvent(this.state(), 'VISIBLE_WINDOW', { shouldAnimate: options.shouldAnimate })); } diff --git a/public/services/trace_bounds/TraceBounds.js.map b/public/services/trace_bounds/TraceBounds.js.map index 6fa47dd90..8fddd1866 100644 --- a/public/services/trace_bounds/TraceBounds.js.map +++ b/public/services/trace_bounds/TraceBounds.js.map @@ -1 +1 @@ -{"version":3,"file":"TraceBounds.js","sourceRoot":"","sources":["../../../../../../front_end/services/trace_bounds/TraceBounds.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,IAAI,QAAQ,GAAuB,IAAI,CAAC;AAExC,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAG/B;IACA;IACA;IAJX,MAAM,CAAU,SAAS,GAAG,yBAAyB,CAAC;IACtD,YACW,KAAsB,EACtB,UAAqD,EACrD,UAEH,EAAC,aAAa,EAAE,KAAK,EAAC;QAE5B,KAAK,CAAC,iBAAiB,CAAC,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAN3D,UAAK,GAAL,KAAK,CAAiB;QACtB,eAAU,GAAV,UAAU,CAA2C;QACrD,YAAO,GAAP,OAAO,CAEY;IAG9B,CAAC;;AAqCH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C,MAAM,CAAC,QAAQ,CAAC,OAEZ,EAAC,QAAQ,EAAE,IA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CAAC,CAAC;IAC9G,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nlet instance: BoundsManager|null = null;\n\nexport class StateChangedEvent extends Event {\n static readonly eventName = 'traceboundsstatechanged';\n constructor(\n public state: Readonly,\n public updateType: 'RESET'|'MINIMAP_BOUNDS'|'VISIBLE_WINDOW',\n public options: {\n shouldAnimate?: boolean,\n } = {shouldAnimate: false},\n ) {\n super(StateChangedEvent.eventName, {composed: true, bubbles: true});\n }\n}\n\nexport interface State {\n readonly micro: Readonly>;\n readonly milli: Readonly>;\n}\n\nexport interface TraceWindows {\n /**\n * This is the bounds of the entire trace. Once a trace is imported/recorded\n * and this is set, it cannot be changed.\n */\n readonly entireTraceBounds: TraceEngine.Types.Timing.TraceWindow;\n /**\n * This is the bounds of the minimap and represents the left and right bound\n * being shown by the minimap. It can be changed by a user action: for\n * example, when a user creates a breadcrumb, that breadcrumb becomes the\n * minimap trace bounds. By default, and when a trace is first loaded, the\n * minimapTraceBounds are equivalent to the entireTraceBounds.\n * Note that this is NOT the active time window that the user has dragged\n * the minimap handles to; this is the min/max being shown by the minimap.\n */\n minimapTraceBounds: TraceEngine.Types.Timing.TraceWindow;\n /**\n * This represents the trace window that is being shown on the main timeline.\n * The reason this is called a \"Window\" rather than \"Bounds\" is because the\n * user is not bound by this value - they can use their mouse to pan/zoom\n * in/out beyond the limits of this window (the limit is the\n * minimapTraceBounds). Another way to think of this value is that the\n * min/max of this value is what is represented by the two drag handles on\n * the TimelineMiniMap that the user can drag to change their current window.\n */\n timelineTraceWindow: TraceEngine.Types.Timing.TraceWindow;\n}\n\nexport class BoundsManager extends EventTarget {\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): BoundsManager {\n const forceNew = Boolean(opts.forceNew);\n if (!instance || forceNew) {\n instance = new BoundsManager();\n }\n return instance;\n }\n\n static removeInstance(): void {\n instance = null;\n }\n\n #currentState: TraceWindows|null = null;\n\n private constructor() {\n // Defined to enable us to mark it as Private.\n super();\n }\n\n resetWithNewBounds(initialBounds: TraceEngine.Types.Timing.TraceWindowMicroSeconds): this {\n this.#currentState = {\n entireTraceBounds: initialBounds,\n minimapTraceBounds: initialBounds,\n timelineTraceWindow: initialBounds,\n };\n this.dispatchEvent(new StateChangedEvent(this.state() as State, 'RESET'));\n return this;\n }\n\n state(): Readonly|null {\n if (this.#currentState === null) {\n return null;\n }\n const entireBoundsMilli = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(this.#currentState.entireTraceBounds);\n const minimapBoundsMilli =\n TraceEngine.Helpers.Timing.traceWindowMilliSeconds(this.#currentState.minimapTraceBounds);\n const timelineTraceWindowMilli =\n TraceEngine.Helpers.Timing.traceWindowMilliSeconds(this.#currentState.timelineTraceWindow);\n\n return {\n micro: this.#currentState,\n milli: {\n entireTraceBounds: entireBoundsMilli,\n minimapTraceBounds: minimapBoundsMilli,\n timelineTraceWindow: timelineTraceWindowMilli,\n },\n };\n }\n\n setMiniMapBounds(newBounds: TraceEngine.Types.Timing.TraceWindowMicroSeconds): void {\n if (!this.#currentState) {\n // If we don't have the existing state and know the trace bounds, we cannot set the minimap bounds.\n return;\n }\n const existingBounds = this.#currentState.minimapTraceBounds;\n if (newBounds.min === existingBounds.min && newBounds.max === existingBounds.max) {\n // New bounds are identical to the old ones so no action required.\n return;\n }\n\n if (newBounds.range < 1_000) {\n // Minimum minimap bounds range is 1 millisecond.\n return;\n }\n\n this.#currentState.minimapTraceBounds = newBounds;\n // this.state() cannot be null here.\n this.dispatchEvent(new StateChangedEvent(this.state() as State, 'MINIMAP_BOUNDS'));\n }\n\n setTimelineVisibleWindow(newWindow: TraceEngine.Types.Timing.TraceWindowMicroSeconds, options: {\n shouldAnimate: boolean,\n } = {\n shouldAnimate: false,\n }): void {\n if (!this.#currentState) {\n return;\n }\n const existingWindow = this.#currentState.timelineTraceWindow;\n if (newWindow.min === existingWindow.min && newWindow.max === existingWindow.max) {\n // New bounds are identical to the old ones so no action required.\n return;\n }\n\n if (newWindow.range < 1_000) {\n // Minimum timeline visible window range is 1 millisecond.\n return;\n }\n\n this.#currentState.timelineTraceWindow = newWindow;\n this.dispatchEvent(\n new StateChangedEvent(this.state() as State, 'VISIBLE_WINDOW', {shouldAnimate: options.shouldAnimate}));\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"TraceBounds.js","sourceRoot":"","sources":["../../../../../../front_end/services/trace_bounds/TraceBounds.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,IAAI,QAAQ,GAAuB,IAAI,CAAC;AAExC,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAG/B;IACA;IACA;IAJX,MAAM,CAAU,SAAS,GAAG,yBAAyB,CAAC;IACtD,YACW,KAAsB,EACtB,UAAqD,EACrD,UAEH,EAAC,aAAa,EAAE,KAAK,EAAC;QAE5B,KAAK,CAAC,iBAAiB,CAAC,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAN3D,UAAK,GAAL,KAAK,CAAiB;QACtB,eAAU,GAAV,UAAU,CAA2C;QACrD,YAAO,GAAP,OAAO,CAEY;IAG9B,CAAC;;AAGH,4EAA4E;AAC5E,kEAAkE;AAClE,MAAM,UAAU,QAAQ,CAAC,EAAsC;IAC7D,aAAa,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CACrC,iBAAiB,CAAC,SAAS;IAC3B,mEAAmE;IACnE,2BAA2B;IAC3B,EAA4B,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAAsC;IACnE,aAAa,CAAC,QAAQ,EAAE,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,SAAS,EAAE,EAA4B,CAAC,CAAC;AAC1G,C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AI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9G,SAAS,CAAC,GAAG;YACT,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QAE9G,IAAI,CAAC,aAAa,CAAC,mBAAmB,GAAG,SAAS,CAAC;QACnD,IAAI,CAAC,aAAa,CACd,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAW,EAAE,gBAAgB,EAAE,EAAC,aAAa,EAAE,OAAO,CAAC,aAAa,EAAC,CAAC,CAAC,CAAC;IAC9G,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nlet instance: BoundsManager|null = null;\n\nexport class StateChangedEvent extends Event {\n static readonly eventName = 'traceboundsstatechanged';\n constructor(\n public state: Readonly,\n public updateType: 'RESET'|'MINIMAP_BOUNDS'|'VISIBLE_WINDOW',\n public options: {\n shouldAnimate?: boolean,\n } = {shouldAnimate: false},\n ) {\n super(StateChangedEvent.eventName, {composed: true, bubbles: true});\n }\n}\n\n// Exposed as a shortcut to BoundsManager.instance().addEventListener, which\n// also takes care of type-casting the event to StateChangedEvent.\nexport function onChange(cb: (event: StateChangedEvent) => void): void {\n BoundsManager.instance().addEventListener(\n StateChangedEvent.eventName,\n // Cast the callback as TS doesn't know that these events will emit\n // StateChangedEvent types.\n cb as (event: Event) => void);\n}\n\nexport function removeListener(cb: (event: StateChangedEvent) => void): void {\n BoundsManager.instance().removeEventListener(StateChangedEvent.eventName, cb as (event: Event) => void);\n}\n\nexport interface State {\n readonly micro: Readonly>;\n readonly milli: Readonly>;\n}\n\nexport interface TraceWindows {\n /**\n * This is the bounds of the entire trace. Once a trace is imported/recorded\n * and this is set, it cannot be changed.\n */\n readonly entireTraceBounds: TraceEngine.Types.Timing.TraceWindow;\n /**\n * This is the bounds of the minimap and represents the left and right bound\n * being shown by the minimap. It can be changed by a user action: for\n * example, when a user creates a breadcrumb, that breadcrumb becomes the\n * minimap trace bounds. By default, and when a trace is first loaded, the\n * minimapTraceBounds are equivalent to the entireTraceBounds.\n * Note that this is NOT the active time window that the user has dragged\n * the minimap handles to; this is the min/max being shown by the minimap.\n */\n minimapTraceBounds: TraceEngine.Types.Timing.TraceWindow;\n /**\n * This represents the trace window that is being shown on the main timeline.\n * The reason this is called a \"Window\" rather than \"Bounds\" is because the\n * user is not bound by this value - they can use their mouse to pan/zoom\n * in/out beyond the limits of this window (the limit is the\n * minimapTraceBounds). Another way to think of this value is that the\n * min/max of this value is what is represented by the two drag handles on\n * the TimelineMiniMap that the user can drag to change their current window.\n */\n timelineTraceWindow: TraceEngine.Types.Timing.TraceWindow;\n}\n\nexport class BoundsManager extends EventTarget {\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): BoundsManager {\n const forceNew = Boolean(opts.forceNew);\n if (!instance || forceNew) {\n instance = new BoundsManager();\n }\n return instance;\n }\n\n static removeInstance(): void {\n instance = null;\n }\n\n #currentState: TraceWindows|null = null;\n\n private constructor() {\n // Defined to enable us to mark it as Private.\n super();\n }\n\n resetWithNewBounds(initialBounds: TraceEngine.Types.Timing.TraceWindowMicroSeconds): this {\n this.#currentState = {\n entireTraceBounds: initialBounds,\n minimapTraceBounds: initialBounds,\n timelineTraceWindow: initialBounds,\n };\n this.dispatchEvent(new StateChangedEvent(this.state() as State, 'RESET'));\n return this;\n }\n\n state(): Readonly|null {\n if (this.#currentState === null) {\n return null;\n }\n const entireBoundsMilli = TraceEngine.Helpers.Timing.traceWindowMilliSeconds(this.#currentState.entireTraceBounds);\n const minimapBoundsMilli =\n TraceEngine.Helpers.Timing.traceWindowMilliSeconds(this.#currentState.minimapTraceBounds);\n const timelineTraceWindowMilli =\n TraceEngine.Helpers.Timing.traceWindowMilliSeconds(this.#currentState.timelineTraceWindow);\n\n return {\n micro: this.#currentState,\n milli: {\n entireTraceBounds: entireBoundsMilli,\n minimapTraceBounds: minimapBoundsMilli,\n timelineTraceWindow: timelineTraceWindowMilli,\n },\n };\n }\n\n setMiniMapBounds(newBounds: TraceEngine.Types.Timing.TraceWindowMicroSeconds): void {\n if (!this.#currentState) {\n // If we don't have the existing state and know the trace bounds, we cannot set the minimap bounds.\n return;\n }\n const existingBounds = this.#currentState.minimapTraceBounds;\n if (newBounds.min === existingBounds.min && newBounds.max === existingBounds.max) {\n // New bounds are identical to the old ones so no action required.\n return;\n }\n\n if (newBounds.range < 1_000) {\n // Minimum minimap bounds range is 1 millisecond.\n return;\n }\n\n this.#currentState.minimapTraceBounds = newBounds;\n // this.state() cannot be null here.\n this.dispatchEvent(new StateChangedEvent(this.state() as State, 'MINIMAP_BOUNDS'));\n }\n\n setTimelineVisibleWindow(newWindow: TraceEngine.Types.Timing.TraceWindowMicroSeconds, options: {\n shouldAnimate: boolean,\n } = {\n shouldAnimate: false,\n }): void {\n if (!this.#currentState) {\n return;\n }\n const existingWindow = this.#currentState.timelineTraceWindow;\n if (newWindow.min === existingWindow.min && newWindow.max === existingWindow.max) {\n // New bounds are identical to the old ones so no action required.\n return;\n }\n\n if (newWindow.range < 1_000) {\n // Minimum timeline visible window range is 1 millisecond.\n return;\n }\n\n // Ensure that the setTimelineVisibleWindow can never go outside the bounds of the minimap bounds.\n newWindow.min =\n TraceEngine.Types.Timing.MicroSeconds(Math.max(this.#currentState.minimapTraceBounds.min, newWindow.min));\n newWindow.max =\n TraceEngine.Types.Timing.MicroSeconds(Math.min(this.#currentState.minimapTraceBounds.max, newWindow.max));\n\n this.#currentState.timelineTraceWindow = newWindow;\n this.dispatchEvent(\n new StateChangedEvent(this.state() as State, 'VISIBLE_WINDOW', {shouldAnimate: options.shouldAnimate}));\n }\n}\n"]} \ No newline at end of file diff --git a/public/third_party/lighthouse/lighthouse-dt-bundle.js b/public/third_party/lighthouse/lighthouse-dt-bundle.js index 1fa0380e5..31477802e 100644 --- a/public/third_party/lighthouse/lighthouse-dt-bundle.js +++ b/public/third_party/lighthouse/lighthouse-dt-bundle.js @@ -1,5 +1,5 @@ /** - * Lighthouse v11.3.0 (Nov 02 2023) + * Lighthouse v11.4.0 (Dec 11 2023) * * Automated auditing, performance metrics, and best practices for the web. * @@ -10,13 +10,13 @@ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -"use strict";(()=>{var a9=Object.create;var Hc=Object.defineProperty;var o9=Object.getOwnPropertyDescriptor;var i9=Object.getOwnPropertyNames;var s9=Object.getPrototypeOf,c9=Object.prototype.hasOwnProperty;var s=(t,e)=>Hc(t,"name",{value:e,configurable:!0});var b=(t,e)=>()=>(t&&(e=t(t=0)),e);var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),S=(t,e)=>{for(var n in e)Hc(t,n,{get:e[n],enumerable:!0})},_x=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of i9(e))!c9.call(t,a)&&a!==n&&Hc(t,a,{get:()=>e[a],enumerable:!(r=o9(e,a))||r.enumerable});return t};var Mt=(t,e,n)=>(n=t!=null?a9(s9(t)):{},_x(e||!t||!t.__esModule?Hc(n,"default",{value:t,enumerable:!0}):n,t)),u9=t=>_x(Hc({},"__esModule",{value:!0}),t);function Rx(){throw new Error("setTimeout has not been defined")}function Fx(){throw new Error("clearTimeout has not been defined")}function kx(t){if(Da===setTimeout)return setTimeout(t,0);if((Da===Rx||!Da)&&setTimeout)return Da=setTimeout,setTimeout(t,0);try{return Da(t,0)}catch{try{return Da.call(null,t,0)}catch{return Da.call(this,t,0)}}}function l9(t){if(Ea===clearTimeout)return clearTimeout(t);if((Ea===Fx||!Ea)&&clearTimeout)return Ea=clearTimeout,clearTimeout(t);try{return Ea(t)}catch{try{return Ea.call(null,t)}catch{return Ea.call(this,t)}}}function d9(){!xi||!xo||(xi=!1,xo.length?Vr=xo.concat(Vr):Tm=-1,Vr.length&&Ix())}function Ix(){if(!xi){var t=kx(d9);xi=!0;for(var e=Vr.length;e;){for(xo=Vr,Vr=[];++Tm1)for(var n=1;n{d();s(Rx,"defaultSetTimout");s(Fx,"defaultClearTimeout");Da=Rx,Ea=Fx;typeof globalThis.setTimeout=="function"&&(Da=setTimeout);typeof globalThis.clearTimeout=="function"&&(Ea=clearTimeout);s(kx,"runTimeout");s(l9,"runClearTimeout");Vr=[],xi=!1,Tm=-1;s(d9,"cleanUpNextTick");s(Ix,"drainQueue");s(nn,"nextTick");s(Nx,"Item");Nx.prototype.run=function(){this.fun.apply(null,this.array)};m9="browser",p9="browser",f9=!0,h9={},g9=[],y9="",b9={},v9={},w9={};s(Co,"noop");D9=Co,E9=Co,T9=Co,S9=Co,x9=Co,C9=Co,A9=Co;s(_9,"binding");s(R9,"cwd");s(F9,"chdir");s(k9,"umask");Si=globalThis.performance||{},I9=Si.now||Si.mozNow||Si.msNow||Si.oNow||Si.webkitNow||function(){return new Date().getTime()};s(N9,"hrtime");M9=new Date;s(L9,"uptime");rn={nextTick:nn,title:m9,browser:f9,env:h9,argv:g9,version:y9,versions:b9,on:D9,addListener:E9,once:T9,off:S9,removeListener:x9,removeAllListeners:C9,emit:A9,binding:_9,cwd:R9,chdir:F9,umask:k9,hrtime:N9,platform:p9,release:v9,config:w9,uptime:L9}});var d=b(()=>{"use strict";Ta();globalThis.process=rn});function Ox(){H1=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=t.length;e0)throw new Error("Invalid string. Length must be a multiple of 4");o=t[c-2]==="="?2:t[c-1]==="="?1:0,i=new P9(c*3/4-o),r=o>0?c-4:c;var u=0;for(e=0,n=0;e>16&255,i[u++]=a>>8&255,i[u++]=a&255;return o===2?(a=Un[t.charCodeAt(e)]<<2|Un[t.charCodeAt(e+1)]>>4,i[u++]=a&255):o===1&&(a=Un[t.charCodeAt(e)]<<10|Un[t.charCodeAt(e+1)]<<4|Un[t.charCodeAt(e+2)]>>2,i[u++]=a>>8&255,i[u++]=a&255),i}function B9(t){return hr[t>>18&63]+hr[t>>12&63]+hr[t>>6&63]+hr[t&63]}function U9(t,e,n){for(var r,a=[],o=e;ou?u:c+i));return r===1?(e=t[n-1],a+=hr[e>>2],a+=hr[e<<4&63],a+="=="):r===2&&(e=(t[n-2]<<8)+t[n-1],a+=hr[e>>10],a+=hr[e>>4&63],a+=hr[e<<2&63],a+="="),o.push(a),o.join("")}function Cm(t,e,n,r,a){var o,i,c=a*8-r-1,u=(1<>1,m=-7,p=n?a-1:0,f=n?-1:1,h=t[e+p];for(p+=f,o=h&(1<<-m)-1,h>>=-m,m+=c;m>0;o=o*256+t[e+p],p+=f,m-=8);for(i=o&(1<<-m)-1,o>>=-m,m+=r;m>0;i=i*256+t[e+p],p+=f,m-=8);if(o===0)o=1-l;else{if(o===u)return i?NaN:(h?-1:1)*(1/0);i=i+Math.pow(2,r),o=o-l}return(h?-1:1)*i*Math.pow(2,o-r)}function Bx(t,e,n,r,a,o){var i,c,u,l=o*8-a-1,m=(1<>1,f=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,y=r?1:-1,v=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,i=m):(i=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-i))<1&&(i--,u*=2),i+p>=1?e+=f/u:e+=f*Math.pow(2,1-p),e*u>=2&&(i++,u/=2),i+p>=m?(c=0,i=m):i+p>=1?(c=(e*u-1)*Math.pow(2,a),i=i+p):(c=e*Math.pow(2,p-1)*Math.pow(2,a),i=0));a>=8;t[n+h]=c&255,h+=y,c/=256,a-=8);for(i=i<0;t[n+h]=i&255,h+=y,i/=256,l-=8);t[n+h-y]|=v*128}function Sm(){return U.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Wr(t,e){if(Sm()=Sm())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Sm().toString(16)+" bytes");return t|0}function gr(t){return!!(t!=null&&t._isBuffer)}function zx(t,e){if(gr(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var n=t.length;if(n===0)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return xm(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return Kx(t).length;default:if(r)return xm(t).length;e=(""+e).toLowerCase(),r=!0}}function W9(t,e,n){var r=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,e>>>=0,n<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return nj(this,e,n);case"utf8":case"utf-8":return Vx(this,e,n);case"ascii":return ej(this,e,n);case"latin1":case"binary":return tj(this,e,n);case"base64":return Z9(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rj(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function Ao(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Hx(t,e,n,r,a){if(t.length===0)return-1;if(typeof n=="string"?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(a)return-1;n=t.length-1}else if(n<0)if(a)n=0;else return-1;if(typeof e=="string"&&(e=U.from(e,r)),gr(e))return e.length===0?-1:Lx(t,e,n,r,a);if(typeof e=="number")return e=e&255,U.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Lx(t,[e],n,r,a);throw new TypeError("val must be string, number or Buffer")}function Lx(t,e,n,r,a){var o=1,i=t.length,c=e.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(t.length<2||e.length<2)return-1;o=2,i/=2,c/=2,n/=2}function u(h,y){return o===1?h[y]:h.readUInt16BE(y*o)}s(u,"read");var l;if(a){var m=-1;for(l=n;li&&(n=i-c),l=n;l>=0;l--){for(var p=!0,f=0;fa&&(r=a)):r=a;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i239?4:o>223?3:o>191?2:1;if(a+c<=n){var u,l,m,p;switch(c){case 1:o<128&&(i=o);break;case 2:u=t[a+1],(u&192)===128&&(p=(o&31)<<6|u&63,p>127&&(i=p));break;case 3:u=t[a+1],l=t[a+2],(u&192)===128&&(l&192)===128&&(p=(o&15)<<12|(u&63)<<6|l&63,p>2047&&(p<55296||p>57343)&&(i=p));break;case 4:u=t[a+1],l=t[a+2],m=t[a+3],(u&192)===128&&(l&192)===128&&(m&192)===128&&(p=(o&15)<<18|(u&63)<<12|(l&63)<<6|m&63,p>65535&&p<1114112&&(i=p))}}i===null?(i=65533,c=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|i&1023),r.push(i),a+=c}return Q9(r)}function Q9(t){var e=t.length;if(e<=Px)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var a="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function Sn(t,e,n,r,a,o){if(!gr(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||et.length)throw new RangeError("Index out of range")}function Am(t,e,n,r){e<0&&(e=65535+e+1);for(var a=0,o=Math.min(t.length-n,2);a>>(r?a:1-a)*8}function _m(t,e,n,r){e<0&&(e=4294967295+e+1);for(var a=0,o=Math.min(t.length-n,4);a>>(r?a:3-a)*8&255}function Wx(t,e,n,r,a,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function $x(t,e,n,r,a){return a||Wx(t,e,n,4),Bx(t,e,n,r,23,4),n+4}function Yx(t,e,n,r,a){return a||Wx(t,e,n,8),Bx(t,e,n,r,52,8),n+8}function oj(t){if(t=ij(t).replace(aj,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function ij(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function sj(t){return t<16?"0"+t.toString(16):t.toString(16)}function xm(t,e){e=e||1/0;for(var n,r=t.length,a=null,o=[],i=0;i55295&&n<57344){if(!a){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(i+1===r){(e-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),a=n;continue}n=(a-55296<<10|n-56320)+65536}else a&&(e-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return o}function cj(t){for(var e=[],n=0;n>8,a=n%256,o.push(a),o.push(r);return o}function Kx(t){return O9(oj(t))}function Rm(t,e,n,r){for(var a=0;a=e.length||a>=t.length);++a)e[a+n]=t[a];return a}function lj(t){return t!==t}function dj(t){return t!=null&&(!!t._isBuffer||Xx(t)||mj(t))}function Xx(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function mj(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&Xx(t.slice(0,0))}var hr,Un,P9,H1,j9,Ux,q9,yue,Px,aj,Ci=b(()=>{d();hr=[],Un=[],P9=typeof Uint8Array<"u"?Uint8Array:Array,H1=!1;s(Ox,"init");s(O9,"toByteArray");s(B9,"tripletToBase64");s(U9,"encodeChunk");s(Mx,"fromByteArray");s(Cm,"read");s(Bx,"write");j9={}.toString,Ux=Array.isArray||function(t){return j9.call(t)=="[object Array]"};q9=50;U.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;yue=Sm();s(Sm,"kMaxLength");s(Wr,"createBuffer");s(U,"Buffer");U.poolSize=8192;U._augment=function(t){return t.__proto__=U.prototype,t};s(jx,"from");U.from=function(t,e,n){return jx(null,t,e,n)};U.TYPED_ARRAY_SUPPORT&&(U.prototype.__proto__=Uint8Array.prototype,U.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&U[Symbol.species]);s(qx,"assertSize");s(z9,"alloc");U.alloc=function(t,e,n){return z9(null,t,e,n)};s(G1,"allocUnsafe");U.allocUnsafe=function(t){return G1(null,t)};U.allocUnsafeSlow=function(t){return G1(null,t)};s(H9,"fromString");s(z1,"fromArrayLike");s(G9,"fromArrayBuffer");s(V9,"fromObject");s(V1,"checked");U.isBuffer=dj;s(gr,"internalIsBuffer");U.compare=s(function(e,n){if(!gr(e)||!gr(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,a=n.length,o=0,i=Math.min(r,a);o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},"inspect");U.prototype.compare=s(function(e,n,r,a,o){if(!gr(e))throw new TypeError("Argument must be a Buffer");if(n===void 0&&(n=0),r===void 0&&(r=e?e.length:0),a===void 0&&(a=0),o===void 0&&(o=this.length),n<0||r>e.length||a<0||o>this.length)throw new RangeError("out of range index");if(a>=o&&n>=r)return 0;if(a>=o)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,a>>>=0,o>>>=0,this===e)return 0;for(var i=o-a,c=r-n,u=Math.min(i,c),l=this.slice(a,o),m=e.slice(n,r),p=0;po)&&(r=o),e.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var i=!1;;)switch(a){case"hex":return $9(this,e,n,r);case"utf8":case"utf-8":return Y9(this,e,n,r);case"ascii":return Gx(this,e,n,r);case"latin1":case"binary":return K9(this,e,n,r);case"base64":return X9(this,e,n,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J9(this,e,n,r);default:if(i)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),i=!0}},"write");U.prototype.toJSON=s(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");s(Z9,"base64Slice");s(Vx,"utf8Slice");Px=4096;s(Q9,"decodeCodePointsArray");s(ej,"asciiSlice");s(tj,"latin1Slice");s(nj,"hexSlice");s(rj,"utf16leSlice");U.prototype.slice=s(function(e,n){var r=this.length;e=~~e,n=n===void 0?r:~~n,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n0&&(o*=256);)a+=this[e+--n]*o;return a},"readUIntBE");U.prototype.readUInt8=s(function(e,n){return n||Wt(e,1,this.length),this[e]},"readUInt8");U.prototype.readUInt16LE=s(function(e,n){return n||Wt(e,2,this.length),this[e]|this[e+1]<<8},"readUInt16LE");U.prototype.readUInt16BE=s(function(e,n){return n||Wt(e,2,this.length),this[e]<<8|this[e+1]},"readUInt16BE");U.prototype.readUInt32LE=s(function(e,n){return n||Wt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},"readUInt32LE");U.prototype.readUInt32BE=s(function(e,n){return n||Wt(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},"readUInt32BE");U.prototype.readIntLE=s(function(e,n,r){e=e|0,n=n|0,r||Wt(e,n,this.length);for(var a=this[e],o=1,i=0;++i=o&&(a-=Math.pow(2,8*n)),a},"readIntLE");U.prototype.readIntBE=s(function(e,n,r){e=e|0,n=n|0,r||Wt(e,n,this.length);for(var a=n,o=1,i=this[e+--a];a>0&&(o*=256);)i+=this[e+--a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*n)),i},"readIntBE");U.prototype.readInt8=s(function(e,n){return n||Wt(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},"readInt8");U.prototype.readInt16LE=s(function(e,n){n||Wt(e,2,this.length);var r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r},"readInt16LE");U.prototype.readInt16BE=s(function(e,n){n||Wt(e,2,this.length);var r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r},"readInt16BE");U.prototype.readInt32LE=s(function(e,n){return n||Wt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},"readInt32LE");U.prototype.readInt32BE=s(function(e,n){return n||Wt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},"readInt32BE");U.prototype.readFloatLE=s(function(e,n){return n||Wt(e,4,this.length),Cm(this,e,!0,23,4)},"readFloatLE");U.prototype.readFloatBE=s(function(e,n){return n||Wt(e,4,this.length),Cm(this,e,!1,23,4)},"readFloatBE");U.prototype.readDoubleLE=s(function(e,n){return n||Wt(e,8,this.length),Cm(this,e,!0,52,8)},"readDoubleLE");U.prototype.readDoubleBE=s(function(e,n){return n||Wt(e,8,this.length),Cm(this,e,!1,52,8)},"readDoubleBE");s(Sn,"checkInt");U.prototype.writeUIntLE=s(function(e,n,r,a){if(e=+e,n=n|0,r=r|0,!a){var o=Math.pow(2,8*r)-1;Sn(this,e,n,r,o,0)}var i=1,c=0;for(this[n]=e&255;++c=0&&(c*=256);)this[n+i]=e/c&255;return n+r},"writeUIntBE");U.prototype.writeUInt8=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,1,255,0),U.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=e&255,n+1},"writeUInt8");s(Am,"objectWriteUInt16");U.prototype.writeUInt16LE=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,2,65535,0),U.TYPED_ARRAY_SUPPORT?(this[n]=e&255,this[n+1]=e>>>8):Am(this,e,n,!0),n+2},"writeUInt16LE");U.prototype.writeUInt16BE=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,2,65535,0),U.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=e&255):Am(this,e,n,!1),n+2},"writeUInt16BE");s(_m,"objectWriteUInt32");U.prototype.writeUInt32LE=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,4,4294967295,0),U.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=e&255):_m(this,e,n,!0),n+4},"writeUInt32LE");U.prototype.writeUInt32BE=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,4,4294967295,0),U.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e&255):_m(this,e,n,!1),n+4},"writeUInt32BE");U.prototype.writeIntLE=s(function(e,n,r,a){if(e=+e,n=n|0,!a){var o=Math.pow(2,8*r-1);Sn(this,e,n,r,o-1,-o)}var i=0,c=1,u=0;for(this[n]=e&255;++i>0)-u&255;return n+r},"writeIntLE");U.prototype.writeIntBE=s(function(e,n,r,a){if(e=+e,n=n|0,!a){var o=Math.pow(2,8*r-1);Sn(this,e,n,r,o-1,-o)}var i=r-1,c=1,u=0;for(this[n+i]=e&255;--i>=0&&(c*=256);)e<0&&u===0&&this[n+i+1]!==0&&(u=1),this[n+i]=(e/c>>0)-u&255;return n+r},"writeIntBE");U.prototype.writeInt8=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,1,127,-128),U.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=e&255,n+1},"writeInt8");U.prototype.writeInt16LE=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,2,32767,-32768),U.TYPED_ARRAY_SUPPORT?(this[n]=e&255,this[n+1]=e>>>8):Am(this,e,n,!0),n+2},"writeInt16LE");U.prototype.writeInt16BE=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,2,32767,-32768),U.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=e&255):Am(this,e,n,!1),n+2},"writeInt16BE");U.prototype.writeInt32LE=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,4,2147483647,-2147483648),U.TYPED_ARRAY_SUPPORT?(this[n]=e&255,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):_m(this,e,n,!0),n+4},"writeInt32LE");U.prototype.writeInt32BE=s(function(e,n,r){return e=+e,n=n|0,r||Sn(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),U.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e&255):_m(this,e,n,!1),n+4},"writeInt32BE");s(Wx,"checkIEEE754");s($x,"writeFloat");U.prototype.writeFloatLE=s(function(e,n,r){return $x(this,e,n,!0,r)},"writeFloatLE");U.prototype.writeFloatBE=s(function(e,n,r){return $x(this,e,n,!1,r)},"writeFloatBE");s(Yx,"writeDouble");U.prototype.writeDoubleLE=s(function(e,n,r){return Yx(this,e,n,!0,r)},"writeDoubleLE");U.prototype.writeDoubleBE=s(function(e,n,r){return Yx(this,e,n,!1,r)},"writeDoubleBE");U.prototype.copy=s(function(e,n,r,a){if(r||(r=0),!a&&a!==0&&(a=this.length),n>=e.length&&(n=e.length),n||(n=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-n=0;--i)e[i+n]=this[i+r];else if(o<1e3||!U.TYPED_ARRAY_SUPPORT)for(i=0;i>>0,r=r===void 0?this.length:r>>>0,e||(e=0);var i;if(typeof e=="number")for(i=n;i0&&i.length>a)){i.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=i.length,bj(c)}return t}function bj(t){typeof console.warn=="function"?console.warn(t):console.log(t)}function Qx(t,e,n){var r=!1;function a(){t.removeListener(e,a),r||(r=!0,n.apply(t,arguments))}return s(a,"g"),a.listener=n,a}function e2(t){var e=this._events;if(e){var n=e[t];if(typeof n=="function")return 1;if(n)return n.length}return 0}function vj(t,e){for(var n=e,r=n+1,a=t.length;r{"use strict";d();s(Sa,"EventHandlers");Sa.prototype=Object.create(null);s(Be,"EventEmitter");jn=Be;Be.EventEmitter=Be;Be.usingDomains=!1;Be.prototype.domain=void 0;Be.prototype._events=void 0;Be.prototype._maxListeners=void 0;Be.defaultMaxListeners=10;Be.init=function(){this.domain=null,Be.usingDomains&&W1.active&&!(this instanceof W1.Domain)&&(this.domain=W1.active),(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new Sa,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Be.prototype.setMaxListeners=s(function(e){if(typeof e!="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},"setMaxListeners");s(Jx,"$getMaxListeners");Be.prototype.getMaxListeners=s(function(){return Jx(this)},"getMaxListeners");s(pj,"emitNone");s(fj,"emitOne");s(hj,"emitTwo");s(gj,"emitThree");s(yj,"emitMany");Be.prototype.emit=s(function(e){var n,r,a,o,i,c,u,l=!1,m=e==="error";if(c=this._events,c)m=m&&c.error==null;else if(!m)return!1;if(u=this.domain,m){if(n=arguments[1],u)n||(n=new Error('Uncaught, unspecified "error" event')),n.domainEmitter=this,n.domain=u,n.domainThrown=!1,u.emit("error",n);else{if(n instanceof Error)throw n;var p=new Error('Uncaught, unspecified "error" event. ('+n+")");throw p.context=n,p}return!1}if(r=c[e],!r)return!1;var f=typeof r=="function";switch(a=arguments.length,a){case 1:pj(r,f,this);break;case 2:fj(r,f,this,arguments[1]);break;case 3:hj(r,f,this,arguments[1],arguments[2]);break;case 4:gj(r,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(a-1),i=1;i0;)if(r[i]===n||r[i].listener&&r[i].listener===n){c=r[i].listener,o=i;break}if(o<0)return this;if(r.length===1){if(r[0]=void 0,--this._eventsCount===0)return this._events=new Sa,this;delete a[e]}else vj(r,o);a.removeListener&&this.emit("removeListener",e,c||n)}return this},"removeListener");Be.prototype.off=function(t,e){return this.removeListener(t,e)};Be.prototype.removeAllListeners=s(function(e){var n,r;if(r=this._events,!r)return this;if(!r.removeListener)return arguments.length===0?(this._events=new Sa,this._eventsCount=0):r[e]&&(--this._eventsCount===0?this._events=new Sa:delete r[e]),this;if(arguments.length===0){for(var a=Object.keys(r),o=0,i;o0?Reflect.ownKeys(this._events):[]},"eventNames");s(vj,"spliceOne");s(Gc,"arrayClone");s(wj,"unwrapListeners")});var n2=I((Sue,t2)=>{d();var Ai=1e3,_i=Ai*60,Ri=_i*60,_o=Ri*24,Dj=_o*7,Ej=_o*365.25;t2.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Tj(t);if(n==="number"&&isFinite(t))return e.long?xj(t):Sj(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Tj(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Ej;case"weeks":case"week":case"w":return n*Dj;case"days":case"day":case"d":return n*_o;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ri;case"minutes":case"minute":case"mins":case"min":case"m":return n*_i;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ai;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}s(Tj,"parse");function Sj(t){var e=Math.abs(t);return e>=_o?Math.round(t/_o)+"d":e>=Ri?Math.round(t/Ri)+"h":e>=_i?Math.round(t/_i)+"m":e>=Ai?Math.round(t/Ai)+"s":t+"ms"}s(Sj,"fmtShort");function xj(t){var e=Math.abs(t);return e>=_o?Fm(t,e,_o,"day"):e>=Ri?Fm(t,e,Ri,"hour"):e>=_i?Fm(t,e,_i,"minute"):e>=Ai?Fm(t,e,Ai,"second"):t+" ms"}s(xj,"fmtLong");function Fm(t,e,n,r){var a=e>=n*1.5;return Math.round(t/n)+" "+r+(a?"s":"")}s(Fm,"plural")});var a2=I((Aue,r2)=>{d();function Cj(t){n.debug=n,n.default=n,n.coerce=u,n.disable=o,n.enable=a,n.enabled=i,n.humanize=n2(),n.destroy=l,Object.keys(t).forEach(m=>{n[m]=t[m]}),n.names=[],n.skips=[],n.formatters={};function e(m){let p=0;for(let f=0;f{if(j==="%%")return"%";A++;let J=n.formatters[B];if(typeof J=="function"){let ne=D[A];j=J.call(E,ne),D.splice(A,1),A--}return j}),n.formatArgs.call(E,D),(E.log||n.log).apply(E,D)}return s(v,"debug"),v.namespace=m,v.useColors=n.useColors(),v.color=n.selectColor(m),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(h!==n.namespaces&&(h=n.namespaces,y=n.enabled(m)),y),set:D=>{f=D}}),typeof n.init=="function"&&n.init(v),v}s(n,"createDebug");function r(m,p){let f=n(this.namespace+(typeof p>"u"?":":p)+m);return f.log=this.log,f}s(r,"extend");function a(m){n.save(m),n.namespaces=m,n.names=[],n.skips=[];let p,f=(typeof m=="string"?m:"").split(/[\s,]+/),h=f.length;for(p=0;p"-"+p)].join(",");return n.enable(""),m}s(o,"disable");function i(m){if(m[m.length-1]==="*")return!0;let p,f;for(p=0,f=n.skips.length;p{d();In.formatArgs=_j;In.save=Rj;In.load=Fj;In.useColors=Aj;In.storage=kj();In.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();In.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Aj(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(Aj,"useColors");function _j(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+km.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(n++,a==="%c"&&(r=n))}),t.splice(r,0,e)}s(_j,"formatArgs");In.log=console.debug||console.log||(()=>{});function Rj(t){try{t?In.storage.setItem("debug",t):In.storage.removeItem("debug")}catch{}}s(Rj,"save");function Fj(){let t;try{t=In.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}s(Fj,"load");function kj(){try{return localStorage}catch{}}s(kj,"localstorage");km.exports=a2()(In);var{formatters:Ij}=km.exports;Ij.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});function Im(t){if(!t)throw new Error("name must be non-empty")}function Nj(t,e){for(var n=0,r=t.length,a;n>>1,t[a].startTime{d();fn=typeof performance<"u"&&performance,i2=fn&&fn.now?function(){return fn.now()}:function(){return Date.now()};s(Im,"throwIfEmpty");s(Nj,"insertSorted");fn&&fn.mark&&fn.getEntriesByName&&fn.getEntriesByType&&fn.clearMeasures?(Lm=s(function(t){Im(t),fn.mark("start "+t)},"mark"),Pm=s(function(t){Im(t),fn.mark("end "+t),fn.measure(t,"start "+t,"end "+t);var e=fn.getEntriesByName(t);return e[e.length-1]},"stop"),Vc=s(function(){return fn.getEntriesByType("measure")},"getEntries"),Om=s(function(){fn.clearMarks(),fn.clearMeasures()},"clear")):(Nm={},Mm=[],Lm=s(function(t){Im(t);var e=i2();Nm["$"+t]=e},"mark"),Pm=s(function(t){Im(t);var e=i2(),n=Nm["$"+t];if(!n)throw new Error("no known mark: "+t);var r={startTime:n,name:t,duration:e-n,entryType:"measure"};return Nj(Mm,r),r},"stop"),Vc=s(function(){return Mm},"getEntries"),Om=s(function(){Nm={},Mm=[]},"clear"))});var Ca,xa,Fi,ki,$1,c2,Lj,u2,Ii,k,_e=b(()=>{d();Ta();$r();Ca=Mt(o2());s2();xa=rn.platform==="win32",Fi=rn.browser,ki={red:Fi?"crimson":1,yellow:Fi?"gold":3,cyan:Fi?"darkturquoise":6,green:Fi?"forestgreen":2,blue:Fi?"steelblue":4,magenta:Fi?"palevioletred":5};Ca.default.colors=[ki.cyan,ki.green,ki.blue,ki.magenta];$1=class extends Be{static{s(this,"Emitter")}issueStatus(e,n){(e==="status"||e==="statusEnd")&&this.emit(e,[e,...n])}issueWarning(e,n){this.emit("warning",[e,...n])}},c2={},Lj=25,Ii=class t{static{s(this,"Log")}static _logToStdErr(e,n){t.loggerfn(e)(...n)}static loggerfn(e){e=`LH:${e}`;let n=c2[e];return n||(n=(0,Ca.default)(e),c2[e]=n,e.endsWith("error")?n.color=ki.red:e.endsWith("warn")&&(n.color=ki.yellow)),n}static setLevel(e){switch(u2=e,e){case"silent":Ca.default.enable("-LH:*");break;case"verbose":Ca.default.enable("LH:*");break;case"warn":Ca.default.enable("-LH:*, LH:*:warn, LH:*:error");break;case"error":Ca.default.enable("-LH:*, LH:*:error");break;default:Ca.default.enable("LH:*, -LH:*:verbose")}}static formatProtocol(e,n,r){let a=!rn||rn.browser?1/0:rn.stdout.columns,o=n.method||"?????",i=a-o.length-e.length-Lj,c=n.params&&o!=="IO.read"?JSON.stringify(n.params).substr(0,i):"";t._logToStdErr(`${e}:${r||""}`,[o,c])}static isVerbose(){return u2==="verbose"}static time({msg:e,id:n,args:r=[]},a="log"){Lm(n),t[a]("status",e,...r)}static timeEnd({msg:e,id:n,args:r=[]},a="verbose"){t[a]("statusEnd",e,...r),Pm(n)}static log(e,...n){return t.events.issueStatus(e,n),t._logToStdErr(e,n)}static warn(e,...n){return t.events.issueWarning(e,n),t._logToStdErr(`${e}:warn`,n)}static error(e,...n){return t._logToStdErr(`${e}:error`,n)}static verbose(e,...n){return t.events.issueStatus(e,n),t._logToStdErr(`${e}:verbose`,n)}static greenify(e){return`${t.green}${e}${t.reset}`}static redify(e){return`${t.red}${e}${t.reset}`}static get green(){return"\x1B[32m"}static get red(){return"\x1B[31m"}static get yellow(){return"\x1B[33m"}static get purple(){return"\x1B[95m"}static get reset(){return"\x1B[0m"}static get bold(){return"\x1B[1m"}static get dim(){return"\x1B[2m"}static get tick(){return xa?"√":"✓"}static get cross(){return xa?"×":"✘"}static get whiteSmallSquare(){return xa?"·":"▫"}static get heavyHorizontal(){return xa?"─":"━"}static get heavyVertical(){return xa?"│ ":"┃ "}static get heavyUpAndRight(){return xa?"└":"┗"}static get heavyVerticalAndRight(){return xa?"├":"┣"}static get heavyDownAndHorizontal(){return xa?"┬":"┳"}static get doubleLightHorizontal(){return"──"}};Ii.events=new $1;Ii.takeTimeEntries=()=>{let t=Vc();return Om(),t};Ii.getTimeEntries=()=>Vc();k=Ii});var jt=b(()=>{"use strict";d();});var Y1,$,Ce=b(()=>{"use strict";d();jt();Y1=class{static{s(this,"BaseGatherer")}meta={supportedModes:[]};startInstrumentation(e){}startSensitiveInstrumentation(e){}stopSensitiveInstrumentation(e){}stopInstrumentation(e){}getArtifact(e){}},$=Y1});var Pj,Oj,Bj,Uj,jj,qj,qt,yr=b(()=>{"use strict";d();_e();Pj=/^(chrome|https?):/,Oj=16,Bj="RunTask",Uj="ThreadControllerImpl::RunTask",jj="ThreadControllerImpl::DoWork",qj="TaskQueueManager::ProcessTaskFromWorkQueue",qt=class t{static{s(this,"TraceProcessor")}static get TIMESPAN_MARKER_ID(){return"__lighthouseTimespanStart__"}static createNoNavstartError(){return new Error("No navigationStart event found")}static createNoResourceSendRequestError(){return new Error("No ResourceSendRequest event found")}static createNoTracingStartedError(){return new Error("No tracingStartedInBrowser event found")}static createNoFirstContentfulPaintError(){return new Error("No FirstContentfulPaint event found")}static createNoLighthouseMarkerError(){return new Error("No Lighthouse timespan marker event found")}static _isNavigationStartOfInterest(e){return e.name!=="navigationStart"?!1:e.args.data?.documentLoaderURL===void 0?!0:e.args.data?.documentLoaderURL?Pj.test(e.args.data.documentLoaderURL):!1}static _sortTimestampEventGroup(e,n,r,a){let o=s(p=>n[p],"lookupArrayIndexByTsIndex"),i=s(p=>a[o(p)],"lookupEventByTsIndex"),c=[],u=[],l=[];for(let p of e){let f=o(p),h=i(p);h.ph==="E"?c.push(f):h.ph==="X"||h.ph==="B"?u.push(f):l.push(f)}let m=new Map;for(let p of u){let f=a[p];if(f.ph==="X")m.set(p,f.dur);else{let h=Number.MAX_SAFE_INTEGER,y=0,v=r+e.length;for(let D=v;D(m.get(f)||0)-(m.get(p)||0)||p-f),l.sort((p,f)=>p-f),[...c,...u,...l]}static filteredTraceSort(e,n){let r=[];for(let o=0;oe[o].ts-e[i].ts);for(let o=0;o0&&p--;for(let f of r){let h=f*n;for(;u0&&ac-u);let i=this.getMainThreadTopLevelEventDurations(e,n,r);return this._riskPercentiles(i.durations,o,a,i.clippedLength)}static getMainThreadTopLevelEventDurations(e,n=0,r=1/0){let a=[],o=0;for(let i of e){if(i.endr)continue;let c=i.duration,u=i.start;ur&&(o=c-(r-u)),a.push(c)}return a.sort((i,c)=>i-c),{durations:a,clippedLength:o}}static getMainThreadTopLevelEvents(e,n=0,r=1/0){let a=[];for(let o of e.mainThreadEvents){if(!this.isScheduleableTask(o)||!o.dur)continue;let i=(o.ts-e.timeOriginEvt.ts)/1e3,c=(o.ts+o.dur-e.timeOriginEvt.ts)/1e3;i>r||ci.name==="TracingStartedInBrowser");if(n?.args.data?.frames){let i=n.args.data.frames.find(l=>!l.parent),c=i?.frame,u=i?.processId;if(u&&c)return{startingPid:u,frameId:c}}let r=e.find(i=>i.name==="TracingStartedInPage");if(r?.args?.data){let i=r.args.data.page;if(i)return{startingPid:r.pid,frameId:i}}let a=e.find(i=>this._isNavigationStartOfInterest(i)&&i.args.data?.isLoadingMainFrame),o=e.find(i=>i.name==="ResourceSendRequest");if(a?.args?.data&&o&&o.pid===a.pid&&o.tid===a.tid){let i=a.args.frame;if(i)return{startingPid:a.pid,frameId:i}}throw this.createNoTracingStartedError()}static findMainFramePidTids(e,n){let r=n.filter(i=>(i.name==="FrameCommittedInBrowser"||i.name==="ProcessReadyInBrowser")&&i.args?.data?.frame===e.frameId&&i?.args?.data?.processId),a=r.length?r.map(i=>i?.args?.data?.processId):[e.startingPid],o=new Map;for(let i of new Set(a)){let c=n.filter(m=>m.cat==="__metadata"&&m.pid===i&&m.ph==="M"&&m.name==="thread_name"),u=c.find(m=>m.args.name==="CrRendererMain");u||(u=c.find(m=>m.args.name==="CrBrowserMain"));let l=u?.tid;if(!l)throw new Error("Unable to determine tid for renderer process");o.set(i,l)}return o}static isScheduleableTask(e){return e.name===Bj||e.name===Uj||e.name===jj||e.name===qj}static isLCPEvent(e){return e.name!=="largestContentfulPaint::Invalidate"&&e.name!=="largestContentfulPaint::Candidate"?!1:!!e.args?.frame}static isLCPCandidateEvent(e){return!!(e.name==="largestContentfulPaint::Candidate"&&e.args?.frame&&e.args.data&&e.args.data.size!==void 0)}static getFrameId(e){return e.args?.data?.frame||e.args.data?.frameID||e.args.frame}static computeValidLCPAllFrames(e,n){let r=e.filter(this.isLCPEvent).reverse(),a=new Map;for(let i of r){if(i.ts<=n.ts)break;let c=i.args.frame;a.has(c)||a.set(c,i)}let o;for(let i of a.values())this.isLCPCandidateEvent(i)&&(!o||i.args.data.size>o.args.data.size)&&(o=i);return{lcp:o,invalidated:!!(!o&&a.size)}}static resolveRootFrames(e){let n=new Map;for(let a of e)a.parent&&n.set(a.id,a.parent);let r=new Map;for(let a of e){let o=a.id;for(;n.has(o);)o=n.get(o);if(o===void 0)throw new Error("Unexpected undefined frameId");r.set(a.id,o)}return r}static processTrace(e,n){let{timeOriginDeterminationMethod:r="auto"}=n||{},a=this.filteredTraceSort(e.traceEvents,A=>A.cat.includes("blink.user_timing")||A.cat.includes("loading")||A.cat.includes("devtools.timeline")||A.cat==="__metadata"),o=this.findMainFrameIds(a),i=this.findMainFramePidTids(o,a),c=t.filteredTraceSort(e.traceEvents,A=>i.has(A.pid)),u=new Map,l=a.find(A=>A.name==="TracingStartedInBrowser")?.args?.data?.frames;if(l)for(let A of l)u.set(A.frame,{id:A.frame,url:A.url,parent:A.parent});a.filter(A=>!!(A.name==="FrameCommittedInBrowser"&&A.args.data?.frame&&A.args.data.url!==void 0)).forEach(A=>{u.set(A.args.data.frame,{id:A.args.data.frame,url:A.args.data.url,parent:A.args.data.parent})});let m=[...u.values()],p=this.resolveRootFrames(m),f=[...p.entries()].filter(([,A])=>A===o.frameId).map(([A])=>A);function h(A){return t.getFrameId(A)===o.frameId}s(h,"associatedToMainFrame");function y(A){let F=t.getFrameId(A);return F?f.includes(F):!1}s(y,"associatedToAllFrames");let v=a.filter(A=>h(A)),D=[];p.has(o.frameId)?D=a.filter(A=>y(A)):(k.warn("TraceProcessor","frameTreeEvents may be incomplete, make sure the trace has frame events"),p.set(o.frameId,o.frameId),D=v);let E=this.computeTimeOrigin({keyEvents:a,frameEvents:v,mainFrameInfo:o},r),T=c.filter(A=>A.tid===i.get(A.pid)),C=this.computeTraceEnd(e.traceEvents,E);return{frames:m,mainThreadEvents:T,frameEvents:v,frameTreeEvents:D,processEvents:c,mainFrameInfo:o,timeOriginEvt:E,timings:{timeOrigin:0,traceEnd:C.timing},timestamps:{timeOrigin:E.ts,traceEnd:C.timestamp},_keyEvents:a,_rendererPidToTid:i}}static processNavigation(e){let{frameEvents:n,frameTreeEvents:r,timeOriginEvt:a,timings:o,timestamps:i}=e,c=this.computeNavigationTimingsForFrame(n,{timeOriginEvt:a}),u=r.find(f=>f.name==="firstContentfulPaint"&&f.ts>a.ts);if(!u)throw this.createNoFirstContentfulPaintError();let l=this.computeValidLCPAllFrames(r,a).lcp,m=s(f=>(f-a.ts)/1e3,"getTiming"),p=s(f=>f===void 0?void 0:m(f),"maybeGetTiming");return{timings:{timeOrigin:o.timeOrigin,firstPaint:c.timings.firstPaint,firstContentfulPaint:c.timings.firstContentfulPaint,firstContentfulPaintAllFrames:m(u.ts),firstMeaningfulPaint:c.timings.firstMeaningfulPaint,largestContentfulPaint:c.timings.largestContentfulPaint,largestContentfulPaintAllFrames:p(l?.ts),load:c.timings.load,domContentLoaded:c.timings.domContentLoaded,traceEnd:o.traceEnd},timestamps:{timeOrigin:i.timeOrigin,firstPaint:c.timestamps.firstPaint,firstContentfulPaint:c.timestamps.firstContentfulPaint,firstContentfulPaintAllFrames:u.ts,firstMeaningfulPaint:c.timestamps.firstMeaningfulPaint,largestContentfulPaint:c.timestamps.largestContentfulPaint,largestContentfulPaintAllFrames:l?.ts,load:c.timestamps.load,domContentLoaded:c.timestamps.domContentLoaded,traceEnd:i.traceEnd},firstPaintEvt:c.firstPaintEvt,firstContentfulPaintEvt:c.firstContentfulPaintEvt,firstContentfulPaintAllFramesEvt:u,firstMeaningfulPaintEvt:c.firstMeaningfulPaintEvt,largestContentfulPaintEvt:c.largestContentfulPaintEvt,largestContentfulPaintAllFramesEvt:l,loadEvt:c.loadEvt,domContentLoadedEvt:c.domContentLoadedEvt,fmpFellBack:c.fmpFellBack,lcpInvalidated:c.lcpInvalidated}}static computeTraceEnd(e,n){let r=-1/0;for(let a of e)r=Math.max(a.ts+(a.dur||0),r);return{timestamp:r,timing:(r-n.ts)/1e3}}static computeTimeOrigin(e,n){let r=s(()=>e.frameEvents.filter(this._isNavigationStartOfInterest).pop(),"lastNavigationStart"),a=s(()=>e.keyEvents.find(i=>i.name==="clock_sync"&&i.args.sync_id===t.TIMESPAN_MARKER_ID),"lighthouseMarker");switch(n){case"firstResourceSendRequest":{let o=e.keyEvents.find(i=>i.name!=="ResourceSendRequest"?!1:(i.args.data||{}).frame===e.mainFrameInfo.frameId);if(!o)throw this.createNoResourceSendRequestError();return o}case"lastNavigationStart":{let o=r();if(!o)throw this.createNoNavstartError();return o}case"lighthouseMarker":{let o=a();if(!o)throw this.createNoLighthouseMarkerError();return o}case"auto":{let o=a()||r();if(!o)throw this.createNoNavstartError();return o}}}static computeNavigationTimingsForFrame(e,n){let{timeOriginEvt:r}=n,a=e.find(D=>D.name==="firstPaint"&&D.ts>r.ts),o=e.find(D=>D.name==="firstContentfulPaint"&&D.ts>r.ts);if(!o)throw this.createNoFirstContentfulPaintError();let i=e.find(D=>D.name==="firstMeaningfulPaint"&&D.ts>r.ts),c=!1;if(!i){let D="firstMeaningfulPaintCandidate";c=!0,k.verbose("TraceProcessor",`No firstMeaningfulPaint found, falling back to last ${D}`);let E=e.filter(T=>T.name===D).pop();E||k.verbose("TraceProcessor","No `firstMeaningfulPaintCandidate` events found in trace"),i=E}let u=this.computeValidLCPAllFrames(e,r),l=e.find(D=>D.name==="loadEventEnd"&&D.ts>r.ts),m=e.find(D=>D.name==="domContentLoadedEventEnd"&&D.ts>r.ts),p=s(D=>D?.ts,"getTimestamp"),f={timeOrigin:r.ts,firstPaint:p(a),firstContentfulPaint:o.ts,firstMeaningfulPaint:p(i),largestContentfulPaint:p(u.lcp),load:p(l),domContentLoaded:p(m)},h=s(D=>(D-r.ts)/1e3,"getTiming"),y=s(D=>D===void 0?void 0:h(D),"maybeGetTiming");return{timings:{timeOrigin:0,firstPaint:y(f.firstPaint),firstContentfulPaint:h(f.firstContentfulPaint),firstMeaningfulPaint:y(f.firstMeaningfulPaint),largestContentfulPaint:y(f.largestContentfulPaint),load:y(f.load),domContentLoaded:y(f.domContentLoaded)},timestamps:f,timeOriginEvt:r,firstPaintEvt:a,firstContentfulPaintEvt:o,firstMeaningfulPaintEvt:i,largestContentfulPaintEvt:u.lcp,loadEvt:l,domContentLoadedEvt:m,fmpFellBack:c,lcpInvalidated:u.invalidated}}}});var l2={};S(l2,{default:()=>Yr});var K1,Yr,Ni=b(()=>{"use strict";d();Ce();yr();K1=class t extends ${static{s(this,"Trace")}_trace={traceEvents:[]};static getDefaultTraceCategories(){return["-*","disabled-by-default-lighthouse","loading","v8","v8.execute","blink.user_timing","blink.console","devtools.timeline","disabled-by-default-devtools.timeline","disabled-by-default-devtools.screenshot","disabled-by-default-devtools.timeline.stack","disabled-by-default-devtools.timeline.frame","latencyInfo"]}static async endTraceAndCollectEvents(e){let n=[],r=s(function(a){n.push(...a.value)},"dataListener");return e.on("Tracing.dataCollected",r),new Promise((a,o)=>{e.once("Tracing.tracingComplete",i=>{e.off("Tracing.dataCollected",r),a({traceEvents:n})}),e.sendCommand("Tracing.end").catch(o)})}static symbol=Symbol("Trace");meta={symbol:t.symbol,supportedModes:["timespan","navigation"]};async startSensitiveInstrumentation({driver:e,gatherMode:n,settings:r}){let a=t.getDefaultTraceCategories().concat(r.additionalTraceCategories||[]);await e.defaultSession.sendCommand("Page.enable"),await e.defaultSession.sendCommand("Tracing.start",{categories:a.join(","),options:"sampling-frequency=10000"}),n==="timespan"&&await e.defaultSession.sendCommand("Tracing.recordClockSyncMarker",{syncId:qt.TIMESPAN_MARKER_ID})}async stopSensitiveInstrumentation({driver:e}){this._trace=await t.endTraceAndCollectEvents(e.defaultSession)}getArtifact(){return this._trace}},Yr=K1});var d2={};S(d2,{default:()=>xn});var xn,Kr=b(()=>{d();xn={}});function m2(t,e){for(var n=0,r=t.length-1;r>=0;r--){var a=t[r];a==="."?t.splice(r,1):a===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function X1(){for(var t="",e=!1,n=arguments.length-1;n>=-1&&!e;n--){var r=n>=0?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!r)continue;t=r+"/"+t,e=r.charAt(0)==="/"}return t=m2(Z1(t.split("/"),function(a){return!!a}),!e).join("/"),(e?"/":"")+t||"."}function p2(t){var e=f2(t),n=Xj(t,-1)==="/";return t=m2(Z1(t.split("/"),function(r){return!!r}),!e).join("/"),!t&&!e&&(t="."),t&&n&&(t+="/"),(e?"/":"")+t}function f2(t){return t.charAt(0)==="/"}function Hj(){var t=Array.prototype.slice.call(arguments,0);return p2(Z1(t,function(e,n){if(typeof e!="string")throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))}function Gj(t,e){t=X1(t).substr(1),e=X1(e).substr(1);function n(l){for(var m=0;m=0&&l[p]==="";p--);return m>p?[]:l.slice(m,p-m+1)}s(n,"trim");for(var r=n(t.split("/")),a=n(e.split("/")),o=Math.min(r.length,a.length),i=o,c=0;c{d();s(m2,"normalizeArray");zj=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,J1=s(function(t){return zj.exec(t).slice(1)},"splitPath");s(X1,"resolve");s(p2,"normalize");s(f2,"isAbsolute");s(Hj,"join");s(Gj,"relative");Vj="/",Wj=":";s($j,"dirname");s(Yj,"basename");s(Kj,"extname");Dt={extname:Kj,basename:Yj,dirname:$j,sep:Vj,delimiter:Wj,relative:Gj,join:Hj,isAbsolute:f2,normalize:p2,resolve:X1};s(Z1,"filter");Xj="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}});var g2=I((nle,h2)=>{d();function Jj(){this.__data__=[],this.size=0}s(Jj,"listCacheClear");h2.exports=Jj});var Q1=I((ole,y2)=>{d();function Zj(t,e){return t===e||t!==t&&e!==e}s(Zj,"eq");y2.exports=Zj});var Wc=I((cle,b2)=>{d();var Qj=Q1();function eq(t,e){for(var n=t.length;n--;)if(Qj(t[n][0],e))return n;return-1}s(eq,"assocIndexOf");b2.exports=eq});var w2=I((dle,v2)=>{d();var tq=Wc(),nq=Array.prototype,rq=nq.splice;function aq(t){var e=this.__data__,n=tq(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():rq.call(e,n,1),--this.size,!0}s(aq,"listCacheDelete");v2.exports=aq});var E2=I((fle,D2)=>{d();var oq=Wc();function iq(t){var e=this.__data__,n=oq(e,t);return n<0?void 0:e[n][1]}s(iq,"listCacheGet");D2.exports=iq});var S2=I((yle,T2)=>{d();var sq=Wc();function cq(t){return sq(this.__data__,t)>-1}s(cq,"listCacheHas");T2.exports=cq});var C2=I((wle,x2)=>{d();var uq=Wc();function lq(t,e){var n=this.__data__,r=uq(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}s(lq,"listCacheSet");x2.exports=lq});var $c=I((Tle,A2)=>{d();var dq=g2(),mq=w2(),pq=E2(),fq=S2(),hq=C2();function Mi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e{d();var gq=$c();function yq(){this.__data__=new gq,this.size=0}s(yq,"stackClear");_2.exports=yq});var k2=I((Rle,F2)=>{d();function bq(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}s(bq,"stackDelete");F2.exports=bq});var N2=I((Ile,I2)=>{d();function vq(t){return this.__data__.get(t)}s(vq,"stackGet");I2.exports=vq});var L2=I((Lle,M2)=>{d();function wq(t){return this.__data__.has(t)}s(wq,"stackHas");M2.exports=wq});var eh=I((Ble,P2)=>{d();var Dq=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis;P2.exports=Dq});var br=I((jle,O2)=>{d();var Eq=eh(),Tq=typeof self=="object"&&self&&self.Object===Object&&self,Sq=Eq||Tq||Function("return this")();O2.exports=Sq});var Bm=I((zle,B2)=>{d();var xq=br(),Cq=xq.Symbol;B2.exports=Cq});var z2=I((Gle,q2)=>{d();var U2=Bm(),j2=Object.prototype,Aq=j2.hasOwnProperty,_q=j2.toString,Yc=U2?U2.toStringTag:void 0;function Rq(t){var e=Aq.call(t,Yc),n=t[Yc];try{t[Yc]=void 0;var r=!0}catch{}var a=_q.call(t);return r&&(e?t[Yc]=n:delete t[Yc]),a}s(Rq,"getRawTag");q2.exports=Rq});var G2=I(($le,H2)=>{d();var Fq=Object.prototype,kq=Fq.toString;function Iq(t){return kq.call(t)}s(Iq,"objectToString");H2.exports=Iq});var Kc=I((Xle,$2)=>{d();var V2=Bm(),Nq=z2(),Mq=G2(),Lq="[object Null]",Pq="[object Undefined]",W2=V2?V2.toStringTag:void 0;function Oq(t){return t==null?t===void 0?Pq:Lq:W2&&W2 in Object(t)?Nq(t):Mq(t)}s(Oq,"baseGetTag");$2.exports=Oq});var th=I((Qle,Y2)=>{d();function Bq(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}s(Bq,"isObject");Y2.exports=Bq});var nh=I((nde,K2)=>{d();var Uq=Kc(),jq=th(),qq="[object AsyncFunction]",zq="[object Function]",Hq="[object GeneratorFunction]",Gq="[object Proxy]";function Vq(t){if(!jq(t))return!1;var e=Uq(t);return e==zq||e==Hq||e==qq||e==Gq}s(Vq,"isFunction");K2.exports=Vq});var J2=I((ode,X2)=>{d();var Wq=br(),$q=Wq["__core-js_shared__"];X2.exports=$q});var eC=I((sde,Q2)=>{d();var rh=J2(),Z2=function(){var t=/[^.]+$/.exec(rh&&rh.keys&&rh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Yq(t){return!!Z2&&Z2 in t}s(Yq,"isMasked");Q2.exports=Yq});var ah=I((lde,tC)=>{d();var Kq=Function.prototype,Xq=Kq.toString;function Jq(t){if(t!=null){try{return Xq.call(t)}catch{}try{return t+""}catch{}}return""}s(Jq,"toSource");tC.exports=Jq});var rC=I((pde,nC)=>{d();var Zq=nh(),Qq=eC(),ez=th(),tz=ah(),nz=/[\\^$.*+?()[\]{}|]/g,rz=/^\[object .+?Constructor\]$/,az=Function.prototype,oz=Object.prototype,iz=az.toString,sz=oz.hasOwnProperty,cz=RegExp("^"+iz.call(sz).replace(nz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uz(t){if(!ez(t)||Qq(t))return!1;var e=Zq(t)?cz:rz;return e.test(tz(t))}s(uz,"baseIsNative");nC.exports=uz});var oC=I((gde,aC)=>{d();function lz(t,e){return t?.[e]}s(lz,"getValue");aC.exports=lz});var Ro=I((vde,iC)=>{d();var dz=rC(),mz=oC();function pz(t,e){var n=mz(t,e);return dz(n)?n:void 0}s(pz,"getNative");iC.exports=pz});var Um=I((Ede,sC)=>{d();var fz=Ro(),hz=br(),gz=fz(hz,"Map");sC.exports=gz});var Xc=I((Sde,cC)=>{d();var yz=Ro(),bz=yz(Object,"create");cC.exports=bz});var dC=I((Cde,lC)=>{d();var uC=Xc();function vz(){this.__data__=uC?uC(null):{},this.size=0}s(vz,"hashClear");lC.exports=vz});var pC=I((Rde,mC)=>{d();function wz(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}s(wz,"hashDelete");mC.exports=wz});var hC=I((Ide,fC)=>{d();var Dz=Xc(),Ez="__lodash_hash_undefined__",Tz=Object.prototype,Sz=Tz.hasOwnProperty;function xz(t){var e=this.__data__;if(Dz){var n=e[t];return n===Ez?void 0:n}return Sz.call(e,t)?e[t]:void 0}s(xz,"hashGet");fC.exports=xz});var yC=I((Lde,gC)=>{d();var Cz=Xc(),Az=Object.prototype,_z=Az.hasOwnProperty;function Rz(t){var e=this.__data__;return Cz?e[t]!==void 0:_z.call(e,t)}s(Rz,"hashHas");gC.exports=Rz});var vC=I((Bde,bC)=>{d();var Fz=Xc(),kz="__lodash_hash_undefined__";function Iz(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Fz&&e===void 0?kz:e,this}s(Iz,"hashSet");bC.exports=Iz});var DC=I((qde,wC)=>{d();var Nz=dC(),Mz=pC(),Lz=hC(),Pz=yC(),Oz=vC();function Li(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e{d();var EC=DC(),Bz=$c(),Uz=Um();function jz(){this.size=0,this.__data__={hash:new EC,map:new(Uz||Bz),string:new EC}}s(jz,"mapCacheClear");TC.exports=jz});var CC=I(($de,xC)=>{d();function qz(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}s(qz,"isKeyable");xC.exports=qz});var Jc=I((Xde,AC)=>{d();var zz=CC();function Hz(t,e){var n=t.__data__;return zz(e)?n[typeof e=="string"?"string":"hash"]:n.map}s(Hz,"getMapData");AC.exports=Hz});var RC=I((Qde,_C)=>{d();var Gz=Jc();function Vz(t){var e=Gz(this,t).delete(t);return this.size-=e?1:0,e}s(Vz,"mapCacheDelete");_C.exports=Vz});var kC=I((nme,FC)=>{d();var Wz=Jc();function $z(t){return Wz(this,t).get(t)}s($z,"mapCacheGet");FC.exports=$z});var NC=I((ome,IC)=>{d();var Yz=Jc();function Kz(t){return Yz(this,t).has(t)}s(Kz,"mapCacheHas");IC.exports=Kz});var LC=I((cme,MC)=>{d();var Xz=Jc();function Jz(t,e){var n=Xz(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}s(Jz,"mapCacheSet");MC.exports=Jz});var oh=I((dme,PC)=>{d();var Zz=SC(),Qz=RC(),eH=kC(),tH=NC(),nH=LC();function Pi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e{d();var rH=$c(),aH=Um(),oH=oh(),iH=200;function sH(t,e){var n=this.__data__;if(n instanceof rH){var r=n.__data__;if(!aH||r.length{d();var cH=$c(),uH=R2(),lH=k2(),dH=N2(),mH=L2(),pH=BC();function Oi(t){var e=this.__data__=new cH(t);this.size=e.size}s(Oi,"Stack");Oi.prototype.clear=uH;Oi.prototype.delete=lH;Oi.prototype.get=dH;Oi.prototype.has=mH;Oi.prototype.set=pH;UC.exports=Oi});var zC=I((wme,qC)=>{d();var fH="__lodash_hash_undefined__";function hH(t){return this.__data__.set(t,fH),this}s(hH,"setCacheAdd");qC.exports=hH});var GC=I((Tme,HC)=>{d();function gH(t){return this.__data__.has(t)}s(gH,"setCacheHas");HC.exports=gH});var WC=I((Cme,VC)=>{d();var yH=oh(),bH=zC(),vH=GC();function jm(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new yH;++e{d();function wH(t,e){for(var n=-1,r=t==null?0:t.length;++n{d();function DH(t,e){return t.has(e)}s(DH,"cacheHas");KC.exports=DH});var ih=I((Lme,JC)=>{d();var EH=WC(),TH=YC(),SH=XC(),xH=1,CH=2;function AH(t,e,n,r,a,o){var i=n&xH,c=t.length,u=e.length;if(c!=u&&!(i&&u>c))return!1;var l=o.get(t),m=o.get(e);if(l&&m)return l==e&&m==t;var p=-1,f=!0,h=n&CH?new EH:void 0;for(o.set(t,e),o.set(e,t);++p{d();var _H=br(),RH=_H.Uint8Array;ZC.exports=RH});var tA=I((jme,eA)=>{d();function FH(t){var e=-1,n=Array(t.size);return t.forEach(function(r,a){n[++e]=[a,r]}),n}s(FH,"mapToArray");eA.exports=FH});var rA=I((Hme,nA)=>{d();function kH(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}s(kH,"setToArray");nA.exports=kH});var cA=I((Wme,sA)=>{d();var aA=Bm(),oA=QC(),IH=Q1(),NH=ih(),MH=tA(),LH=rA(),PH=1,OH=2,BH="[object Boolean]",UH="[object Date]",jH="[object Error]",qH="[object Map]",zH="[object Number]",HH="[object RegExp]",GH="[object Set]",VH="[object String]",WH="[object Symbol]",$H="[object ArrayBuffer]",YH="[object DataView]",iA=aA?aA.prototype:void 0,sh=iA?iA.valueOf:void 0;function KH(t,e,n,r,a,o,i){switch(n){case YH:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case $H:return!(t.byteLength!=e.byteLength||!o(new oA(t),new oA(e)));case BH:case UH:case zH:return IH(+t,+e);case jH:return t.name==e.name&&t.message==e.message;case HH:case VH:return t==e+"";case qH:var c=MH;case GH:var u=r&PH;if(c||(c=LH),t.size!=e.size&&!u)return!1;var l=i.get(t);if(l)return l==e;r|=OH,i.set(t,e);var m=NH(c(t),c(e),r,a,o,i);return i.delete(t),m;case WH:if(sh)return sh.call(t)==sh.call(e)}return!1}s(KH,"equalByTag");sA.exports=KH});var lA=I((Kme,uA)=>{d();function XH(t,e){for(var n=-1,r=e.length,a=t.length;++n{d();var JH=Array.isArray;dA.exports=JH});var pA=I((epe,mA)=>{d();var ZH=lA(),QH=qm();function eG(t,e,n){var r=e(t);return QH(t)?r:ZH(r,n(t))}s(eG,"baseGetAllKeys");mA.exports=eG});var hA=I((rpe,fA)=>{d();function tG(t,e){for(var n=-1,r=t==null?0:t.length,a=0,o=[];++n{d();function nG(){return[]}s(nG,"stubArray");gA.exports=nG});var wA=I((upe,vA)=>{d();var rG=hA(),aG=yA(),oG=Object.prototype,iG=oG.propertyIsEnumerable,bA=Object.getOwnPropertySymbols,sG=bA?function(t){return t==null?[]:(t=Object(t),rG(bA(t),function(e){return iG.call(t,e)}))}:aG;vA.exports=sG});var EA=I((dpe,DA)=>{d();function cG(t,e){for(var n=-1,r=Array(t);++n{d();function uG(t){return t!=null&&typeof t=="object"}s(uG,"isObjectLike");TA.exports=uG});var xA=I((ype,SA)=>{d();var lG=Kc(),dG=Zc(),mG="[object Arguments]";function pG(t){return dG(t)&&lG(t)==mG}s(pG,"baseIsArguments");SA.exports=pG});var RA=I((wpe,_A)=>{d();var CA=xA(),fG=Zc(),AA=Object.prototype,hG=AA.hasOwnProperty,gG=AA.propertyIsEnumerable,yG=CA(function(){return arguments}())?CA:function(t){return fG(t)&&hG.call(t,"callee")&&!gG.call(t,"callee")};_A.exports=yG});var kA=I((Epe,FA)=>{d();function bG(){return!1}s(bG,"stubFalse");FA.exports=bG});var ch=I((Qc,Bi)=>{d();var vG=br(),wG=kA(),MA=typeof Qc=="object"&&Qc&&!Qc.nodeType&&Qc,IA=MA&&typeof Bi=="object"&&Bi&&!Bi.nodeType&&Bi,DG=IA&&IA.exports===MA,NA=DG?vG.Buffer:void 0,EG=NA?NA.isBuffer:void 0,TG=EG||wG;Bi.exports=TG});var PA=I((Cpe,LA)=>{d();var SG=9007199254740991,xG=/^(?:0|[1-9]\d*)$/;function CG(t,e){var n=typeof t;return e=e??SG,!!e&&(n=="number"||n!="symbol"&&xG.test(t))&&t>-1&&t%1==0&&t{d();var AG=9007199254740991;function _G(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=AG}s(_G,"isLength");OA.exports=_G});var UA=I((Ipe,BA)=>{d();var RG=Kc(),FG=uh(),kG=Zc(),IG="[object Arguments]",NG="[object Array]",MG="[object Boolean]",LG="[object Date]",PG="[object Error]",OG="[object Function]",BG="[object Map]",UG="[object Number]",jG="[object Object]",qG="[object RegExp]",zG="[object Set]",HG="[object String]",GG="[object WeakMap]",VG="[object ArrayBuffer]",WG="[object DataView]",$G="[object Float32Array]",YG="[object Float64Array]",KG="[object Int8Array]",XG="[object Int16Array]",JG="[object Int32Array]",ZG="[object Uint8Array]",QG="[object Uint8ClampedArray]",eV="[object Uint16Array]",tV="[object Uint32Array]",bt={};bt[$G]=bt[YG]=bt[KG]=bt[XG]=bt[JG]=bt[ZG]=bt[QG]=bt[eV]=bt[tV]=!0;bt[IG]=bt[NG]=bt[VG]=bt[MG]=bt[WG]=bt[LG]=bt[PG]=bt[OG]=bt[BG]=bt[UG]=bt[jG]=bt[qG]=bt[zG]=bt[HG]=bt[GG]=!1;function nV(t){return kG(t)&&FG(t.length)&&!!bt[RG(t)]}s(nV,"baseIsTypedArray");BA.exports=nV});var qA=I((Lpe,jA)=>{d();function rV(t){return function(e){return t(e)}}s(rV,"baseUnary");jA.exports=rV});var HA=I((eu,Ui)=>{d();var aV=eh(),zA=typeof eu=="object"&&eu&&!eu.nodeType&&eu,tu=zA&&typeof Ui=="object"&&Ui&&!Ui.nodeType&&Ui,oV=tu&&tu.exports===zA,lh=oV&&aV.process,iV=function(){try{var t=tu&&tu.require&&tu.require("util").types;return t||lh&&lh.binding&&lh.binding("util")}catch{}}();Ui.exports=iV});var dh=I((Upe,WA)=>{d();var sV=UA(),cV=qA(),GA=HA(),VA=GA&&GA.isTypedArray,uV=VA?cV(VA):sV;WA.exports=uV});var YA=I((qpe,$A)=>{d();var lV=EA(),dV=RA(),mV=qm(),pV=ch(),fV=PA(),hV=dh(),gV=Object.prototype,yV=gV.hasOwnProperty;function bV(t,e){var n=mV(t),r=!n&&dV(t),a=!n&&!r&&pV(t),o=!n&&!r&&!a&&hV(t),i=n||r||a||o,c=i?lV(t.length,String):[],u=c.length;for(var l in t)(e||yV.call(t,l))&&!(i&&(l=="length"||a&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||fV(l,u)))&&c.push(l);return c}s(bV,"arrayLikeKeys");$A.exports=bV});var XA=I((Gpe,KA)=>{d();var vV=Object.prototype;function wV(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||vV;return t===n}s(wV,"isPrototype");KA.exports=wV});var ZA=I(($pe,JA)=>{d();function DV(t,e){return function(n){return t(e(n))}}s(DV,"overArg");JA.exports=DV});var e_=I((Xpe,QA)=>{d();var EV=ZA(),TV=EV(Object.keys,Object);QA.exports=TV});var n_=I((Zpe,t_)=>{d();var SV=XA(),xV=e_(),CV=Object.prototype,AV=CV.hasOwnProperty;function _V(t){if(!SV(t))return xV(t);var e=[];for(var n in Object(t))AV.call(t,n)&&n!="constructor"&&e.push(n);return e}s(_V,"baseKeys");t_.exports=_V});var a_=I((tfe,r_)=>{d();var RV=nh(),FV=uh();function kV(t){return t!=null&&FV(t.length)&&!RV(t)}s(kV,"isArrayLike");r_.exports=kV});var i_=I((afe,o_)=>{d();var IV=YA(),NV=n_(),MV=a_();function LV(t){return MV(t)?IV(t):NV(t)}s(LV,"keys");o_.exports=LV});var c_=I((sfe,s_)=>{d();var PV=pA(),OV=wA(),BV=i_();function UV(t){return PV(t,BV,OV)}s(UV,"getAllKeys");s_.exports=UV});var d_=I((lfe,l_)=>{d();var u_=c_(),jV=1,qV=Object.prototype,zV=qV.hasOwnProperty;function HV(t,e,n,r,a,o){var i=n&jV,c=u_(t),u=c.length,l=u_(e),m=l.length;if(u!=m&&!i)return!1;for(var p=u;p--;){var f=c[p];if(!(i?f in e:zV.call(e,f)))return!1}var h=o.get(t),y=o.get(e);if(h&&y)return h==e&&y==t;var v=!0;o.set(t,e),o.set(e,t);for(var D=i;++p{d();var GV=Ro(),VV=br(),WV=GV(VV,"DataView");m_.exports=WV});var h_=I((hfe,f_)=>{d();var $V=Ro(),YV=br(),KV=$V(YV,"Promise");f_.exports=KV});var y_=I((yfe,g_)=>{d();var XV=Ro(),JV=br(),ZV=XV(JV,"Set");g_.exports=ZV});var v_=I((vfe,b_)=>{d();var QV=Ro(),eW=br(),tW=QV(eW,"WeakMap");b_.exports=tW});var A_=I((Dfe,C_)=>{d();var mh=p_(),ph=Um(),fh=h_(),hh=y_(),gh=v_(),x_=Kc(),ji=ah(),w_="[object Map]",nW="[object Object]",D_="[object Promise]",E_="[object Set]",T_="[object WeakMap]",S_="[object DataView]",rW=ji(mh),aW=ji(ph),oW=ji(fh),iW=ji(hh),sW=ji(gh),Fo=x_;(mh&&Fo(new mh(new ArrayBuffer(1)))!=S_||ph&&Fo(new ph)!=w_||fh&&Fo(fh.resolve())!=D_||hh&&Fo(new hh)!=E_||gh&&Fo(new gh)!=T_)&&(Fo=s(function(t){var e=x_(t),n=e==nW?t.constructor:void 0,r=n?ji(n):"";if(r)switch(r){case rW:return S_;case aW:return w_;case oW:return D_;case iW:return E_;case sW:return T_}return e},"getTag"));C_.exports=Fo});var L_=I((Sfe,M_)=>{d();var yh=jC(),cW=ih(),uW=cA(),lW=d_(),__=A_(),R_=qm(),F_=ch(),dW=dh(),mW=1,k_="[object Arguments]",I_="[object Array]",zm="[object Object]",pW=Object.prototype,N_=pW.hasOwnProperty;function fW(t,e,n,r,a,o){var i=R_(t),c=R_(e),u=i?I_:__(t),l=c?I_:__(e);u=u==k_?zm:u,l=l==k_?zm:l;var m=u==zm,p=l==zm,f=u==l;if(f&&F_(t)){if(!F_(e))return!1;i=!0,m=!1}if(f&&!m)return o||(o=new yh),i||dW(t)?cW(t,e,n,r,a,o):uW(t,e,u,n,r,a,o);if(!(n&mW)){var h=m&&N_.call(t,"__wrapped__"),y=p&&N_.call(e,"__wrapped__");if(h||y){var v=h?t.value():t,D=y?e.value():e;return o||(o=new yh),a(v,D,n,r,o)}}return f?(o||(o=new yh),lW(t,e,n,r,a,o)):!1}s(fW,"baseIsEqualDeep");M_.exports=fW});var U_=I((Afe,B_)=>{d();var hW=L_(),P_=Zc();function O_(t,e,n,r,a){return t===e?!0:t==null||e==null||!P_(t)&&!P_(e)?t!==t&&e!==e:hW(t,e,n,r,O_,a)}s(O_,"baseIsEqual");B_.exports=O_});var nu=I((Ffe,j_)=>{d();var gW=U_();function yW(t,e){return gW(t,e)}s(yW,"isEqual");j_.exports=yW});var q_,z_=b(()=>{"use strict";d();Ta();q_=!!rn.env.CI||rn.env.NODE_ENV==="test"});function DW(t){let e=Math.sign(t);t=Math.abs(t);let n=.254829592,r=-.284496736,a=1.421413741,o=-1.453152027,i=1.061405429,u=1/(1+.3275911*t),l=u*(n+u*(r+u*(a+u*(o+u*i))));return e*(1-l*Math.exp(-t*t))}function H_({median:t,p10:e},n){if(t<=0)throw new Error("median must be greater than zero");if(e<=0)throw new Error("p10 must be greater than zero");if(e>=t)throw new Error("p10 must be less than the median");if(n<=0)return 1;let r=.9061938024368232,a=Math.max(Number.MIN_VALUE,n/t),o=Math.log(a),i=Math.max(Number.MIN_VALUE,e/t),c=-Math.log(i),u=o*r/c,l=(1-DW(u))/2,m;return n<=e?m=Math.max(.9,Math.min(1,l)):n<=t?m=Math.max(vW,Math.min(bW,l)):m=Math.max(0,Math.min(wW,l)),m}function G_(t,e,n,r,a){let o=(r-e)/(n-t);return e+(a-t)*o}var bW,vW,wW,bh=b(()=>{"use strict";d();bW=.8999999999999999,vW=.5,wW=.49999999999999994;s(DW,"erf");s(H_,"getLogNormalScore");s(G_,"linearInterpolation")});var Xr,TW,V_,SW,xW,Te,Cn=b(()=>{"use strict";d();bh();Xr="…",TW=" ",V_=.9,SW={PASS:{label:"pass",minScore:V_},AVERAGE:{label:"average",minScore:.5},FAIL:{label:"fail"},ERROR:{label:"error"}},xW=["com","co","gov","edu","ac","org","go","gob","or","net","in","ne","nic","gouv","web","spb","blog","jus","kiev","mil","wi","qc","ca","bel","on"],Te=class t{static{s(this,"Util")}static get RATINGS(){return SW}static get PASS_THRESHOLD(){return V_}static get MS_DISPLAY_VALUE(){return`%10d${TW}ms`}static getFinalDisplayedUrl(e){if(e.finalDisplayedUrl)return e.finalDisplayedUrl;if(e.finalUrl)return e.finalUrl;throw new Error("Could not determine final displayed URL")}static getMainDocumentUrl(e){return e.mainDocumentUrl||e.finalUrl}static getFullPageScreenshot(e){return e.fullPageScreenshot?e.fullPageScreenshot:e.audits["full-page-screenshot"]?.details}static splitMarkdownCodeSpans(e){let n=[],r=e.split(/`(.*?)`/g);for(let a=0;al.length);r&&u.length>r&&(i=Xr+u.slice(-1*r).join("/")),o&&(i=`${e.host}/${i.replace(/^\//,"")}`),a&&(i=`${i}${e.search}`)}let c=64;if(e.protocol!=="data:"&&(i=i.slice(0,200),i=i.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g,`$1${Xr}`),i=i.replace(/([a-zA-Z0-9-_]{9})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9-_]{10,}/g,`$1${Xr}`),i=i.replace(/(\d{3})\d{6,}/g,`$1${Xr}`),i=i.replace(/\u2026+/g,Xr),i.length>c&&i.includes("?")&&(i=i.replace(/\?([^=]*)(=)?.*/,`?$1$2${Xr}`),i.length>c&&(i=i.replace(/\?.*/,`?${Xr}`)))),i.length>c){let u=i.lastIndexOf(".");u>=0?i=i.slice(0,c-1-(i.length-u))+`${Xr}${i.slice(u)}`:i=i.slice(0,c-1)+Xr}return i}static getChromeExtensionOrigin(e){let n=new URL(e);return n.protocol+"//"+n.host}static parseURL(e){let n=new URL(e);return{file:t.getURLDisplayName(n),hostname:n.hostname,origin:n.protocol==="chrome-extension:"?t.getChromeExtensionOrigin(e):n.origin}}static createOrReturnURL(e){return e instanceof URL?e:new URL(e)}static getTld(e){let n=e.split(".").slice(-2);return xW.includes(n[0])?`.${n.join(".")}`:`.${n[n.length-1]}`}static getRootDomain(e){let n=t.createOrReturnURL(e).hostname,a=t.getTld(n).split(".");return n.split(".").slice(-a.length).join(".")}static filterRelevantLines(e,n,r){if(n.length===0)return e.slice(0,r*2+1);let a=3,o=new Set;return n=n.sort((i,c)=>(i.lineNumber||0)-(c.lineNumber||0)),n.forEach(({lineNumber:i})=>{let c=i-r,u=i+r;for(;c<1;)c++,u++;o.has(c-a-1)&&(c-=a);for(let l=c;l<=u;l++){let m=l;o.add(m)}}),e.filter(i=>o.has(i.lineNumber))}static computeLogNormalScore(e,n){let r=H_(e,n);return r>.9&&(r+=.05*(r-.9)),Math.floor(r*100)/100}}});var CW,AW,g,V=b(()=>{"use strict";d();jt();z_();Cn();CW="defaultPass",AW=s(t=>Math.round(t*100)/100,"clampTo2Decimals"),g=class t{static{s(this,"Audit")}static get DEFAULT_PASS(){return CW}static get SCORING_MODES(){return{NUMERIC:"numeric",METRIC_SAVINGS:"metricSavings",BINARY:"binary",MANUAL:"manual",INFORMATIVE:"informative",NOT_APPLICABLE:"notApplicable",ERROR:"error"}}static get meta(){throw new Error("Audit meta information must be overridden.")}static get defaultOptions(){return{}}static audit(e,n){throw new Error("audit() method must be overridden")}static computeLogNormalScore(e,n){return Te.computeLogNormalScore(e,n)}static assertHeadingKeysExist(e,n){if(n.length&&q_)for(let r of e){if(r.key===null)continue;let a=r.key;if(!n.some(o=>a in o))throw new Error(`"${r.key}" is missing from items`)}}static makeTableDetails(e,n,r={}){let{wastedBytes:a,wastedMs:o,sortedBy:i,skipSumming:c,isEntityGrouped:u}=r,l=a||o?{wastedBytes:a,wastedMs:o}:void 0;return n.length===0?{type:"table",headings:[],items:[],summary:l}:(t.assertHeadingKeysExist(e,n),{type:"table",headings:e,items:n,summary:l,sortedBy:i,skipSumming:c,isEntityGrouped:u})}static makeListDetails(e){return{type:"list",items:e}}static makeSnippetDetails({content:e,title:n,lineMessages:r,generalMessages:a,node:o,maxLineLength:i=200,maxLinesAroundMessage:c=20}){let u=t._makeSnippetLinesArray(e,i);return{type:"snippet",lines:Te.filterRelevantLines(u,r,c),title:n,lineMessages:r,generalMessages:a,lineCount:u.length,node:o}}static _makeSnippetLinesArray(e,n){return e.split(` -`).map((r,a)=>{let o=a+1,i={content:Te.truncate(r,n),lineNumber:o};return r.length>n&&(i.truncated=!0),i})}static makeOpportunityDetails(e,n,r){t.assertHeadingKeysExist(e,n);let{overallSavingsMs:a,overallSavingsBytes:o,sortedBy:i,skipSumming:c,isEntityGrouped:u}=r;return{type:"opportunity",headings:n.length===0?[]:e,items:n,overallSavingsMs:a,overallSavingsBytes:o,sortedBy:i,skipSumming:c,isEntityGrouped:u}}static makeNodeItem(e){return{type:"node",lhId:e.lhId,path:e.devtoolsNodePath,selector:e.selector,boundingRect:e.boundingRect,snippet:e.snippet,nodeLabel:e.nodeLabel}}static _findOriginalLocation(e,n,r){let a=e?.map.findEntry(n,r);if(a)return{file:a.sourceURL||"",line:a.sourceLineNumber||0,column:a.sourceColumnNumber||0}}static makeSourceLocation(e,n,r,a){return{type:"source-location",url:e,urlProvider:"network",line:n,column:r,original:a&&this._findOriginalLocation(a,n,r)}}static makeSourceLocationFromConsoleMessage(e,n){if(!e.url)return;let r=e.lineNumber||0,a=e.columnNumber||0;return this.makeSourceLocation(e.url,r,a,n)}static _normalizeAuditScore(e,n,r){if(n!==t.SCORING_MODES.BINARY&&n!==t.SCORING_MODES.NUMERIC&&n!==t.SCORING_MODES.METRIC_SAVINGS)return null;if(e===null||!Number.isFinite(e))throw new Error(`Invalid score for ${r}: ${e}`);if(e>1)throw new Error(`Audit score for ${r} is > 1`);if(e<0)throw new Error(`Audit score for ${r} is < 0`);return e=AW(e),e}static generateErrorAuditResult(e,n,r){return t.generateAuditResult(e,{score:null,errorMessage:n,errorStack:r})}static generateAuditResult(e,n){if(n.score===void 0)throw new Error("generateAuditResult requires a score");let r=e.meta.scoreDisplayMode||t.SCORING_MODES.BINARY,a=n.score;n.errorMessage!==void 0?r=t.SCORING_MODES.ERROR:n.notApplicable?r=t.SCORING_MODES.NOT_APPLICABLE:n.scoreDisplayMode&&(r=n.scoreDisplayMode),r===t.SCORING_MODES.METRIC_SAVINGS&&(a&&a>=Te.PASS_THRESHOLD?a=1:Object.values(n.metricSavings||{}).some(c=>c)?a=0:a=.5),a=t._normalizeAuditScore(a,r,e.meta.id);let o=e.meta.title;e.meta.failureTitle&&a!==null&&a{"use strict";d();V();_W=s(t=>Math.round(t*100)/100,"clampTo2Decimals"),Hm=class t{static{s(this,"ReportScoring")}static arithmeticMean(e){if(e=e.filter(r=>r.weight>0),e.some(r=>r.score===null))return null;let n=e.reduce((r,a)=>{let o=a.score,i=a.weight;return{weight:r.weight+i,sum:r.sum+o*i}},{weight:0,sum:0});return _W(n.sum/n.weight||0)}static scoreAllCategories(e,n){let r={};for(let[a,o]of Object.entries(e)){let i=o.auditRefs.map(l=>{let m={...l},p=n[m.id];return(p.scoreDisplayMode===g.SCORING_MODES.NOT_APPLICABLE||p.scoreDisplayMode===g.SCORING_MODES.INFORMATIVE||p.scoreDisplayMode===g.SCORING_MODES.MANUAL)&&(m.weight=0),m}),c=i.map(l=>({score:n[l.id].score,weight:l.weight})),u=t.arithmeticMean(c);r[a]={...o,auditRefs:i,id:a,score:u}}return r}}});function ru(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");vh(t,e);function n(){this.constructor=t}s(n,"__"),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function $_(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(t);a{d();vh=s(function(t,e){return vh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},vh(t,e)},"extendStatics");s(ru,"__extends");tr=s(function(){return tr=Object.assign||s(function(e){for(var n,r=1,a=arguments.length;r{d();qi=s(function(){return qi=Object.assign||s(function(e){for(var n,r=1,a=arguments.length;r{d();(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Ue||(Ue={}))});function Th(t){return t.type===vt.literal}function Y_(t){return t.type===vt.argument}function Vm(t){return t.type===vt.number}function Wm(t){return t.type===vt.date}function $m(t){return t.type===vt.time}function Ym(t){return t.type===vt.select}function Km(t){return t.type===vt.plural}function K_(t){return t.type===vt.pound}function Xm(t){return t.type===vt.tag}function Jm(t){return!!(t&&typeof t=="object"&&t.type===ko.number)}function au(t){return!!(t&&typeof t=="object"&&t.type===ko.dateTime)}var vt,ko,Zm=b(()=>{d();(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(vt||(vt={}));(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(ko||(ko={}));s(Th,"isLiteralElement");s(Y_,"isArgumentElement");s(Vm,"isNumberElement");s(Wm,"isDateElement");s($m,"isTimeElement");s(Ym,"isSelectElement");s(Km,"isPluralElement");s(K_,"isPoundElement");s(Xm,"isTagElement");s(Jm,"isNumberSkeleton");s(au,"isDateTimeSkeleton")});var Sh,X_=b(()=>{d();Sh=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/});function J_(t){var e={};return t.replace(RW,function(n){var r=n.length;switch(n[0]){case"G":e.era=r===4?"long":r===5?"narrow":"short";break;case"y":e.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=r===4?"short":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][r-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][r-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][r-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][r-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][r-1];break;case"s":e.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var RW,Z_=b(()=>{d();RW=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;s(J_,"parseDateTimeSkeleton")});var _t,Q_=b(()=>{d();_t=s(function(){return _t=Object.assign||s(function(e){for(var n,r=1,a=arguments.length;r{d();eR=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i});function oR(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(eR).filter(function(f){return f.length>0}),n=[],r=0,a=e;r1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(kW,function(u,l,m,p,f,h){if(l)e.minimumIntegerDigits=m.length;else{if(p&&f)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(sR.test(a.stem)){e.minimumIntegerDigits=a.stem.length;continue}if(nR.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(nR,function(u,l,m,p,f,h){return m==="*"?e.minimumFractionDigits=l.length:p&&p[0]==="#"?e.maximumFractionDigits=p.length:f&&h?(e.minimumFractionDigits=f.length,e.maximumFractionDigits=f.length+h.length):(e.minimumFractionDigits=l.length,e.maximumFractionDigits=l.length),""});var o=a.options[0];o==="w"?e=_t(_t({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=_t(_t({},e),rR(o)));continue}if(iR.test(a.stem)){e=_t(_t({},e),rR(a.stem));continue}var i=cR(a.stem);i&&(e=_t(_t({},e),i));var c=IW(a.stem);c&&(e=_t(_t({},e),c))}return e}var nR,iR,kW,sR,lR=b(()=>{d();Q_();tR();s(oR,"parseNumberSkeletonFromString");s(FW,"icuUnitToEcma");nR=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,iR=/^(@+)?(\+|#+)?[rs]?$/g,kW=/(\*)(0+)|(#+)(0+)|(0+)/g,sR=/^(0+)$/;s(rR,"parseSignificantPrecision");s(cR,"parseSign");s(IW,"parseConciseScientificAndEngineeringStem");s(aR,"parseNotationOptions");s(uR,"parseNumberSkeleton")});var dR=b(()=>{d();Z_();lR()});var ou,mR=b(()=>{d();ou={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]}});function pR(t,e){for(var n="",r=0;r>1),u="a",l=NW(e);for((l=="H"||l=="k")&&(c=0);c-- >0;)n+=u;for(;i-- >0;)n=l+n}else a==="J"?n+="H":n+=a}return n}function NW(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,r;n!=="root"&&(r=t.maximize().region);var a=ou[r||""]||ou[n||""]||ou["".concat(n,"-001")]||ou["001"];return a[0]}var fR=b(()=>{d();mR();s(pR,"getBestPattern");s(NW,"getDefaultHourSymbolFromLocale")});function Ve(t,e){return{start:t,end:e}}function vR(t,e){return new RegExp(t,e)}function Fh(t){return t>=97&&t<=122||t>=65&&t<=90}function WW(t){return Fh(t)||t===47}function $W(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function DR(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function YW(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}var xh,MW,LW,PW,OW,BW,UW,jW,qW,zW,HW,Ah,hR,gR,_h,yR,bR,GW,VW,Rh,Ch,wR,ER=b(()=>{d();Dh();Eh();Zm();X_();dR();fR();MW=new RegExp("^".concat(Sh.source,"*")),LW=new RegExp("".concat(Sh.source,"*$"));s(Ve,"createLocation");PW=!!String.prototype.startsWith&&"_a".startsWith("a",1),OW=!!String.fromCodePoint,BW=!!Object.fromEntries,UW=!!String.prototype.codePointAt,jW=!!String.prototype.trimStart,qW=!!String.prototype.trimEnd,zW=!!Number.isSafeInteger,HW=zW?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Ah=!0;try{hR=vR("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ah=((xh=hR.exec("a"))===null||xh===void 0?void 0:xh[0])==="a"}catch{Ah=!1}gR=s(PW?function(e,n,r){return e.startsWith(n,r)}:function(e,n,r){return e.slice(r,r+n.length)===n},"startsWith"),_h=OW?String.fromCodePoint:s(function(){for(var e=[],n=0;no;){if(i=e[o++],i>1114111)throw RangeError(i+" is not a valid code point");r+=i<65536?String.fromCharCode(i):String.fromCharCode(((i-=65536)>>10)+55296,i%1024+56320)}return r},"fromCodePoint"),yR=BW?Object.fromEntries:s(function(e){for(var n={},r=0,a=e;r=r)){var a=e.charCodeAt(n),o;return a<55296||a>56319||n+1===r||(o=e.charCodeAt(n+1))<56320||o>57343?a:(a-55296<<10)+(o-56320)+65536}},"codePointAt"),GW=s(jW?function(e){return e.trimStart()}:function(e){return e.replace(MW,"")},"trimStart"),VW=s(qW?function(e){return e.trimEnd()}:function(e){return e.replace(LW,"")},"trimEnd");s(vR,"RE");Ah?(Ch=vR("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Rh=s(function(e,n){var r;Ch.lastIndex=n;var a=Ch.exec(e);return(r=a[1])!==null&&r!==void 0?r:""},"matchIdentifierAtIndex")):Rh=s(function(e,n){for(var r=[];;){var a=bR(e,n);if(a===void 0||DR(a)||YW(a))break;r.push(a),n+=a>=65536?2:1}return _h.apply(void 0,r)},"matchIdentifierAtIndex");wR=function(){function t(e,n){n===void 0&&(n={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return s(t,"Parser"),t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,r){for(var a=[];!this.isEOF();){var o=this.char();if(o===123){var i=this.parseArgument(e,r);if(i.err)return i;a.push(i.val)}else{if(o===125&&e>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var c=this.clonePosition();this.bump(),a.push({type:vt.pound,location:Ve(c,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Ue.UNMATCHED_CLOSING_TAG,Ve(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Fh(this.peek()||0)){var i=this.parseTag(e,n);if(i.err)return i;a.push(i.val)}else{var i=this.parseLiteral(e,n);if(i.err)return i;a.push(i.val)}}}return{val:a,err:null}},t.prototype.parseTag=function(e,n){var r=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:vt.literal,value:"<".concat(a,"/>"),location:Ve(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,n,!0);if(o.err)return o;var i=o.val,c=this.clonePosition();if(this.bumpIf("")?{val:{type:vt.tag,value:a,children:i,location:Ve(r,this.clonePosition())},err:null}:this.error(Ue.INVALID_TAG,Ve(c,this.clonePosition())))}else return this.error(Ue.UNCLOSED_TAG,Ve(r,this.clonePosition()))}else return this.error(Ue.INVALID_TAG,Ve(r,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&$W(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var r=this.clonePosition(),a="";;){var o=this.tryParseQuote(n);if(o){a+=o;continue}var i=this.tryParseUnquoted(e,n);if(i){a+=i;continue}var c=this.tryParseLeftAngleBracket();if(c){a+=c;continue}break}var u=Ve(r,this.clonePosition());return{val:{type:vt.literal,value:a,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!WW(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return _h.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&e>0?null:(this.bump(),_h(r))},t.prototype.parseArgument=function(e,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ue.EMPTY_ARGUMENT,Ve(r,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(Ue.MALFORMED_ARGUMENT,Ve(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:vt.argument,value:a,location:Ve(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition())):this.parseArgumentOptions(e,n,a,r);default:return this.error(Ue.MALFORMED_ARGUMENT,Ve(r,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),r=Rh(this.message,n),a=n+r.length;this.bumpTo(a);var o=this.clonePosition(),i=Ve(e,o);return{value:r,location:i}},t.prototype.parseArgumentOptions=function(e,n,r,a){var o,i=this.clonePosition(),c=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(c){case"":return this.error(Ue.EXPECT_ARGUMENT_TYPE,Ve(i,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var m=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var f=VW(p.val);if(f.length===0)return this.error(Ue.EXPECT_ARGUMENT_STYLE,Ve(this.clonePosition(),this.clonePosition()));var h=Ve(m,this.clonePosition());l={style:f,styleLocation:h}}var y=this.tryParseArgumentClose(a);if(y.err)return y;var v=Ve(a,this.clonePosition());if(l&&gR(l?.style,"::",0)){var D=GW(l.style.slice(2));if(c==="number"){var p=this.parseNumberSkeletonFromString(D,l.styleLocation);return p.err?p:{val:{type:vt.number,value:r,location:v,style:p.val},err:null}}else{if(D.length===0)return this.error(Ue.EXPECT_DATE_TIME_SKELETON,v);var E=D;this.locale&&(E=pR(D,this.locale));var f={type:ko.dateTime,pattern:E,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?J_(E):{}},T=c==="date"?vt.date:vt.time;return{val:{type:T,value:r,location:v,style:f},err:null}}}return{val:{type:c==="number"?vt.number:c==="date"?vt.date:vt.time,value:r,location:v,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var C=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ue.EXPECT_SELECT_ARGUMENT_OPTIONS,Ve(C,qi({},C)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),F=0;if(c!=="select"&&A.value==="offset"){if(!this.bumpIf(":"))return this.error(Ue.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ve(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(Ue.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ue.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),A=this.parseIdentifierIfPossible(),F=p.val}var j=this.tryParsePluralOrSelectOptions(e,c,n,A);if(j.err)return j;var y=this.tryParseArgumentClose(a);if(y.err)return y;var B=Ve(a,this.clonePosition());return c==="select"?{val:{type:vt.select,value:r,options:yR(j.val),location:B},err:null}:{val:{type:vt.plural,value:r,options:yR(j.val),offset:F,pluralType:c==="plural"?"cardinal":"ordinal",location:B},err:null}}default:return this.error(Ue.INVALID_ARGUMENT_TYPE,Ve(i,u))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ue.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ve(a,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,n){var r=[];try{r=oR(e)}catch{return this.error(Ue.INVALID_NUMBER_SKELETON,n)}return{val:{type:ko.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?uR(r):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,r,a){for(var o,i=!1,c=[],u=new Set,l=a.value,m=a.location;;){if(l.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ue.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;m=Ve(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?Ue.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ue.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,m);l==="other"&&(i=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Ue.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ve(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(e+1,n,r);if(y.err)return y;var v=this.tryParseArgumentClose(h);if(v.err)return v;c.push([l,{value:y.val,location:Ve(h,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,m=o.location}return c.length===0?this.error(n==="select"?Ue.EXPECT_SELECT_ARGUMENT_SELECTOR:Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ve(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(Ue.MISSING_OTHER_CLAUSE,Ve(this.clonePosition(),this.clonePosition())):{val:c,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var r=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,i=0;!this.isEOF();){var c=this.char();if(c>=48&&c<=57)o=!0,i=i*10+(c-48),this.bump();else break}var u=Ve(a,this.clonePosition());return o?(i*=r,HW(i)?{val:i,err:null}:this.error(n,u)):this.error(e,u)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=bR(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(gR(this.message,e,this.offset())){for(var n=0;n=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&DR(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(e>=65536?2:1));return r??null},t}();s(Fh,"_isAlpha");s(WW,"_isAlphaOrSlash");s($W,"_isPotentialElementNameChar");s(DR,"_isWhiteSpace");s(YW,"_isPatternSyntax")});function kh(t){t.forEach(function(e){if(delete e.location,Ym(e)||Km(e))for(var n in e.options)delete e.options[n].location,kh(e.options[n].value);else Vm(e)&&Jm(e.style)||(Wm(e)||$m(e))&&au(e.style)?delete e.style.location:Xm(e)&&kh(e.children)})}function TR(t,e){e===void 0&&(e={}),e=qi({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new wR(t,e).parse();if(n.err){var r=SyntaxError(Ue[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return e?.captureLocation||kh(n.val),n.val}var Ih=b(()=>{d();Dh();Eh();ER();Zm();Zm();s(kh,"pruneLocation");s(TR,"parse")});function Qm(t,e){var n=e&&e.cache?e.cache:e$,r=e&&e.serializer?e.serializer:QW,a=e&&e.strategy?e.strategy:XW;return a(t,{cache:n,serializer:r})}function KW(t){return t==null||typeof t=="number"||typeof t=="boolean"}function SR(t,e,n,r){var a=KW(r)?r:n(r),o=e.get(a);return typeof o>"u"&&(o=t.call(this,r),e.set(a,o)),o}function xR(t,e,n){var r=Array.prototype.slice.call(arguments,3),a=n(r),o=e.get(a);return typeof o>"u"&&(o=t.apply(this,r),e.set(a,o)),o}function Nh(t,e,n,r,a){return n.bind(e,t,r,a)}function XW(t,e){var n=t.length===1?SR:xR;return Nh(t,this,n,e.cache.create(),e.serializer)}function JW(t,e){return Nh(t,this,xR,e.cache.create(),e.serializer)}function ZW(t,e){return Nh(t,this,SR,e.cache.create(),e.serializer)}function Mh(){this.cache=Object.create(null)}var QW,e$,ep,CR=b(()=>{d();s(Qm,"memoize");s(KW,"isPrimitive");s(SR,"monadic");s(xR,"variadic");s(Nh,"assemble");s(XW,"strategyDefault");s(JW,"strategyVariadic");s(ZW,"strategyMonadic");QW=s(function(){return JSON.stringify(arguments)},"serializerDefault");s(Mh,"ObjectWithoutPrototypeCache");Mh.prototype.get=function(t){return this.cache[t]};Mh.prototype.set=function(t,e){this.cache[t]=e};e$={create:s(function(){return new Mh},"create")},ep={variadic:JW,monadic:ZW}});var Io,iu,Lh,AR,_R,Ph=b(()=>{d();wh();(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Io||(Io={}));iu=function(t){ru(e,t);function e(n,r,a){var o=t.call(this,n)||this;return o.code=r,o.originalMessage=a,o}return s(e,"FormatError"),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),Lh=function(t){ru(e,t);function e(n,r,a,o){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(a).join('", "'),'"'),Io.INVALID_VALUE,o)||this}return s(e,"InvalidValueError"),e}(iu),AR=function(t){ru(e,t);function e(n,r,a){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Io.INVALID_VALUE,a)||this}return s(e,"InvalidValueTypeError"),e}(iu),_R=function(t){ru(e,t);function e(n,r){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Io.MISSING_VALUE,r)||this}return s(e,"MissingValueError"),e}(iu)});function t$(t){return t.length<2?t:t.reduce(function(e,n){var r=e[e.length-1];return!r||r.type!==an.literal||n.type!==an.literal?e.push(n):r.value+=n.value,e},[])}function n$(t){return typeof t=="function"}function su(t,e,n,r,a,o,i){if(t.length===1&&Th(t[0]))return[{type:an.literal,value:t[0].value}];for(var c=[],u=0,l=t;u{var Y9=Object.create;var $c=Object.defineProperty;var K9=Object.getOwnPropertyDescriptor;var X9=Object.getOwnPropertyNames;var J9=Object.getPrototypeOf,Z9=Object.prototype.hasOwnProperty;var s=(e,t)=>$c(e,"name",{value:t,configurable:!0});var b=(e,t)=>()=>(e&&(t=e(e=0)),t);var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),T=(e,t)=>{for(var n in t)$c(e,n,{get:t[n],enumerable:!0})},QS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of X9(t))!Z9.call(e,a)&&a!==n&&$c(e,a,{get:()=>t[a],enumerable:!(r=K9(t,a))||r.enumerable});return e};var Lt=(e,t,n)=>(n=e!=null?Y9(J9(e)):{},QS(t||!e||!e.__esModule?$c(n,"default",{value:e,enumerable:!0}):n,e)),Q9=e=>QS($c({},"__esModule",{value:!0}),e);function e2(){throw new Error("setTimeout has not been defined")}function t2(){throw new Error("clearTimeout has not been defined")}function n2(e){if(Ea===setTimeout)return setTimeout(e,0);if((Ea===e2||!Ea)&&setTimeout)return Ea=setTimeout,setTimeout(e,0);try{return Ea(e,0)}catch{try{return Ea.call(null,e,0)}catch{return Ea.call(this,e,0)}}}function ej(e){if(xa===clearTimeout)return clearTimeout(e);if((xa===t2||!xa)&&clearTimeout)return xa=clearTimeout,clearTimeout(e);try{return xa(e)}catch{try{return xa.call(null,e)}catch{return xa.call(this,e)}}}function tj(){!ki||!So||(ki=!1,So.length?$r=So.concat($r):km=-1,$r.length&&r2())}function r2(){if(!ki){var e=n2(tj);ki=!0;for(var t=$r.length;t;){for(So=$r,$r=[];++km1)for(var n=1;n{d();s(e2,"defaultSetTimout");s(t2,"defaultClearTimeout");Ea=e2,xa=t2;typeof globalThis.setTimeout=="function"&&(Ea=setTimeout);typeof globalThis.clearTimeout=="function"&&(xa=clearTimeout);s(n2,"runTimeout");s(ej,"runClearTimeout");$r=[],ki=!1,km=-1;s(tj,"cleanUpNextTick");s(r2,"drainQueue");s(nn,"nextTick");s(a2,"Item");a2.prototype.run=function(){this.fun.apply(null,this.array)};nj="browser",rj="browser",aj=!0,oj={},ij=[],sj="",cj={},uj={},lj={};s(ko,"noop");dj=ko,mj=ko,pj=ko,fj=ko,hj=ko,gj=ko,yj=ko;s(bj,"binding");s(vj,"cwd");s(wj,"chdir");s(Dj,"umask");Si=globalThis.performance||{},Ej=Si.now||Si.mozNow||Si.msNow||Si.oNow||Si.webkitNow||function(){return new Date().getTime()};s(xj,"hrtime");Tj=new Date;s(Sj,"uptime");rn={nextTick:nn,title:nj,browser:aj,env:oj,argv:ij,version:sj,versions:cj,on:dj,addListener:mj,once:pj,off:fj,removeListener:hj,removeAllListeners:gj,emit:yj,binding:bj,cwd:vj,chdir:wj,umask:Dj,hrtime:xj,platform:rj,release:uj,config:lj,uptime:Sj}});var d=b(()=>{"use strict";Ta();globalThis.process=rn});function c2(){Jh=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t0)throw new Error("Invalid string. Length must be a multiple of 4");o=e[c-2]==="="?2:e[c-1]==="="?1:0,i=new kj(c*3/4-o),r=o>0?c-4:c;var u=0;for(t=0,n=0;t>16&255,i[u++]=a>>8&255,i[u++]=a&255;return o===2?(a=Un[e.charCodeAt(t)]<<2|Un[e.charCodeAt(t+1)]>>4,i[u++]=a&255):o===1&&(a=Un[e.charCodeAt(t)]<<10|Un[e.charCodeAt(t+1)]<<4|Un[e.charCodeAt(t+2)]>>2,i[u++]=a>>8&255,i[u++]=a&255),i}function Aj(e){return yr[e>>18&63]+yr[e>>12&63]+yr[e>>6&63]+yr[e&63]}function _j(e,t,n){for(var r,a=[],o=t;ou?u:c+i));return r===1?(t=e[n-1],a+=yr[t>>2],a+=yr[t<<4&63],a+="=="):r===2&&(t=(e[n-2]<<8)+e[n-1],a+=yr[t>>10],a+=yr[t>>4&63],a+=yr[t<<2&63],a+="="),o.push(a),o.join("")}function _m(e,t,n,r,a){var o,i,c=a*8-r-1,u=(1<>1,m=-7,p=n?a-1:0,h=n?-1:1,f=e[t+p];for(p+=h,o=f&(1<<-m)-1,f>>=-m,m+=c;m>0;o=o*256+e[t+p],p+=h,m-=8);for(i=o&(1<<-m)-1,o>>=-m,m+=r;m>0;i=i*256+e[t+p],p+=h,m-=8);if(o===0)o=1-l;else{if(o===u)return i?NaN:(f?-1:1)*(1/0);i=i+Math.pow(2,r),o=o-l}return(f?-1:1)*i*Math.pow(2,o-r)}function u2(e,t,n,r,a,o){var i,c,u,l=o*8-a-1,m=(1<>1,h=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,y=r?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,i=m):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),i+p>=1?t+=h/u:t+=h*Math.pow(2,1-p),t*u>=2&&(i++,u/=2),i+p>=m?(c=0,i=m):i+p>=1?(c=(t*u-1)*Math.pow(2,a),i=i+p):(c=t*Math.pow(2,p-1)*Math.pow(2,a),i=0));a>=8;e[n+f]=c&255,f+=y,c/=256,a-=8);for(i=i<0;e[n+f]=i&255,f+=y,i/=256,l-=8);e[n+f-y]|=v*128}function Cm(){return U.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Yr(e,t){if(Cm()=Cm())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Cm().toString(16)+" bytes");return e|0}function br(e){return!!(e!=null&&e._isBuffer)}function p2(e,t){if(br(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Am(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return w2(e).length;default:if(r)return Am(e).length;t=(""+t).toLowerCase(),r=!0}}function Pj(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Wj(this,t,n);case"utf8":case"utf-8":return g2(this,t,n);case"ascii":return Gj(this,t,n);case"latin1":case"binary":return Vj(this,t,n);case"base64":return zj(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Co(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function f2(e,t,n,r,a){if(e.length===0)return-1;if(typeof n=="string"?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0)if(a)n=0;else return-1;if(typeof t=="string"&&(t=U.from(t,r)),br(t))return t.length===0?-1:i2(e,t,n,r,a);if(typeof t=="number")return t=t&255,U.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):i2(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function i2(e,t,n,r,a){var o=1,i=e.length,c=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,i/=2,c/=2,n/=2}function u(f,y){return o===1?f[y]:f.readUInt16BE(y*o)}s(u,"read");var l;if(a){var m=-1;for(l=n;li&&(n=i-c),l=n;l>=0;l--){for(var p=!0,h=0;ha&&(r=a)):r=a;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i239?4:o>223?3:o>191?2:1;if(a+c<=n){var u,l,m,p;switch(c){case 1:o<128&&(i=o);break;case 2:u=e[a+1],(u&192)===128&&(p=(o&31)<<6|u&63,p>127&&(i=p));break;case 3:u=e[a+1],l=e[a+2],(u&192)===128&&(l&192)===128&&(p=(o&15)<<12|(u&63)<<6|l&63,p>2047&&(p<55296||p>57343)&&(i=p));break;case 4:u=e[a+1],l=e[a+2],m=e[a+3],(u&192)===128&&(l&192)===128&&(m&192)===128&&(p=(o&15)<<18|(u&63)<<12|(l&63)<<6|m&63,p>65535&&p<1114112&&(i=p))}}i===null?(i=65533,c=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|i&1023),r.push(i),a+=c}return Hj(r)}function Hj(e){var t=e.length;if(t<=s2)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function Tn(e,t,n,r,a,o){if(!br(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function Rm(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);a>>(r?a:1-a)*8}function Fm(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);a>>(r?a:3-a)*8&255}function y2(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function b2(e,t,n,r,a){return a||y2(e,t,n,4),u2(e,t,n,r,23,4),n+4}function v2(e,t,n,r,a){return a||y2(e,t,n,8),u2(e,t,n,r,52,8),n+8}function Kj(e){if(e=Xj(e).replace(Yj,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Xj(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Jj(e){return e<16?"0"+e.toString(16):e.toString(16)}function Am(e,t){t=t||1/0;for(var n,r=e.length,a=null,o=[],i=0;i55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=(a-55296<<10|n-56320)+65536}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return o}function Zj(e){for(var t=[],n=0;n>8,a=n%256,o.push(a),o.push(r);return o}function w2(e){return Cj(Kj(e))}function Im(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function eq(e){return e!==e}function tq(e){return e!=null&&(!!e._isBuffer||D2(e)||nq(e))}function D2(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function nq(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&D2(e.slice(0,0))}var yr,Un,kj,Jh,Rj,l2,Fj,fle,s2,Yj,Ci=b(()=>{d();yr=[],Un=[],kj=typeof Uint8Array<"u"?Uint8Array:Array,Jh=!1;s(c2,"init");s(Cj,"toByteArray");s(Aj,"tripletToBase64");s(_j,"encodeChunk");s(o2,"fromByteArray");s(_m,"read");s(u2,"write");Rj={}.toString,l2=Array.isArray||function(e){return Rj.call(e)=="[object Array]"};Fj=50;U.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;fle=Cm();s(Cm,"kMaxLength");s(Yr,"createBuffer");s(U,"Buffer");U.poolSize=8192;U._augment=function(e){return e.__proto__=U.prototype,e};s(d2,"from");U.from=function(e,t,n){return d2(null,e,t,n)};U.TYPED_ARRAY_SUPPORT&&(U.prototype.__proto__=Uint8Array.prototype,U.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&U[Symbol.species]);s(m2,"assertSize");s(Ij,"alloc");U.alloc=function(e,t,n){return Ij(null,e,t,n)};s(Zh,"allocUnsafe");U.allocUnsafe=function(e){return Zh(null,e)};U.allocUnsafeSlow=function(e){return Zh(null,e)};s(Nj,"fromString");s(Xh,"fromArrayLike");s(Mj,"fromArrayBuffer");s(Lj,"fromObject");s(Qh,"checked");U.isBuffer=tq;s(br,"internalIsBuffer");U.compare=s(function(t,n){if(!br(t)||!br(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,a=n.length,o=0,i=Math.min(r,a);o0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},"inspect");U.prototype.compare=s(function(t,n,r,a,o){if(!br(t))throw new TypeError("Argument must be a Buffer");if(n===void 0&&(n=0),r===void 0&&(r=t?t.length:0),a===void 0&&(a=0),o===void 0&&(o=this.length),n<0||r>t.length||a<0||o>this.length)throw new RangeError("out of range index");if(a>=o&&n>=r)return 0;if(a>=o)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,a>>>=0,o>>>=0,this===t)return 0;for(var i=o-a,c=r-n,u=Math.min(i,c),l=this.slice(a,o),m=t.slice(n,r),p=0;po)&&(r=o),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var i=!1;;)switch(a){case"hex":return Oj(this,t,n,r);case"utf8":case"utf-8":return Bj(this,t,n,r);case"ascii":return h2(this,t,n,r);case"latin1":case"binary":return Uj(this,t,n,r);case"base64":return jj(this,t,n,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qj(this,t,n,r);default:if(i)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),i=!0}},"write");U.prototype.toJSON=s(function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},"toJSON");s(zj,"base64Slice");s(g2,"utf8Slice");s2=4096;s(Hj,"decodeCodePointsArray");s(Gj,"asciiSlice");s(Vj,"latin1Slice");s(Wj,"hexSlice");s($j,"utf16leSlice");U.prototype.slice=s(function(t,n){var r=this.length;t=~~t,n=n===void 0?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n0&&(o*=256);)a+=this[t+--n]*o;return a},"readUIntBE");U.prototype.readUInt8=s(function(t,n){return n||$t(t,1,this.length),this[t]},"readUInt8");U.prototype.readUInt16LE=s(function(t,n){return n||$t(t,2,this.length),this[t]|this[t+1]<<8},"readUInt16LE");U.prototype.readUInt16BE=s(function(t,n){return n||$t(t,2,this.length),this[t]<<8|this[t+1]},"readUInt16BE");U.prototype.readUInt32LE=s(function(t,n){return n||$t(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},"readUInt32LE");U.prototype.readUInt32BE=s(function(t,n){return n||$t(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},"readUInt32BE");U.prototype.readIntLE=s(function(t,n,r){t=t|0,n=n|0,r||$t(t,n,this.length);for(var a=this[t],o=1,i=0;++i=o&&(a-=Math.pow(2,8*n)),a},"readIntLE");U.prototype.readIntBE=s(function(t,n,r){t=t|0,n=n|0,r||$t(t,n,this.length);for(var a=n,o=1,i=this[t+--a];a>0&&(o*=256);)i+=this[t+--a]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*n)),i},"readIntBE");U.prototype.readInt8=s(function(t,n){return n||$t(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},"readInt8");U.prototype.readInt16LE=s(function(t,n){n||$t(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r},"readInt16LE");U.prototype.readInt16BE=s(function(t,n){n||$t(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r},"readInt16BE");U.prototype.readInt32LE=s(function(t,n){return n||$t(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},"readInt32LE");U.prototype.readInt32BE=s(function(t,n){return n||$t(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},"readInt32BE");U.prototype.readFloatLE=s(function(t,n){return n||$t(t,4,this.length),_m(this,t,!0,23,4)},"readFloatLE");U.prototype.readFloatBE=s(function(t,n){return n||$t(t,4,this.length),_m(this,t,!1,23,4)},"readFloatBE");U.prototype.readDoubleLE=s(function(t,n){return n||$t(t,8,this.length),_m(this,t,!0,52,8)},"readDoubleLE");U.prototype.readDoubleBE=s(function(t,n){return n||$t(t,8,this.length),_m(this,t,!1,52,8)},"readDoubleBE");s(Tn,"checkInt");U.prototype.writeUIntLE=s(function(t,n,r,a){if(t=+t,n=n|0,r=r|0,!a){var o=Math.pow(2,8*r)-1;Tn(this,t,n,r,o,0)}var i=1,c=0;for(this[n]=t&255;++c=0&&(c*=256);)this[n+i]=t/c&255;return n+r},"writeUIntBE");U.prototype.writeUInt8=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,1,255,0),U.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=t&255,n+1},"writeUInt8");s(Rm,"objectWriteUInt16");U.prototype.writeUInt16LE=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,2,65535,0),U.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):Rm(this,t,n,!0),n+2},"writeUInt16LE");U.prototype.writeUInt16BE=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,2,65535,0),U.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):Rm(this,t,n,!1),n+2},"writeUInt16BE");s(Fm,"objectWriteUInt32");U.prototype.writeUInt32LE=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,4,4294967295,0),U.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255):Fm(this,t,n,!0),n+4},"writeUInt32LE");U.prototype.writeUInt32BE=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,4,4294967295,0),U.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):Fm(this,t,n,!1),n+4},"writeUInt32BE");U.prototype.writeIntLE=s(function(t,n,r,a){if(t=+t,n=n|0,!a){var o=Math.pow(2,8*r-1);Tn(this,t,n,r,o-1,-o)}var i=0,c=1,u=0;for(this[n]=t&255;++i>0)-u&255;return n+r},"writeIntLE");U.prototype.writeIntBE=s(function(t,n,r,a){if(t=+t,n=n|0,!a){var o=Math.pow(2,8*r-1);Tn(this,t,n,r,o-1,-o)}var i=r-1,c=1,u=0;for(this[n+i]=t&255;--i>=0&&(c*=256);)t<0&&u===0&&this[n+i+1]!==0&&(u=1),this[n+i]=(t/c>>0)-u&255;return n+r},"writeIntBE");U.prototype.writeInt8=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,1,127,-128),U.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=t&255,n+1},"writeInt8");U.prototype.writeInt16LE=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,2,32767,-32768),U.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):Rm(this,t,n,!0),n+2},"writeInt16LE");U.prototype.writeInt16BE=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,2,32767,-32768),U.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):Rm(this,t,n,!1),n+2},"writeInt16BE");U.prototype.writeInt32LE=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,4,2147483647,-2147483648),U.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):Fm(this,t,n,!0),n+4},"writeInt32LE");U.prototype.writeInt32BE=s(function(t,n,r){return t=+t,n=n|0,r||Tn(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),U.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):Fm(this,t,n,!1),n+4},"writeInt32BE");s(y2,"checkIEEE754");s(b2,"writeFloat");U.prototype.writeFloatLE=s(function(t,n,r){return b2(this,t,n,!0,r)},"writeFloatLE");U.prototype.writeFloatBE=s(function(t,n,r){return b2(this,t,n,!1,r)},"writeFloatBE");s(v2,"writeDouble");U.prototype.writeDoubleLE=s(function(t,n,r){return v2(this,t,n,!0,r)},"writeDoubleLE");U.prototype.writeDoubleBE=s(function(t,n,r){return v2(this,t,n,!1,r)},"writeDoubleBE");U.prototype.copy=s(function(t,n,r,a){if(r||(r=0),!a&&a!==0&&(a=this.length),n>=t.length&&(n=t.length),n||(n=0),a>0&&a=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-n=0;--i)t[i+n]=this[i+r];else if(o<1e3||!U.TYPED_ARRAY_SUPPORT)for(i=0;i>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var i;if(typeof t=="number")for(i=n;i0&&i.length>a)){i.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=i.length,cq(c)}return e}function cq(e){typeof console.warn=="function"?console.warn(e):console.log(e)}function T2(e,t,n){var r=!1;function a(){e.removeListener(t,a),r||(r=!0,n.apply(e,arguments))}return s(a,"g"),a.listener=n,a}function S2(e){var t=this._events;if(t){var n=t[e];if(typeof n=="function")return 1;if(n)return n.length}return 0}function uq(e,t){for(var n=t,r=n+1,a=e.length;r{"use strict";d();s(Sa,"EventHandlers");Sa.prototype=Object.create(null);s(Be,"EventEmitter");jn=Be;Be.EventEmitter=Be;Be.usingDomains=!1;Be.prototype.domain=void 0;Be.prototype._events=void 0;Be.prototype._maxListeners=void 0;Be.defaultMaxListeners=10;Be.init=function(){this.domain=null,Be.usingDomains&&e1.active&&!(this instanceof e1.Domain)&&(this.domain=e1.active),(!this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=new Sa,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Be.prototype.setMaxListeners=s(function(t){if(typeof t!="number"||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},"setMaxListeners");s(E2,"$getMaxListeners");Be.prototype.getMaxListeners=s(function(){return E2(this)},"getMaxListeners");s(rq,"emitNone");s(aq,"emitOne");s(oq,"emitTwo");s(iq,"emitThree");s(sq,"emitMany");Be.prototype.emit=s(function(t){var n,r,a,o,i,c,u,l=!1,m=t==="error";if(c=this._events,c)m=m&&c.error==null;else if(!m)return!1;if(u=this.domain,m){if(n=arguments[1],u)n||(n=new Error('Uncaught, unspecified "error" event')),n.domainEmitter=this,n.domain=u,n.domainThrown=!1,u.emit("error",n);else{if(n instanceof Error)throw n;var p=new Error('Uncaught, unspecified "error" event. ('+n+")");throw p.context=n,p}return!1}if(r=c[t],!r)return!1;var h=typeof r=="function";switch(a=arguments.length,a){case 1:rq(r,h,this);break;case 2:aq(r,h,this,arguments[1]);break;case 3:oq(r,h,this,arguments[1],arguments[2]);break;case 4:iq(r,h,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(a-1),i=1;i0;)if(r[i]===n||r[i].listener&&r[i].listener===n){c=r[i].listener,o=i;break}if(o<0)return this;if(r.length===1){if(r[0]=void 0,--this._eventsCount===0)return this._events=new Sa,this;delete a[t]}else uq(r,o);a.removeListener&&this.emit("removeListener",t,c||n)}return this},"removeListener");Be.prototype.off=function(e,t){return this.removeListener(e,t)};Be.prototype.removeAllListeners=s(function(t){var n,r;if(r=this._events,!r)return this;if(!r.removeListener)return arguments.length===0?(this._events=new Sa,this._eventsCount=0):r[t]&&(--this._eventsCount===0?this._events=new Sa:delete r[t]),this;if(arguments.length===0){for(var a=Object.keys(r),o=0,i;o0?Reflect.ownKeys(this._events):[]},"eventNames");s(uq,"spliceOne");s(Yc,"arrayClone");s(lq,"unwrapListeners")});var C2=I((Dle,k2)=>{d();var Ai=1e3,_i=Ai*60,Ri=_i*60,Ao=Ri*24,dq=Ao*7,mq=Ao*365.25;k2.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return pq(e);if(n==="number"&&isFinite(e))return t.long?hq(e):fq(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function pq(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*mq;case"weeks":case"week":case"w":return n*dq;case"days":case"day":case"d":return n*Ao;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Ri;case"minutes":case"minute":case"mins":case"min":case"m":return n*_i;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ai;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}s(pq,"parse");function fq(e){var t=Math.abs(e);return t>=Ao?Math.round(e/Ao)+"d":t>=Ri?Math.round(e/Ri)+"h":t>=_i?Math.round(e/_i)+"m":t>=Ai?Math.round(e/Ai)+"s":e+"ms"}s(fq,"fmtShort");function hq(e){var t=Math.abs(e);return t>=Ao?Nm(e,t,Ao,"day"):t>=Ri?Nm(e,t,Ri,"hour"):t>=_i?Nm(e,t,_i,"minute"):t>=Ai?Nm(e,t,Ai,"second"):e+" ms"}s(hq,"fmtLong");function Nm(e,t,n,r){var a=t>=n*1.5;return Math.round(e/n)+" "+r+(a?"s":"")}s(Nm,"plural")});var _2=I((Tle,A2)=>{d();function gq(e){n.debug=n,n.default=n,n.coerce=u,n.disable=o,n.enable=a,n.enabled=i,n.humanize=C2(),n.destroy=l,Object.keys(e).forEach(m=>{n[m]=e[m]}),n.names=[],n.skips=[],n.formatters={};function t(m){let p=0;for(let h=0;h{if(z==="%%")return"%";C++;let J=n.formatters[B];if(typeof J=="function"){let ne=D[C];z=J.call(E,ne),D.splice(C,1),C--}return z}),n.formatArgs.call(E,D),(E.log||n.log).apply(E,D)}return s(v,"debug"),v.namespace=m,v.useColors=n.useColors(),v.color=n.selectColor(m),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(f!==n.namespaces&&(f=n.namespaces,y=n.enabled(m)),y),set:D=>{h=D}}),typeof n.init=="function"&&n.init(v),v}s(n,"createDebug");function r(m,p){let h=n(this.namespace+(typeof p>"u"?":":p)+m);return h.log=this.log,h}s(r,"extend");function a(m){n.save(m),n.namespaces=m,n.names=[],n.skips=[];let p,h=(typeof m=="string"?m:"").split(/[\s,]+/),f=h.length;for(p=0;p"-"+p)].join(",");return n.enable(""),m}s(o,"disable");function i(m){if(m[m.length-1]==="*")return!0;let p,h;for(p=0,h=n.skips.length;p{d();Rn.formatArgs=bq;Rn.save=vq;Rn.load=wq;Rn.useColors=yq;Rn.storage=Dq();Rn.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Rn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function yq(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(yq,"useColors");function bq(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Mm.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(n++,a==="%c"&&(r=n))}),e.splice(r,0,t)}s(bq,"formatArgs");Rn.log=console.debug||console.log||(()=>{});function vq(e){try{e?Rn.storage.setItem("debug",e):Rn.storage.removeItem("debug")}catch{}}s(vq,"save");function wq(){let e;try{e=Rn.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}s(wq,"load");function Dq(){try{return localStorage}catch{}}s(Dq,"localstorage");Mm.exports=_2()(Rn);var{formatters:Eq}=Mm.exports;Eq.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});function Lm(e){if(!e)throw new Error("name must be non-empty")}function xq(e,t){for(var n=0,r=e.length,a;n>>1,e[a].startTime{d();fn=typeof performance<"u"&&performance,F2=fn&&fn.now?function(){return fn.now()}:function(){return Date.now()};s(Lm,"throwIfEmpty");s(xq,"insertSorted");fn&&fn.mark&&fn.getEntriesByName&&fn.getEntriesByType&&fn.clearMeasures?(Bm=s(function(e){Lm(e),fn.mark("start "+e)},"mark"),Um=s(function(e){Lm(e),fn.mark("end "+e),fn.measure(e,"start "+e,"end "+e);var t=fn.getEntriesByName(e);return t[t.length-1]},"stop"),Kc=s(function(){return fn.getEntriesByType("measure")},"getEntries"),jm=s(function(){fn.clearMarks(),fn.clearMeasures()},"clear")):(Pm={},Om=[],Bm=s(function(e){Lm(e);var t=F2();Pm["$"+e]=t},"mark"),Um=s(function(e){Lm(e);var t=F2(),n=Pm["$"+e];if(!n)throw new Error("no known mark: "+e);var r={startTime:n,name:e,duration:t-n,entryType:"measure"};return xq(Om,r),r},"stop"),Kc=s(function(){return Om},"getEntries"),jm=s(function(){Pm={},Om=[]},"clear"))});var Ca,ka,Fi,Ii,t1,N2,Sq,M2,Ni,F,Ae=b(()=>{d();Ta();Kr();Ca=Lt(R2());I2();ka=rn.platform==="win32",Fi=rn.browser,Ii={red:Fi?"crimson":1,yellow:Fi?"gold":3,cyan:Fi?"darkturquoise":6,green:Fi?"forestgreen":2,blue:Fi?"steelblue":4,magenta:Fi?"palevioletred":5};Ca.default.colors=[Ii.cyan,Ii.green,Ii.blue,Ii.magenta];t1=class extends Be{static{s(this,"Emitter")}issueStatus(t,n){(t==="status"||t==="statusEnd")&&this.emit(t,[t,...n])}issueWarning(t,n){this.emit("warning",[t,...n])}},N2={},Sq=25,Ni=class e{static{s(this,"Log")}static _logToStdErr(t,n){e.loggerfn(t)(...n)}static loggerfn(t){t=`LH:${t}`;let n=N2[t];return n||(n=(0,Ca.default)(t),N2[t]=n,t.endsWith("error")?n.color=Ii.red:t.endsWith("warn")&&(n.color=Ii.yellow)),n}static setLevel(t){switch(M2=t,t){case"silent":Ca.default.enable("-LH:*");break;case"verbose":Ca.default.enable("LH:*");break;case"warn":Ca.default.enable("-LH:*, LH:*:warn, LH:*:error");break;case"error":Ca.default.enable("-LH:*, LH:*:error");break;default:Ca.default.enable("LH:*, -LH:*:verbose")}}static formatProtocol(t,n,r){let a=!rn||rn.browser?1/0:rn.stdout.columns,o=n.method||"?????",i=a-o.length-t.length-Sq,c=n.params&&o!=="IO.read"?JSON.stringify(n.params).substr(0,i):"";e._logToStdErr(`${t}:${r||""}`,[o,c])}static isVerbose(){return M2==="verbose"}static time({msg:t,id:n,args:r=[]},a="log"){Bm(n),e[a]("status",t,...r)}static timeEnd({msg:t,id:n,args:r=[]},a="verbose"){e[a]("statusEnd",t,...r),Um(n)}static log(t,...n){return e.events.issueStatus(t,n),e._logToStdErr(t,n)}static warn(t,...n){return e.events.issueWarning(t,n),e._logToStdErr(`${t}:warn`,n)}static error(t,...n){return e._logToStdErr(`${t}:error`,n)}static verbose(t,...n){return e.events.issueStatus(t,n),e._logToStdErr(`${t}:verbose`,n)}static greenify(t){return`${e.green}${t}${e.reset}`}static redify(t){return`${e.red}${t}${e.reset}`}static get green(){return"\x1B[32m"}static get red(){return"\x1B[31m"}static get yellow(){return"\x1B[33m"}static get purple(){return"\x1B[95m"}static get reset(){return"\x1B[0m"}static get bold(){return"\x1B[1m"}static get dim(){return"\x1B[2m"}static get tick(){return ka?"√":"✓"}static get cross(){return ka?"×":"✘"}static get whiteSmallSquare(){return ka?"·":"▫"}static get heavyHorizontal(){return ka?"─":"━"}static get heavyVertical(){return ka?"│ ":"┃ "}static get heavyUpAndRight(){return ka?"└":"┗"}static get heavyVerticalAndRight(){return ka?"├":"┣"}static get heavyDownAndHorizontal(){return ka?"┬":"┳"}static get doubleLightHorizontal(){return"──"}};Ni.events=new t1;Ni.takeTimeEntries=()=>{let e=Kc();return jm(),e};Ni.getTimeEntries=()=>Kc();F=Ni});var jt=b(()=>{"use strict";d();});var n1,$,Se=b(()=>{"use strict";d();jt();n1=class{static{s(this,"BaseGatherer")}meta={supportedModes:[]};startInstrumentation(t){}startSensitiveInstrumentation(t){}stopSensitiveInstrumentation(t){}stopInstrumentation(t){}getArtifact(t){}},$=n1});var kq,Cq,Aq,_q,Rq,Fq,qt,vr=b(()=>{"use strict";d();Ae();kq=/^(chrome|https?):/,Cq=16,Aq="RunTask",_q="ThreadControllerImpl::RunTask",Rq="ThreadControllerImpl::DoWork",Fq="TaskQueueManager::ProcessTaskFromWorkQueue",qt=class e{static{s(this,"TraceProcessor")}static get TIMESPAN_MARKER_ID(){return"__lighthouseTimespanStart__"}static createNoNavstartError(){return new Error("No navigationStart event found")}static createNoResourceSendRequestError(){return new Error("No ResourceSendRequest event found")}static createNoTracingStartedError(){return new Error("No tracingStartedInBrowser event found")}static createNoFirstContentfulPaintError(){return new Error("No FirstContentfulPaint event found")}static createNoLighthouseMarkerError(){return new Error("No Lighthouse timespan marker event found")}static _isNavigationStartOfInterest(t){return t.name!=="navigationStart"?!1:t.args.data?.documentLoaderURL===void 0?!0:t.args.data?.documentLoaderURL?kq.test(t.args.data.documentLoaderURL):!1}static _sortTimestampEventGroup(t,n,r,a){let o=s(p=>n[p],"lookupArrayIndexByTsIndex"),i=s(p=>a[o(p)],"lookupEventByTsIndex"),c=[],u=[],l=[];for(let p of t){let h=o(p),f=i(p);f.ph==="E"?c.push(h):f.ph==="X"||f.ph==="B"?u.push(h):l.push(h)}let m=new Map;for(let p of u){let h=a[p];if(h.ph==="X")m.set(p,h.dur);else{let f=Number.MAX_SAFE_INTEGER,y=0,v=r+t.length;for(let D=v;D(m.get(h)||0)-(m.get(p)||0)||p-h),l.sort((p,h)=>p-h),[...c,...u,...l]}static filteredTraceSort(t,n){let r=[];for(let o=0;ot[o].ts-t[i].ts);for(let o=0;o0&&p--;for(let h of r){let f=h*n;for(;u0&&ac-u);let i=this.getMainThreadTopLevelEventDurations(t,n,r);return this._riskPercentiles(i.durations,o,a,i.clippedLength)}static getMainThreadTopLevelEventDurations(t,n=0,r=1/0){let a=[],o=0;for(let i of t){if(i.endr)continue;let c=i.duration,u=i.start;ur&&(o=c-(r-u)),a.push(c)}return a.sort((i,c)=>i-c),{durations:a,clippedLength:o}}static getMainThreadTopLevelEvents(t,n=0,r=1/0){let a=[];for(let o of t.mainThreadEvents){if(!this.isScheduleableTask(o)||!o.dur)continue;let i=(o.ts-t.timeOriginEvt.ts)/1e3,c=(o.ts+o.dur-t.timeOriginEvt.ts)/1e3;i>r||ci.name==="TracingStartedInBrowser");if(n?.args.data?.frames){let i=n.args.data.frames.find(l=>!l.parent),c=i?.frame,u=i?.processId;if(u&&c)return{startingPid:u,frameId:c}}let r=t.find(i=>i.name==="TracingStartedInPage");if(r?.args?.data){let i=r.args.data.page;if(i)return{startingPid:r.pid,frameId:i}}let a=t.find(i=>this._isNavigationStartOfInterest(i)&&i.args.data?.isLoadingMainFrame),o=t.find(i=>i.name==="ResourceSendRequest");if(a?.args?.data&&o&&o.pid===a.pid&&o.tid===a.tid){let i=a.args.frame;if(i)return{startingPid:a.pid,frameId:i}}throw this.createNoTracingStartedError()}static findMainFramePidTids(t,n){let r=n.filter(i=>(i.name==="FrameCommittedInBrowser"||i.name==="ProcessReadyInBrowser")&&i.args?.data?.frame===t.frameId&&i?.args?.data?.processId),a=r.length?r.map(i=>i?.args?.data?.processId):[t.startingPid],o=new Map;for(let i of new Set(a)){let c=n.filter(m=>m.cat==="__metadata"&&m.pid===i&&m.ph==="M"&&m.name==="thread_name"),u=c.find(m=>m.args.name==="CrRendererMain");u||(u=c.find(m=>m.args.name==="CrBrowserMain"));let l=u?.tid;if(!l)throw new Error("Unable to determine tid for renderer process");o.set(i,l)}return o}static isScheduleableTask(t){return t.name===Aq||t.name===_q||t.name===Rq||t.name===Fq}static isLCPEvent(t){return t.name!=="largestContentfulPaint::Invalidate"&&t.name!=="largestContentfulPaint::Candidate"?!1:!!t.args?.frame}static isLCPCandidateEvent(t){return!!(t.name==="largestContentfulPaint::Candidate"&&t.args?.frame&&t.args.data&&t.args.data.size!==void 0)}static getFrameId(t){return t.args?.data?.frame||t.args.data?.frameID||t.args.frame}static computeValidLCPAllFrames(t,n){let r=t.filter(this.isLCPEvent).reverse(),a=new Map;for(let i of r){if(i.ts<=n.ts)break;let c=i.args.frame;a.has(c)||a.set(c,i)}let o;for(let i of a.values())this.isLCPCandidateEvent(i)&&(!o||i.args.data.size>o.args.data.size)&&(o=i);return{lcp:o,invalidated:!!(!o&&a.size)}}static resolveRootFrames(t){let n=new Map;for(let a of t)a.parent&&n.set(a.id,a.parent);let r=new Map;for(let a of t){let o=a.id;for(;n.has(o);)o=n.get(o);if(o===void 0)throw new Error("Unexpected undefined frameId");r.set(a.id,o)}return r}static processTrace(t,n){let{timeOriginDeterminationMethod:r="auto"}=n||{},a=this.filteredTraceSort(t.traceEvents,C=>C.cat.includes("blink.user_timing")||C.cat.includes("loading")||C.cat.includes("devtools.timeline")||C.cat==="__metadata"),o=this.findMainFrameIds(a),i=this.findMainFramePidTids(o,a),c=e.filteredTraceSort(t.traceEvents,C=>i.has(C.pid)),u=new Map,l=a.find(C=>C.name==="TracingStartedInBrowser")?.args?.data?.frames;if(l)for(let C of l)u.set(C.frame,{id:C.frame,url:C.url,parent:C.parent});a.filter(C=>!!(C.name==="FrameCommittedInBrowser"&&C.args.data?.frame&&C.args.data.url!==void 0)).forEach(C=>{u.set(C.args.data.frame,{id:C.args.data.frame,url:C.args.data.url,parent:C.args.data.parent})});let m=[...u.values()],p=this.resolveRootFrames(m),h=[...p.entries()].filter(([,C])=>C===o.frameId).map(([C])=>C);function f(C){return e.getFrameId(C)===o.frameId}s(f,"associatedToMainFrame");function y(C){let R=e.getFrameId(C);return R?h.includes(R):!1}s(y,"associatedToAllFrames");let v=a.filter(C=>f(C)),D=[];p.has(o.frameId)?D=a.filter(C=>y(C)):(F.warn("TraceProcessor","frameTreeEvents may be incomplete, make sure the trace has frame events"),p.set(o.frameId,o.frameId),D=v);let E=this.computeTimeOrigin({keyEvents:a,frameEvents:v,mainFrameInfo:o},r),S=c.filter(C=>C.tid===i.get(C.pid)),k=this.computeTraceEnd(t.traceEvents,E);return{frames:m,mainThreadEvents:S,frameEvents:v,frameTreeEvents:D,processEvents:c,mainFrameInfo:o,timeOriginEvt:E,timings:{timeOrigin:0,traceEnd:k.timing},timestamps:{timeOrigin:E.ts,traceEnd:k.timestamp},_keyEvents:a,_rendererPidToTid:i}}static processNavigation(t){let{frameEvents:n,frameTreeEvents:r,timeOriginEvt:a,timings:o,timestamps:i}=t,c=this.computeNavigationTimingsForFrame(n,{timeOriginEvt:a}),u=r.find(h=>h.name==="firstContentfulPaint"&&h.ts>a.ts);if(!u)throw this.createNoFirstContentfulPaintError();let l=this.computeValidLCPAllFrames(r,a).lcp,m=s(h=>(h-a.ts)/1e3,"getTiming"),p=s(h=>h===void 0?void 0:m(h),"maybeGetTiming");return{timings:{timeOrigin:o.timeOrigin,firstPaint:c.timings.firstPaint,firstContentfulPaint:c.timings.firstContentfulPaint,firstContentfulPaintAllFrames:m(u.ts),firstMeaningfulPaint:c.timings.firstMeaningfulPaint,largestContentfulPaint:c.timings.largestContentfulPaint,largestContentfulPaintAllFrames:p(l?.ts),load:c.timings.load,domContentLoaded:c.timings.domContentLoaded,traceEnd:o.traceEnd},timestamps:{timeOrigin:i.timeOrigin,firstPaint:c.timestamps.firstPaint,firstContentfulPaint:c.timestamps.firstContentfulPaint,firstContentfulPaintAllFrames:u.ts,firstMeaningfulPaint:c.timestamps.firstMeaningfulPaint,largestContentfulPaint:c.timestamps.largestContentfulPaint,largestContentfulPaintAllFrames:l?.ts,load:c.timestamps.load,domContentLoaded:c.timestamps.domContentLoaded,traceEnd:i.traceEnd},firstPaintEvt:c.firstPaintEvt,firstContentfulPaintEvt:c.firstContentfulPaintEvt,firstContentfulPaintAllFramesEvt:u,firstMeaningfulPaintEvt:c.firstMeaningfulPaintEvt,largestContentfulPaintEvt:c.largestContentfulPaintEvt,largestContentfulPaintAllFramesEvt:l,loadEvt:c.loadEvt,domContentLoadedEvt:c.domContentLoadedEvt,fmpFellBack:c.fmpFellBack,lcpInvalidated:c.lcpInvalidated}}static computeTraceEnd(t,n){let r=-1/0;for(let a of t)r=Math.max(a.ts+(a.dur||0),r);return{timestamp:r,timing:(r-n.ts)/1e3}}static computeTimeOrigin(t,n){let r=s(()=>t.frameEvents.filter(this._isNavigationStartOfInterest).pop(),"lastNavigationStart"),a=s(()=>t.keyEvents.find(i=>i.name==="clock_sync"&&i.args.sync_id===e.TIMESPAN_MARKER_ID),"lighthouseMarker");switch(n){case"firstResourceSendRequest":{let o=t.keyEvents.find(i=>i.name!=="ResourceSendRequest"?!1:(i.args.data||{}).frame===t.mainFrameInfo.frameId);if(!o)throw this.createNoResourceSendRequestError();return o}case"lastNavigationStart":{let o=r();if(!o)throw this.createNoNavstartError();return o}case"lighthouseMarker":{let o=a();if(!o)throw this.createNoLighthouseMarkerError();return o}case"auto":{let o=a()||r();if(!o)throw this.createNoNavstartError();return o}}}static computeNavigationTimingsForFrame(t,n){let{timeOriginEvt:r}=n,a=t.find(D=>D.name==="firstPaint"&&D.ts>r.ts),o=t.find(D=>D.name==="firstContentfulPaint"&&D.ts>r.ts);if(!o)throw this.createNoFirstContentfulPaintError();let i=t.find(D=>D.name==="firstMeaningfulPaint"&&D.ts>r.ts),c=!1;if(!i){let D="firstMeaningfulPaintCandidate";c=!0,F.verbose("TraceProcessor",`No firstMeaningfulPaint found, falling back to last ${D}`);let E=t.filter(S=>S.name===D).pop();E||F.verbose("TraceProcessor","No `firstMeaningfulPaintCandidate` events found in trace"),i=E}let u=this.computeValidLCPAllFrames(t,r),l=t.find(D=>D.name==="loadEventEnd"&&D.ts>r.ts),m=t.find(D=>D.name==="domContentLoadedEventEnd"&&D.ts>r.ts),p=s(D=>D?.ts,"getTimestamp"),h={timeOrigin:r.ts,firstPaint:p(a),firstContentfulPaint:o.ts,firstMeaningfulPaint:p(i),largestContentfulPaint:p(u.lcp),load:p(l),domContentLoaded:p(m)},f=s(D=>(D-r.ts)/1e3,"getTiming"),y=s(D=>D===void 0?void 0:f(D),"maybeGetTiming");return{timings:{timeOrigin:0,firstPaint:y(h.firstPaint),firstContentfulPaint:f(h.firstContentfulPaint),firstMeaningfulPaint:y(h.firstMeaningfulPaint),largestContentfulPaint:y(h.largestContentfulPaint),load:y(h.load),domContentLoaded:y(h.domContentLoaded)},timestamps:h,timeOriginEvt:r,firstPaintEvt:a,firstContentfulPaintEvt:o,firstMeaningfulPaintEvt:i,largestContentfulPaintEvt:u.lcp,loadEvt:l,domContentLoadedEvt:m,fmpFellBack:c,lcpInvalidated:u.invalidated}}}});var L2={};T(L2,{default:()=>Xr});var r1,Xr,Mi=b(()=>{"use strict";d();Se();vr();r1=class e extends ${static{s(this,"Trace")}_trace={traceEvents:[]};static getDefaultTraceCategories(){return["-*","disabled-by-default-lighthouse","loading","v8","v8.execute","blink.user_timing","blink.console","devtools.timeline","disabled-by-default-devtools.timeline","disabled-by-default-devtools.screenshot","disabled-by-default-devtools.timeline.stack","disabled-by-default-devtools.timeline.frame","latencyInfo"]}static async endTraceAndCollectEvents(t){let n=[],r=s(function(a){n.push(...a.value)},"dataListener");return t.on("Tracing.dataCollected",r),new Promise((a,o)=>{t.once("Tracing.tracingComplete",i=>{t.off("Tracing.dataCollected",r),a({traceEvents:n})}),t.sendCommand("Tracing.end").catch(o)})}static symbol=Symbol("Trace");meta={symbol:e.symbol,supportedModes:["timespan","navigation"]};async startSensitiveInstrumentation({driver:t,gatherMode:n,settings:r}){let a=e.getDefaultTraceCategories().concat(r.additionalTraceCategories||[]);await t.defaultSession.sendCommand("Page.enable"),await t.defaultSession.sendCommand("Tracing.start",{categories:a.join(","),options:"sampling-frequency=10000"}),n==="timespan"&&await t.defaultSession.sendCommand("Tracing.recordClockSyncMarker",{syncId:qt.TIMESPAN_MARKER_ID})}async stopSensitiveInstrumentation({driver:t}){this._trace=await e.endTraceAndCollectEvents(t.defaultSession)}getArtifact(){return this._trace}},Xr=r1});var P2={};T(P2,{default:()=>Sn});var Sn,Jr=b(()=>{d();Sn={}});function O2(e,t){for(var n=0,r=e.length-1;r>=0;r--){var a=e[r];a==="."?e.splice(r,1):a===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function a1(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!r)continue;e=r+"/"+e,t=r.charAt(0)==="/"}return e=O2(i1(e.split("/"),function(a){return!!a}),!t).join("/"),(t?"/":"")+e||"."}function B2(e){var t=U2(e),n=jq(e,-1)==="/";return e=O2(i1(e.split("/"),function(r){return!!r}),!t).join("/"),!e&&!t&&(e="."),e&&n&&(e+="/"),(t?"/":"")+e}function U2(e){return e.charAt(0)==="/"}function Nq(){var e=Array.prototype.slice.call(arguments,0);return B2(i1(e,function(t,n){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))}function Mq(e,t){e=a1(e).substr(1),t=a1(t).substr(1);function n(l){for(var m=0;m=0&&l[p]==="";p--);return m>p?[]:l.slice(m,p-m+1)}s(n,"trim");for(var r=n(e.split("/")),a=n(t.split("/")),o=Math.min(r.length,a.length),i=o,c=0;c{d();s(O2,"normalizeArray");Iq=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o1=s(function(e){return Iq.exec(e).slice(1)},"splitPath");s(a1,"resolve");s(B2,"normalize");s(U2,"isAbsolute");s(Nq,"join");s(Mq,"relative");Lq="/",Pq=":";s(Oq,"dirname");s(Bq,"basename");s(Uq,"extname");Dt={extname:Uq,basename:Bq,dirname:Oq,sep:Lq,delimiter:Pq,relative:Mq,join:Nq,isAbsolute:U2,normalize:B2,resolve:a1};s(i1,"filter");jq="ab".substr(-1)==="b"?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}});var q2=I((Qle,j2)=>{d();function qq(){this.__data__=[],this.size=0}s(qq,"listCacheClear");j2.exports=qq});var s1=I((nde,z2)=>{d();function zq(e,t){return e===t||e!==e&&t!==t}s(zq,"eq");z2.exports=zq});var Xc=I((ode,H2)=>{d();var Hq=s1();function Gq(e,t){for(var n=e.length;n--;)if(Hq(e[n][0],t))return n;return-1}s(Gq,"assocIndexOf");H2.exports=Gq});var V2=I((cde,G2)=>{d();var Vq=Xc(),Wq=Array.prototype,$q=Wq.splice;function Yq(e){var t=this.__data__,n=Vq(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$q.call(t,n,1),--this.size,!0}s(Yq,"listCacheDelete");G2.exports=Yq});var $2=I((dde,W2)=>{d();var Kq=Xc();function Xq(e){var t=this.__data__,n=Kq(t,e);return n<0?void 0:t[n][1]}s(Xq,"listCacheGet");W2.exports=Xq});var K2=I((fde,Y2)=>{d();var Jq=Xc();function Zq(e){return Jq(this.__data__,e)>-1}s(Zq,"listCacheHas");Y2.exports=Zq});var J2=I((yde,X2)=>{d();var Qq=Xc();function ez(e,t){var n=this.__data__,r=Qq(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}s(ez,"listCacheSet");X2.exports=ez});var Jc=I((wde,Z2)=>{d();var tz=q2(),nz=V2(),rz=$2(),az=K2(),oz=J2();function Li(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{d();var iz=Jc();function sz(){this.__data__=new iz,this.size=0}s(sz,"stackClear");Q2.exports=sz});var nk=I((kde,tk)=>{d();function cz(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}s(cz,"stackDelete");tk.exports=cz});var ak=I((_de,rk)=>{d();function uz(e){return this.__data__.get(e)}s(uz,"stackGet");rk.exports=uz});var ik=I((Ide,ok)=>{d();function lz(e){return this.__data__.has(e)}s(lz,"stackHas");ok.exports=lz});var c1=I((Lde,sk)=>{d();var dz=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis;sk.exports=dz});var wr=I((Ode,ck)=>{d();var mz=c1(),pz=typeof self=="object"&&self&&self.Object===Object&&self,fz=mz||pz||Function("return this")();ck.exports=fz});var qm=I((Ude,uk)=>{d();var hz=wr(),gz=hz.Symbol;uk.exports=gz});var pk=I((qde,mk)=>{d();var lk=qm(),dk=Object.prototype,yz=dk.hasOwnProperty,bz=dk.toString,Zc=lk?lk.toStringTag:void 0;function vz(e){var t=yz.call(e,Zc),n=e[Zc];try{e[Zc]=void 0;var r=!0}catch{}var a=bz.call(e);return r&&(t?e[Zc]=n:delete e[Zc]),a}s(vz,"getRawTag");mk.exports=vz});var hk=I((Gde,fk)=>{d();var wz=Object.prototype,Dz=wz.toString;function Ez(e){return Dz.call(e)}s(Ez,"objectToString");fk.exports=Ez});var Qc=I(($de,bk)=>{d();var gk=qm(),xz=pk(),Tz=hk(),Sz="[object Null]",kz="[object Undefined]",yk=gk?gk.toStringTag:void 0;function Cz(e){return e==null?e===void 0?kz:Sz:yk&&yk in Object(e)?xz(e):Tz(e)}s(Cz,"baseGetTag");bk.exports=Cz});var u1=I((Xde,vk)=>{d();function Az(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}s(Az,"isObject");vk.exports=Az});var l1=I((Qde,wk)=>{d();var _z=Qc(),Rz=u1(),Fz="[object AsyncFunction]",Iz="[object Function]",Nz="[object GeneratorFunction]",Mz="[object Proxy]";function Lz(e){if(!Rz(e))return!1;var t=_z(e);return t==Iz||t==Nz||t==Fz||t==Mz}s(Lz,"isFunction");wk.exports=Lz});var Ek=I((nme,Dk)=>{d();var Pz=wr(),Oz=Pz["__core-js_shared__"];Dk.exports=Oz});var Sk=I((ame,Tk)=>{d();var d1=Ek(),xk=function(){var e=/[^.]+$/.exec(d1&&d1.keys&&d1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Bz(e){return!!xk&&xk in e}s(Bz,"isMasked");Tk.exports=Bz});var m1=I((sme,kk)=>{d();var Uz=Function.prototype,jz=Uz.toString;function qz(e){if(e!=null){try{return jz.call(e)}catch{}try{return e+""}catch{}}return""}s(qz,"toSource");kk.exports=qz});var Ak=I((lme,Ck)=>{d();var zz=l1(),Hz=Sk(),Gz=u1(),Vz=m1(),Wz=/[\\^$.*+?()[\]{}|]/g,$z=/^\[object .+?Constructor\]$/,Yz=Function.prototype,Kz=Object.prototype,Xz=Yz.toString,Jz=Kz.hasOwnProperty,Zz=RegExp("^"+Xz.call(Jz).replace(Wz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qz(e){if(!Gz(e)||Hz(e))return!1;var t=zz(e)?Zz:$z;return t.test(Vz(e))}s(Qz,"baseIsNative");Ck.exports=Qz});var Rk=I((pme,_k)=>{d();function eH(e,t){return e?.[t]}s(eH,"getValue");_k.exports=eH});var _o=I((gme,Fk)=>{d();var tH=Ak(),nH=Rk();function rH(e,t){var n=nH(e,t);return tH(n)?n:void 0}s(rH,"getNative");Fk.exports=rH});var zm=I((vme,Ik)=>{d();var aH=_o(),oH=wr(),iH=aH(oH,"Map");Ik.exports=iH});var eu=I((Dme,Nk)=>{d();var sH=_o(),cH=sH(Object,"create");Nk.exports=cH});var Pk=I((xme,Lk)=>{d();var Mk=eu();function uH(){this.__data__=Mk?Mk(null):{},this.size=0}s(uH,"hashClear");Lk.exports=uH});var Bk=I((kme,Ok)=>{d();function lH(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}s(lH,"hashDelete");Ok.exports=lH});var jk=I((_me,Uk)=>{d();var dH=eu(),mH="__lodash_hash_undefined__",pH=Object.prototype,fH=pH.hasOwnProperty;function hH(e){var t=this.__data__;if(dH){var n=t[e];return n===mH?void 0:n}return fH.call(t,e)?t[e]:void 0}s(hH,"hashGet");Uk.exports=hH});var zk=I((Ime,qk)=>{d();var gH=eu(),yH=Object.prototype,bH=yH.hasOwnProperty;function vH(e){var t=this.__data__;return gH?t[e]!==void 0:bH.call(t,e)}s(vH,"hashHas");qk.exports=vH});var Gk=I((Lme,Hk)=>{d();var wH=eu(),DH="__lodash_hash_undefined__";function EH(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=wH&&t===void 0?DH:t,this}s(EH,"hashSet");Hk.exports=EH});var Wk=I((Bme,Vk)=>{d();var xH=Pk(),TH=Bk(),SH=jk(),kH=zk(),CH=Gk();function Pi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{d();var $k=Wk(),AH=Jc(),_H=zm();function RH(){this.size=0,this.__data__={hash:new $k,map:new(_H||AH),string:new $k}}s(RH,"mapCacheClear");Yk.exports=RH});var Jk=I((Gme,Xk)=>{d();function FH(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}s(FH,"isKeyable");Xk.exports=FH});var tu=I(($me,Zk)=>{d();var IH=Jk();function NH(e,t){var n=e.__data__;return IH(t)?n[typeof t=="string"?"string":"hash"]:n.map}s(NH,"getMapData");Zk.exports=NH});var eC=I((Xme,Qk)=>{d();var MH=tu();function LH(e){var t=MH(this,e).delete(e);return this.size-=t?1:0,t}s(LH,"mapCacheDelete");Qk.exports=LH});var nC=I((Qme,tC)=>{d();var PH=tu();function OH(e){return PH(this,e).get(e)}s(OH,"mapCacheGet");tC.exports=OH});var aC=I((npe,rC)=>{d();var BH=tu();function UH(e){return BH(this,e).has(e)}s(UH,"mapCacheHas");rC.exports=UH});var iC=I((ope,oC)=>{d();var jH=tu();function qH(e,t){var n=jH(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}s(qH,"mapCacheSet");oC.exports=qH});var p1=I((cpe,sC)=>{d();var zH=Kk(),HH=eC(),GH=nC(),VH=aC(),WH=iC();function Oi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t{d();var $H=Jc(),YH=zm(),KH=p1(),XH=200;function JH(e,t){var n=this.__data__;if(n instanceof $H){var r=n.__data__;if(!YH||r.length{d();var ZH=Jc(),QH=ek(),eG=nk(),tG=ak(),nG=ik(),rG=uC();function Bi(e){var t=this.__data__=new ZH(e);this.size=t.size}s(Bi,"Stack");Bi.prototype.clear=QH;Bi.prototype.delete=eG;Bi.prototype.get=tG;Bi.prototype.has=nG;Bi.prototype.set=rG;lC.exports=Bi});var pC=I((ype,mC)=>{d();var aG="__lodash_hash_undefined__";function oG(e){return this.__data__.set(e,aG),this}s(oG,"setCacheAdd");mC.exports=oG});var hC=I((wpe,fC)=>{d();function iG(e){return this.__data__.has(e)}s(iG,"setCacheHas");fC.exports=iG});var yC=I((xpe,gC)=>{d();var sG=p1(),cG=pC(),uG=hC();function Hm(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new sG;++t{d();function lG(e,t){for(var n=-1,r=e==null?0:e.length;++n{d();function dG(e,t){return e.has(t)}s(dG,"cacheHas");wC.exports=dG});var f1=I((Ipe,EC)=>{d();var mG=yC(),pG=vC(),fG=DC(),hG=1,gG=2;function yG(e,t,n,r,a,o){var i=n&hG,c=e.length,u=t.length;if(c!=u&&!(i&&u>c))return!1;var l=o.get(e),m=o.get(t);if(l&&m)return l==t&&m==e;var p=-1,h=!0,f=n&gG?new mG:void 0;for(o.set(e,t),o.set(t,e);++p{d();var bG=wr(),vG=bG.Uint8Array;xC.exports=vG});var kC=I((Ope,SC)=>{d();function wG(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}s(wG,"mapToArray");SC.exports=wG});var AC=I((jpe,CC)=>{d();function DG(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}s(DG,"setToArray");CC.exports=DG});var NC=I((Hpe,IC)=>{d();var _C=qm(),RC=TC(),EG=s1(),xG=f1(),TG=kC(),SG=AC(),kG=1,CG=2,AG="[object Boolean]",_G="[object Date]",RG="[object Error]",FG="[object Map]",IG="[object Number]",NG="[object RegExp]",MG="[object Set]",LG="[object String]",PG="[object Symbol]",OG="[object ArrayBuffer]",BG="[object DataView]",FC=_C?_C.prototype:void 0,h1=FC?FC.valueOf:void 0;function UG(e,t,n,r,a,o,i){switch(n){case BG:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case OG:return!(e.byteLength!=t.byteLength||!o(new RC(e),new RC(t)));case AG:case _G:case IG:return EG(+e,+t);case RG:return e.name==t.name&&e.message==t.message;case NG:case LG:return e==t+"";case FG:var c=TG;case MG:var u=r&kG;if(c||(c=SG),e.size!=t.size&&!u)return!1;var l=i.get(e);if(l)return l==t;r|=CG,i.set(e,t);var m=xG(c(e),c(t),r,a,o,i);return i.delete(e),m;case PG:if(h1)return h1.call(e)==h1.call(t)}return!1}s(UG,"equalByTag");IC.exports=UG});var LC=I((Wpe,MC)=>{d();function jG(e,t){for(var n=-1,r=t.length,a=e.length;++n{d();var qG=Array.isArray;PC.exports=qG});var BC=I((Jpe,OC)=>{d();var zG=LC(),HG=Gm();function GG(e,t,n){var r=t(e);return HG(e)?r:zG(r,n(e))}s(GG,"baseGetAllKeys");OC.exports=GG});var jC=I((efe,UC)=>{d();function VG(e,t){for(var n=-1,r=e==null?0:e.length,a=0,o=[];++n{d();function WG(){return[]}s(WG,"stubArray");qC.exports=WG});var VC=I((ife,GC)=>{d();var $G=jC(),YG=zC(),KG=Object.prototype,XG=KG.propertyIsEnumerable,HC=Object.getOwnPropertySymbols,JG=HC?function(e){return e==null?[]:(e=Object(e),$G(HC(e),function(t){return XG.call(e,t)}))}:YG;GC.exports=JG});var $C=I((cfe,WC)=>{d();function ZG(e,t){for(var n=-1,r=Array(e);++n{d();function QG(e){return e!=null&&typeof e=="object"}s(QG,"isObjectLike");YC.exports=QG});var XC=I((ffe,KC)=>{d();var eV=Qc(),tV=nu(),nV="[object Arguments]";function rV(e){return tV(e)&&eV(e)==nV}s(rV,"baseIsArguments");KC.exports=rV});var eA=I((yfe,QC)=>{d();var JC=XC(),aV=nu(),ZC=Object.prototype,oV=ZC.hasOwnProperty,iV=ZC.propertyIsEnumerable,sV=JC(function(){return arguments}())?JC:function(e){return aV(e)&&oV.call(e,"callee")&&!iV.call(e,"callee")};QC.exports=sV});var nA=I((vfe,tA)=>{d();function cV(){return!1}s(cV,"stubFalse");tA.exports=cV});var g1=I((ru,Ui)=>{d();var uV=wr(),lV=nA(),oA=typeof ru=="object"&&ru&&!ru.nodeType&&ru,rA=oA&&typeof Ui=="object"&&Ui&&!Ui.nodeType&&Ui,dV=rA&&rA.exports===oA,aA=dV?uV.Buffer:void 0,mV=aA?aA.isBuffer:void 0,pV=mV||lV;Ui.exports=pV});var sA=I((xfe,iA)=>{d();var fV=9007199254740991,hV=/^(?:0|[1-9]\d*)$/;function gV(e,t){var n=typeof e;return t=t??fV,!!t&&(n=="number"||n!="symbol"&&hV.test(e))&&e>-1&&e%1==0&&e{d();var yV=9007199254740991;function bV(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=yV}s(bV,"isLength");cA.exports=bV});var lA=I((_fe,uA)=>{d();var vV=Qc(),wV=y1(),DV=nu(),EV="[object Arguments]",xV="[object Array]",TV="[object Boolean]",SV="[object Date]",kV="[object Error]",CV="[object Function]",AV="[object Map]",_V="[object Number]",RV="[object Object]",FV="[object RegExp]",IV="[object Set]",NV="[object String]",MV="[object WeakMap]",LV="[object ArrayBuffer]",PV="[object DataView]",OV="[object Float32Array]",BV="[object Float64Array]",UV="[object Int8Array]",jV="[object Int16Array]",qV="[object Int32Array]",zV="[object Uint8Array]",HV="[object Uint8ClampedArray]",GV="[object Uint16Array]",VV="[object Uint32Array]",bt={};bt[OV]=bt[BV]=bt[UV]=bt[jV]=bt[qV]=bt[zV]=bt[HV]=bt[GV]=bt[VV]=!0;bt[EV]=bt[xV]=bt[LV]=bt[TV]=bt[PV]=bt[SV]=bt[kV]=bt[CV]=bt[AV]=bt[_V]=bt[RV]=bt[FV]=bt[IV]=bt[NV]=bt[MV]=!1;function WV(e){return DV(e)&&wV(e.length)&&!!bt[vV(e)]}s(WV,"baseIsTypedArray");uA.exports=WV});var mA=I((Ife,dA)=>{d();function $V(e){return function(t){return e(t)}}s($V,"baseUnary");dA.exports=$V});var fA=I((au,ji)=>{d();var YV=c1(),pA=typeof au=="object"&&au&&!au.nodeType&&au,ou=pA&&typeof ji=="object"&&ji&&!ji.nodeType&&ji,KV=ou&&ou.exports===pA,b1=KV&&YV.process,XV=function(){try{var e=ou&&ou.require&&ou.require("util").types;return e||b1&&b1.binding&&b1.binding("util")}catch{}}();ji.exports=XV});var v1=I((Pfe,yA)=>{d();var JV=lA(),ZV=mA(),hA=fA(),gA=hA&&hA.isTypedArray,QV=gA?ZV(gA):JV;yA.exports=QV});var vA=I((Bfe,bA)=>{d();var eW=$C(),tW=eA(),nW=Gm(),rW=g1(),aW=sA(),oW=v1(),iW=Object.prototype,sW=iW.hasOwnProperty;function cW(e,t){var n=nW(e),r=!n&&tW(e),a=!n&&!r&&rW(e),o=!n&&!r&&!a&&oW(e),i=n||r||a||o,c=i?eW(e.length,String):[],u=c.length;for(var l in e)(t||sW.call(e,l))&&!(i&&(l=="length"||a&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||aW(l,u)))&&c.push(l);return c}s(cW,"arrayLikeKeys");bA.exports=cW});var DA=I((qfe,wA)=>{d();var uW=Object.prototype;function lW(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||uW;return e===n}s(lW,"isPrototype");wA.exports=lW});var xA=I((Gfe,EA)=>{d();function dW(e,t){return function(n){return e(t(n))}}s(dW,"overArg");EA.exports=dW});var SA=I(($fe,TA)=>{d();var mW=xA(),pW=mW(Object.keys,Object);TA.exports=pW});var CA=I((Kfe,kA)=>{d();var fW=DA(),hW=SA(),gW=Object.prototype,yW=gW.hasOwnProperty;function bW(e){if(!fW(e))return hW(e);var t=[];for(var n in Object(e))yW.call(e,n)&&n!="constructor"&&t.push(n);return t}s(bW,"baseKeys");kA.exports=bW});var _A=I((Zfe,AA)=>{d();var vW=l1(),wW=y1();function DW(e){return e!=null&&wW(e.length)&&!vW(e)}s(DW,"isArrayLike");AA.exports=DW});var FA=I((the,RA)=>{d();var EW=vA(),xW=CA(),TW=_A();function SW(e){return TW(e)?EW(e):xW(e)}s(SW,"keys");RA.exports=SW});var NA=I((ahe,IA)=>{d();var kW=BC(),CW=VC(),AW=FA();function _W(e){return kW(e,AW,CW)}s(_W,"getAllKeys");IA.exports=_W});var PA=I((she,LA)=>{d();var MA=NA(),RW=1,FW=Object.prototype,IW=FW.hasOwnProperty;function NW(e,t,n,r,a,o){var i=n&RW,c=MA(e),u=c.length,l=MA(t),m=l.length;if(u!=m&&!i)return!1;for(var p=u;p--;){var h=c[p];if(!(i?h in t:IW.call(t,h)))return!1}var f=o.get(e),y=o.get(t);if(f&&y)return f==t&&y==e;var v=!0;o.set(e,t),o.set(t,e);for(var D=i;++p{d();var MW=_o(),LW=wr(),PW=MW(LW,"DataView");OA.exports=PW});var jA=I((mhe,UA)=>{d();var OW=_o(),BW=wr(),UW=OW(BW,"Promise");UA.exports=UW});var zA=I((fhe,qA)=>{d();var jW=_o(),qW=wr(),zW=jW(qW,"Set");qA.exports=zW});var GA=I((ghe,HA)=>{d();var HW=_o(),GW=wr(),VW=HW(GW,"WeakMap");HA.exports=VW});var ZA=I((bhe,JA)=>{d();var w1=BA(),D1=zm(),E1=jA(),x1=zA(),T1=GA(),XA=Qc(),qi=m1(),VA="[object Map]",WW="[object Object]",WA="[object Promise]",$A="[object Set]",YA="[object WeakMap]",KA="[object DataView]",$W=qi(w1),YW=qi(D1),KW=qi(E1),XW=qi(x1),JW=qi(T1),Ro=XA;(w1&&Ro(new w1(new ArrayBuffer(1)))!=KA||D1&&Ro(new D1)!=VA||E1&&Ro(E1.resolve())!=WA||x1&&Ro(new x1)!=$A||T1&&Ro(new T1)!=YA)&&(Ro=s(function(e){var t=XA(e),n=t==WW?e.constructor:void 0,r=n?qi(n):"";if(r)switch(r){case $W:return KA;case YW:return VA;case KW:return WA;case XW:return $A;case JW:return YA}return t},"getTag"));JA.exports=Ro});var i_=I((Dhe,o_)=>{d();var S1=dC(),ZW=f1(),QW=NC(),e$=PA(),QA=ZA(),e_=Gm(),t_=g1(),t$=v1(),n$=1,n_="[object Arguments]",r_="[object Array]",Vm="[object Object]",r$=Object.prototype,a_=r$.hasOwnProperty;function a$(e,t,n,r,a,o){var i=e_(e),c=e_(t),u=i?r_:QA(e),l=c?r_:QA(t);u=u==n_?Vm:u,l=l==n_?Vm:l;var m=u==Vm,p=l==Vm,h=u==l;if(h&&t_(e)){if(!t_(t))return!1;i=!0,m=!1}if(h&&!m)return o||(o=new S1),i||t$(e)?ZW(e,t,n,r,a,o):QW(e,t,u,n,r,a,o);if(!(n&n$)){var f=m&&a_.call(e,"__wrapped__"),y=p&&a_.call(t,"__wrapped__");if(f||y){var v=f?e.value():e,D=y?t.value():t;return o||(o=new S1),a(v,D,n,r,o)}}return h?(o||(o=new S1),e$(e,t,n,r,a,o)):!1}s(a$,"baseIsEqualDeep");o_.exports=a$});var l_=I((The,u_)=>{d();var o$=i_(),s_=nu();function c_(e,t,n,r,a){return e===t?!0:e==null||t==null||!s_(e)&&!s_(t)?e!==e&&t!==t:o$(e,t,n,r,c_,a)}s(c_,"baseIsEqual");u_.exports=c_});var iu=I((Che,d_)=>{d();var i$=l_();function s$(e,t){return i$(e,t)}s(s$,"isEqual");d_.exports=s$});var m_,p_=b(()=>{"use strict";d();Ta();m_=!!rn.env.CI||rn.env.NODE_ENV==="test"});function d$(e){let t=Math.sign(e);e=Math.abs(e);let n=.254829592,r=-.284496736,a=1.421413741,o=-1.453152027,i=1.061405429,u=1/(1+.3275911*e),l=u*(n+u*(r+u*(a+u*(o+u*i))));return t*(1-l*Math.exp(-e*e))}function f_({median:e,p10:t},n){if(e<=0)throw new Error("median must be greater than zero");if(t<=0)throw new Error("p10 must be greater than zero");if(t>=e)throw new Error("p10 must be less than the median");if(n<=0)return 1;let r=.9061938024368232,a=Math.max(Number.MIN_VALUE,n/e),o=Math.log(a),i=Math.max(Number.MIN_VALUE,t/e),c=-Math.log(i),u=o*r/c,l=(1-d$(u))/2,m;return n<=t?m=Math.max(.9,Math.min(1,l)):n<=e?m=Math.max(u$,Math.min(c$,l)):m=Math.max(0,Math.min(l$,l)),m}function h_(e,t,n,r,a){let o=(r-t)/(n-e);return t+(a-e)*o}var c$,u$,l$,k1=b(()=>{"use strict";d();c$=.8999999999999999,u$=.5,l$=.49999999999999994;s(d$,"erf");s(f_,"getLogNormalScore");s(h_,"linearInterpolation")});var Zr,p$,g_,f$,h$,Me,Fn=b(()=>{"use strict";d();k1();Zr="…",p$=" ",g_=.9,f$={PASS:{label:"pass",minScore:g_},AVERAGE:{label:"average",minScore:.5},FAIL:{label:"fail"},ERROR:{label:"error"}},h$=["com","co","gov","edu","ac","org","go","gob","or","net","in","ne","nic","gouv","web","spb","blog","jus","kiev","mil","wi","qc","ca","bel","on"],Me=class e{static{s(this,"Util")}static get RATINGS(){return f$}static get PASS_THRESHOLD(){return g_}static get MS_DISPLAY_VALUE(){return`%10d${p$}ms`}static getFinalDisplayedUrl(t){if(t.finalDisplayedUrl)return t.finalDisplayedUrl;if(t.finalUrl)return t.finalUrl;throw new Error("Could not determine final displayed URL")}static getMainDocumentUrl(t){return t.mainDocumentUrl||t.finalUrl}static getFullPageScreenshot(t){return t.fullPageScreenshot?t.fullPageScreenshot:t.audits["full-page-screenshot"]?.details}static getEntityFromUrl(t,n){return n&&n.find(a=>a.origins.find(o=>t.startsWith(o)))||e.getPseudoRootDomain(t)}static splitMarkdownCodeSpans(t){let n=[],r=t.split(/`(.*?)`/g);for(let a=0;al.length);r&&u.length>r&&(i=Zr+u.slice(-1*r).join("/")),o&&(i=`${t.host}/${i.replace(/^\//,"")}`),a&&(i=`${i}${t.search}`)}let c=64;if(t.protocol!=="data:"&&(i=i.slice(0,200),i=i.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g,`$1${Zr}`),i=i.replace(/([a-zA-Z0-9-_]{9})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9-_]{10,}/g,`$1${Zr}`),i=i.replace(/(\d{3})\d{6,}/g,`$1${Zr}`),i=i.replace(/\u2026+/g,Zr),i.length>c&&i.includes("?")&&(i=i.replace(/\?([^=]*)(=)?.*/,`?$1$2${Zr}`),i.length>c&&(i=i.replace(/\?.*/,`?${Zr}`)))),i.length>c){let u=i.lastIndexOf(".");u>=0?i=i.slice(0,c-1-(i.length-u))+`${Zr}${i.slice(u)}`:i=i.slice(0,c-1)+Zr}return i}static getChromeExtensionOrigin(t){let n=new URL(t);return n.protocol+"//"+n.host}static parseURL(t){let n=new URL(t);return{file:e.getURLDisplayName(n),hostname:n.hostname,origin:n.protocol==="chrome-extension:"?e.getChromeExtensionOrigin(t):n.origin}}static createOrReturnURL(t){return t instanceof URL?t:new URL(t)}static getPseudoTld(t){let n=t.split(".").slice(-2);return h$.includes(n[0])?`.${n.join(".")}`:`.${n[n.length-1]}`}static getPseudoRootDomain(t){let n=e.createOrReturnURL(t).hostname,a=e.getPseudoTld(n).split(".");return n.split(".").slice(-a.length).join(".")}static filterRelevantLines(t,n,r){if(n.length===0)return t.slice(0,r*2+1);let a=3,o=new Set;return n=n.sort((i,c)=>(i.lineNumber||0)-(c.lineNumber||0)),n.forEach(({lineNumber:i})=>{let c=i-r,u=i+r;for(;c<1;)c++,u++;o.has(c-a-1)&&(c-=a);for(let l=c;l<=u;l++){let m=l;o.add(m)}}),t.filter(i=>o.has(i.lineNumber))}static computeLogNormalScore(t,n){let r=f_(t,n);return r>.9&&(r+=.05*(r-.9)),Math.floor(r*100)/100}}});var g$,y$,g,V=b(()=>{"use strict";d();jt();p_();Fn();g$="defaultPass",y$=s(e=>Math.round(e*100)/100,"clampTo2Decimals"),g=class e{static{s(this,"Audit")}static get DEFAULT_PASS(){return g$}static get SCORING_MODES(){return{NUMERIC:"numeric",METRIC_SAVINGS:"metricSavings",BINARY:"binary",MANUAL:"manual",INFORMATIVE:"informative",NOT_APPLICABLE:"notApplicable",ERROR:"error"}}static get meta(){throw new Error("Audit meta information must be overridden.")}static get defaultOptions(){return{}}static audit(t,n){throw new Error("audit() method must be overridden")}static computeLogNormalScore(t,n){return Me.computeLogNormalScore(t,n)}static assertHeadingKeysExist(t,n){if(n.length&&m_)for(let r of t){if(r.key===null)continue;let a=r.key;if(!n.some(o=>a in o))throw new Error(`"${r.key}" is missing from items`)}}static makeTableDetails(t,n,r={}){let{wastedBytes:a,wastedMs:o,sortedBy:i,skipSumming:c,isEntityGrouped:u}=r,l=a||o?{wastedBytes:a,wastedMs:o}:void 0;return n.length===0?{type:"table",headings:[],items:[],summary:l}:(e.assertHeadingKeysExist(t,n),{type:"table",headings:t,items:n,summary:l,sortedBy:i,skipSumming:c,isEntityGrouped:u})}static makeListDetails(t){return{type:"list",items:t}}static makeSnippetDetails({content:t,title:n,lineMessages:r,generalMessages:a,node:o,maxLineLength:i=200,maxLinesAroundMessage:c=20}){let u=e._makeSnippetLinesArray(t,i);return{type:"snippet",lines:Me.filterRelevantLines(u,r,c),title:n,lineMessages:r,generalMessages:a,lineCount:u.length,node:o}}static _makeSnippetLinesArray(t,n){return t.split(` +`).map((r,a)=>{let o=a+1,i={content:Me.truncate(r,n),lineNumber:o};return r.length>n&&(i.truncated=!0),i})}static makeOpportunityDetails(t,n,r){e.assertHeadingKeysExist(t,n);let{overallSavingsMs:a,overallSavingsBytes:o,sortedBy:i,skipSumming:c,isEntityGrouped:u}=r;return{type:"opportunity",headings:n.length===0?[]:t,items:n,overallSavingsMs:a,overallSavingsBytes:o,sortedBy:i,skipSumming:c,isEntityGrouped:u}}static makeNodeItem(t){return{type:"node",lhId:t.lhId,path:t.devtoolsNodePath,selector:t.selector,boundingRect:t.boundingRect,snippet:t.snippet,nodeLabel:t.nodeLabel}}static _findOriginalLocation(t,n,r){let a=t?.map.findEntry(n,r);if(a)return{file:a.sourceURL||"",line:a.sourceLineNumber||0,column:a.sourceColumnNumber||0}}static makeSourceLocation(t,n,r,a){return{type:"source-location",url:t,urlProvider:"network",line:n,column:r,original:a&&this._findOriginalLocation(a,n,r)}}static makeSourceLocationFromConsoleMessage(t,n){if(!t.url)return;let r=t.lineNumber||0,a=t.columnNumber||0;return this.makeSourceLocation(t.url,r,a,n)}static _normalizeAuditScore(t,n,r){if(n!==e.SCORING_MODES.BINARY&&n!==e.SCORING_MODES.NUMERIC&&n!==e.SCORING_MODES.METRIC_SAVINGS)return null;if(t===null||!Number.isFinite(t))throw new Error(`Invalid score for ${r}: ${t}`);if(t>1)throw new Error(`Audit score for ${r} is > 1`);if(t<0)throw new Error(`Audit score for ${r} is < 0`);return t=y$(t),t}static generateErrorAuditResult(t,n,r){return e.generateAuditResult(t,{score:null,errorMessage:n,errorStack:r})}static generateAuditResult(t,n){if(n.score===void 0)throw new Error("generateAuditResult requires a score");let r=t.meta.scoreDisplayMode||e.SCORING_MODES.BINARY,a=n.score;n.errorMessage!==void 0?r=e.SCORING_MODES.ERROR:n.notApplicable?r=e.SCORING_MODES.NOT_APPLICABLE:n.scoreDisplayMode&&(r=n.scoreDisplayMode),r===e.SCORING_MODES.METRIC_SAVINGS&&(a&&a>=Me.PASS_THRESHOLD?a=1:Object.values(n.metricSavings||{}).some(c=>c)?a=0:a=.5),a=e._normalizeAuditScore(a,r,t.meta.id);let o=t.meta.title;t.meta.failureTitle&&a!==null&&a{"use strict";d();V();b$=s(e=>Math.round(e*100)/100,"clampTo2Decimals"),Wm=class e{static{s(this,"ReportScoring")}static arithmeticMean(t){if(t=t.filter(r=>r.weight>0),t.some(r=>r.score===null))return null;let n=t.reduce((r,a)=>{let o=a.score,i=a.weight;return{weight:r.weight+i,sum:r.sum+o*i}},{weight:0,sum:0});return b$(n.sum/n.weight||0)}static scoreAllCategories(t,n){let r={};for(let[a,o]of Object.entries(t)){let i=o.auditRefs.map(l=>{let m={...l},p=n[m.id];return(p.scoreDisplayMode===g.SCORING_MODES.NOT_APPLICABLE||p.scoreDisplayMode===g.SCORING_MODES.INFORMATIVE||p.scoreDisplayMode===g.SCORING_MODES.MANUAL)&&(m.weight=0),m}),c=i.map(l=>({score:n[l.id].score,weight:l.weight})),u=e.arithmeticMean(c);r[a]={...o,auditRefs:i,id:a,score:u}}return r}}});function su(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");C1(e,t);function n(){this.constructor=e}s(n,"__"),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function b_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a{d();C1=s(function(e,t){return C1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},C1(e,t)},"extendStatics");s(su,"__extends");rr=s(function(){return rr=Object.assign||s(function(t){for(var n,r=1,a=arguments.length;r{d();zi=s(function(){return zi=Object.assign||s(function(t){for(var n,r=1,a=arguments.length;r{d();(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Ue||(Ue={}))});function F1(e){return e.type===vt.literal}function v_(e){return e.type===vt.argument}function Ym(e){return e.type===vt.number}function Km(e){return e.type===vt.date}function Xm(e){return e.type===vt.time}function Jm(e){return e.type===vt.select}function Zm(e){return e.type===vt.plural}function w_(e){return e.type===vt.pound}function Qm(e){return e.type===vt.tag}function ep(e){return!!(e&&typeof e=="object"&&e.type===Fo.number)}function cu(e){return!!(e&&typeof e=="object"&&e.type===Fo.dateTime)}var vt,Fo,tp=b(()=>{d();(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(vt||(vt={}));(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Fo||(Fo={}));s(F1,"isLiteralElement");s(v_,"isArgumentElement");s(Ym,"isNumberElement");s(Km,"isDateElement");s(Xm,"isTimeElement");s(Jm,"isSelectElement");s(Zm,"isPluralElement");s(w_,"isPoundElement");s(Qm,"isTagElement");s(ep,"isNumberSkeleton");s(cu,"isDateTimeSkeleton")});var I1,D_=b(()=>{d();I1=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/});function E_(e){var t={};return e.replace(v$,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"short":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var v$,x_=b(()=>{d();v$=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;s(E_,"parseDateTimeSkeleton")});var At,T_=b(()=>{d();At=s(function(){return At=Object.assign||s(function(t){for(var n,r=1,a=arguments.length;r{d();S_=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i});function R_(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(S_).filter(function(h){return h.length>0}),n=[],r=0,a=t;r1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(D$,function(u,l,m,p,h,f){if(l)t.minimumIntegerDigits=m.length;else{if(p&&h)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(I_.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(C_.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(C_,function(u,l,m,p,h,f){return m==="*"?t.minimumFractionDigits=l.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:h&&f?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+f.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=a.options[0];o==="w"?t=At(At({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=At(At({},t),A_(o)));continue}if(F_.test(a.stem)){t=At(At({},t),A_(a.stem));continue}var i=N_(a.stem);i&&(t=At(At({},t),i));var c=E$(a.stem);c&&(t=At(At({},t),c))}return t}var C_,F_,D$,I_,L_=b(()=>{d();T_();k_();s(R_,"parseNumberSkeletonFromString");s(w$,"icuUnitToEcma");C_=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,F_=/^(@+)?(\+|#+)?[rs]?$/g,D$=/(\*)(0+)|(#+)(0+)|(0+)/g,I_=/^(0+)$/;s(A_,"parseSignificantPrecision");s(N_,"parseSign");s(E$,"parseConciseScientificAndEngineeringStem");s(__,"parseNotationOptions");s(M_,"parseNumberSkeleton")});var P_=b(()=>{d();x_();L_()});var uu,O_=b(()=>{d();uu={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]}});function B_(e,t){for(var n="",r=0;r>1),u="a",l=x$(t);for((l=="H"||l=="k")&&(c=0);c-- >0;)n+=u;for(;i-- >0;)n=l+n}else a==="J"?n+="H":n+=a}return n}function x$(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var a=uu[r||""]||uu[n||""]||uu["".concat(n,"-001")]||uu["001"];return a[0]}var U_=b(()=>{d();O_();s(B_,"getBestPattern");s(x$,"getDefaultHourSymbolFromLocale")});function Ve(e,t){return{start:e,end:t}}function G_(e,t){return new RegExp(e,t)}function B1(e){return e>=97&&e<=122||e>=65&&e<=90}function P$(e){return B1(e)||e===47}function O$(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function W_(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function B$(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}var N1,T$,S$,k$,C$,A$,_$,R$,F$,I$,N$,L1,j_,q_,P1,z_,H_,M$,L$,O1,M1,V_,$_=b(()=>{d();_1();R1();tp();D_();P_();U_();T$=new RegExp("^".concat(I1.source,"*")),S$=new RegExp("".concat(I1.source,"*$"));s(Ve,"createLocation");k$=!!String.prototype.startsWith&&"_a".startsWith("a",1),C$=!!String.fromCodePoint,A$=!!Object.fromEntries,_$=!!String.prototype.codePointAt,R$=!!String.prototype.trimStart,F$=!!String.prototype.trimEnd,I$=!!Number.isSafeInteger,N$=I$?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},L1=!0;try{j_=G_("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),L1=((N1=j_.exec("a"))===null||N1===void 0?void 0:N1[0])==="a"}catch{L1=!1}q_=s(k$?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},"startsWith"),P1=C$?String.fromCodePoint:s(function(){for(var t=[],n=0;no;){if(i=t[o++],i>1114111)throw RangeError(i+" is not a valid code point");r+=i<65536?String.fromCharCode(i):String.fromCharCode(((i-=65536)>>10)+55296,i%1024+56320)}return r},"fromCodePoint"),z_=A$?Object.fromEntries:s(function(t){for(var n={},r=0,a=t;r=r)){var a=t.charCodeAt(n),o;return a<55296||a>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?a:(a-55296<<10)+(o-56320)+65536}},"codePointAt"),M$=s(R$?function(t){return t.trimStart()}:function(t){return t.replace(T$,"")},"trimStart"),L$=s(F$?function(t){return t.trimEnd()}:function(t){return t.replace(S$,"")},"trimEnd");s(G_,"RE");L1?(M1=G_("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),O1=s(function(t,n){var r;M1.lastIndex=n;var a=M1.exec(t);return(r=a[1])!==null&&r!==void 0?r:""},"matchIdentifierAtIndex")):O1=s(function(t,n){for(var r=[];;){var a=H_(t,n);if(a===void 0||W_(a)||B$(a))break;r.push(a),n+=a>=65536?2:1}return P1.apply(void 0,r)},"matchIdentifierAtIndex");V_=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return s(e,"Parser"),e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var a=[];!this.isEOF();){var o=this.char();if(o===123){var i=this.parseArgument(t,r);if(i.err)return i;a.push(i.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var c=this.clonePosition();this.bump(),a.push({type:vt.pound,location:Ve(c,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Ue.UNMATCHED_CLOSING_TAG,Ve(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&B1(this.peek()||0)){var i=this.parseTag(t,n);if(i.err)return i;a.push(i.val)}else{var i=this.parseLiteral(t,n);if(i.err)return i;a.push(i.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:vt.literal,value:"<".concat(a,"/>"),location:Ve(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var i=o.val,c=this.clonePosition();if(this.bumpIf("")?{val:{type:vt.tag,value:a,children:i,location:Ve(r,this.clonePosition())},err:null}:this.error(Ue.INVALID_TAG,Ve(c,this.clonePosition())))}else return this.error(Ue.UNCLOSED_TAG,Ve(r,this.clonePosition()))}else return this.error(Ue.INVALID_TAG,Ve(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&O$(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),a="";;){var o=this.tryParseQuote(n);if(o){a+=o;continue}var i=this.tryParseUnquoted(t,n);if(i){a+=i;continue}var c=this.tryParseLeftAngleBracket();if(c){a+=c;continue}break}var u=Ve(r,this.clonePosition());return{val:{type:vt.literal,value:a,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!P$(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return P1.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),P1(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ue.EMPTY_ARGUMENT,Ve(r,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(Ue.MALFORMED_ARGUMENT,Ve(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:vt.argument,value:a,location:Ve(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(r,this.clonePosition())):this.parseArgumentOptions(t,n,a,r);default:return this.error(Ue.MALFORMED_ARGUMENT,Ve(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=O1(this.message,n),a=n+r.length;this.bumpTo(a);var o=this.clonePosition(),i=Ve(t,o);return{value:r,location:i}},e.prototype.parseArgumentOptions=function(t,n,r,a){var o,i=this.clonePosition(),c=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(c){case"":return this.error(Ue.EXPECT_ARGUMENT_TYPE,Ve(i,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var m=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var h=L$(p.val);if(h.length===0)return this.error(Ue.EXPECT_ARGUMENT_STYLE,Ve(this.clonePosition(),this.clonePosition()));var f=Ve(m,this.clonePosition());l={style:h,styleLocation:f}}var y=this.tryParseArgumentClose(a);if(y.err)return y;var v=Ve(a,this.clonePosition());if(l&&q_(l?.style,"::",0)){var D=M$(l.style.slice(2));if(c==="number"){var p=this.parseNumberSkeletonFromString(D,l.styleLocation);return p.err?p:{val:{type:vt.number,value:r,location:v,style:p.val},err:null}}else{if(D.length===0)return this.error(Ue.EXPECT_DATE_TIME_SKELETON,v);var E=D;this.locale&&(E=B_(D,this.locale));var h={type:Fo.dateTime,pattern:E,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?E_(E):{}},S=c==="date"?vt.date:vt.time;return{val:{type:S,value:r,location:v,style:h},err:null}}}return{val:{type:c==="number"?vt.number:c==="date"?vt.date:vt.time,value:r,location:v,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var k=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ue.EXPECT_SELECT_ARGUMENT_OPTIONS,Ve(k,zi({},k)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),R=0;if(c!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(Ue.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ve(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(Ue.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ue.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),C=this.parseIdentifierIfPossible(),R=p.val}var z=this.tryParsePluralOrSelectOptions(t,c,n,C);if(z.err)return z;var y=this.tryParseArgumentClose(a);if(y.err)return y;var B=Ve(a,this.clonePosition());return c==="select"?{val:{type:vt.select,value:r,options:z_(z.val),location:B},err:null}:{val:{type:vt.plural,value:r,options:z_(z.val),offset:R,pluralType:c==="plural"?"cardinal":"ordinal",location:B},err:null}}default:return this.error(Ue.INVALID_ARGUMENT_TYPE,Ve(i,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,Ve(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ue.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ve(a,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=R_(t)}catch{return this.error(Ue.INVALID_NUMBER_SKELETON,n)}return{val:{type:Fo.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?M_(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,a){for(var o,i=!1,c=[],u=new Set,l=a.value,m=a.location;;){if(l.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ue.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;m=Ve(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?Ue.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ue.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,m);l==="other"&&(i=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Ue.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ve(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,n,r);if(y.err)return y;var v=this.tryParseArgumentClose(f);if(v.err)return v;c.push([l,{value:y.val,location:Ve(f,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,m=o.location}return c.length===0?this.error(n==="select"?Ue.EXPECT_SELECT_ARGUMENT_SELECTOR:Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ve(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(Ue.MISSING_OTHER_CLAUSE,Ve(this.clonePosition(),this.clonePosition())):{val:c,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,i=0;!this.isEOF();){var c=this.char();if(c>=48&&c<=57)o=!0,i=i*10+(c-48),this.bump();else break}var u=Ve(a,this.clonePosition());return o?(i*=r,N$(i)?{val:i,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=H_(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(q_(this.message,t,this.offset())){for(var n=0;n=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&W_(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();s(B1,"_isAlpha");s(P$,"_isAlphaOrSlash");s(O$,"_isPotentialElementNameChar");s(W_,"_isWhiteSpace");s(B$,"_isPatternSyntax")});function U1(e){e.forEach(function(t){if(delete t.location,Jm(t)||Zm(t))for(var n in t.options)delete t.options[n].location,U1(t.options[n].value);else Ym(t)&&ep(t.style)||(Km(t)||Xm(t))&&cu(t.style)?delete t.style.location:Qm(t)&&U1(t.children)})}function Y_(e,t){t===void 0&&(t={}),t=zi({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new V_(e,t).parse();if(n.err){var r=SyntaxError(Ue[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||U1(n.val),n.val}var j1=b(()=>{d();_1();R1();$_();tp();tp();s(U1,"pruneLocation");s(Y_,"parse")});function np(e,t){var n=t&&t.cache?t.cache:G$,r=t&&t.serializer?t.serializer:H$,a=t&&t.strategy?t.strategy:j$;return a(e,{cache:n,serializer:r})}function U$(e){return e==null||typeof e=="number"||typeof e=="boolean"}function K_(e,t,n,r){var a=U$(r)?r:n(r),o=t.get(a);return typeof o>"u"&&(o=e.call(this,r),t.set(a,o)),o}function X_(e,t,n){var r=Array.prototype.slice.call(arguments,3),a=n(r),o=t.get(a);return typeof o>"u"&&(o=e.apply(this,r),t.set(a,o)),o}function q1(e,t,n,r,a){return n.bind(t,e,r,a)}function j$(e,t){var n=e.length===1?K_:X_;return q1(e,this,n,t.cache.create(),t.serializer)}function q$(e,t){return q1(e,this,X_,t.cache.create(),t.serializer)}function z$(e,t){return q1(e,this,K_,t.cache.create(),t.serializer)}function z1(){this.cache=Object.create(null)}var H$,G$,rp,J_=b(()=>{d();s(np,"memoize");s(U$,"isPrimitive");s(K_,"monadic");s(X_,"variadic");s(q1,"assemble");s(j$,"strategyDefault");s(q$,"strategyVariadic");s(z$,"strategyMonadic");H$=s(function(){return JSON.stringify(arguments)},"serializerDefault");s(z1,"ObjectWithoutPrototypeCache");z1.prototype.get=function(e){return this.cache[e]};z1.prototype.set=function(e,t){this.cache[e]=t};G$={create:s(function(){return new z1},"create")},rp={variadic:q$,monadic:z$}});var Io,lu,H1,Z_,Q_,G1=b(()=>{d();A1();(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Io||(Io={}));lu=function(e){su(t,e);function t(n,r,a){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=a,o}return s(t,"FormatError"),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),H1=function(e){su(t,e);function t(n,r,a,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(a).join('", "'),'"'),Io.INVALID_VALUE,o)||this}return s(t,"InvalidValueError"),t}(lu),Z_=function(e){su(t,e);function t(n,r,a){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Io.INVALID_VALUE,a)||this}return s(t,"InvalidValueTypeError"),t}(lu),Q_=function(e){su(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Io.MISSING_VALUE,r)||this}return s(t,"MissingValueError"),t}(lu)});function V$(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==an.literal||n.type!==an.literal?t.push(n):r.value+=n.value,t},[])}function W$(e){return typeof e=="function"}function du(e,t,n,r,a,o,i){if(e.length===1&&F1(e[0]))return[{type:an.literal,value:e[0].value}];for(var c=[],u=0,l=e;u{d();Ih();Ph();(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(an||(an={}));s(t$,"mergeLiteral");s(n$,"isFormatXMLElementFn");s(su,"formatToParts")});function r$(t,e){return e?tr(tr(tr({},t||{}),e||{}),Object.keys(t).reduce(function(n,r){return n[r]=tr(tr({},t[r]),e[r]||{}),n},{})):t}function a$(t,e){return e?Object.keys(t).reduce(function(n,r){return n[r]=r$(t[r],e[r]),n},tr({},t)):t}function Bh(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function o$(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Qm(function(){for(var e,n=[],r=0;r{d();wh();Ih();CR();Oh();s(r$,"mergeConfig");s(a$,"mergeConfigs");s(Bh,"createFastMemoizeCache");s(o$,"createDefaultFormatters");RR=function(){function t(e,n,r,a){n===void 0&&(n=t.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var m=o.formatToParts(l);if(m.length===1)return m[0].value;var p=m.reduce(function(f,h){return!f.length||h.type!==an.literal||typeof f[f.length-1]!="string"?f.push(h.value):f[f.length-1]+=h.value,f},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(l){return su(o.ast,o.locales,o.formatters,o.formats,l,void 0,o.message)},this.resolvedOptions=function(){var l;return{locale:((l=o.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var i=a||{},c=i.formatters,u=$_(i,["formatters"]);this.ast=t.__parse(e,tr(tr({},u),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=a$(t.formats,r),this.formatters=a&&a.formatters||o$(this.formatterCache)}return s(t,"IntlMessageFormat"),Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(e);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=TR,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}()});var jh,FR=b(()=>{d();Uh();Oh();Uh();Ph();jh=RR});var No,zi=b(()=>{d();No=s(()=>({resolve(){throw new Error("createRequire.resolve is not supported in bundled Lighthouse")}}),"createRequire")});var i$,s$,Mo,cu=b(()=>{d();i$=globalThis.URL,s$=s(t=>t,"fileURLToPath"),Mo={URL:i$,fileURLToPath:s$}});function kR(t){return Mo.fileURLToPath(t.url)}var Lo=b(()=>{"use strict";d();zi();cu();Aa();s(kR,"getModulePath")});function qh(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function IR(t){return typeof t=="object"&&t!==null}var NR=b(()=>{"use strict";d();s(qh,"isObjectOfUnknownValues");s(IR,"isObjectOrArrayOfUnknownValues")});var MR,LR=b(()=>{d();MR={}});function OR(t,e=new Map){for(let n of t)if(!(n.type===tp.literal||n.type===tp.pound)&&(e.set(n.value,n),n.type===tp.plural))for(let r of Object.values(n.options))OR(r.value,e);return e}function l$(t,e={},n){let r=OR(t.getAst()),a={};for(let[o,i]of r){if(!(o in e))throw new Error(`ICU Message "${n}" contains a value reference ("${o}") that wasn't provided`);let c=e[o];if(i.type!==tp.number){a[o]=c;continue}if(typeof c!="number")throw new Error(`ICU Message "${n}" contains a numeric reference ("${o}") but provided value was not a number`);i.style==="milliseconds"?a[o]=Math.round(c/10)*10:i.style==="seconds"&&o==="timeInMs"?a[o]=Math.round(c/100)/10:i.style==="bytes"?a[o]=c/1024:a[o]=c}for(let o of Object.keys(e))if(!(o in a)){if(o==="errorCode"){a.errorCode=e.errorCode;continue}throw new Error(`Provided value "${o}" does not match any placeholder in ICU message "${n}"`)}return a}function d$(t){return t.replace(/'/g,"''").replace(/\\{/g,"'{").replace(/\\}/g,"'}")}function Hh(t,e,n){t=d$(t);let r=n==="en-XA"||n==="en-XL"?"de-DE":n,a=jh.IntlMessageFormat||jh,o=new a(t,r,u$,{ignoreTag:!0}),i=l$(o,e,t),c=o.format(i);if(typeof c!="string")throw new Error("unexpected formatted result");return c}function m$(t,e){let r=UR(e)[t.i18nId];return r?Hh(r.message,t.values,e):t.formattedDefault}function BR(t){let e=UR(t),n=Object.keys(e).filter(a=>a.startsWith("report/renderer/report-utils.js")),r={};for(let a of n){let{filename:o,key:i}=f$(a);if(!o.endsWith("report-utils.js"))throw new Error(`Unexpected message: ${a}`);r[i]=e[a].message}return r}function Gi(t){if(!qh(t))return!1;let{i18nId:e,values:n,formattedDefault:r}=t;if(typeof e!="string"||typeof r!="string")return!1;if(n!==void 0){if(!qh(n))return!1;for(let a of Object.values(n))if(typeof a!="string"&&typeof a!="number")return!1}return PR.test(e)}function Po(t,e){if(Gi(t))return m$(t,e);if(typeof t=="string")return t;throw new Error("Attempted to format invalid icuMessage type")}function p$(t){let e="";for(let n of t)if(/^[a-z]+$/i.test(n))e.length&&(e+="."),e+=n;else{if(/]|"|'|\s/.test(n))throw new Error(`Cannot handle "${n}" in i18n`);e+=`[${n}]`}return e}function Gh(t,e){function n(a,o,i=[]){if(IR(a))for(let[c,u]of Object.entries(a)){let l=i.concat([c]);if(Gi(u)){let m=Po(u,e),p=o[u.i18nId]||[],f=p$(l);p.push(u.values?{values:u.values,path:f}:f),a[c]=m,o[u.i18nId]=p}else n(u,o,l)}}s(n,"replaceInObject");let r={};return n(t,r),r}function UR(t){let e=zh[t];if(!e){if(t===Hi)return{};throw new Error(`Unsupported locale '${t}'`)}return e}function jR(){return c$}function qR(){return[...new Set([...Object.keys(zh),Hi])].sort()}function zR(t,e){zh[t]=e}function f$(t){if(!PR.test(t))throw Error(`"${t}" does not appear to be a valid ICU message id`);let[e,n]=t.split(" | ");return{filename:e,key:n}}var tp,zh,Hi,c$,PR,u$,Jr=b(()=>{"use strict";d();Kr();FR();Lo();NR();LR();tp={literal:0,argument:1,number:2,date:3,time:4,select:5,plural:6,pound:7,tag:8},zh=MR,Hi="en-US",c$=["ar-XB.json","ar.json","bg.json","ca.json","cs.json","da.json","de.json","el.json","en-GB.json","en-US.ctc.json","en-US.json","en-XA.json","en-XL.ctc.json","en-XL.json","es-419.json","es.json","fi.json","fil.json","fr.json","he.json","hi.json","hr.json","hu.json","id.json","it.json","ja.json","ko.json","lt.json","lv.json","nl.json","no.json","pl.json","pt-PT.json","pt.json","ro.json","ru.json","sk.json","sl.json","sr-Latn.json","sr.json","sv.json","ta.json","te.json","th.json","tr.json","uk.json","vi.json","zh-HK.json","zh-TW.json","zh.json"].filter(t=>t.endsWith(".json")&&!t.endsWith(".ctc.json")).map(t=>t.replace(".json","")).sort(),PR=/ | [^\s]+$/,u$={number:{bytes:{maximumFractionDigits:0},milliseconds:{maximumFractionDigits:0},seconds:{minimumFractionDigits:1,maximumFractionDigits:1},extendedPercent:{maximumFractionDigits:2,style:"percent"}}};s(OR,"collectAllCustomElementsFromICU");s(l$,"_preformatValues");s(d$,"escapeIcuMessage");s(Hh,"formatMessage");s(m$,"_localizeIcuMessage");s(BR,"getRendererFormattedStrings");s(Gi,"isIcuMessage");s(Po,"getFormatted");s(p$,"_formatPathAsString");s(Gh,"replaceIcuMessages");s(UR,"_getLocaleMessages");s(jR,"getCanonicalLocales");s(qR,"getAvailableLocales");s(zR,"registerLocaleData");s(f$,"getIcuMessageIdParts")});var GR=I(($he,HR)=>{d();var h$='data:image/svg+xml,',g$={"modern-image-formats":"Consider displaying all [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) components in WebP formats while specifying an appropriate fallback for other browsers. [Learn more](https://amp.dev/documentation/components/amp-img/#example:-specifying-a-fallback-image).","offscreen-images":"Ensure that you are using [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) for images to automatically lazy-load. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/media_iframes_3p/?format=websites#images).","render-blocking-resources":"Use tools such as [AMP Optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer) to [server-side render AMP layouts](https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/server-side-rendering/).","unminified-css":"Refer to the [AMP documentation](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/) to ensure all styles are supported.","efficient-animated-content":"For animated content, use [`amp-anim`](https://amp.dev/documentation/components/amp-anim/) to minimize CPU usage when the content is offscreen.","uses-responsive-images":"The [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) component supports the [`srcset`](https://web.dev/use-srcset-to-automatically-choose-the-right-image/) attribute to specify which image assets to use based on the screen size. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/art_direction/)."};HR.exports={id:"amp",title:"AMP",icon:h$,UIStrings:g$}});var WR=I((Khe,VR)=>{d();var y$='data:image/svg+xml,',b$={"total-byte-weight":"Apply [route-level code splitting](https://web.dev/route-level-code-splitting-in-angular/) to minimize the size of your JavaScript bundles. Also, consider precaching assets with the [Angular service worker](https://web.dev/precaching-with-the-angular-service-worker/).","unminified-warning":"If you are using Angular CLI, ensure that builds are generated in production mode. [Learn more](https://angular.io/guide/deployment#enable-runtime-production-mode).","unused-javascript":"If you are using Angular CLI, include source maps in your production build to inspect your bundles. [Learn more](https://angular.io/guide/deployment#inspect-the-bundles).","uses-responsive-images":"Consider using the `BreakpointObserver` utility in the Component Dev Kit (CDK) to manage image breakpoints. [Learn more](https://material.angular.io/cdk/layout/overview).","uses-rel-preload":"Preload routes ahead of time to speed up navigation. [Learn more](https://web.dev/route-preloading-in-angular/).","dom-size":"Consider virtual scrolling with the Component Dev Kit (CDK) if very large lists are being rendered. [Learn more](https://web.dev/virtualize-lists-with-angular-cdk/)."};VR.exports={id:"angular",title:"Angular",icon:y$,UIStrings:b$}});var YR=I((Jhe,$R)=>{d();var v$='data:image/svg+xml,',w$={"unused-css-rules":"Consider removing unused CSS rules and only attach the needed Drupal libraries to the relevant page or component in a page. See the [Drupal documentation link](https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module#library) for details. To identify attached libraries that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the stylesheet when CSS aggregation is disabled in your Drupal site. Look out for themes/modules that have many stylesheets in the list which have a lot of red in code coverage. A theme/module should only enqueue a stylesheet if it is actually used on the page.","unused-javascript":"Consider removing unused JavaScript assets and only attach the needed Drupal libraries to the relevant page or component in a page. See the [Drupal documentation link](https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module#library) for details. To identify attached libraries that are adding extraneous JavaScript, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the script when JavaScript aggregation is disabled in your Drupal site. Look out for themes/modules that have many scripts in the list which have a lot of red in code coverage. A theme/module should only enqueue a script if it is actually used on the page.","modern-image-formats":"Consider configuring [WebP image formats with a Convert image style](https://www.drupal.org/docs/core-modules-and-themes/core-modules/image-module/working-with-images#styles) on your site.","offscreen-images":"Install [a Drupal module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A67&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=%22lazy+load%22&solrsort=iss_project_release_usage+desc&op=Search) that can lazy load images. Such modules provide the ability to defer any offscreen images to improve performance.","total-byte-weight":"Consider using [Responsive Image Styles](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) to reduce the size of images loaded on your page. If you are using Views to show multiple content items on a page, consider implementing pagination to limit the number of content items shown on a given page.","render-blocking-resources":"Consider using a module to inline critical CSS and JavaScript, and use the defer attribute for non-critical CSS or JavaScript.","unminified-css":'Ensure you have enabled "Aggregate CSS files" in the "Administration » Configuration » Development" page. Ensure your Drupal site is running at least Drupal 10.1 for improved asset aggregation support.',"unminified-javascript":'Ensure you have enabled "Aggregate JavaScript files" in the "Administration » Configuration » Development" page. Ensure your Drupal site is running at least Drupal 10.1 for improved asset aggregation support.',"efficient-animated-content":"Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.","uses-long-cache-ttl":'Set the "Browser and proxy cache maximum age" in the "Administration » Configuration » Development" page. Read about [Drupal cache and optimizing for performance](https://www.drupal.org/docs/7/managing-site-performance-and-scalability/caching-to-improve-performance/caching-overview#s-drupal-performance-resources).',"uses-optimized-images":"Consider using [a module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A123&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=optimize+images&solrsort=iss_project_release_usage+desc&op=Search) that automatically optimizes and reduces the size of images uploaded through the site while retaining quality. Also, ensure you are using the native [Responsive Image Styles](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) provided from Drupal (available in Drupal 8 and above) for all images rendered on the site.","uses-responsive-images":"Ensure that you are using the native [Responsive Image Styles](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) provided from Drupal (available in Drupal 8 and above). Use the Responsive Image Styles when rendering image fields through view modes, views, or images uploaded through the WYSIWYG editor.","server-response-time":"Themes, modules, and server specifications all contribute to server response time. Consider finding a more optimized theme, carefully selecting an optimization module, and/or upgrading your server. Your hosting servers should make use of PHP opcode caching, memory-caching to reduce database query times such as Redis or Memcached, as well as optimized application logic to prepare pages faster.","uses-rel-preconnect":"Preconnect or dns-prefetch resource hints can be added by installing and configuring [a module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=dns-prefetch&solrsort=iss_project_release_usage+desc&op=Search) that provides facilities for user agent resource hints.","font-display":"Specify `@font-display` when defining custom fonts in your theme."};$R.exports={id:"drupal",title:"Drupal",icon:v$,UIStrings:w$}});var XR=I((Qhe,KR)=>{d();var D$='data:image/svg+xml,',E$={"unused-css-rules":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Remove Unused CSS` to help with this issue. It will identify the CSS classes that are actually used on each page of your site, and remove any others to keep the file size small.","modern-image-formats":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Next-Gen Formats` to convert images to WebP.","offscreen-images":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Lazy Load Images` to defer loading off-screen images until they are needed.","render-blocking-resources":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Critical CSS` and `Script Delay` to defer non-critical JS/CSS.","unminified-css":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Minify CSS` to automatically minify your CSS to reduce network payload sizes.","unminified-javascript":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Minify Javascript` to automatically minify your JS to reduce network payload sizes.","uses-long-cache-ttl":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Efficient Static Cache Policy` to set recommended values in the caching header for static assests.","uses-optimized-images":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Next-Gen Formats` to convert images to WebP.","uses-responsive-images":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Resize Images` to resize images to a device appropriate size, reducing network payload sizes.","server-response-time":"Use [Ezoic Cloud Caching](https://pubdash.ezoic.com/speed/caching) to cache your content across our world wide network, improving time to first byte.","uses-rel-preconnect":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Pre-Connect Origins` to automatically add `preconnect` resource hints to establish early connections to important third-party origins.","uses-rel-preload":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Preload Fonts` and `Preload Background Images` to add `preload` links to prioritize fetching resources that are currently requested later in page load.","font-display":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Optimize Fonts` to automatically leverage the `font-display` CSS feature to ensure text is user-visible while webfonts are loading."};KR.exports={id:"ezoic",title:"Ezoic",icon:D$,UIStrings:E$}});var ZR=I((tge,JR)=>{d();var T$='data:image/svg+xml,',S$={"unused-css-rules":"Use the `PurgeCSS` `Gatsby` plugin to remove unused rules from stylesheets. [Learn more](https://purgecss.com/plugins/gatsby.html).","modern-image-formats":"Use the `gatsby-plugin-image` component instead of `` to automatically optimize image format. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).","offscreen-images":"Use the `gatsby-plugin-image` component instead of `` to automatically lazy-load images. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).","render-blocking-resources":"Use the `Gatsby Script API` to defer loading of non-critical third-party scripts. [Learn more](https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-script/).","unused-javascript":"Use `Webpack Bundle Analyzer` to detect unused JavaScript code. [Learn more](https://www.gatsbyjs.com/plugins/gatsby-plugin-webpack-bundle-analyser-v2/)","uses-long-cache-ttl":"Configure caching for immutable assets. [Learn more](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/caching/).","uses-optimized-images":"Use the `gatsby-plugin-image` component instead of `` to adjust image quality. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).","uses-responsive-images":"Use the `gatsby-plugin-image` component to set appropriate `sizes`. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).","prioritize-lcp-image":"Use the `gatsby-plugin-image` component and set the `loading` prop to `eager`. [Learn more](https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image#shared-props)."};JR.exports={id:"gatsby",title:"Gatsby",icon:T$,UIStrings:S$}});var eF=I((rge,QR)=>{"use strict";d();var x$='data:image/svg+xml,',C$={"unused-css-rules":"Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused CSS in your page. To identify extensions that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.","modern-image-formats":"Consider using a [plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=webp) or service that will automatically convert your uploaded images to the optimal formats.","offscreen-images":"Install a [lazy-load Joomla plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=lazy%20loading) that provides the ability to defer any offscreen images, or switch to a template that provides that functionality. Starting with Joomla 4.0, all new images will [automatically](https://github.com/joomla/joomla-cms/pull/30748) get the `loading` attribute from the core.","total-byte-weight":"Consider showing excerpts in your article categories (e.g. via the read more link), reducing the number of articles shown on a given page, breaking your long posts into multiple pages, or using a plugin to lazy-load comments.","render-blocking-resources":"There are a number of Joomla plugins that can help you [inline critical assets](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) or [defer less important resources](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance). Beware that optimizations provided by these plugins may break features of your templates or plugins, so you will need to test these thoroughly.","unminified-css":"A number of [Joomla extensions](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) can speed up your site by concatenating, minifying, and compressing your css styles. There are also templates that provide this functionality.","unminified-javascript":"A number of [Joomla extensions](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) can speed up your site by concatenating, minifying, and compressing your scripts. There are also templates that provide this functionality.","efficient-animated-content":"Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.","unused-javascript":"Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused JavaScript in your page. To identify plugins that are adding extraneous JS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the extension responsible from the URL of the script. Look out for extensions that have many scripts in the list which have a lot of red in code coverage. An extension should only enqueue a script if it is actually used on the page.","uses-long-cache-ttl":"Read about [Browser Caching in Joomla](https://docs.joomla.org/Cache).","uses-optimized-images":"Consider using an [image optimization plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) that compresses your images while retaining quality.","uses-text-compression":"You can enable text compression by enabling Gzip Page Compression in Joomla (System > Global configuration > Server).","uses-responsive-images":"Consider using a [responsive images plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=responsive%20images) to use responsive images in your content.","server-response-time":"Templates, extensions, and server specifications all contribute to server response time. Consider finding a more optimized template, carefully selecting an optimization extension, and/or upgrading your server."};QR.exports={id:"joomla",title:"Joomla",icon:x$,UIStrings:C$}});var nF=I((oge,tF)=>{d();var A$='data:image/svg+xml,',_$={"modern-image-formats":"Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=webp) for a variety of third-party extensions to leverage newer image formats.","offscreen-images":"Consider modifying your product and catalog templates to make use of the web platform's [lazy loading](https://web.dev/native-lazy-loading) feature.","disable-bundling":"Disable Magento's built-in [JavaScript bundling and minification](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html), and consider using [baler](https://github.com/magento/baler/) instead.","unminified-css":`Enable the "Minify CSS Files" option in your store's Developer settings. [Learn more](https://devdocs.magento.com/guides/v2.3/performance-best-practices/configuration.html?itm_source=devdocs&itm_medium=search_page&itm_campaign=federated_search&itm_term=minify%20css%20files).`,"unminified-javascript":"Use [Terser](https://www.npmjs.com/package/terser) to minify all JavaScript assets from static content deployment, and disable the built-in minification feature.","unused-javascript":"Disable Magento's built-in [JavaScript bundling](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html).","uses-optimized-images":"Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=optimize%20image) for a variety of third party extensions to optimize images.","server-response-time":"Use Magento's [Varnish integration](https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html).","uses-rel-preconnect":"Preconnect or dns-prefetch resource hints can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).","uses-rel-preload":"`` tags can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).","critical-request-chains":"If you are not bundling your JavaScript assets, consider using [baler](https://github.com/magento/baler).","font-display":"Specify `@font-display` when [defining custom fonts](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/using-fonts.html)."};tF.exports={id:"magento",title:"Magento",icon:A$,UIStrings:_$}});var aF=I((sge,rF)=>{d();var R$='data:image/svg+xml,',F$={"unused-css-rules":"Consider setting up `PurgeCSS` in `Next.js` configuration to remove unused rules from stylesheets. [Learn more](https://purgecss.com/guides/next.html).","modern-image-formats":"Use the `next/image` component instead of `` to automatically optimize image format. [Learn more](https://nextjs.org/docs/basic-features/image-optimization).","offscreen-images":"Use the `next/image` component instead of `` to automatically lazy-load images. [Learn more](https://nextjs.org/docs/basic-features/image-optimization).","render-blocking-resources":"Use the `next/script` component to defer loading of non-critical third-party scripts. [Learn more](https://nextjs.org/docs/basic-features/script).","unused-javascript":"Use `Webpack Bundle Analyzer` to detect unused JavaScript code. [Learn more](https://github.com/vercel/next.js/tree/canary/packages/next-bundle-analyzer)","uses-long-cache-ttl":"Configure caching for immutable assets and `Server-side Rendered` (SSR) pages. [Learn more](https://nextjs.org/docs/going-to-production#caching).","uses-optimized-images":"Use the `next/image` component instead of `` to adjust image quality. [Learn more](https://nextjs.org/docs/basic-features/image-optimization).","uses-text-compression":"Enable compression on your Next.js server. [Learn more](https://nextjs.org/docs/api-reference/next.config.js/compression).","uses-responsive-images":"Use the `next/image` component to set the appropriate `sizes`. [Learn more](https://nextjs.org/docs/api-reference/next/image#sizes).","user-timings":"Consider using `Next.js Analytics` to measure your app's real-world performance. [Learn more](https://nextjs.org/docs/advanced-features/measuring-performance).","prioritize-lcp-image":'Use the `next/image` component and set "priority" to true to preload LCP image. [Learn more](https://nextjs.org/docs/api-reference/next/image#priority).',"unsized-images":"Use the `next/image` component to make sure images are always sized appropriately. [Learn more](https://nextjs.org/docs/api-reference/next/image#width)."};rF.exports={id:"next.js",title:"Next.js",icon:R$,UIStrings:F$}});var iF=I((uge,oF)=>{d();var k$='data:image/svg+xml,',I$={"unused-css-rules":"Enable [`Reduce Unused CSS`](https://support.nitropack.io/hc/en-us/articles/360020418457-Reduce-Unused-CSS) to remove CSS rules that are not applicable to this page.","modern-image-formats":"Use [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/16547237162513) to automatically convert your images to WebP.","offscreen-images":"Defer offscreen images by enabling [`Automatic Image Lazy Loading`](https://support.nitropack.io/hc/en-us/articles/12457493524369-NitroPack-Lazy-Loading-Feature-for-Images).","render-blocking-resources":"Enable [`Remove render-blocking resources`](https://support.nitropack.io/hc/en-us/articles/13820893500049-How-to-Deal-with-Render-Blocking-Resources-in-NitroPack) in NitroPack for faster initial load times.","unminified-css":"Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your CSS, HTML, and JavaScript files for faster load times.","unminified-javascript":"Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your JS, HTML, and CSS files for faster load times.","unused-javascript":"Configure [`Delayed Scripts`](https://support.nitropack.io/hc/en-us/articles/1500002600942-Delayed-Scripts) in NitroPack to delay loading of scripts until they are needed.","uses-long-cache-ttl":"Go to the [`Improve Server Response Time`](https://support.nitropack.io/hc/en-us/articles/1500002321821-Improve-Server-Response-Time) feature in the `Caching` menu and adjust your page cache expiration time to improve loading times and user experience.","uses-optimized-images":"Automatically compress, optimize, and convert your images into WebP by enabling the [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/14177271695121-How-to-serve-images-in-next-gen-formats-using-NitroPack) setting.","uses-text-compression":"Use [`Gzip compression`](https://support.nitropack.io/hc/en-us/articles/13229297479313-Enabling-GZIP-compression) in NitroPack to reduce the size of the files that are sent to the browser.","uses-responsive-images":"Enable [`Adaptive Image Sizing`](https://support.nitropack.io/hc/en-us/articles/10123833029905-How-to-Enable-Adaptive-Image-Sizing-For-Your-Site) to preemptively optimize your images and make them match the dimensions of the containers they’re displayed in across all devices.","server-response-time":"Improve server response time and optimize perceived performance by activating [`Instant Load`](https://support.nitropack.io/hc/en-us/articles/16547340617361).","dom-size":"Contact your account manager to enable [`HTML Lazy Load`](https://support.nitropack.io/hc/en-us/articles/17144942904337). Configuring it will prioritize and optimize your page rendering performance.","font-display":"Use the [`Override Font Rendering Behavior`](https://support.nitropack.io/hc/en-us/articles/16547358865041) option in NitroPack to set a desired value for the CSS font-display rule."};oF.exports={id:"nitropack",title:"NitroPack",icon:k$,UIStrings:I$}});var cF=I((dge,sF)=>{d();var N$='data:image/svg+xml,',M$={"modern-image-formats":'Use the `nuxt/image` component and set `format="webp"`. [Learn more](https://image.nuxt.com/usage/nuxt-img#format).',"offscreen-images":'Use the `nuxt/image` component and set `loading="lazy"` for offscreen images. [Learn more](https://image.nuxt.com/usage/nuxt-img#loading).',"uses-optimized-images":"Use the `nuxt/image` component and set the appropriate `quality`. [Learn more](https://image.nuxt.com/usage/nuxt-img#quality).","uses-responsive-images":"Use the `nuxt/image` component and set the appropriate `sizes`. [Learn more](https://image.nuxt.com/usage/nuxt-img#sizes).","prioritize-lcp-image":"Use the `nuxt/image` component and specify `preload` for LCP image. [Learn more](https://image.nuxt.com/usage/nuxt-img#preload).","unsized-images":"Use the `nuxt/image` component and specify explicit `width` and `height`. [Learn more](https://image.nuxt.com/usage/nuxt-img#width-height)."};sF.exports={id:"nuxt",title:"Nuxt",icon:N$,UIStrings:M$}});var lF=I((pge,uF)=>{d();var L$='data:image/svg+xml,',P$={"unused-css-rules":"Consider reviewing the [plugins](https://octobercms.com/plugins) loading unused CSS on the website. To identify plugins that add unnecessary CSS, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the stylesheet URL. Look for plugins with many stylesheets with lots of red in code coverage. A plugin should only add a stylesheet if it is actually used on the web page.","modern-image-formats":"Consider using a [plugin](https://octobercms.com/plugins?search=image) or service that will automatically convert the uploaded images to the optimal formats. [WebP lossless images](https://developers.google.com/speed/webp) are 26% smaller in size compared to PNGs and 25-34% smaller than comparable JPEG images at the equivalent SSIM quality index. Another next-gen image format to consider is [AVIF](https://jakearchibald.com/2020/avif-has-landed/).","offscreen-images":"Consider installing an [image lazy loading plugin](https://octobercms.com/plugins?search=lazy) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://octobercms.com/plugins?search=Accelerated+Mobile+Pages).","total-byte-weight":"Consider showing excerpts in the post lists (e.g. using a `show more` button), reducing the number of posts shown on a given web page, breaking long posts into multiple web pages, or using a plugin to lazy-load comments.","render-blocking-resources":"There are many plugins that help [inline critical assets](https://octobercms.com/plugins?search=css). These plugins may break other plugins, so you should test thoroughly.","unminified-css":"There are many [plugins](https://octobercms.com/plugins?search=css) that can speed up a website by concatenating, minifying and compressing the styles. Using a build process to do this minification up-front can speed up development.","unminified-javascript":"There are many [plugins](https://octobercms.com/plugins?search=javascript) that can speed up a website by concatenating, minifying and compressing the scripts. Using a build process to do this minification up-front can speed up development.","efficient-animated-content":"[Replace animated GIFs with video](https://web.dev/replace-gifs-with-videos/) for faster web page loads and consider using modern file formats such as [WebM](https://web.dev/replace-gifs-with-videos/#create-webm-videos) or [AV1](https://developers.google.com/web/updates/2018/09/chrome-70-media-updates#av1-decoder) to improve compression efficiency by greater than 30% over the current state-of-the-art video codec, VP9.","unused-javascript":"Consider reviewing the [plugins](https://octobercms.com/plugins?search=javascript) that load unused JavaScript in the web page. To identify plugins that add unnecessary JavaScript, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the URL of the script. Look for plugins with many scripts with lots of red in code coverage. A plugin should only add a script if it is actually used on the web page.","uses-long-cache-ttl":"Read about [preventing unnecessary network requests with the HTTP Cache](https://web.dev/http-cache/#caching-checklist). There are many [plugins](https://octobercms.com/plugins?search=Caching) that can be used to speed up caching.","uses-optimized-images":"Consider using an [image optimization plugin](https://octobercms.com/plugins?search=image) to compresses images while retaining the quality.","uses-text-compression":"Enable text compression in the web server configuration.","uses-responsive-images":"Upload images directly in the media manager to ensure the required image sizes are available. Consider using the [resize filter](https://octobercms.com/docs/markup/filter-resize) or an [image resizing plugin](https://octobercms.com/plugins?search=image) to ensure the optimal image sizes are used.","server-response-time":"Themes, plugins and server specifications all contribute to the server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin and/or upgrade the server. October CMS also allows developers to use [`Queues`](https://octobercms.com/docs/services/queues) to defer the processing of a time consuming task, such as sending an e-mail. This drastically speeds up web requests."};uF.exports={id:"octobercms",title:"October CMS",icon:L$,UIStrings:P$}});var mF=I((hge,dF)=>{d();var O$='data:image/svg+xml,',B$={"unminified-css":"If your build system minifies CSS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).","unminified-javascript":"If your build system minifies JS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).","unused-javascript":"If you are not server-side rendering, [split your JavaScript bundles](https://web.dev/code-splitting-suspense/) with `React.lazy()`. Otherwise, code-split using a third-party library such as [loadable-components](https://www.smooth-code.com/open-source/loadable-components/docs/getting-started/).","server-response-time":"If you are server-side rendering any React components, consider using `renderToPipeableStream()` or `renderToStaticNodeStream()` to allow the client to receive and hydrate different parts of the markup instead of all at once. [Learn more](https://reactjs.org/docs/react-dom-server.html#renderToPipeableStream).",redirects:"If you are using React Router, minimize usage of the `` component for [route navigations](https://reacttraining.com/react-router/web/api/Redirect).","user-timings":"Use the React DevTools Profiler, which makes use of the Profiler API, to measure the rendering performance of your components. [Learn more.](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html)","dom-size":'Consider using a "windowing" library like `react-window` to minimize the number of DOM nodes created if you are rendering many repeated elements on the page. [Learn more](https://web.dev/virtualize-long-lists-react-window/). Also, minimize unnecessary re-renders using [`shouldComponentUpdate`](https://reactjs.org/docs/optimizing-performance.html#shouldcomponentupdate-in-action), [`PureComponent`](https://reactjs.org/docs/react-api.html#reactpurecomponent), or [`React.memo`](https://reactjs.org/docs/react-api.html#reactmemo) and [skip effects](https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects) only until certain dependencies have changed if you are using the `Effect` hook to improve runtime performance.'};dF.exports={id:"react",title:"React",icon:O$,UIStrings:B$}});var fF=I((yge,pF)=>{d();var U$='data:image/svg+xml,',j$={"modern-image-formats":"Upload images using `Wix Media Manager` to ensure they are automatically served as WebP. Find [more ways to optimize](https://support.wix.com/en/article/site-performance-optimizing-your-media) your site's media.","render-blocking-resources":"When [adding third-party code](https://support.wix.com/en/article/site-performance-using-third-party-code-on-your-site) in the `Custom Code` tab of your site's dashboard, make sure it's deferred or loaded at the end of the code body. Where possible, use Wix’s [integrations](https://support.wix.com/en/article/about-marketing-integrations) to embed marketing tools on your site. ","efficient-animated-content":"Place videos inside `VideoBoxes`, customize them using `Video Masks` or add `Transparent Videos`. [Learn more](https://support.wix.com/en/article/wix-video-about-wix-video).","unused-javascript":"Review any third-party code you've added to your site in the `Custom Code` tab of your site's dashboard and only keep the services that are necessary to your site. [Find out more](https://support.wix.com/en/article/site-performance-removing-unused-javascript).","server-response-time":"Wix utilizes CDNs and caching to serve responses as fast as possible for most visitors. Consider [manually enabling caching](https://support.wix.com/en/article/site-performance-caching-pages-to-optimize-loading-speed) for your site, especially if using `Velo`."};pF.exports={id:"wix",title:"Wix",icon:U$,UIStrings:j$}});var gF=I((vge,hF)=>{d();var q$='data:image/svg+xml,',z$={"unused-css-rules":"Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused CSS in your page. To identify plugins that are adding extraneous CSS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage/) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.","modern-image-formats":"Consider using the [Performance Lab](https://wordpress.org/plugins/performance-lab/) plugin to automatically convert your uploaded JPEG images into WebP, wherever supported.","offscreen-images":"Install a [lazy-load WordPress plugin](https://wordpress.org/plugins/search/lazy+load/) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://wordpress.org/plugins/amp/).","total-byte-weight":"Consider showing excerpts in your post lists (e.g. via the more tag), reducing the number of posts shown on a given page, breaking your long posts into multiple pages, or using a plugin to lazy-load comments.","render-blocking-resources":"There are a number of WordPress plugins that can help you [inline critical assets](https://wordpress.org/plugins/search/critical+css/) or [defer less important resources](https://wordpress.org/plugins/search/defer+css+javascript/). Beware that optimizations provided by these plugins may break features of your theme or plugins, so you will likely need to make code changes.","unminified-css":"A number of [WordPress plugins](https://wordpress.org/plugins/search/minify+css/) can speed up your site by concatenating, minifying, and compressing your styles. You may also want to use a build process to do this minification up-front if possible.","unminified-javascript":"A number of [WordPress plugins](https://wordpress.org/plugins/search/minify+javascript/) can speed up your site by concatenating, minifying, and compressing your scripts. You may also want to use a build process to do this minification up front if possible.","efficient-animated-content":"Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.","unused-javascript":"Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused JavaScript in your page. To identify plugins that are adding extraneous JS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage/) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the script. Look out for plugins that have many scripts in the list which have a lot of red in code coverage. A plugin should only enqueue a script if it is actually used on the page.","uses-long-cache-ttl":"Read about [Browser Caching in WordPress](https://wordpress.org/support/article/optimization/#browser-caching).","uses-optimized-images":"Consider using an [image optimization WordPress plugin](https://wordpress.org/plugins/search/optimize+images/) that compresses your images while retaining quality.","uses-text-compression":"You can enable text compression in your web server configuration.","uses-responsive-images":"Upload images directly through the [media library](https://wordpress.org/support/article/media-library-screen/) to ensure that the required image sizes are available, and then insert them from the media library or use the image widget to ensure the optimal image sizes are used (including those for the responsive breakpoints). Avoid using `Full Size` images unless the dimensions are adequate for their usage. [Learn More](https://wordpress.org/support/article/inserting-images-into-posts-and-pages/).","server-response-time":"Themes, plugins, and server specifications all contribute to server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin, and/or upgrading your server."};hF.exports={id:"wordpress",title:"WordPress",icon:q$,UIStrings:z$}});var bF=I((Dge,yF)=>{d();var H$='data:image/svg+xml,',G$={"unused-css-rules":"Enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) in 'WP Rocket' to fix this issue. It reduces page size by removing all CSS and stylesheets that are not used while keeping only the used CSS for each page.","modern-image-formats":"Enable 'Imagify' from the Image Optimization tab in 'WP Rocket' to convert your images to WebP.","unused-javascript":"Enable [Delay JavaScript execution](https://docs.wp-rocket.me/article/1349-delay-javascript-execution) in 'WP Rocket' to fix this problem. It will improve the loading of your page by delaying the execution of scripts until user interaction. If your site has iframes, you can use WP Rocket's [LazyLoad for iframes and videos](https://docs.wp-rocket.me/article/1674-lazyload-for-iframes-and-videos) and [Replace YouTube iframe with preview image](https://docs.wp-rocket.me/article/1488-replace-youtube-iframe-with-preview-image) as well.","render-blocking-resources":"Enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) and [Load JavaScript deferred](https://docs.wp-rocket.me/article/1265-load-javascript-deferred) in 'WP Rocket' to address this recommendation. These features will respectively optimize the CSS and JavaScript files so that they don't block the rendering of your page.","unminified-css":"Enable [Minify CSS files](https://docs.wp-rocket.me/article/1350-css-minify-combine) in 'WP Rocket' to fix this issue. Any spaces and comments in your site's CSS files will be removed to make the file size smaller and faster to download.","unminified-javascript":"Enable [Minify JavaScript files](https://docs.wp-rocket.me/article/1351-javascript-minify-combine) in 'WP Rocket' to fix this issue. Empty spaces and comments will be removed from JavaScript files to make their size smaller and faster to download.","uses-optimized-images":"Enable 'Imagify' from the Image Optimization tab in 'WP Rocket' and run Bulk Optimization to compress your images.","uses-rel-preconnect":`Use [Prefetch DNS Requests](https://docs.wp-rocket.me/article/1302-prefetch-dns-requests) in 'WP Rocket' to add "dns-prefetch" and speed up the connection with external domains. Also, 'WP Rocket' automatically adds "preconnect" to [Google Fonts domain](https://docs.wp-rocket.me/article/1312-optimize-google-fonts) and any CNAME(S) added via the [Enable CDN](https://docs.wp-rocket.me/article/42-using-wp-rocket-with-a-cdn) feature.`,"uses-rel-preload":"To fix this issue for fonts, enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) in 'WP Rocket'. Your site's critical fonts will be preloaded with priority.","offscreen-images":"Enable [LazyLoad](https://docs.wp-rocket.me/article/1141-lazyload-for-images) in WP Rocket to fix this recommendation. This feature delays the loading of the images until the visitor scrolls down the page and actually needs to see them."};yF.exports={id:"wp-rocket",title:"WP Rocket",icon:H$,UIStrings:G$}});var wF=I((Tge,vF)=>{d();var V$=[GR(),WR(),YR(),XR(),ZR(),eF(),nF(),aF(),iF(),cF(),lF(),mF(),fF(),gF(),bF()];vF.exports=V$});var EF=I((xge,DF)=>{d();DF.exports=s(function(e,n){if(typeof e=="string"&&n[e])return e;for(var r=[].concat(e||[]),a=0,o=r.length;a{"use strict";d();Kr();Aa();Lo();np=Dt.dirname(""),W$=JSON.parse(`{ +`,Io.MISSING_INTL_API,i);var C=n.getPluralRules(t,{type:m.pluralType}).select(h-(m.offset||0));k=m.options[C]||m.options.other}if(!k)throw new H1(m.value,h,Object.keys(m.options),i);c.push.apply(c,du(k.value,t,n,r,a,h-(m.offset||0)));continue}}return V$(c)}var an,V1=b(()=>{d();j1();G1();(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(an||(an={}));s(V$,"mergeLiteral");s(W$,"isFormatXMLElementFn");s(du,"formatToParts")});function $$(e,t){return t?rr(rr(rr({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=rr(rr({},e[r]),t[r]||{}),n},{})):e}function Y$(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=$$(e[r],t[r]),n},rr({},e)):e}function W1(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function K$(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:np(function(){for(var t,n=[],r=0;r{d();A1();j1();J_();V1();s($$,"mergeConfig");s(Y$,"mergeConfigs");s(W1,"createFastMemoizeCache");s(K$,"createDefaultFormatters");eR=function(){function e(t,n,r,a){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var m=o.formatToParts(l);if(m.length===1)return m[0].value;var p=m.reduce(function(h,f){return!h.length||f.type!==an.literal||typeof h[h.length-1]!="string"?h.push(f.value):h[h.length-1]+=f.value,h},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(l){return du(o.ast,o.locales,o.formatters,o.formats,l,void 0,o.message)},this.resolvedOptions=function(){var l;return{locale:((l=o.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var i=a||{},c=i.formatters,u=b_(i,["formatters"]);this.ast=e.__parse(t,rr(rr({},u),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Y$(e.formats,r),this.formatters=a&&a.formatters||K$(this.formatterCache)}return s(e,"IntlMessageFormat"),Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Y_,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}()});var Y1,tR=b(()=>{d();$1();V1();$1();G1();Y1=eR});var No,Hi=b(()=>{d();No=s(()=>({resolve(){throw new Error("createRequire.resolve is not supported in bundled Lighthouse")}}),"createRequire")});var X$,J$,Mo,mu=b(()=>{d();X$=globalThis.URL,J$=s(e=>e,"fileURLToPath"),Mo={URL:X$,fileURLToPath:J$}});function nR(e){return Mo.fileURLToPath(e.url)}var Lo=b(()=>{"use strict";d();Hi();mu();Aa();s(nR,"getModulePath")});function K1(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function rR(e){return typeof e=="object"&&e!==null}var aR=b(()=>{"use strict";d();s(K1,"isObjectOfUnknownValues");s(rR,"isObjectOrArrayOfUnknownValues")});var oR,iR=b(()=>{d();oR={}});function cR(e,t=new Map){for(let n of e)if(!(n.type===ap.literal||n.type===ap.pound)&&(t.set(n.value,n),n.type===ap.plural))for(let r of Object.values(n.options))cR(r.value,t);return t}function eY(e,t={},n){let r=cR(e.getAst()),a={};for(let[o,i]of r){if(!(o in t))throw new Error(`ICU Message "${n}" contains a value reference ("${o}") that wasn't provided`);let c=t[o];if(i.type!==ap.number){a[o]=c;continue}if(typeof c!="number")throw new Error(`ICU Message "${n}" contains a numeric reference ("${o}") but provided value was not a number`);i.style==="milliseconds"?a[o]=Math.round(c/10)*10:i.style==="seconds"&&o==="timeInMs"?a[o]=Math.round(c/100)/10:i.style==="bytes"?a[o]=c/1024:a[o]=c}for(let o of Object.keys(t))if(!(o in a)){if(o==="errorCode"){a.errorCode=t.errorCode;continue}throw new Error(`Provided value "${o}" does not match any placeholder in ICU message "${n}"`)}return a}function tY(e){return e.replace(/'/g,"''").replace(/\\{/g,"'{").replace(/\\}/g,"'}")}function J1(e,t,n){e=tY(e);let r=n==="en-XA"||n==="en-XL"?"de-DE":n,a=Y1.IntlMessageFormat||Y1,o=new a(e,r,Q$,{ignoreTag:!0}),i=eY(o,t,e),c=o.format(i);if(typeof c!="string")throw new Error("unexpected formatted result");return c}function nY(e,t){let r=lR(t)[e.i18nId];return r?J1(r.message,e.values,t):e.formattedDefault}function uR(e){let t=lR(e),n=Object.keys(t).filter(a=>a.startsWith("report/renderer/report-utils.js")),r={};for(let a of n){let{filename:o,key:i}=aY(a);if(!o.endsWith("report-utils.js"))throw new Error(`Unexpected message: ${a}`);r[i]=t[a].message}return r}function Vi(e){if(!K1(e))return!1;let{i18nId:t,values:n,formattedDefault:r}=e;if(typeof t!="string"||typeof r!="string")return!1;if(n!==void 0){if(!K1(n))return!1;for(let a of Object.values(n))if(typeof a!="string"&&typeof a!="number")return!1}return sR.test(t)}function Po(e,t){if(Vi(e))return nY(e,t);if(typeof e=="string")return e;throw new Error("Attempted to format invalid icuMessage type")}function rY(e){let t="";for(let n of e)if(/^[a-z]+$/i.test(n))t.length&&(t+="."),t+=n;else{if(/]|"|'|\s/.test(n))throw new Error(`Cannot handle "${n}" in i18n`);t+=`[${n}]`}return t}function Z1(e,t){function n(a,o,i=[]){if(rR(a))for(let[c,u]of Object.entries(a)){let l=i.concat([c]);if(Vi(u)){let m=Po(u,t),p=o[u.i18nId]||[],h=rY(l);p.push(u.values?{values:u.values,path:h}:h),a[c]=m,o[u.i18nId]=p}else n(u,o,l)}}s(n,"replaceInObject");let r={};return n(e,r),r}function lR(e){let t=X1[e];if(!t){if(e===Gi)return{};throw new Error(`Unsupported locale '${e}'`)}return t}function dR(){return Z$}function mR(){return[...new Set([...Object.keys(X1),Gi])].sort()}function pR(e,t){X1[e]=t}function aY(e){if(!sR.test(e))throw Error(`"${e}" does not appear to be a valid ICU message id`);let[t,n]=e.split(" | ");return{filename:t,key:n}}var ap,X1,Gi,Z$,sR,Q$,Qr=b(()=>{"use strict";d();Jr();tR();Lo();aR();iR();ap={literal:0,argument:1,number:2,date:3,time:4,select:5,plural:6,pound:7,tag:8},X1=oR,Gi="en-US",Z$=["ar-XB.json","ar.json","bg.json","ca.json","cs.json","da.json","de.json","el.json","en-GB.json","en-US.json","en-XA.json","en-XL.json","es-419.json","es.json","fi.json","fil.json","fr.json","he.json","hi.json","hr.json","hu.json","id.json","it.json","ja.json","ko.json","lt.json","lv.json","nl.json","no.json","pl.json","pt-PT.json","pt.json","ro.json","ru.json","sk.json","sl.json","sr-Latn.json","sr.json","sv.json","ta.json","te.json","th.json","tr.json","uk.json","vi.json","zh-HK.json","zh-TW.json","zh.json"].filter(e=>e.endsWith(".json")&&!e.endsWith(".ctc.json")).map(e=>e.replace(".json","")).sort(),sR=/ | [^\s]+$/,Q$={number:{bytes:{maximumFractionDigits:0},milliseconds:{maximumFractionDigits:0},seconds:{minimumFractionDigits:1,maximumFractionDigits:1},extendedPercent:{maximumFractionDigits:2,style:"percent"}}};s(cR,"collectAllCustomElementsFromICU");s(eY,"_preformatValues");s(tY,"escapeIcuMessage");s(J1,"formatMessage");s(nY,"_localizeIcuMessage");s(uR,"getRendererFormattedStrings");s(Vi,"isIcuMessage");s(Po,"getFormatted");s(rY,"_formatPathAsString");s(Z1,"replaceIcuMessages");s(lR,"_getLocaleMessages");s(dR,"getCanonicalLocales");s(mR,"getAvailableLocales");s(pR,"registerLocaleData");s(aY,"getIcuMessageIdParts")});var hR=I((Gge,fR)=>{d();var oY='data:image/svg+xml,',iY={"modern-image-formats":"Consider displaying all [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) components in WebP formats while specifying an appropriate fallback for other browsers. [Learn more](https://amp.dev/documentation/components/amp-img/#example:-specifying-a-fallback-image).","offscreen-images":"Ensure that you are using [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) for images to automatically lazy-load. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/media_iframes_3p/?format=websites#images).","render-blocking-resources":"Use tools such as [AMP Optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer) to [server-side render AMP layouts](https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/server-side-rendering/).","unminified-css":"Refer to the [AMP documentation](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/) to ensure all styles are supported.","efficient-animated-content":"For animated content, use [`amp-anim`](https://amp.dev/documentation/components/amp-anim/) to minimize CPU usage when the content is offscreen.","uses-responsive-images":"The [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) component supports the [`srcset`](https://web.dev/use-srcset-to-automatically-choose-the-right-image/) attribute to specify which image assets to use based on the screen size. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/art_direction/)."};fR.exports={id:"amp",title:"AMP",icon:oY,UIStrings:iY}});var yR=I((Wge,gR)=>{d();var sY='data:image/svg+xml,',cY={"total-byte-weight":"Apply [route-level code splitting](https://web.dev/route-level-code-splitting-in-angular/) to minimize the size of your JavaScript bundles. Also, consider precaching assets with the [Angular service worker](https://web.dev/precaching-with-the-angular-service-worker/).","unminified-warning":"If you are using Angular CLI, ensure that builds are generated in production mode. [Learn more](https://angular.io/guide/deployment#enable-runtime-production-mode).","unused-javascript":"If you are using Angular CLI, include source maps in your production build to inspect your bundles. [Learn more](https://angular.io/guide/deployment#inspect-the-bundles).","uses-responsive-images":"Consider using the `BreakpointObserver` utility in the Component Dev Kit (CDK) to manage image breakpoints. [Learn more](https://material.angular.io/cdk/layout/overview).","uses-rel-preload":"Preload routes ahead of time to speed up navigation. [Learn more](https://web.dev/route-preloading-in-angular/).","dom-size":"Consider virtual scrolling with the Component Dev Kit (CDK) if very large lists are being rendered. [Learn more](https://web.dev/virtualize-lists-with-angular-cdk/)."};gR.exports={id:"angular",title:"Angular",icon:sY,UIStrings:cY}});var vR=I((Yge,bR)=>{d();var uY='data:image/svg+xml,',lY={"unused-css-rules":"Consider removing unused CSS rules and only attach the needed Drupal libraries to the relevant page or component in a page. See the [Drupal documentation link](https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module#library) for details. To identify attached libraries that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the stylesheet when CSS aggregation is disabled in your Drupal site. Look out for themes/modules that have many stylesheets in the list which have a lot of red in code coverage. A theme/module should only enqueue a stylesheet if it is actually used on the page.","unused-javascript":"Consider removing unused JavaScript assets and only attach the needed Drupal libraries to the relevant page or component in a page. See the [Drupal documentation link](https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module#library) for details. To identify attached libraries that are adding extraneous JavaScript, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the script when JavaScript aggregation is disabled in your Drupal site. Look out for themes/modules that have many scripts in the list which have a lot of red in code coverage. A theme/module should only enqueue a script if it is actually used on the page.","modern-image-formats":"Consider configuring [WebP image formats with a Convert image style](https://www.drupal.org/docs/core-modules-and-themes/core-modules/image-module/working-with-images#styles) on your site.","offscreen-images":"Install [a Drupal module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A67&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=%22lazy+load%22&solrsort=iss_project_release_usage+desc&op=Search) that can lazy load images. Such modules provide the ability to defer any offscreen images to improve performance.","total-byte-weight":"Consider using [Responsive Image Styles](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) to reduce the size of images loaded on your page. If you are using Views to show multiple content items on a page, consider implementing pagination to limit the number of content items shown on a given page.","render-blocking-resources":"Consider using a module to inline critical CSS and JavaScript, and use the defer attribute for non-critical CSS or JavaScript.","unminified-css":'Ensure you have enabled "Aggregate CSS files" in the "Administration » Configuration » Development" page. Ensure your Drupal site is running at least Drupal 10.1 for improved asset aggregation support.',"unminified-javascript":'Ensure you have enabled "Aggregate JavaScript files" in the "Administration » Configuration » Development" page. Ensure your Drupal site is running at least Drupal 10.1 for improved asset aggregation support.',"efficient-animated-content":"Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.","uses-long-cache-ttl":'Set the "Browser and proxy cache maximum age" in the "Administration » Configuration » Development" page. Read about [Drupal cache and optimizing for performance](https://www.drupal.org/docs/7/managing-site-performance-and-scalability/caching-to-improve-performance/caching-overview#s-drupal-performance-resources).',"uses-optimized-images":"Consider using [a module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A123&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=optimize+images&solrsort=iss_project_release_usage+desc&op=Search) that automatically optimizes and reduces the size of images uploaded through the site while retaining quality. Also, ensure you are using the native [Responsive Image Styles](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) provided from Drupal (available in Drupal 8 and above) for all images rendered on the site.","uses-responsive-images":"Ensure that you are using the native [Responsive Image Styles](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) provided from Drupal (available in Drupal 8 and above). Use the Responsive Image Styles when rendering image fields through view modes, views, or images uploaded through the WYSIWYG editor.","server-response-time":"Themes, modules, and server specifications all contribute to server response time. Consider finding a more optimized theme, carefully selecting an optimization module, and/or upgrading your server. Your hosting servers should make use of PHP opcode caching, memory-caching to reduce database query times such as Redis or Memcached, as well as optimized application logic to prepare pages faster.","uses-rel-preconnect":"Preconnect or dns-prefetch resource hints can be added by installing and configuring [a module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=dns-prefetch&solrsort=iss_project_release_usage+desc&op=Search) that provides facilities for user agent resource hints.","font-display":"Specify `@font-display` when defining custom fonts in your theme."};bR.exports={id:"drupal",title:"Drupal",icon:uY,UIStrings:lY}});var DR=I((Xge,wR)=>{d();var dY='data:image/svg+xml,',mY={"unused-css-rules":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Remove Unused CSS` to help with this issue. It will identify the CSS classes that are actually used on each page of your site, and remove any others to keep the file size small.","modern-image-formats":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Next-Gen Formats` to convert images to WebP.","offscreen-images":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Lazy Load Images` to defer loading off-screen images until they are needed.","render-blocking-resources":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Critical CSS` and `Script Delay` to defer non-critical JS/CSS.","unminified-css":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Minify CSS` to automatically minify your CSS to reduce network payload sizes.","unminified-javascript":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Minify Javascript` to automatically minify your JS to reduce network payload sizes.","uses-long-cache-ttl":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Efficient Static Cache Policy` to set recommended values in the caching header for static assests.","uses-optimized-images":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Next-Gen Formats` to convert images to WebP.","uses-responsive-images":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Resize Images` to resize images to a device appropriate size, reducing network payload sizes.","server-response-time":"Use [Ezoic Cloud Caching](https://pubdash.ezoic.com/speed/caching) to cache your content across our world wide network, improving time to first byte.","uses-rel-preconnect":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Pre-Connect Origins` to automatically add `preconnect` resource hints to establish early connections to important third-party origins.","uses-rel-preload":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Preload Fonts` and `Preload Background Images` to add `preload` links to prioritize fetching resources that are currently requested later in page load.","font-display":"Use [Ezoic Leap](https://pubdash.ezoic.com/speed) and enable `Optimize Fonts` to automatically leverage the `font-display` CSS feature to ensure text is user-visible while webfonts are loading."};wR.exports={id:"ezoic",title:"Ezoic",icon:dY,UIStrings:mY}});var xR=I((Zge,ER)=>{d();var pY='data:image/svg+xml,',fY={"unused-css-rules":"Use the `PurgeCSS` `Gatsby` plugin to remove unused rules from stylesheets. [Learn more](https://purgecss.com/plugins/gatsby.html).","modern-image-formats":"Use the `gatsby-plugin-image` component instead of `` to automatically optimize image format. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).","offscreen-images":"Use the `gatsby-plugin-image` component instead of `` to automatically lazy-load images. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).","render-blocking-resources":"Use the `Gatsby Script API` to defer loading of non-critical third-party scripts. [Learn more](https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-script/).","unused-javascript":"Use `Webpack Bundle Analyzer` to detect unused JavaScript code. [Learn more](https://www.gatsbyjs.com/plugins/gatsby-plugin-webpack-bundle-analyser-v2/)","uses-long-cache-ttl":"Configure caching for immutable assets. [Learn more](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/caching/).","uses-optimized-images":"Use the `gatsby-plugin-image` component instead of `` to adjust image quality. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).","uses-responsive-images":"Use the `gatsby-plugin-image` component to set appropriate `sizes`. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).","prioritize-lcp-image":"Use the `gatsby-plugin-image` component and set the `loading` prop to `eager`. [Learn more](https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image#shared-props)."};ER.exports={id:"gatsby",title:"Gatsby",icon:pY,UIStrings:fY}});var SR=I((eye,TR)=>{"use strict";d();var hY='data:image/svg+xml,',gY={"unused-css-rules":"Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused CSS in your page. To identify extensions that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.","modern-image-formats":"Consider using a [plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=webp) or service that will automatically convert your uploaded images to the optimal formats.","offscreen-images":"Install a [lazy-load Joomla plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=lazy%20loading) that provides the ability to defer any offscreen images, or switch to a template that provides that functionality. Starting with Joomla 4.0, all new images will [automatically](https://github.com/joomla/joomla-cms/pull/30748) get the `loading` attribute from the core.","total-byte-weight":"Consider showing excerpts in your article categories (e.g. via the read more link), reducing the number of articles shown on a given page, breaking your long posts into multiple pages, or using a plugin to lazy-load comments.","render-blocking-resources":"There are a number of Joomla plugins that can help you [inline critical assets](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) or [defer less important resources](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance). Beware that optimizations provided by these plugins may break features of your templates or plugins, so you will need to test these thoroughly.","unminified-css":"A number of [Joomla extensions](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) can speed up your site by concatenating, minifying, and compressing your css styles. There are also templates that provide this functionality.","unminified-javascript":"A number of [Joomla extensions](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) can speed up your site by concatenating, minifying, and compressing your scripts. There are also templates that provide this functionality.","efficient-animated-content":"Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.","unused-javascript":"Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused JavaScript in your page. To identify plugins that are adding extraneous JS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the extension responsible from the URL of the script. Look out for extensions that have many scripts in the list which have a lot of red in code coverage. An extension should only enqueue a script if it is actually used on the page.","uses-long-cache-ttl":"Read about [Browser Caching in Joomla](https://docs.joomla.org/Cache).","uses-optimized-images":"Consider using an [image optimization plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) that compresses your images while retaining quality.","uses-text-compression":"You can enable text compression by enabling Gzip Page Compression in Joomla (System > Global configuration > Server).","uses-responsive-images":"Consider using a [responsive images plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=responsive%20images) to use responsive images in your content.","server-response-time":"Templates, extensions, and server specifications all contribute to server response time. Consider finding a more optimized template, carefully selecting an optimization extension, and/or upgrading your server."};TR.exports={id:"joomla",title:"Joomla",icon:hY,UIStrings:gY}});var CR=I((nye,kR)=>{d();var yY='data:image/svg+xml,',bY={"modern-image-formats":"Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=webp) for a variety of third-party extensions to leverage newer image formats.","offscreen-images":"Consider modifying your product and catalog templates to make use of the web platform's [lazy loading](https://web.dev/native-lazy-loading) feature.","disable-bundling":"Disable Magento's built-in [JavaScript bundling and minification](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html), and consider using [baler](https://github.com/magento/baler/) instead.","unminified-css":`Enable the "Minify CSS Files" option in your store's Developer settings. [Learn more](https://devdocs.magento.com/guides/v2.3/performance-best-practices/configuration.html?itm_source=devdocs&itm_medium=search_page&itm_campaign=federated_search&itm_term=minify%20css%20files).`,"unminified-javascript":"Use [Terser](https://www.npmjs.com/package/terser) to minify all JavaScript assets from static content deployment, and disable the built-in minification feature.","unused-javascript":"Disable Magento's built-in [JavaScript bundling](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html).","uses-optimized-images":"Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=optimize%20image) for a variety of third party extensions to optimize images.","server-response-time":"Use Magento's [Varnish integration](https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html).","uses-rel-preconnect":"Preconnect or dns-prefetch resource hints can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).","uses-rel-preload":"`` tags can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).","critical-request-chains":"If you are not bundling your JavaScript assets, consider using [baler](https://github.com/magento/baler).","font-display":"Specify `@font-display` when [defining custom fonts](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/using-fonts.html)."};kR.exports={id:"magento",title:"Magento",icon:yY,UIStrings:bY}});var _R=I((aye,AR)=>{d();var vY='data:image/svg+xml,',wY={"unused-css-rules":"Consider setting up `PurgeCSS` in `Next.js` configuration to remove unused rules from stylesheets. [Learn more](https://purgecss.com/guides/next.html).","modern-image-formats":"Use the `next/image` component instead of `` to automatically optimize image format. [Learn more](https://nextjs.org/docs/basic-features/image-optimization).","offscreen-images":"Use the `next/image` component instead of `` to automatically lazy-load images. [Learn more](https://nextjs.org/docs/basic-features/image-optimization).","render-blocking-resources":"Use the `next/script` component to defer loading of non-critical third-party scripts. [Learn more](https://nextjs.org/docs/basic-features/script).","unused-javascript":"Use `Webpack Bundle Analyzer` to detect unused JavaScript code. [Learn more](https://github.com/vercel/next.js/tree/canary/packages/next-bundle-analyzer)","uses-long-cache-ttl":"Configure caching for immutable assets and `Server-side Rendered` (SSR) pages. [Learn more](https://nextjs.org/docs/going-to-production#caching).","uses-optimized-images":"Use the `next/image` component instead of `` to adjust image quality. [Learn more](https://nextjs.org/docs/basic-features/image-optimization).","uses-text-compression":"Enable compression on your Next.js server. [Learn more](https://nextjs.org/docs/api-reference/next.config.js/compression).","uses-responsive-images":"Use the `next/image` component to set the appropriate `sizes`. [Learn more](https://nextjs.org/docs/api-reference/next/image#sizes).","user-timings":"Consider using `Next.js Analytics` to measure your app's real-world performance. [Learn more](https://nextjs.org/docs/advanced-features/measuring-performance).","prioritize-lcp-image":'Use the `next/image` component and set "priority" to true to preload LCP image. [Learn more](https://nextjs.org/docs/api-reference/next/image#priority).',"unsized-images":"Use the `next/image` component to make sure images are always sized appropriately. [Learn more](https://nextjs.org/docs/api-reference/next/image#width)."};AR.exports={id:"next.js",title:"Next.js",icon:vY,UIStrings:wY}});var FR=I((iye,RR)=>{d();var DY='data:image/svg+xml,',EY={"unused-css-rules":"Enable [`Reduce Unused CSS`](https://support.nitropack.io/hc/en-us/articles/360020418457-Reduce-Unused-CSS) to remove CSS rules that are not applicable to this page.","modern-image-formats":"Use [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/16547237162513) to automatically convert your images to WebP.","offscreen-images":"Defer offscreen images by enabling [`Automatic Image Lazy Loading`](https://support.nitropack.io/hc/en-us/articles/12457493524369-NitroPack-Lazy-Loading-Feature-for-Images).","render-blocking-resources":"Enable [`Remove render-blocking resources`](https://support.nitropack.io/hc/en-us/articles/13820893500049-How-to-Deal-with-Render-Blocking-Resources-in-NitroPack) in NitroPack for faster initial load times.","unminified-css":"Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your CSS, HTML, and JavaScript files for faster load times.","unminified-javascript":"Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your JS, HTML, and CSS files for faster load times.","unused-javascript":"Configure [`Delayed Scripts`](https://support.nitropack.io/hc/en-us/articles/1500002600942-Delayed-Scripts) in NitroPack to delay loading of scripts until they are needed.","uses-long-cache-ttl":"Go to the [`Improve Server Response Time`](https://support.nitropack.io/hc/en-us/articles/1500002321821-Improve-Server-Response-Time) feature in the `Caching` menu and adjust your page cache expiration time to improve loading times and user experience.","uses-optimized-images":"Automatically compress, optimize, and convert your images into WebP by enabling the [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/14177271695121-How-to-serve-images-in-next-gen-formats-using-NitroPack) setting.","uses-text-compression":"Use [`Gzip compression`](https://support.nitropack.io/hc/en-us/articles/13229297479313-Enabling-GZIP-compression) in NitroPack to reduce the size of the files that are sent to the browser.","uses-responsive-images":"Enable [`Adaptive Image Sizing`](https://support.nitropack.io/hc/en-us/articles/10123833029905-How-to-Enable-Adaptive-Image-Sizing-For-Your-Site) to preemptively optimize your images and make them match the dimensions of the containers they’re displayed in across all devices.","server-response-time":"Improve server response time and optimize perceived performance by activating [`Instant Load`](https://support.nitropack.io/hc/en-us/articles/16547340617361).","dom-size":"Contact your account manager to enable [`HTML Lazy Load`](https://support.nitropack.io/hc/en-us/articles/17144942904337). Configuring it will prioritize and optimize your page rendering performance.","font-display":"Use the [`Override Font Rendering Behavior`](https://support.nitropack.io/hc/en-us/articles/16547358865041) option in NitroPack to set a desired value for the CSS font-display rule."};RR.exports={id:"nitropack",title:"NitroPack",icon:DY,UIStrings:EY}});var NR=I((cye,IR)=>{d();var xY='data:image/svg+xml,',TY={"modern-image-formats":'Use the `nuxt/image` component and set `format="webp"`. [Learn more](https://image.nuxt.com/usage/nuxt-img#format).',"offscreen-images":'Use the `nuxt/image` component and set `loading="lazy"` for offscreen images. [Learn more](https://image.nuxt.com/usage/nuxt-img#loading).',"uses-optimized-images":"Use the `nuxt/image` component and set the appropriate `quality`. [Learn more](https://image.nuxt.com/usage/nuxt-img#quality).","uses-responsive-images":"Use the `nuxt/image` component and set the appropriate `sizes`. [Learn more](https://image.nuxt.com/usage/nuxt-img#sizes).","prioritize-lcp-image":"Use the `nuxt/image` component and specify `preload` for LCP image. [Learn more](https://image.nuxt.com/usage/nuxt-img#preload).","unsized-images":"Use the `nuxt/image` component and specify explicit `width` and `height`. [Learn more](https://image.nuxt.com/usage/nuxt-img#width-height)."};IR.exports={id:"nuxt",title:"Nuxt",icon:xY,UIStrings:TY}});var LR=I((lye,MR)=>{d();var SY='data:image/svg+xml,',kY={"unused-css-rules":"Consider reviewing the [plugins](https://octobercms.com/plugins) loading unused CSS on the website. To identify plugins that add unnecessary CSS, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the stylesheet URL. Look for plugins with many stylesheets with lots of red in code coverage. A plugin should only add a stylesheet if it is actually used on the web page.","modern-image-formats":"Consider using a [plugin](https://octobercms.com/plugins?search=image) or service that will automatically convert the uploaded images to the optimal formats. [WebP lossless images](https://developers.google.com/speed/webp) are 26% smaller in size compared to PNGs and 25-34% smaller than comparable JPEG images at the equivalent SSIM quality index. Another next-gen image format to consider is [AVIF](https://jakearchibald.com/2020/avif-has-landed/).","offscreen-images":"Consider installing an [image lazy loading plugin](https://octobercms.com/plugins?search=lazy) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://octobercms.com/plugins?search=Accelerated+Mobile+Pages).","total-byte-weight":"Consider showing excerpts in the post lists (e.g. using a `show more` button), reducing the number of posts shown on a given web page, breaking long posts into multiple web pages, or using a plugin to lazy-load comments.","render-blocking-resources":"There are many plugins that help [inline critical assets](https://octobercms.com/plugins?search=css). These plugins may break other plugins, so you should test thoroughly.","unminified-css":"There are many [plugins](https://octobercms.com/plugins?search=css) that can speed up a website by concatenating, minifying and compressing the styles. Using a build process to do this minification up-front can speed up development.","unminified-javascript":"There are many [plugins](https://octobercms.com/plugins?search=javascript) that can speed up a website by concatenating, minifying and compressing the scripts. Using a build process to do this minification up-front can speed up development.","efficient-animated-content":"[Replace animated GIFs with video](https://web.dev/replace-gifs-with-videos/) for faster web page loads and consider using modern file formats such as [WebM](https://web.dev/replace-gifs-with-videos/#create-webm-videos) or [AV1](https://developers.google.com/web/updates/2018/09/chrome-70-media-updates#av1-decoder) to improve compression efficiency by greater than 30% over the current state-of-the-art video codec, VP9.","unused-javascript":"Consider reviewing the [plugins](https://octobercms.com/plugins?search=javascript) that load unused JavaScript in the web page. To identify plugins that add unnecessary JavaScript, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the URL of the script. Look for plugins with many scripts with lots of red in code coverage. A plugin should only add a script if it is actually used on the web page.","uses-long-cache-ttl":"Read about [preventing unnecessary network requests with the HTTP Cache](https://web.dev/http-cache/#caching-checklist). There are many [plugins](https://octobercms.com/plugins?search=Caching) that can be used to speed up caching.","uses-optimized-images":"Consider using an [image optimization plugin](https://octobercms.com/plugins?search=image) to compresses images while retaining the quality.","uses-text-compression":"Enable text compression in the web server configuration.","uses-responsive-images":"Upload images directly in the media manager to ensure the required image sizes are available. Consider using the [resize filter](https://octobercms.com/docs/markup/filter-resize) or an [image resizing plugin](https://octobercms.com/plugins?search=image) to ensure the optimal image sizes are used.","server-response-time":"Themes, plugins and server specifications all contribute to the server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin and/or upgrade the server. October CMS also allows developers to use [`Queues`](https://octobercms.com/docs/services/queues) to defer the processing of a time consuming task, such as sending an e-mail. This drastically speeds up web requests."};MR.exports={id:"octobercms",title:"October CMS",icon:SY,UIStrings:kY}});var OR=I((mye,PR)=>{d();var CY='data:image/svg+xml,',AY={"unminified-css":"If your build system minifies CSS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).","unminified-javascript":"If your build system minifies JS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).","unused-javascript":"If you are not server-side rendering, [split your JavaScript bundles](https://web.dev/code-splitting-suspense/) with `React.lazy()`. Otherwise, code-split using a third-party library such as [loadable-components](https://www.smooth-code.com/open-source/loadable-components/docs/getting-started/).","server-response-time":"If you are server-side rendering any React components, consider using `renderToPipeableStream()` or `renderToStaticNodeStream()` to allow the client to receive and hydrate different parts of the markup instead of all at once. [Learn more](https://reactjs.org/docs/react-dom-server.html#renderToPipeableStream).",redirects:"If you are using React Router, minimize usage of the `` component for [route navigations](https://reacttraining.com/react-router/web/api/Redirect).","user-timings":"Use the React DevTools Profiler, which makes use of the Profiler API, to measure the rendering performance of your components. [Learn more.](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html)","dom-size":'Consider using a "windowing" library like `react-window` to minimize the number of DOM nodes created if you are rendering many repeated elements on the page. [Learn more](https://web.dev/virtualize-long-lists-react-window/). Also, minimize unnecessary re-renders using [`shouldComponentUpdate`](https://reactjs.org/docs/optimizing-performance.html#shouldcomponentupdate-in-action), [`PureComponent`](https://reactjs.org/docs/react-api.html#reactpurecomponent), or [`React.memo`](https://reactjs.org/docs/react-api.html#reactmemo) and [skip effects](https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects) only until certain dependencies have changed if you are using the `Effect` hook to improve runtime performance.'};PR.exports={id:"react",title:"React",icon:CY,UIStrings:AY}});var UR=I((fye,BR)=>{d();var _Y='data:image/svg+xml,',RY={"modern-image-formats":"Upload images using `Wix Media Manager` to ensure they are automatically served as WebP. Find [more ways to optimize](https://support.wix.com/en/article/site-performance-optimizing-your-media) your site's media.","render-blocking-resources":"When [adding third-party code](https://support.wix.com/en/article/site-performance-using-third-party-code-on-your-site) in the `Custom Code` tab of your site's dashboard, make sure it's deferred or loaded at the end of the code body. Where possible, use Wix’s [integrations](https://support.wix.com/en/article/about-marketing-integrations) to embed marketing tools on your site. ","efficient-animated-content":"Place videos inside `VideoBoxes`, customize them using `Video Masks` or add `Transparent Videos`. [Learn more](https://support.wix.com/en/article/wix-video-about-wix-video).","unused-javascript":"Review any third-party code you've added to your site in the `Custom Code` tab of your site's dashboard and only keep the services that are necessary to your site. [Find out more](https://support.wix.com/en/article/site-performance-removing-unused-javascript).","server-response-time":"Wix utilizes CDNs and caching to serve responses as fast as possible for most visitors. Consider [manually enabling caching](https://support.wix.com/en/article/site-performance-caching-pages-to-optimize-loading-speed) for your site, especially if using `Velo`."};BR.exports={id:"wix",title:"Wix",icon:_Y,UIStrings:RY}});var qR=I((gye,jR)=>{d();var FY='data:image/svg+xml,',IY={"unused-css-rules":"Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused CSS in your page. To identify plugins that are adding extraneous CSS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage/) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.","modern-image-formats":"Consider using the [Performance Lab](https://wordpress.org/plugins/performance-lab/) plugin to automatically convert your uploaded JPEG images into WebP, wherever supported.","offscreen-images":"Install a [lazy-load WordPress plugin](https://wordpress.org/plugins/search/lazy+load/) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://wordpress.org/plugins/amp/).","total-byte-weight":"Consider showing excerpts in your post lists (e.g. via the more tag), reducing the number of posts shown on a given page, breaking your long posts into multiple pages, or using a plugin to lazy-load comments.","render-blocking-resources":"There are a number of WordPress plugins that can help you [inline critical assets](https://wordpress.org/plugins/search/critical+css/) or [defer less important resources](https://wordpress.org/plugins/search/defer+css+javascript/). Beware that optimizations provided by these plugins may break features of your theme or plugins, so you will likely need to make code changes.","unminified-css":"A number of [WordPress plugins](https://wordpress.org/plugins/search/minify+css/) can speed up your site by concatenating, minifying, and compressing your styles. You may also want to use a build process to do this minification up-front if possible.","unminified-javascript":"A number of [WordPress plugins](https://wordpress.org/plugins/search/minify+javascript/) can speed up your site by concatenating, minifying, and compressing your scripts. You may also want to use a build process to do this minification up front if possible.","efficient-animated-content":"Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.","unused-javascript":"Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused JavaScript in your page. To identify plugins that are adding extraneous JS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage/) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the script. Look out for plugins that have many scripts in the list which have a lot of red in code coverage. A plugin should only enqueue a script if it is actually used on the page.","uses-long-cache-ttl":"Read about [Browser Caching in WordPress](https://wordpress.org/support/article/optimization/#browser-caching).","uses-optimized-images":"Consider using an [image optimization WordPress plugin](https://wordpress.org/plugins/search/optimize+images/) that compresses your images while retaining quality.","uses-text-compression":"You can enable text compression in your web server configuration.","uses-responsive-images":"Upload images directly through the [media library](https://wordpress.org/support/article/media-library-screen/) to ensure that the required image sizes are available, and then insert them from the media library or use the image widget to ensure the optimal image sizes are used (including those for the responsive breakpoints). Avoid using `Full Size` images unless the dimensions are adequate for their usage. [Learn More](https://wordpress.org/support/article/inserting-images-into-posts-and-pages/).","server-response-time":"Themes, plugins, and server specifications all contribute to server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin, and/or upgrading your server."};jR.exports={id:"wordpress",title:"WordPress",icon:FY,UIStrings:IY}});var HR=I((bye,zR)=>{d();var NY='data:image/svg+xml,',MY={"unused-css-rules":"Enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) in 'WP Rocket' to fix this issue. It reduces page size by removing all CSS and stylesheets that are not used while keeping only the used CSS for each page.","modern-image-formats":"Enable 'Imagify' from the Image Optimization tab in 'WP Rocket' to convert your images to WebP.","unused-javascript":"Enable [Delay JavaScript execution](https://docs.wp-rocket.me/article/1349-delay-javascript-execution) in 'WP Rocket' to fix this problem. It will improve the loading of your page by delaying the execution of scripts until user interaction. If your site has iframes, you can use WP Rocket's [LazyLoad for iframes and videos](https://docs.wp-rocket.me/article/1674-lazyload-for-iframes-and-videos) and [Replace YouTube iframe with preview image](https://docs.wp-rocket.me/article/1488-replace-youtube-iframe-with-preview-image) as well.","render-blocking-resources":"Enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) and [Load JavaScript deferred](https://docs.wp-rocket.me/article/1265-load-javascript-deferred) in 'WP Rocket' to address this recommendation. These features will respectively optimize the CSS and JavaScript files so that they don't block the rendering of your page.","unminified-css":"Enable [Minify CSS files](https://docs.wp-rocket.me/article/1350-css-minify-combine) in 'WP Rocket' to fix this issue. Any spaces and comments in your site's CSS files will be removed to make the file size smaller and faster to download.","unminified-javascript":"Enable [Minify JavaScript files](https://docs.wp-rocket.me/article/1351-javascript-minify-combine) in 'WP Rocket' to fix this issue. Empty spaces and comments will be removed from JavaScript files to make their size smaller and faster to download.","uses-optimized-images":"Enable 'Imagify' from the Image Optimization tab in 'WP Rocket' and run Bulk Optimization to compress your images.","uses-rel-preconnect":`Use [Prefetch DNS Requests](https://docs.wp-rocket.me/article/1302-prefetch-dns-requests) in 'WP Rocket' to add "dns-prefetch" and speed up the connection with external domains. Also, 'WP Rocket' automatically adds "preconnect" to [Google Fonts domain](https://docs.wp-rocket.me/article/1312-optimize-google-fonts) and any CNAME(S) added via the [Enable CDN](https://docs.wp-rocket.me/article/42-using-wp-rocket-with-a-cdn) feature.`,"uses-rel-preload":"To fix this issue for fonts, enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) in 'WP Rocket'. Your site's critical fonts will be preloaded with priority.","offscreen-images":"Enable [LazyLoad](https://docs.wp-rocket.me/article/1141-lazyload-for-images) in WP Rocket to fix this recommendation. This feature delays the loading of the images until the visitor scrolls down the page and actually needs to see them."};zR.exports={id:"wp-rocket",title:"WP Rocket",icon:NY,UIStrings:MY}});var VR=I((wye,GR)=>{d();var LY=[hR(),yR(),vR(),DR(),xR(),SR(),CR(),_R(),FR(),NR(),LR(),OR(),UR(),qR(),HR()];GR.exports=LY});var $R=I((Eye,WR)=>{d();WR.exports=s(function(t,n){if(typeof t=="string"&&n[t])return t;for(var r=[].concat(t||[]),a=0,o=r.length;a{"use strict";d();Jr();Aa();Lo();op=Dt.dirname(""),PY=JSON.parse(`{ "name": "lighthouse", "type": "module", - "version": "11.3.0", + "version": "11.4.0", "description": "Automated auditing, performance metrics, and best practices for the web.", "main": "./core/index.js", "bin": { @@ -181,7 +181,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules" "pako": "^2.0.3", "preact": "^10.7.2", "pretty-json-stringify": "^0.0.2", - "puppeteer": "^21.5.0", + "puppeteer": "^21.5.2", "resolve": "^1.22.1", "rollup": "^2.52.7", "rollup-plugin-polyfill-node": "^0.12.0", @@ -214,11 +214,12 @@ Try polyfilling it using "@formatjs/intl-pluralrules" "open": "^8.4.0", "parse-cache-control": "1.0.1", "ps-list": "^8.0.0", - "puppeteer-core": "^21.5.0", + "puppeteer-core": "^21.5.2", "robots-parser": "^3.0.1", "semver": "^5.3.0", "speedline-core": "^1.4.3", - "third-party-web": "^0.24.0", + "third-party-web": "^0.24.1", + "tldts-icann": "^6.1.0", "ws": "^7.0.0", "yargs": "^17.3.1", "yargs-parser": "^21.0.0" @@ -240,32 +241,32 @@ Try polyfilling it using "@formatjs/intl-pluralrules" }, "homepage": "https://github.com/GoogleChrome/lighthouse#readme" } -`),rp=W$.version});function ap(t,e){if(typeof Intl!="object")throw new Error("Lighthouse must be run in Node with `Intl` support. See https://nodejs.org/api/intl.html for help");let n=Intl.getCanonicalLocales(t),r=Intl.NumberFormat.supportedLocalesOf(n),a=e||qR(),o=Object.fromEntries(a.map(c=>[c,{}])),i=(0,TF.default)(r,o);return i||(Intl.NumberFormat.supportedLocalesOf("es").length===0&&k.warn("i18n","Requested locale not available in this version of node. The `full-icu` npm module can provide additional locales. For help, see https://github.com/GoogleChrome/lighthouse/blob/main/readme.md#how-do-i-get-localized-lighthouse-results-via-the-cli"),k.warn("i18n",`locale(s) '${t}' not available. Falling back to default '${Hi}'`)),i||Hi}function w(t,e){t.startsWith("file://")&&(t=Mo.fileURLToPath(t)),Dt.isAbsolute(t)&&(t=Dt.relative(np,t));let n={...x,...e};return s((a,o)=>{let i=Object.keys(n).find(m=>n[m]===a);if(!i)throw new Error(`Could not locate: ${a}`);return{i18nId:`${(i in e?t:Dt.relative(np,kR({url:"core/lib/i18n/i18n.js"}))).replace(/\\/g,"/")} | ${i}`,values:o,formattedDefault:Hh(a,o,Hi)}},"getIcuMessageFn")}function vr(t){return typeof t=="string"||Gi(t)}var TF,x,_=b(()=>{"use strict";d();Aa();cu();TF=Mt(EF(),1);_e();Jr();Vi();Jr();Lo();x={ms:"{timeInMs, number, milliseconds} ms",seconds:"{timeInMs, number, seconds} s",displayValueByteSavings:"Potential savings of {wastedBytes, number, bytes} KiB",displayValueMsSavings:"Potential savings of {wastedMs, number, milliseconds} ms",displayValueElementsFound:"{nodeCount, plural, =1 {1 element found} other {# elements found}}",columnURL:"URL",columnSize:"Size",columnResourceSize:"Resource Size",columnTransferSize:"Transfer Size",columnCacheTTL:"Cache TTL",columnWastedBytes:"Potential Savings",columnWastedMs:"Potential Savings",columnBlockingTime:"Main-Thread Blocking Time",columnTimeSpent:"Time Spent",columnLocation:"Location",columnResourceType:"Resource Type",columnRequests:"Requests",columnName:"Name",columnSource:"Source",columnOverBudget:"Over Budget",columnElement:"Element",columnStartTime:"Start Time",columnDuration:"Duration",columnFailingElem:"Failing Elements",columnDescription:"Description",totalResourceType:"Total",documentResourceType:"Document",scriptResourceType:"Script",stylesheetResourceType:"Stylesheet",imageResourceType:"Image",mediaResourceType:"Media",fontResourceType:"Font",otherResourceType:"Other",thirdPartyResourceType:"Third-party",otherResourcesLabel:"Other resources",firstContentfulPaintMetric:"First Contentful Paint",interactiveMetric:"Time to Interactive",firstMeaningfulPaintMetric:"First Meaningful Paint",totalBlockingTimeMetric:"Total Blocking Time",maxPotentialFIDMetric:"Max Potential First Input Delay",speedIndexMetric:"Speed Index",largestContentfulPaintMetric:"Largest Contentful Paint",cumulativeLayoutShiftMetric:"Cumulative Layout Shift",interactionToNextPaint:"Interaction to Next Paint",itemSeverityLow:"Low",itemSeverityMedium:"Medium",itemSeverityHigh:"High"};s(ap,"lookupLocale");s(w,"createIcuMessageFn");s(vr,"isStringOrIcuMessage")});function xF(t){if(!t)return[];let e=[];for(let n of t){let r=Wh.find(u=>u.requiredStacks.includes(`${n.detector}:${n.id}`));if(!r)continue;let a=SF.default.find(u=>u.id===r.packId);if(!a){k.warn("StackPacks",`'${r.packId}' stack pack was matched but is not found in stack-packs lib`);continue}let o=w(`node_modules/lighthouse-stack-packs/packs/${a.id}.js`,a.UIStrings),i={},c=a.UIStrings;for(let u in c)c[u]&&(i[u]=o(c[u]));e.push({id:a.id,title:a.title,iconDataURL:a.icon,descriptions:i})}return e.sort((n,r)=>{let a=Wh.findIndex(i=>i.packId===n.id),o=Wh.findIndex(i=>i.packId===r.id);return a-o})}var SF,Wh,CF=b(()=>{"use strict";d();_e();SF=Mt(wF(),1);_();Wh=[{packId:"gatsby",requiredStacks:["js:gatsby"]},{packId:"wordpress",requiredStacks:["js:wordpress"]},{packId:"wix",requiredStacks:["js:wix"]},{packId:"wp-rocket",requiredStacks:["js:wp-rocket"]},{packId:"ezoic",requiredStacks:["js:ezoic"]},{packId:"drupal",requiredStacks:["js:drupal"]},{packId:"nitropack",requiredStacks:["js:nitropack"]},{packId:"amp",requiredStacks:["js:amp"]},{packId:"magento",requiredStacks:["js:magento"]},{packId:"octobercms",requiredStacks:["js:octobercms"]},{packId:"joomla",requiredStacks:["js:joomla"]},{packId:"next.js",requiredStacks:["js:next"]},{packId:"nuxt",requiredStacks:["js:nuxt"]},{packId:"angular",requiredStacks:["js:@angular/core"]},{packId:"react",requiredStacks:["js:react"]}];s(xF,"getStackPacks")});var $h,kt,AF=b(()=>{d();typeof Object.create=="function"?$h=s(function(e,n){e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},"inherits"):$h=s(function(e,n){e.super_=n;var r=s(function(){},"TempCtor");r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e},"inherits");kt=$h});function X$(t){if(!ng(t)){for(var e=[],n=0;n=a)return c;switch(c){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}default:return c}}),i=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),FF(e)?n.showHidden=e:e&&oY(n,e),_a(n.showHidden)&&(n.showHidden=!1),_a(n.depth)&&(n.depth=2),_a(n.colors)&&(n.colors=!1),_a(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=J$),ip(n,t,n.depth)}function J$(t,e){var n=Ra.styles[e];return n?"\x1B["+Ra.colors[n][0]+"m"+t+"\x1B["+Ra.colors[n][1]+"m":t}function Z$(t,e){return t}function Q$(t){var e={};return t.forEach(function(n,r){e[n]=!0}),e}function ip(t,e,n){if(t.customInspect&&e&&Zh(e.inspect)&&e.inspect!==Ra&&!(e.constructor&&e.constructor.prototype===e)){var r=e.inspect(n,t);return ng(r)||(r=ip(t,r,n)),r}var a=eY(t,e);if(a)return a;var o=Object.keys(e),i=Q$(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),Jh(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Kh(e);if(o.length===0){if(Zh(e)){var c=e.name?": "+e.name:"";return t.stylize("[Function"+c+"]","special")}if(Xh(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_F(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Jh(e))return Kh(e)}var u="",l=!1,m=["{","}"];if(rY(e)&&(l=!0,m=["[","]"]),Zh(e)){var p=e.name?": "+e.name:"";u=" [Function"+p+"]"}if(Xh(e)&&(u=" "+RegExp.prototype.toString.call(e)),_F(e)&&(u=" "+Date.prototype.toUTCString.call(e)),Jh(e)&&(u=" "+Kh(e)),o.length===0&&(!l||e.length==0))return m[0]+u+m[1];if(n<0)return Xh(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var f;return l?f=tY(t,e,n,i,o):f=o.map(function(h){return Qh(t,e,n,i,h,l)}),t.seen.pop(),nY(f,u,m)}function eY(t,e){if(_a(e))return t.stylize("undefined","undefined");if(ng(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(aY(e))return t.stylize(""+e,"number");if(FF(e))return t.stylize(""+e,"boolean");if(tg(e))return t.stylize("null","null")}function Kh(t){return"["+Error.prototype.toString.call(t)+"]"}function tY(t,e,n,r,a){for(var o=[],i=0,c=e.length;i[c,{}])),i=(0,YR.default)(r,o);return i||(Intl.NumberFormat.supportedLocalesOf("es").length===0&&F.warn("i18n","Requested locale not available in this version of node. The `full-icu` npm module can provide additional locales. For help, see https://github.com/GoogleChrome/lighthouse/blob/main/readme.md#how-do-i-get-localized-lighthouse-results-via-the-cli"),F.warn("i18n",`locale(s) '${e}' not available. Falling back to default '${Gi}'`)),i||Gi}function w(e,t={}){e.startsWith("file://")&&(e=Mo.fileURLToPath(e)),Dt.isAbsolute(e)&&(e=Dt.relative(op,e));let n={...x,...t};return s((a,o)=>{let i=Object.keys(n).find(m=>n[m]===a);if(!i)throw new Error(`Could not locate: ${a}`);return{i18nId:`${(i in t?e:Dt.relative(op,nR({url:"core/lib/i18n/i18n.js"}))).replace(/\\/g,"/")} | ${i}`,values:o,formattedDefault:J1(a,o,Gi)}},"getIcuMessageFn")}function Dr(e){return typeof e=="string"||Vi(e)}var YR,x,A=b(()=>{"use strict";d();Aa();mu();YR=Lt($R(),1);Ae();Qr();Wi();Qr();Lo();x={ms:"{timeInMs, number, milliseconds} ms",seconds:"{timeInMs, number, seconds} s",displayValueByteSavings:"Potential savings of {wastedBytes, number, bytes} KiB",displayValueMsSavings:"Potential savings of {wastedMs, number, milliseconds} ms",displayValueElementsFound:"{nodeCount, plural, =1 {1 element found} other {# elements found}}",columnURL:"URL",columnSize:"Size",columnResourceSize:"Resource Size",columnTransferSize:"Transfer Size",columnCacheTTL:"Cache TTL",columnWastedBytes:"Potential Savings",columnWastedMs:"Potential Savings",columnBlockingTime:"Main-Thread Blocking Time",columnTimeSpent:"Time Spent",columnLocation:"Location",columnResourceType:"Resource Type",columnRequests:"Requests",columnName:"Name",columnSource:"Source",columnOverBudget:"Over Budget",columnElement:"Element",columnStartTime:"Start Time",columnDuration:"Duration",columnFailingElem:"Failing Elements",columnDescription:"Description",totalResourceType:"Total",documentResourceType:"Document",scriptResourceType:"Script",stylesheetResourceType:"Stylesheet",imageResourceType:"Image",mediaResourceType:"Media",fontResourceType:"Font",otherResourceType:"Other",thirdPartyResourceType:"Third-party",otherResourcesLabel:"Other resources",firstContentfulPaintMetric:"First Contentful Paint",interactiveMetric:"Time to Interactive",firstMeaningfulPaintMetric:"First Meaningful Paint",totalBlockingTimeMetric:"Total Blocking Time",maxPotentialFIDMetric:"Max Potential First Input Delay",speedIndexMetric:"Speed Index",largestContentfulPaintMetric:"Largest Contentful Paint",cumulativeLayoutShiftMetric:"Cumulative Layout Shift",interactionToNextPaint:"Interaction to Next Paint",itemSeverityLow:"Low",itemSeverityMedium:"Medium",itemSeverityHigh:"High"};s(sp,"lookupLocale");s(w,"createIcuMessageFn");s(Dr,"isStringOrIcuMessage")});function XR(e){if(!e)return[];let t=[];for(let n of e){let r=eg.find(u=>u.requiredStacks.includes(`${n.detector}:${n.id}`));if(!r)continue;let a=KR.default.find(u=>u.id===r.packId);if(!a){F.warn("StackPacks",`'${r.packId}' stack pack was matched but is not found in stack-packs lib`);continue}let o=w(`node_modules/lighthouse-stack-packs/packs/${a.id}.js`,a.UIStrings),i={},c=a.UIStrings;for(let u in c)c[u]&&(i[u]=o(c[u]));t.push({id:a.id,title:a.title,iconDataURL:a.icon,descriptions:i})}return t.sort((n,r)=>{let a=eg.findIndex(i=>i.packId===n.id),o=eg.findIndex(i=>i.packId===r.id);return a-o})}var KR,eg,JR=b(()=>{"use strict";d();Ae();KR=Lt(VR(),1);A();eg=[{packId:"gatsby",requiredStacks:["js:gatsby"]},{packId:"wordpress",requiredStacks:["js:wordpress"]},{packId:"wix",requiredStacks:["js:wix"]},{packId:"wp-rocket",requiredStacks:["js:wp-rocket"]},{packId:"ezoic",requiredStacks:["js:ezoic"]},{packId:"drupal",requiredStacks:["js:drupal"]},{packId:"nitropack",requiredStacks:["js:nitropack"]},{packId:"amp",requiredStacks:["js:amp"]},{packId:"magento",requiredStacks:["js:magento"]},{packId:"octobercms",requiredStacks:["js:octobercms"]},{packId:"joomla",requiredStacks:["js:joomla"]},{packId:"next.js",requiredStacks:["js:next"]},{packId:"nuxt",requiredStacks:["js:nuxt"]},{packId:"angular",requiredStacks:["js:@angular/core"]},{packId:"react",requiredStacks:["js:react"]}];s(XR,"getStackPacks")});var tg,Ft,ZR=b(()=>{d();typeof Object.create=="function"?tg=s(function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},"inherits"):tg=s(function(t,n){t.super_=n;var r=s(function(){},"TempCtor");r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t},"inherits");Ft=tg});function jY(e){if(!lg(e)){for(var t=[],n=0;n=a)return c;switch(c){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}default:return c}}),i=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),tF(t)?n.showHidden=t:t&&KY(n,t),_a(n.showHidden)&&(n.showHidden=!1),_a(n.depth)&&(n.depth=2),_a(n.colors)&&(n.colors=!1),_a(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=qY),up(n,e,n.depth)}function qY(e,t){var n=Ra.styles[t];return n?"\x1B["+Ra.colors[n][0]+"m"+e+"\x1B["+Ra.colors[n][1]+"m":e}function zY(e,t){return e}function HY(e){var t={};return e.forEach(function(n,r){t[n]=!0}),t}function up(e,t,n){if(e.customInspect&&t&&ig(t.inspect)&&t.inspect!==Ra&&!(t.constructor&&t.constructor.prototype===t)){var r=t.inspect(n,e);return lg(r)||(r=up(e,r,n)),r}var a=GY(e,t);if(a)return a;var o=Object.keys(t),i=HY(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),og(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return rg(t);if(o.length===0){if(ig(t)){var c=t.name?": "+t.name:"";return e.stylize("[Function"+c+"]","special")}if(ag(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(QR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(og(t))return rg(t)}var u="",l=!1,m=["{","}"];if($Y(t)&&(l=!0,m=["[","]"]),ig(t)){var p=t.name?": "+t.name:"";u=" [Function"+p+"]"}if(ag(t)&&(u=" "+RegExp.prototype.toString.call(t)),QR(t)&&(u=" "+Date.prototype.toUTCString.call(t)),og(t)&&(u=" "+rg(t)),o.length===0&&(!l||t.length==0))return m[0]+u+m[1];if(n<0)return ag(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return l?h=VY(e,t,n,i,o):h=o.map(function(f){return sg(e,t,n,i,f,l)}),e.seen.pop(),WY(h,u,m)}function GY(e,t){if(_a(t))return e.stylize("undefined","undefined");if(lg(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(YY(t))return e.stylize(""+t,"number");if(tF(t))return e.stylize(""+t,"boolean");if(ug(t))return e.stylize("null","null")}function rg(e){return"["+Error.prototype.toString.call(e)+"]"}function VY(e,t,n,r,a){for(var o=[],i=0,c=t.length;i-1&&(o?c=c.split(` `).map(function(l){return" "+l}).join(` `).substr(2):c=` `+c.split(` `).map(function(l){return" "+l}).join(` -`))):c=t.stylize("[Circular]","special")),_a(i)){if(o&&a.match(/^\d+$/))return c;i=JSON.stringify(""+a),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+c}function nY(t,e,n){var r=0,a=t.reduce(function(o,i){return r++,i.indexOf(` -`)>=0&&r++,o+i.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?n[0]+(e===""?"":e+` - `)+" "+t.join(`, - `)+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function rY(t){return Array.isArray(t)}function FF(t){return typeof t=="boolean"}function tg(t){return t===null}function aY(t){return typeof t=="number"}function ng(t){return typeof t=="string"}function _a(t){return t===void 0}function Xh(t){return uu(t)&&rg(t)==="[object RegExp]"}function uu(t){return typeof t=="object"&&t!==null}function _F(t){return uu(t)&&rg(t)==="[object Date]"}function Jh(t){return uu(t)&&(rg(t)==="[object Error]"||t instanceof Error)}function Zh(t){return typeof t=="function"}function rg(t){return Object.prototype.toString.call(t)}function oY(t,e){if(!e||!uu(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}function kF(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function iY(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(Oo&&t[Oo]){var e=t[Oo];if(typeof e!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,Oo,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var n,r,a=new Promise(function(c,u){n=c,r=u}),o=[],i=0;i{d();Ta();AF();Y$=Object.getOwnPropertyDescriptors||s(function(e){for(var n=Object.keys(e),r={},a=0;a{d();Ci();IF=Bo;s(Bo,"BufferList");Bo.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length};Bo.prototype.unshift=function(t){var e={data:t,next:this.head};this.length===0&&(this.tail=e),this.head=e,++this.length};Bo.prototype.shift=function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}};Bo.prototype.clear=function(){this.head=this.tail=null,this.length=0};Bo.prototype.join=function(t){if(this.length===0)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n};Bo.prototype.concat=function(t){if(this.length===0)return U.alloc(0);if(this.length===1)return this.head.data;for(var e=U.allocUnsafe(t>>>0),n=this.head,r=0;n;)n.data.copy(e,r),r+=n.data.length,n=n.next;return e}});function cY(t){if(t&&!sY(t))throw new Error("Unknown encoding: "+t)}function Wi(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),cY(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=lY;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=dY;break;default:this.write=uY;return}this.charBuffer=new U(6),this.charReceived=0,this.charLength=0}function uY(t){return t.toString(this.encoding)}function lY(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function dY(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var sY,MF=b(()=>{d();Ci();sY=U.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};s(cY,"assertEncoding");s(Wi,"StringDecoder");Wi.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&a<=56319){this.charLength+=this.surrogateSize,e="";continue}if(this.charReceived=this.charLength=0,t.length===0)return e;break}this.detectIncompleteChar(t);var r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived),e+=t.toString(this.encoding,0,r);var r=e.length-1,a=e.charCodeAt(r);if(a>=55296&&a<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,r)}return e};Wi.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(e==1&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e};Wi.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,a=this.encoding;e+=r.slice(0,n).toString(a)}return e};s(uY,"passThroughWrite");s(lY,"utf16DetectIncompleteChar");s(dY,"base64DetectIncompleteChar")});function mY(t,e,n){if(typeof t.prependListener=="function")return t.prependListener(e,n);!t._events||!t._events[e]?t.on(e,n):Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]}function pY(t,e){return t.listeners(e).length}function BF(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof on&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new IF,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new Wi(t.encoding),this.encoding=t.encoding)}function Et(t){if(!(this instanceof Et))return new Et(t);this._readableState=new BF(t,this),this.readable=!0,t&&typeof t.read=="function"&&(this._read=t.read),jn.call(this)}function UF(t,e,n,r,a){var o=gY(e,n);if(o)t.emit("error",o);else if(n===null)e.reading=!1,yY(t,e);else if(e.objectMode||n&&n.length>0)if(e.ended&&!a){var i=new Error("stream.push() after EOF");t.emit("error",i)}else if(e.endEmitted&&a){var c=new Error("stream.unshift() after end event");t.emit("error",c)}else{var u;e.decoder&&!a&&!r&&(n=e.decoder.write(n),u=!e.objectMode&&n.length===0),a||(e.reading=!1),u||(e.flowing&&e.length===0&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,a?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&sp(t))),bY(t,e)}else a||(e.reading=!1);return fY(e)}function fY(t){return!t.ended&&(t.needReadable||t.length=LF?t=LF:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function PF(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=hY(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function gY(t,e){var n=null;return!Buffer.isBuffer(e)&&typeof e!="string"&&e!==null&&e!==void 0&&!t.objectMode&&(n=new TypeError("Invalid non-string/buffer chunk")),n}function yY(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,sp(t)}}function sp(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(tt("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?nn(OF,t):OF(t))}function OF(t){tt("emit readable"),t.emit("readable"),og(t)}function bY(t,e){e.readingMore||(e.readingMore=!0,nn(vY,t,e))}function vY(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(e.decoder?n=e.buffer.join(""):e.buffer.length===1?n=e.buffer.head.data:n=e.buffer.concat(e.length),e.buffer.clear()):n=SY(t,e.buffer,e.decoder),n}function SY(t,e,n){var r;return to.length?o.length:t;if(i===o.length?a+=o:a+=o.slice(0,t),t-=i,t===0){i===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(i));break}++r}return e.length-=r,a}function CY(t,e){var n=Buffer.allocUnsafe(t),r=e.head,a=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,i=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,i),t-=i,t===0){i===o.length?(++a,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(i));break}++a}return e.length-=a,n}function ag(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,nn(AY,e,t))}function AY(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function _Y(t,e){for(var n=0,r=t.length;n{"use strict";d();$r();Fa();NF();MF();lu();Ta();Et.ReadableState=BF;tt=RF("stream");kt(Et,jn);s(mY,"prependListener");s(pY,"listenerCount");s(BF,"ReadableState");s(Et,"Readable");Et.prototype.push=function(t,e){var n=this._readableState;return!n.objectMode&&typeof t=="string"&&(e=e||n.defaultEncoding,e!==n.encoding&&(t=Buffer.from(t,e),e="")),UF(this,n,t,e,!1)};Et.prototype.unshift=function(t){var e=this._readableState;return UF(this,e,t,"",!0)};Et.prototype.isPaused=function(){return this._readableState.flowing===!1};s(UF,"readableAddChunk");s(fY,"needMoreData");Et.prototype.setEncoding=function(t){return this._readableState.decoder=new Wi(t),this._readableState.encoding=t,this};LF=8388608;s(hY,"computeNewHighWaterMark");s(PF,"howMuchToRead");Et.prototype.read=function(t){tt("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return tt("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ag(this):sp(this),null;if(t=PF(t,e),t===0&&e.ended)return e.length===0&&ag(this),null;var r=e.needReadable;tt("need readable",r),(e.length===0||e.length-t0?a=jF(t,e):a=null,a===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&ag(this)),a!==null&&this.emit("data",a),a};s(gY,"chunkInvalid");s(yY,"onEofChunk");s(sp,"emitReadable");s(OF,"emitReadable_");s(bY,"maybeReadMore");s(vY,"maybeReadMore_");Et.prototype._read=function(t){this.emit("error",new Error("not implemented"))};Et.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t);break}r.pipesCount+=1,tt("pipe count=%d opts=%j",r.pipesCount,e);var a=!e||e.end!==!1,o=a?c:m;r.endEmitted?nn(o):n.once("end",o),t.on("unpipe",i);function i(E){tt("onunpipe"),E===n&&m()}s(i,"onunpipe");function c(){tt("onend"),t.end()}s(c,"onend");var u=wY(n);t.on("drain",u);var l=!1;function m(){tt("cleanup"),t.removeListener("close",y),t.removeListener("finish",v),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",i),n.removeListener("end",c),n.removeListener("end",m),n.removeListener("data",f),l=!0,r.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}s(m,"cleanup");var p=!1;n.on("data",f);function f(E){tt("ondata"),p=!1;var T=t.write(E);T===!1&&!p&&((r.pipesCount===1&&r.pipes===t||r.pipesCount>1&&qF(r.pipes,t)!==-1)&&!l&&(tt("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}s(f,"ondata");function h(E){tt("onerror",E),D(),t.removeListener("error",h),pY(t,"error")===0&&t.emit("error",E)}s(h,"onerror"),mY(t,"error",h);function y(){t.removeListener("finish",v),D()}s(y,"onclose"),t.once("close",y);function v(){tt("onfinish"),t.removeListener("close",y),D()}s(v,"onfinish"),t.once("finish",v);function D(){tt("unpipe"),n.unpipe(t)}return s(D,"unpipe"),t.emit("pipe",n),r.flowing||(tt("pipe resume"),n.resume()),t};s(wY,"pipeOnDrain");Et.prototype.unpipe=function(t){var e=this._readableState;if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a{d();Fa();Ci();$r();lu();Ta();$t.WritableState=cg;kt($t,Be);s(RY,"nop");s(FY,"WriteReq");s(cg,"WritableState");cg.prototype.getBuffer=s(function(){for(var e=this.bufferedRequest,n=[];e;)n.push(e),e=e.next;return n},"writableStateGetBuffer");s($t,"Writable");$t.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};s(kY,"writeAfterEnd");s(IY,"validChunk");$t.prototype.write=function(t,e,n){var r=this._writableState,a=!1;return typeof e=="function"&&(n=e,e=null),U.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),typeof n!="function"&&(n=RY),r.ended?kY(this,n):IY(this,r,t,n)&&(r.pendingcb++,a=MY(this,r,t,e,n)),a};$t.prototype.cork=function(){var t=this._writableState;t.corked++};$t.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest&&GF(this,t))};$t.prototype.setDefaultEncoding=s(function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},"setDefaultEncoding");s(NY,"decodeChunk");s(MY,"writeOrBuffer");s(sg,"doWrite");s(LY,"onwriteError");s(PY,"onwriteStateUpdate");s(OY,"onwrite");s(zF,"afterWrite");s(BY,"onwriteDrain");s(GF,"clearBuffer");$t.prototype._write=function(t,e,n){n(new Error("not implemented"))};$t.prototype._writev=null;$t.prototype.end=function(t,e,n){var r=this._writableState;typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null),t!=null&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),!r.ending&&!r.finished&&UY(this,r,n)};s(VF,"needFinish");s(HF,"prefinish");s(WF,"finishMaybe");s(UY,"endWritable");s($F,"CorkedRequest")});function on(t){if(!(this instanceof on))return new on(t);Et.call(this,t),$t.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",jY)}function jY(){this.allowHalfOpen||this._writableState.ended||nn(qY,this)}function qY(t){t.end()}var YF,up,cp,lu=b(()=>{d();Fa();Ta();ig();ug();kt(on,Et);YF=Object.keys($t.prototype);for(cp=0;cp{d();lu();Fa();kt(hn,on);s(zY,"TransformState");s(HY,"afterTransform");s(hn,"Transform");hn.prototype.push=function(t,e){return this._transformState.needTransform=!1,on.prototype.push.call(this,t,e)};hn.prototype._transform=function(t,e,n){throw new Error("Not implemented")};hn.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var a=this._readableState;(r.needTransform||a.needReadable||a.length{d();lg();Fa();kt($i,hn);s($i,"PassThrough");$i.prototype._transform=function(t,e,n){n(null,t)}});function wr(){jn.call(this)}var dg,mg=b(()=>{d();$r();Fa();lu();ig();ug();lg();XF();kt(wr,jn);wr.Readable=Et;wr.Writable=$t;wr.Duplex=on;wr.Transform=hn;wr.PassThrough=$i;wr.Stream=wr;dg=wr;s(wr,"Stream");wr.prototype.pipe=function(t,e){var n=this;function r(m){t.writable&&t.write(m)===!1&&n.pause&&n.pause()}s(r,"ondata"),n.on("data",r);function a(){n.readable&&n.resume&&n.resume()}s(a,"ondrain"),t.on("drain",a),!t._isStdio&&(!e||e.end!==!1)&&(n.on("end",i),n.on("close",c));var o=!1;function i(){o||(o=!0,t.end())}s(i,"onend");function c(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}s(c,"onclose");function u(m){if(l(),jn.listenerCount(this,"error")===0)throw m}s(u,"onerror"),n.on("error",u),t.on("error",u);function l(){n.removeListener("data",r),t.removeListener("drain",a),n.removeListener("end",i),n.removeListener("close",c),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return s(l,"cleanup"),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t}});var be,gn=b(()=>{"use strict";d();be=class t{static{s(this,"BaseNode")}constructor(e){this._id=e,this._isMainDocument=!1,this._dependents=[],this._dependencies=[]}get id(){return this._id}get type(){throw new Error("Unimplemented")}get startTime(){throw new Error("Unimplemented")}get endTime(){throw new Error("Unimplemented")}setIsMainDocument(e){this._isMainDocument=e}isMainDocument(){return this._isMainDocument}getDependents(){return this._dependents.slice()}getNumberOfDependents(){return this._dependents.length}getDependencies(){return this._dependencies.slice()}getNumberOfDependencies(){return this._dependencies.length}getRootNode(){let e=this;for(;e._dependencies.length;)e=e._dependencies[0];return e}addDependent(e){e.addDependency(this)}addDependency(e){if(e===this)throw new Error("Cannot add dependency on itself");this._dependencies.includes(e)||(e._dependents.push(this),this._dependencies.push(e))}removeDependent(e){e.removeDependency(this)}removeDependency(e){if(!this._dependencies.includes(e))return;let n=e._dependents.indexOf(this);e._dependents.splice(n,1),this._dependencies.splice(this._dependencies.indexOf(e),1)}removeAllDependencies(){for(let e of this._dependencies.slice())this.removeDependency(e)}isDependentOn(e){let n=!1;return this.traverse(r=>{n||(n=r===e)},r=>n?[]:r.getDependencies()),n}cloneWithoutRelationships(){let e=new t(this.id);return e.setIsMainDocument(this._isMainDocument),e}cloneWithRelationships(e){let n=this.getRootNode(),r=new Map;n.traverse(o=>{if(!r.has(o.id)){if(e===void 0){r.set(o.id,o.cloneWithoutRelationships());return}e(o)&&o.traverse(i=>r.set(i.id,i.cloneWithoutRelationships()),i=>i._dependencies.filter(c=>!r.has(c.id)))}}),n.traverse(o=>{let i=r.get(o.id);if(i)for(let c of o._dependencies){let u=r.get(c.id);if(!u)throw new Error("Dependency somehow not cloned");i.addDependency(u)}});let a=r.get(this.id);if(!a)throw new Error("Cloned graph missing node");return a}traverse(e,n){for(let{node:r,traversalPath:a}of this.traverseGenerator(n))e(r,a)}*traverseGenerator(e){e||(e=s(a=>a.getDependents(),"getNextNodes"));let n=[[this]],r=new Set([this.id]);for(;n.length;){let a=n.shift(),o=a[0];yield{node:o,traversalPath:a};for(let i of e(o))r.has(i.id)||(r.add(i.id),n.push([i,...a]))}}static hasCycle(e,n="both"){if(n==="both")return t.hasCycle(e,"dependents")||t.hasCycle(e,"dependencies");let r=new Set,a=[],o=[e],i=new Map([[e,0]]);for(;o.length;){let c=o.pop();if(a.includes(c))return!0;if(r.has(c))continue;for(;a.length>i.get(c);)a.pop();r.add(c),a.push(c);let u=n==="dependents"?c._dependents:c._dependencies;for(let l of u)o.includes(l)||(o.push(l),i.set(l,a.length))}return!1}canDependOn(e){return e.startTime<=this.startTime}};be.TYPES={NETWORK:"network",CPU:"cpu"}});var Yi,pg=b(()=>{"use strict";d();Yi=class t{static{s(this,"TcpConnection")}constructor(e,n,r=0,a=!0,o=!1){this._warmed=!1,this._ssl=a,this._h2=o,this._rtt=e,this._throughput=n,this._serverLatency=r,this._congestionWindow=10,this._h2OverflowBytesDownloaded=0}static maximumSaturatedConnections(e,n){let i=1e3/e*1460*8;return Math.floor(n/i)}_computeMaximumCongestionWindowInSegments(){let e=this._throughput/8,n=this._rtt/1e3,r=e*n;return Math.floor(r/1460)}setThroughput(e){this._throughput=e}setCongestionWindow(e){this._congestionWindow=e}setWarmed(e){this._warmed=e}isWarm(){return this._warmed}isH2(){return this._h2}get congestionWindow(){return this._congestionWindow}setH2OverflowBytesDownloaded(e){this._h2&&(this._h2OverflowBytesDownloaded=e)}clone(){return Object.assign(new t(this._rtt,this._throughput),this)}simulateDownloadUntil(e,n){let{timeAlreadyElapsed:r=0,maximumTimeToElapse:a=1/0,dnsResolutionTime:o=0}=n||{};this._warmed&&this._h2&&(e-=this._h2OverflowBytesDownloaded);let i=this._rtt,c=i/2,u=this._computeMaximumCongestionWindowInSegments(),l=c;this._warmed||(l=o+c+c+c+(this._ssl?i:0));let m=Math.ceil(l/i),p=l+this._serverLatency+c;this._warmed&&this._h2&&(p=0);let f=Math.max(p-r,0),h=a-f,y=Math.min(this._congestionWindow,u),v=0;f>0?v=y*1460:m=0;let D=0,E=e-v;for(;E>0&&D<=h;){m++,D+=i,y=Math.max(Math.min(u,y*2),1);let j=y*1460;v+=j,E-=j}let T=f+D,C=this._h2?Math.max(v-e,0):0,A=Math.max(Math.min(v,e),0),F;return this._warmed?this._h2?F={timeToFirstByte:p}:F={connectionTime:l,timeToFirstByte:p}:F={dnsResolutionTime:o,connectionTime:l-o,sslTime:this._ssl?i:void 0,timeToFirstByte:p},{roundTrips:m,timeElapsed:T,bytesDownloaded:A,extraBytesDownloaded:C,congestionWindow:y,connectionTiming:F}}}});var Ke,GY,JF,ZF,q,VY,It=b(()=>{"use strict";d();_();Ke={didntCollectScreenshots:"Chrome didn't collect any screenshots during the page load. Please make sure there is content visible on the page, and then try re-running Lighthouse. ({errorCode})",badTraceRecording:"Something went wrong with recording the trace over your page load. Please run Lighthouse again. ({errorCode})",noFcp:"The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again. ({errorCode})",noLcp:"The page did not display content that qualifies as a Largest Contentful Paint (LCP). Ensure the page has a valid LCP element and then try again. ({errorCode})",pageLoadTookTooLong:"Your page took too long to load. Please follow the opportunities in the report to reduce your page load time, and then try re-running Lighthouse. ({errorCode})",pageLoadFailed:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests.",pageLoadFailedWithStatusCode:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: {statusCode})",pageLoadFailedWithDetails:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: {errorDetails})",pageLoadFailedInsecure:"The URL you have provided does not have a valid security certificate. {securityMessages}",pageLoadFailedInterstitial:"Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests.",internalChromeError:"An internal Chrome error occurred. Please restart Chrome and try re-running Lighthouse.",requestContentTimeout:"Fetching resource content has exceeded the allotted time",notHtml:"The page provided is not HTML (served as MIME type {mimeType}).",urlInvalid:"The URL you have provided appears to be invalid.",protocolTimeout:"Waiting for DevTools protocol response has exceeded the allotted time. (Method: {protocolMethod})",dnsFailure:"DNS servers could not resolve the provided domain.",pageLoadFailedHung:"Lighthouse was unable to reliably load the URL you requested because the page stopped responding.",criTimeout:"Timeout waiting for initial Debugger Protocol connection.",missingRequiredArtifact:"Required {artifactName} gatherer did not run.",erroredRequiredArtifact:"Required {artifactName} gatherer encountered an error: {errorMessage}",oldChromeDoesNotSupportFeature:"This version of Chrome is too old to support '{featureName}'. Use a newer version to see full results."},GY=w("core/lib/lh-error.js",Ke),JF="__LighthouseErrorSentinel",ZF="__ErrorSentinel",q=class t extends Error{static{s(this,"LighthouseError")}constructor(e,n,r){super(e.code,r),this.name="LighthouseError",this.code=e.code,this.friendlyMessage=GY(e.message,{errorCode:this.code,...n}),this.lhrRuntimeError=!!e.lhrRuntimeError,n&&Object.assign(this,n),Error.captureStackTrace(this,t)}static fromProtocolMessage(e,n){let r=Object.values(t.errors).filter(i=>i.pattern).find(i=>i.pattern&&i.pattern.test(n.message));if(r)return new t(r);let a=`(${e}): ${n.message}`;n.data&&(a+=` (${n.data})`);let o=new Error(`Protocol error ${a}`);return Object.assign(o,{protocolMethod:e,protocolError:n.message})}static stringifyReplacer(e){if(e instanceof t){let{name:n,code:r,message:a,friendlyMessage:o,lhrRuntimeError:i,stack:c,cause:u,...l}=e;return{sentinel:JF,code:r,stack:c,cause:u,properties:l}}if(e instanceof Error){let{message:n,stack:r,cause:a}=e,o=e.code;return{sentinel:ZF,message:n,code:o,stack:r,cause:a}}throw new Error("Invalid value for LighthouseError stringification")}static parseReviver(e,n){if(typeof n=="object"&&n!==null){if(n.sentinel===JF){let{code:r,stack:a,cause:o,properties:i}=n,c=t.errors[r],u=new t(c,i,{cause:o});return u.stack=a,u}if(n.sentinel===ZF){let{message:r,code:a,stack:o,cause:i}=n,c=i?{cause:i}:void 0,u=new Error(r,c);return Object.assign(u,{code:a,stack:o}),u}}return n}},VY={NO_SPEEDLINE_FRAMES:{code:"NO_SPEEDLINE_FRAMES",message:Ke.didntCollectScreenshots,lhrRuntimeError:!0},SPEEDINDEX_OF_ZERO:{code:"SPEEDINDEX_OF_ZERO",message:Ke.didntCollectScreenshots,lhrRuntimeError:!0},NO_SCREENSHOTS:{code:"NO_SCREENSHOTS",message:Ke.didntCollectScreenshots,lhrRuntimeError:!0},INVALID_SPEEDLINE:{code:"INVALID_SPEEDLINE",message:Ke.didntCollectScreenshots,lhrRuntimeError:!0},NO_TRACING_STARTED:{code:"NO_TRACING_STARTED",message:Ke.badTraceRecording,lhrRuntimeError:!0},NO_RESOURCE_REQUEST:{code:"NO_RESOURCE_REQUEST",message:Ke.badTraceRecording,lhrRuntimeError:!0},NO_NAVSTART:{code:"NO_NAVSTART",message:Ke.badTraceRecording,lhrRuntimeError:!0},NO_FCP:{code:"NO_FCP",message:Ke.noFcp,lhrRuntimeError:!0},NO_DCL:{code:"NO_DCL",message:Ke.badTraceRecording,lhrRuntimeError:!0},NO_FMP:{code:"NO_FMP",message:Ke.badTraceRecording},NO_LCP:{code:"NO_LCP",message:Ke.noLcp},NO_LCP_ALL_FRAMES:{code:"NO_LCP_ALL_FRAMES",message:Ke.noLcp},UNSUPPORTED_OLD_CHROME:{code:"UNSUPPORTED_OLD_CHROME",message:Ke.oldChromeDoesNotSupportFeature},NO_TTI_CPU_IDLE_PERIOD:{code:"NO_TTI_CPU_IDLE_PERIOD",message:Ke.pageLoadTookTooLong},NO_TTI_NETWORK_IDLE_PERIOD:{code:"NO_TTI_NETWORK_IDLE_PERIOD",message:Ke.pageLoadTookTooLong},NO_DOCUMENT_REQUEST:{code:"NO_DOCUMENT_REQUEST",message:Ke.pageLoadFailed,lhrRuntimeError:!0},FAILED_DOCUMENT_REQUEST:{code:"FAILED_DOCUMENT_REQUEST",message:Ke.pageLoadFailedWithDetails,lhrRuntimeError:!0},ERRORED_DOCUMENT_REQUEST:{code:"ERRORED_DOCUMENT_REQUEST",message:Ke.pageLoadFailedWithStatusCode,lhrRuntimeError:!0},INSECURE_DOCUMENT_REQUEST:{code:"INSECURE_DOCUMENT_REQUEST",message:Ke.pageLoadFailedInsecure,lhrRuntimeError:!0},CHROME_INTERSTITIAL_ERROR:{code:"CHROME_INTERSTITIAL_ERROR",message:Ke.pageLoadFailedInterstitial,lhrRuntimeError:!0},PAGE_HUNG:{code:"PAGE_HUNG",message:Ke.pageLoadFailedHung,lhrRuntimeError:!0},NOT_HTML:{code:"NOT_HTML",message:Ke.notHtml,lhrRuntimeError:!0},TRACING_ALREADY_STARTED:{code:"TRACING_ALREADY_STARTED",message:Ke.internalChromeError,pattern:/Tracing.*started/,lhrRuntimeError:!0},PARSING_PROBLEM:{code:"PARSING_PROBLEM",message:Ke.internalChromeError,pattern:/Parsing problem/,lhrRuntimeError:!0},READ_FAILED:{code:"READ_FAILED",message:Ke.internalChromeError,pattern:/Read failed/,lhrRuntimeError:!0},INVALID_URL:{code:"INVALID_URL",message:Ke.urlInvalid},PROTOCOL_TIMEOUT:{code:"PROTOCOL_TIMEOUT",message:Ke.protocolTimeout,lhrRuntimeError:!0},DNS_FAILURE:{code:"DNS_FAILURE",message:Ke.dnsFailure,lhrRuntimeError:!0},CRI_TIMEOUT:{code:"CRI_TIMEOUT",message:Ke.criTimeout,lhrRuntimeError:!0},MISSING_REQUIRED_ARTIFACT:{code:"MISSING_REQUIRED_ARTIFACT",message:Ke.missingRequiredArtifact},ERRORED_REQUIRED_ARTIFACT:{code:"ERRORED_REQUIRED_ARTIFACT",message:Ke.erroredRequiredArtifact}};q.errors=VY;q.NO_ERROR="NO_ERROR";q.UNKNOWN_ERROR="UNKNOWN_ERROR"});function XY(t){return!t||!t.startsWith("chrome://")?t:(t.endsWith("/")&&(t=t.replace(/\/$/,"")),t.replace(/^chrome:\/\/chrome\//,"chrome://"))}var WY,$Y,YY,KY,lp,X,Qe=b(()=>{"use strict";d();Cn();It();WY=["https:","http:","chrome:","chrome-extension:"],$Y=["data","https","wss","blob","chrome","chrome-extension","about","filesystem"],YY=["localhost","127.0.0.1"],KY=["blob","data","intent","file","filesystem","chrome-extension"];s(XY,"rewriteChromeInternalUrl");lp=class{static{s(this,"UrlUtils")}static isValid(e){try{return new URL(e),!0}catch{return!1}}static hostsMatch(e,n){try{return new URL(e).host===new URL(n).host}catch{return!1}}static originsMatch(e,n){try{return new URL(e).origin===new URL(n).origin}catch{return!1}}static getOrigin(e){try{let n=new URL(e);return n.protocol==="chrome-extension:"?Te.getChromeExtensionOrigin(e):n.host&&n.origin||null}catch{return null}}static rootDomainsMatch(e,n){let r,a;try{r=Te.createOrReturnURL(e),a=Te.createOrReturnURL(n)}catch{return!1}if(!r.hostname||!a.hostname)return!1;let o=Te.getRootDomain(r),i=Te.getRootDomain(a);return o===i}static getURLDisplayName(e,n){return Te.getURLDisplayName(new URL(e),n)}static elideDataURI(e){try{return new URL(e).protocol==="data:"?Te.truncate(e,100):e}catch{return e}}static equalWithExcludedFragments(e,n){[e,n]=[e,n].map(XY);try{let r=new URL(e);r.hash="";let a=new URL(n);return a.hash="",r.href===a.href}catch{return!1}}static isProtocolAllowed(e){try{let n=new URL(e);return WY.includes(n.protocol)}catch{return!1}}static isLikeLocalhost(e){return YY.includes(e)||e.endsWith(".localhost")}static isSecureScheme(e){return $Y.includes(e)}static isNonNetworkProtocol(e){let n=e.includes(":")?e.slice(0,e.indexOf(":")):e;return KY.includes(n)}static guessMimeType(e){let n;try{n=new URL(e)}catch{return}if(n.protocol==="data:"){let o=n.pathname.match(/^(image\/(png|jpeg|svg\+xml|webp|gif|avif))[;,]/);return o?o[1]:void 0}let r=n.pathname.toLowerCase().match(/\.(png|jpeg|jpg|svg|webp|gif|avif)$/);if(!r)return;let a=r[1];return a==="svg"?"image/svg+xml":a==="jpg"?"image/jpeg":`image/${a}`}static normalizeUrl(e){if(e&&this.isValid(e)&&this.isProtocolAllowed(e))return new URL(e).href;throw new q(q.errors.INVALID_URL)}};lp.INVALID_URL_DEBUG_STRING="Lighthouse was unable to determine the URL of some script executions. It's possible a Chrome extension or other eval'd code is the source.";X=lp});var QF,JY,ZY,Ht,Uo=b(()=>{"use strict";d();Qe();QF=14*1024,JY=.4,ZY={Document:.9,XHR:.9,Fetch:.9},Ht=class t{static{s(this,"NetworkAnalyzer")}static get SUMMARY(){return"__SUMMARY__"}static groupByOrigin(e){let n=new Map;return e.forEach(r=>{let a=r.parsedURL.securityOrigin,o=n.get(a)||[];o.push(r),n.set(a,o)}),n}static getSummary(e){e.sort((r,a)=>r-a);let n;if(e.length===0)n=e[0];else if(e.length%2===0){let r=e[Math.floor((e.length-1)/2)],a=e[Math.floor((e.length-1)/2)+1];n=(r+a)/2}else n=e[Math.floor((e.length-1)/2)];return{min:e[0],max:e[e.length-1],avg:e.reduce((r,a)=>r+a,0)/e.length,median:n}}static summarize(e){let n=new Map,r=[];for(let[a,o]of e)n.set(a,t.getSummary(o)),r.push(...o);return n.set(t.SUMMARY,t.getSummary(r)),n}static _estimateValueByOrigin(e,n){let r=t.estimateIfConnectionWasReused(e),a=t.groupByOrigin(e),o=new Map;for(let[i,c]of a.entries()){let u=[];for(let l of c){let m=l.timing;if(!m)continue;let p=n({record:l,timing:m,connectionReused:r.get(l.requestId)});typeof p<"u"&&(u=u.concat(p))}u.length&&o.set(i,u)}return o}static _estimateRTTViaConnectionTiming(e){let{timing:n,connectionReused:r,record:a}=e;if(r)return;if(globalThis.isLightrider&&a.lrStatistics)return a.protocol.startsWith("h3")?a.lrStatistics.TCPMs:[a.lrStatistics.TCPMs/2,a.lrStatistics.TCPMs/2];let{connectStart:o,sslStart:i,sslEnd:c,connectEnd:u}=n;if(u>=0&&o>=0&&a.protocol.startsWith("h3"))return u-o;if(i>=0&&c>=0&&i!==o)return[u-i,i-o];if(o>=0&&u>=0)return u-o}static _estimateRTTViaDownloadTiming(e){let{timing:n,connectionReused:r,record:a}=e;if(r||a.transferSize<=QF||!Number.isFinite(n.receiveHeadersEnd)||n.receiveHeadersEnd<0)return;let i=a.networkEndTime-a.networkRequestTime-n.receiveHeadersEnd,c=Math.log2(a.transferSize/QF);if(!(c>5))return i/c}static _estimateRTTViaSendStartTiming(e){let{timing:n,connectionReused:r,record:a}=e;if(r||!Number.isFinite(n.sendStart)||n.sendStart<0)return;let o=1;return a.protocol.startsWith("h3")||(o+=1),a.parsedURL.scheme==="https"&&(o+=1),n.sendStart/o}static _estimateRTTViaHeadersEndTiming(e){let{timing:n,connectionReused:r,record:a}=e;if(!Number.isFinite(n.receiveHeadersEnd)||n.receiveHeadersEnd<0||!a.resourceType)return;let o=ZY[a.resourceType]||JY,i=n.receiveHeadersEnd*o,c=1;return r||(c+=1,a.protocol.startsWith("h3")||(c+=1),a.parsedURL.scheme==="https"&&(c+=1)),Math.max((n.receiveHeadersEnd-i)/c,3)}static _estimateResponseTimeByOrigin(e,n){return t._estimateValueByOrigin(e,({record:r,timing:a})=>{if(globalThis.isLightrider&&r.lrStatistics)return r.lrStatistics.requestMs;if(!Number.isFinite(a.receiveHeadersEnd)||a.receiveHeadersEnd<0||!Number.isFinite(a.sendEnd)||a.sendEnd<0)return;let o=a.receiveHeadersEnd-a.sendEnd,i=r.parsedURL.securityOrigin,c=n.get(i)||n.get(t.SUMMARY)||0;return Math.max(o-c,0)})}static canTrustConnectionInformation(e){let n=new Map;for(let r of e){let a=n.get(r.connectionId)||!r.connectionReused;n.set(r.connectionId,a)}return n.size<=1?!1:Array.from(n.values()).every(r=>r)}static estimateIfConnectionWasReused(e,n){let{forceCoarseEstimates:r=!1}=n||{};if(!r&&t.canTrustConnectionInformation(e))return new Map(e.map(i=>[i.requestId,!!i.connectionReused]));let a=new Map,o=t.groupByOrigin(e);for(let[i,c]of o.entries()){let u=c.map(m=>m.networkEndTime).reduce((m,p)=>Math.min(m,p),1/0);for(let m of c)a.set(m.requestId,m.networkRequestTime>=u||m.protocol==="h2");let l=c.reduce((m,p)=>m.networkRequestTime>p.networkRequestTime?p:m);a.set(l.requestId,!1)}return a}static estimateRTTByOrigin(e,n){let{forceCoarseEstimates:r=!1,coarseEstimateMultiplier:a=.3,useDownloadEstimates:o=!0,useSendStartEstimates:i=!0,useHeadersEndEstimates:c=!0}=n||{},u=t.estimateIfConnectionWasReused(e),l=t.groupByOrigin(e),m=new Map;for(let[f,h]of l.entries()){let v=function(D,E=1){for(let T of h){let C=T.timing;if(!C)continue;let A=D({record:T,timing:C,connectionReused:u.get(T.requestId)});A!==void 0&&(Array.isArray(A)?y.push(...A.map(F=>F*E)):y.push(A*E))}};var p=v;s(v,"collectEstimates");let y=[];r||v(this._estimateRTTViaConnectionTiming),y.length||(o&&v(this._estimateRTTViaDownloadTiming,a),i&&v(this._estimateRTTViaSendStartTiming,a),c&&v(this._estimateRTTViaHeadersEndTiming,a)),y.length&&m.set(f,y)}if(!m.size)throw new Error("No timing information available");return t.summarize(m)}static estimateServerResponseTimeByOrigin(e,n){let r=(n||{}).rttByOrigin;if(!r){r=new Map;let o=t.estimateRTTByOrigin(e,n);for(let[i,c]of o.entries())r.set(i,c.min)}let a=t._estimateResponseTimeByOrigin(e,r);return t.summarize(a)}static estimateThroughput(e){let n=0,r=e.reduce((c,u)=>(u.parsedURL?.scheme==="data"||u.failed||!u.finished||u.statusCode>300||!u.transferSize||(n+=u.transferSize,c.push({time:u.responseHeadersEndTime/1e3,isStart:!0}),c.push({time:u.networkEndTime/1e3,isStart:!1})),c),[]).sort((c,u)=>c.time-u.time);if(!r.length)return 1/0;let a=0,o=0,i=0;return r.forEach(c=>{c.isStart?(a===0&&(o=c.time),a++):(a--,a===0&&(i+=c.time-o))}),n*8/i}static findResourceForUrl(e,n){return e.find(r=>n.startsWith(r.url)&&X.equalWithExcludedFragments(r.url,n))}static findLastDocumentForUrl(e,n){let r=e.filter(a=>a.resourceType==="Document"&&n.startsWith(a.url)&&X.equalWithExcludedFragments(a.url,n));return r[r.length-1]}static resolveRedirects(e){for(;e.redirectDestination;)e=e.redirectDestination;return e}}});var QY,eK,tK,dp,ek=b(()=>{"use strict";d();jt();Uo();pg();QY=30,eK=["https","wss"],tK=6,dp=class{static{s(this,"ConnectionPool")}constructor(e,n){this._options=n,this._records=e,this._connectionsByOrigin=new Map,this._connectionsByRecord=new Map,this._connectionsInUse=new Set,this._connectionReusedByRequestId=Ht.estimateIfConnectionWasReused(e,{forceCoarseEstimates:!0}),this._initializeConnections()}connectionsInUse(){return Array.from(this._connectionsInUse)}_initializeConnections(){let e=this._connectionReusedByRequestId,n=this._options.additionalRttByOrigin,r=this._options.serverResponseTimeByOrigin,a=Ht.groupByOrigin(this._records);for(let[o,i]of a.entries()){let c=[],u=n.get(o)||0,l=r.get(o)||QY;for(let p of i){if(e.get(p.requestId))continue;let f=eK.includes(p.parsedURL.scheme),h=p.protocol==="h2",y=new Yi(this._options.rtt+u,this._options.throughput,l,f,h);c.push(y)}if(!c.length)throw new Error(`Could not find a connection for origin: ${o}`);let m=c[0].isH2()?1:tK;for(;c.lengthu&&(o=c)}return o}acquire(e,n={}){if(this._connectionsByRecord.has(e))throw new Error("Record already has a connection");let r=e.parsedURL.securityOrigin,a=!!this._connectionReusedByRequestId.get(e.requestId),o=this._connectionsByOrigin.get(r)||[],i=this._findAvailableConnectionWithLargestCongestionWindow(o,{ignoreConnectionReused:n.ignoreConnectionReused,observedConnectionWasReused:a});return i?(this._connectionsInUse.add(i),this._connectionsByRecord.set(e,i),i):null}acquireActiveConnectionFromRecord(e){let n=this._connectionsByRecord.get(e);if(!n)throw new Error("Could not find an active connection for record");return n}release(e){let n=this._connectionsByRecord.get(e);this._connectionsByRecord.delete(e),this._connectionsInUse.delete(n)}}});var nK,Ki,tk=b(()=>{"use strict";d();jt();nK=2,Ki=class t{static{s(this,"DNSCache")}constructor({rtt:e}){this._rtt=e,this._resolvedDomainNames=new Map}getTimeUntilResolution(e,n){let{requestedAt:r=0,shouldUpdateCache:a=!1}=n||{},o=e.parsedURL.host,i=this._resolvedDomainNames.get(o),c=this._rtt*t.RTT_MULTIPLIER;if(i){let l=Math.max(i.resolvedAt-r,0);c=Math.min(l,c)}let u=r+c;return a&&this._updateCacheResolvedAtIfNeeded(e,u),c}_updateCacheResolvedAtIfNeeded(e,n){let r=e.parsedURL.host,a=this._resolvedDomainNames.get(r)||{resolvedAt:n};a.resolvedAt=Math.min(a.resolvedAt,n),this._resolvedDomainNames.set(r,a)}setResolvedAt(e,n){this._resolvedDomainNames.set(e,{resolvedAt:n})}};Ki.RTT_MULTIPLIER=nK});var du,nk=b(()=>{"use strict";d();gn();du=class{static{s(this,"SimulatorTimingMap")}constructor(){this._nodeTimings=new Map}getNodes(){return Array.from(this._nodeTimings.keys())}setReadyToStart(e,n){this._nodeTimings.set(e,n)}setInProgress(e,n){let r={...this.getQueued(e),startTime:n.startTime,timeElapsed:0};this._nodeTimings.set(e,e.type===be.TYPES.NETWORK?{...r,timeElapsedOvershoot:0,bytesDownloaded:0}:r)}setCompleted(e,n){let r={...this.getInProgress(e),endTime:n.endTime,connectionTiming:n.connectionTiming};this._nodeTimings.set(e,r)}setCpu(e,n){let r={...this.getCpuStarted(e),timeElapsed:n.timeElapsed};this._nodeTimings.set(e,r)}setCpuEstimated(e,n){let r={...this.getCpuStarted(e),estimatedTimeElapsed:n.estimatedTimeElapsed};this._nodeTimings.set(e,r)}setNetwork(e,n){let r={...this.getNetworkStarted(e),timeElapsed:n.timeElapsed,timeElapsedOvershoot:n.timeElapsedOvershoot,bytesDownloaded:n.bytesDownloaded};this._nodeTimings.set(e,r)}setNetworkEstimated(e,n){let r={...this.getNetworkStarted(e),estimatedTimeElapsed:n.estimatedTimeElapsed};this._nodeTimings.set(e,r)}getQueued(e){let n=this._nodeTimings.get(e);if(!n)throw new Error(`Node ${e.id} not yet queued`);return n}getCpuStarted(e){let n=this._nodeTimings.get(e);if(!n)throw new Error(`Node ${e.id} not yet queued`);if(!("startTime"in n))throw new Error(`Node ${e.id} not yet started`);if("bytesDownloaded"in n)throw new Error(`Node ${e.id} timing not valid`);return n}getNetworkStarted(e){let n=this._nodeTimings.get(e);if(!n)throw new Error(`Node ${e.id} not yet queued`);if(!("startTime"in n))throw new Error(`Node ${e.id} not yet started`);if(!("bytesDownloaded"in n))throw new Error(`Node ${e.id} timing not valid`);return n}getInProgress(e){let n=this._nodeTimings.get(e);if(!n)throw new Error(`Node ${e.id} not yet queued`);if(!("startTime"in n))throw new Error(`Node ${e.id} not yet started`);if(!("estimatedTimeElapsed"in n))throw new Error(`Node ${e.id} not yet in progress`);return n}getCompleted(e){let n=this._nodeTimings.get(e);if(!n)throw new Error(`Node ${e.id} not yet queued`);if(!("startTime"in n))throw new Error(`Node ${e.id} not yet started`);if(!("estimatedTimeElapsed"in n))throw new Error(`Node ${e.id} not yet in progress`);if(!("endTime"in n))throw new Error(`Node ${e.id} not yet completed`);return n}}});var Dr={};S(Dr,{defaultSettings:()=>qn,nonSimulatedSettingsOverrides:()=>Xi,screenEmulationMetrics:()=>mp,throttling:()=>Nn,userAgents:()=>ka});var Nn,rK,aK,mp,oK,iK,ka,qn,Xi,zn=b(()=>{"use strict";d();Nn={DEVTOOLS_RTT_ADJUSTMENT_FACTOR:3.75,DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR:.9,mobileSlow4G:{rttMs:150,throughputKbps:1638.4,requestLatencyMs:562.5,downloadThroughputKbps:1474.5600000000002,uploadThroughputKbps:675,cpuSlowdownMultiplier:4},mobileRegular3G:{rttMs:300,throughputKbps:700,requestLatencyMs:1125,downloadThroughputKbps:630,uploadThroughputKbps:630,cpuSlowdownMultiplier:4},desktopDense4G:{rttMs:40,throughputKbps:10240,cpuSlowdownMultiplier:1,requestLatencyMs:0,downloadThroughputKbps:0,uploadThroughputKbps:0}},rK={mobile:!0,width:412,height:823,deviceScaleFactor:1.75,disabled:!1},aK={mobile:!1,width:1350,height:940,deviceScaleFactor:1,disabled:!1},mp={mobile:rK,desktop:aK},oK="Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36",iK="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",ka={mobile:oK,desktop:iK},qn={output:"json",maxWaitForFcp:30*1e3,maxWaitForLoad:45*1e3,pauseAfterFcpMs:1e3,pauseAfterLoadMs:1e3,networkQuietThresholdMs:1e3,cpuQuietThresholdMs:1e3,formFactor:"mobile",throttling:Nn.mobileSlow4G,throttlingMethod:"simulate",screenEmulation:mp.mobile,emulatedUserAgent:ka.mobile,auditMode:!1,gatherMode:!1,clearStorageTypes:["file_systems","shader_cache","service_workers","cache_storage"],disableStorageReset:!1,debugNavigation:!1,channel:"node",usePassiveGathering:!1,disableFullPageScreenshot:!1,skipAboutBlank:!1,blankPage:"about:blank",ignoreStatusCode:!1,budgets:null,locale:"en-US",blockedUrlPatterns:null,additionalTraceCategories:null,extraHeaders:null,precomputedLanternData:null,onlyAudits:null,onlyCategories:null,skipAudits:null},Xi={pauseAfterFcpMs:5250,pauseAfterLoadMs:5250,networkQuietThresholdMs:5250,cpuQuietThresholdMs:5250}});var fg,sK,cK,uK,Hn,lK,rk,mu,hg=b(()=>{"use strict";d();jt();gn();pg();ek();tk();nk();zn();fg=Nn.mobileSlow4G,sK=10,cK=.5,uK=1e4,Hn={NotReadyToStart:0,ReadyToStart:1,InProgress:2,Complete:3},lK={VeryHigh:0,High:.25,Medium:.5,Low:1,VeryLow:2},rk=new Map,mu=class t{static{s(this,"Simulator")}constructor(e){if(this._options=Object.assign({rtt:fg.rttMs,throughput:fg.throughputKbps*1024,maximumConcurrentRequests:sK,cpuSlowdownMultiplier:fg.cpuSlowdownMultiplier,layoutTaskMultiplier:cK,additionalRttByOrigin:new Map,serverResponseTimeByOrigin:new Map},e),this._rtt=this._options.rtt,this._throughput=this._options.throughput,this._maximumConcurrentRequests=Math.max(Math.min(Yi.maximumSaturatedConnections(this._rtt,this._throughput),this._options.maximumConcurrentRequests),1),this._cpuSlowdownMultiplier=this._options.cpuSlowdownMultiplier,this._layoutTaskMultiplier=this._cpuSlowdownMultiplier*this._options.layoutTaskMultiplier,this._cachedNodeListByStartPosition=[],this._flexibleOrdering=!1,this._nodeTimings=new du,this._numberInProgressByType=new Map,this._nodes={},this._dns=new Ki({rtt:this._rtt}),this._connectionPool=null,!Number.isFinite(this._rtt))throw new Error(`Invalid rtt ${this._rtt}`);if(!Number.isFinite(this._throughput))throw new Error(`Invalid rtt ${this._throughput}`)}get rtt(){return this._rtt}_initializeConnectionPool(e){let n=[];e.getRootNode().traverse(r=>{r.type===be.TYPES.NETWORK&&n.push(r.record)}),this._connectionPool=new dp(n,this._options)}_initializeAuxiliaryData(){this._nodeTimings=new du,this._numberInProgressByType=new Map,this._nodes={},this._cachedNodeListByStartPosition=[];for(let e of Object.values(Hn))this._nodes[e]=new Set}_numberInProgress(e){return this._numberInProgressByType.get(e)||0}_markNodeAsReadyToStart(e,n){let r=t._computeNodeStartPosition(e),a=this._cachedNodeListByStartPosition.findIndex(i=>t._computeNodeStartPosition(i)>r),o=a===-1?this._cachedNodeListByStartPosition.length:a;this._cachedNodeListByStartPosition.splice(o,0,e),this._nodes[Hn.ReadyToStart].add(e),this._nodes[Hn.NotReadyToStart].delete(e),this._nodeTimings.setReadyToStart(e,{queuedTime:n})}_markNodeAsInProgress(e,n){let r=this._cachedNodeListByStartPosition.indexOf(e);this._cachedNodeListByStartPosition.splice(r,1),this._nodes[Hn.InProgress].add(e),this._nodes[Hn.ReadyToStart].delete(e),this._numberInProgressByType.set(e.type,this._numberInProgress(e.type)+1),this._nodeTimings.setInProgress(e,{startTime:n})}_markNodeAsComplete(e,n,r){this._nodes[Hn.Complete].add(e),this._nodes[Hn.InProgress].delete(e),this._numberInProgressByType.set(e.type,this._numberInProgress(e.type)-1),this._nodeTimings.setCompleted(e,{endTime:n,connectionTiming:r});for(let a of e.getDependents())a.getDependencies().some(i=>!this._nodes[Hn.Complete].has(i))||this._markNodeAsReadyToStart(a,n)}_acquireConnection(e){return this._connectionPool.acquire(e,{ignoreConnectionReused:this._flexibleOrdering})}_getNodesSortedByStartPosition(){return Array.from(this._cachedNodeListByStartPosition)}_startNodeIfPossible(e,n){if(e.type===be.TYPES.CPU){this._numberInProgress(e.type)===0&&this._markNodeAsInProgress(e,n);return}if(e.type!==be.TYPES.NETWORK)throw new Error("Unsupported");!e.isConnectionless&&(this._numberInProgress(e.type)>=this._maximumConcurrentRequests||!this._acquireConnection(e.record))||this._markNodeAsInProgress(e,n)}_updateNetworkCapacity(){let e=this._numberInProgress(be.TYPES.NETWORK);if(e!==0)for(let n of this._connectionPool.connectionsInUse())n.setThroughput(this._throughput/e)}_estimateTimeRemaining(e){if(e.type===be.TYPES.CPU)return this._estimateCPUTimeRemaining(e);if(e.type===be.TYPES.NETWORK)return this._estimateNetworkTimeRemaining(e);throw new Error("Unsupported")}_estimateCPUTimeRemaining(e){let n=this._nodeTimings.getCpuStarted(e),r=e.didPerformLayout()?this._layoutTaskMultiplier:this._cpuSlowdownMultiplier,o=Math.min(Math.round(e.event.dur/1e3*r),uK)-n.timeElapsed;return this._nodeTimings.setCpuEstimated(e,{estimatedTimeElapsed:o}),o}_estimateNetworkTimeRemaining(e){let n=e.record,r=this._nodeTimings.getNetworkStarted(e),a=0;if(e.fromDiskCache)a=8+20*((n.resourceSize||0)/1024/1024)-r.timeElapsed;else if(e.isNonNetworkProtocol)a=2+10*((n.resourceSize||0)/1024/1024)-r.timeElapsed;else{let i=this._connectionPool.acquireActiveConnectionFromRecord(n),c=this._dns.getTimeUntilResolution(n,{requestedAt:r.startTime,shouldUpdateCache:!0}),u=r.timeElapsed;a=i.simulateDownloadUntil(n.transferSize-r.bytesDownloaded,{timeAlreadyElapsed:u,dnsResolutionTime:c,maximumTimeToElapse:1/0}).timeElapsed}let o=a+r.timeElapsedOvershoot;return this._nodeTimings.setNetworkEstimated(e,{estimatedTimeElapsed:o}),o}_findNextNodeCompletionTime(){let e=1/0;for(let n of this._nodes[Hn.InProgress])e=Math.min(e,this._estimateTimeRemaining(n));return e}_updateProgressMadeInTimePeriod(e,n,r){let a=this._nodeTimings.getInProgress(e),o=a.estimatedTimeElapsed===n;if(e.type===be.TYPES.CPU||e.isConnectionless)return o?this._markNodeAsComplete(e,r):a.timeElapsed+=n;if(e.type!==be.TYPES.NETWORK)throw new Error("Unsupported");if(!("bytesDownloaded"in a))throw new Error("Invalid timing data");let i=e.record,c=this._connectionPool.acquireActiveConnectionFromRecord(i),u=this._dns.getTimeUntilResolution(i,{requestedAt:a.startTime,shouldUpdateCache:!0}),l=c.simulateDownloadUntil(i.transferSize-a.bytesDownloaded,{dnsResolutionTime:u,timeAlreadyElapsed:a.timeElapsed,maximumTimeToElapse:n-a.timeElapsedOvershoot});c.setCongestionWindow(l.congestionWindow),c.setH2OverflowBytesDownloaded(l.extraBytesDownloaded),o?(c.setWarmed(!0),this._connectionPool.release(i),this._markNodeAsComplete(e,r,l.connectionTiming)):(a.timeElapsed+=l.timeElapsed,a.timeElapsedOvershoot+=l.timeElapsed-n,a.bytesDownloaded+=l.bytesDownloaded)}_computeFinalNodeTimings(){let e=this._nodeTimings.getNodes().map(r=>[r,this._nodeTimings.getCompleted(r)]);e.sort((r,a)=>r[1].startTime-a[1].startTime);let n=e.map(([r,a])=>[r,{startTime:a.startTime,endTime:a.endTime,duration:a.endTime-a.startTime}]);return{nodeTimings:new Map(n),completeNodeTimings:new Map(e)}}getOptions(){return this._options}simulate(e,n){if(be.hasCycle(e))throw new Error("Cannot simulate graph with cycle");n=Object.assign({label:void 0,flexibleOrdering:!1},n),this._flexibleOrdering=!!n.flexibleOrdering,this._dns=new Ki({rtt:this._rtt}),this._initializeConnectionPool(e),this._initializeAuxiliaryData();let r=this._nodes[Hn.NotReadyToStart],a=this._nodes[Hn.ReadyToStart],o=this._nodes[Hn.InProgress],i=e.getRootNode();i.traverse(p=>r.add(p));let c=0,u=0;for(this._markNodeAsReadyToStart(i,c);a.size||o.size;){for(let f of this._getNodesSortedByStartPosition())this._startNodeIfPossible(f,c);if(!o.size){if(this._flexibleOrdering)throw new Error("Failed to start a node");this._flexibleOrdering=!0;continue}this._updateNetworkCapacity();let p=this._findNextNodeCompletionTime();if(c+=p,!Number.isFinite(p)||u>1e5)throw new Error("Simulation failed, depth exceeded");u++;for(let f of o)this._updateProgressMadeInTimePeriod(f,p,c)}let{nodeTimings:l,completeNodeTimings:m}=this._computeFinalNodeTimings();return rk.set(n.label||"unlabeled",m),{timeInMs:c,nodeTimings:l}}computeWastedMsFromWastedBytes(e){let{throughput:n,observedThroughput:r}=this._options,a=n===0?r:n;if(a===0)return 0;let i=e*8/a*1e3;return Math.round(i/10)*10}static get ALL_NODE_TIMINGS(){return rk}static _computeNodeStartPosition(e){return e.type==="cpu"?e.startTime:e.startTime+(lK[e.record.priority]*1e3*1e3||0)}}});var ak=b(()=>{"use strict";d();});var ok=b(()=>{"use strict";d();_e();yr();});var ik,pp,sk=b(()=>{"use strict";d();ik=Mt(nu(),1);pp=class t{static{s(this,"ArbitraryEqualityMap")}constructor(){this._equalsFn=t.deepEquals,this._entries=[]}setEqualityFn(e){this._equalsFn=e}has(e){return this._findIndexOf(e)!==-1}get(e){return this._entries[this._findIndexOf(e)]?.value}set(e,n){let r=this._findIndexOf(e);r===-1&&(r=this._entries.length),this._entries[r]={key:e,value:n}}_findIndexOf(e){for(let n=0;n{let o=e?Object.fromEntries(e.map(f=>[f,r[f]])):r,i=a.computedCache,c=t.name,u=i.get(c)||new pp;i.set(c,u);let l=u.get(o);if(l)return l;let m={msg:`Computing artifact: ${c}`,id:`lh:computed:${c}`};k.time(m,"verbose");let p=t.compute_(o,a);return u.set(o,p),p.then(()=>k.timeEnd(m)).catch(()=>k.timeEnd(m)),p},"request")})}var le=b(()=>{"use strict";d();_e();sk();s(z,"makeComputedArtifact")});var ck,uk,lk,dk,mk,pk,fk,fp,G,mt=b(()=>{"use strict";d();jt();Qe();ck="X-TCPMs",uk="X-SSLMs",lk="X-RequestMs",dk="X-ResponseMs",mk="X-TotalMs",pk="X-TotalFetchedSize",fk="X-ProtocolIsH2",fp={XHR:"XHR",Fetch:"Fetch",EventSource:"EventSource",Script:"Script",Stylesheet:"Stylesheet",Image:"Image",Media:"Media",Font:"Font",Document:"Document",TextTrack:"TextTrack",WebSocket:"WebSocket",Other:"Other",Manifest:"Manifest",SignedExchange:"SignedExchange",Ping:"Ping",Preflight:"Preflight",CSPViolationReport:"CSPViolationReport",Prefetch:"Prefetch"},G=class t{static{s(this,"NetworkRequest")}constructor(){this.requestId="",this.connectionId="0",this.connectionReused=!1,this.url="",this.protocol="",this.isSecure=!1,this.isValid=!1,this.parsedURL={scheme:""},this.documentURL="",this.rendererStartTime=-1,this.networkRequestTime=-1,this.responseHeadersEndTime=-1,this.networkEndTime=-1,this.transferSize=0,this.resourceSize=0,this.fromDiskCache=!1,this.fromMemoryCache=!1,this.fromPrefetchCache=!1,this.lrStatistics=void 0,this.finished=!1,this.requestMethod="",this.statusCode=-1,this.redirectSource=void 0,this.redirectDestination=void 0,this.redirects=void 0,this.failed=!1,this.localizedFailDescription="",this.initiator={type:"other"},this.timing=void 0,this.resourceType=void 0,this.mimeType="",this.priority="Low",this.initiatorRequest=void 0,this.responseHeaders=[],this.responseHeadersText="",this.fetchedViaServiceWorker=!1,this.frameId="",this.sessionId=void 0,this.sessionTargetType=void 0,this.isLinkPreload=!1}hasErrorStatusCode(){return this.statusCode>=400}setInitiatorRequest(e){this.initiatorRequest=e}onRequestWillBeSent(e){this.requestId=e.requestId;let n;try{n=new URL(e.request.url)}catch{return}this.url=e.request.url,this.documentURL=e.documentURL,this.parsedURL={scheme:n.protocol.split(":")[0],host:n.hostname,securityOrigin:n.origin},this.isSecure=X.isSecureScheme(this.parsedURL.scheme),this.rendererStartTime=e.timestamp*1e3,this.networkRequestTime=this.rendererStartTime,this.requestMethod=e.request.method,this.initiator=e.initiator,this.resourceType=e.type&&fp[e.type],this.priority=e.request.initialPriority,this.frameId=e.frameId,this.isLinkPreload=e.initiator.type==="preload"||!!e.request.isLinkPreload,this.isValid=!0}onRequestServedFromCache(){this.fromMemoryCache=!0}onResponseReceived(e){this._onResponse(e.response,e.timestamp,e.type),this._updateProtocolForLightrider(),this.frameId=e.frameId}onDataReceived(e){this.resourceSize+=e.dataLength,e.encodedDataLength!==-1&&(this.transferSize+=e.encodedDataLength)}onLoadingFinished(e){this.finished||(this.finished=!0,this.networkEndTime=e.timestamp*1e3,e.encodedDataLength>=0&&(this.transferSize=e.encodedDataLength),this._updateResponseHeadersEndTimeIfNecessary(),this._backfillReceiveHeaderStartTiming(),this._updateTransferSizeForLightrider(),this._updateTimingsForLightrider())}onLoadingFailed(e){this.finished||(this.finished=!0,this.networkEndTime=e.timestamp*1e3,this.failed=!0,this.resourceType=e.type&&fp[e.type],this.localizedFailDescription=e.errorText,this._updateResponseHeadersEndTimeIfNecessary(),this._backfillReceiveHeaderStartTiming(),this._updateTransferSizeForLightrider(),this._updateTimingsForLightrider())}onResourceChangedPriority(e){this.priority=e.newPriority}onRedirectResponse(e){if(!e.redirectResponse)throw new Error("Missing redirectResponse data");this._onResponse(e.redirectResponse,e.timestamp,e.type),this.resourceType=void 0,this.finished=!0,this.networkEndTime=e.timestamp*1e3,this._updateResponseHeadersEndTimeIfNecessary(),this._backfillReceiveHeaderStartTiming()}setSession(e){this.sessionId=e}get isOutOfProcessIframe(){return this.sessionTargetType==="iframe"}_onResponse(e,n,r){this.url=e.url,this.connectionId=String(e.connectionId),this.connectionReused=e.connectionReused,e.protocol&&(this.protocol=e.protocol),this.responseHeadersEndTime=n*1e3,this.transferSize=e.encodedDataLength,typeof e.fromDiskCache=="boolean"&&(this.fromDiskCache=e.fromDiskCache),typeof e.fromPrefetchCache=="boolean"&&(this.fromPrefetchCache=e.fromPrefetchCache),this.statusCode=e.status,this.timing=e.timing,r&&(this.resourceType=fp[r]),this.mimeType=e.mimeType,this.responseHeadersText=e.headersText||"",this.responseHeaders=t._headersDictToHeadersArray(e.headers),this.fetchedViaServiceWorker=!!e.fromServiceWorker,this.fromMemoryCache&&(this.timing=void 0),this.timing&&this._recomputeTimesWithResourceTiming(this.timing)}_recomputeTimesWithResourceTiming(e){if(e.requestTime===0||e.receiveHeadersEnd===-1)return;this.networkRequestTime=e.requestTime*1e3;let n=this.networkRequestTime+e.receiveHeadersEnd,r=this.responseHeadersEndTime;this.responseHeadersEndTime=n,this.responseHeadersEndTime=Math.min(this.responseHeadersEndTime,r),this.responseHeadersEndTime=Math.max(this.responseHeadersEndTime,this.networkRequestTime),this.networkEndTime=Math.max(this.networkEndTime,this.responseHeadersEndTime)}_updateResponseHeadersEndTimeIfNecessary(){this.responseHeadersEndTime=Math.min(this.networkEndTime,this.responseHeadersEndTime)}_updateTransferSizeForLightrider(){if(!globalThis.isLightrider)return;let e=this.responseHeaders.find(r=>r.name===pk);if(!e)return;let n=parseFloat(e.value);isNaN(n)||(this.transferSize=n)}_updateProtocolForLightrider(){globalThis.isLightrider&&this.responseHeaders.some(e=>e.name===fk)&&(this.protocol="h2")}_backfillReceiveHeaderStartTiming(){!this.timing||this.timing.receiveHeadersStart!==void 0||(this.timing.receiveHeadersStart=this.timing.receiveHeadersEnd)}_updateTimingsForLightrider(){if(!globalThis.isLightrider)return;let e=this.responseHeaders.find(p=>p.name===mk);if(!e)return;let n=parseInt(e.value),r=this.responseHeaders.find(p=>p.name===ck),a=this.responseHeaders.find(p=>p.name===uk),o=this.responseHeaders.find(p=>p.name===lk),i=this.responseHeaders.find(p=>p.name===dk),c=r?Math.max(0,parseInt(r.value)):0,u=a?Math.max(0,parseInt(a.value)):0,l=o?Math.max(0,parseInt(o.value)):0,m=i?Math.max(0,parseInt(i.value)):0;if(!Number.isNaN(c+l+m+n)){if(c+l+m!==n){if(Math.abs(c+l+m-n)>=25)return;n=c+l+m}u>c||(this.lrStatistics={endTimeDeltaMs:this.networkEndTime-(this.networkRequestTime+n),TCPMs:c,requestMs:l,responseMs:m})}}static getRequestIdForBackend(e){return e.replace(/(:redirect)+$/,"")}static _headersDictToHeadersArray(e){let n=[];for(let r of Object.keys(e)){let a=e[r].split(` -`);for(let o=0;oo.name==="Non-Authoritative-Reason")?.value==="HSTS"&&t.isSecureRequest(n):!1}static getResourceSizeOnNetwork(e){return Math.min(e.resourceSize||0,e.transferSize||1/0)}};G.HEADER_TCP=ck;G.HEADER_SSL=uk;G.HEADER_REQ=lk;G.HEADER_RES=dk;G.HEADER_TOTAL=mk;G.HEADER_FETCHED_SIZE=pk;G.HEADER_PROTOCOL_IS_H2=fk});var pu,fu=b(()=>{"use strict";d();jt();gn();mt();pu=class t extends be{static{s(this,"NetworkNode")}constructor(e){super(e.requestId),this._record=e}get type(){return be.TYPES.NETWORK}get startTime(){return this._record.networkRequestTime*1e3}get endTime(){return this._record.networkEndTime*1e3}get record(){return this._record}get initiatorType(){return this._record.initiator&&this._record.initiator.type}get fromDiskCache(){return!!this._record.fromDiskCache}get isNonNetworkProtocol(){return G.isNonNetworkRequest(this._record)}get isConnectionless(){return this.fromDiskCache||this.isNonNetworkProtocol}hasRenderBlockingPriority(){let e=this._record.priority,n=this._record.resourceType===G.TYPES.Script,r=this._record.resourceType===G.TYPES.Document;return e==="VeryHigh"||e==="High"&&n||e==="High"&&r}cloneWithoutRelationships(){let e=new t(this._record);return e.setIsMainDocument(this._isMainDocument),e}}});var hp,hu=b(()=>{"use strict";d();jt();gn();hp=class t extends be{static{s(this,"CPUNode")}constructor(e,n=[]){let r=`${e.tid}.${e.ts}`;super(r),this._event=e,this._childEvents=n}get type(){return be.TYPES.CPU}get startTime(){return this._event.ts}get endTime(){return this._event.ts+this._event.dur}get event(){return this._event}get childEvents(){return this._childEvents}didPerformLayout(){return this._childEvents.some(e=>e.name==="Layout")}getEvaluateScriptURLs(){let e=new Set;for(let n of this._childEvents)n.name==="EvaluateScript"&&(!n.args.data||!n.args.data.url||e.add(n.args.data.url));return e}cloneWithoutRelationships(){return new t(this._event,this._childEvents)}}});var gg,gu,yg=b(()=>{"use strict";d();It();yr();gg=class extends qt{static{s(this,"LHTraceProcessor")}static createNoNavstartError(){return new q(q.errors.NO_NAVSTART)}static createNoResourceSendRequestError(){return new q(q.errors.NO_RESOURCE_REQUEST)}static createNoTracingStartedError(){return new q(q.errors.NO_TRACING_STARTED)}static createNoFirstContentfulPaintError(){return new q(q.errors.NO_FCP)}},gu=gg});var bg,Ne,Lt=b(()=>{"use strict";d();le();yg();bg=class{static{s(this,"ProcessedTrace")}static async compute_(e){return gu.processTrace(e)}},Ne=z(bg,null)});var vg,hk,gk=b(()=>{"use strict";d();Uo();le();me();Lt();vg=class{static{s(this,"DocumentUrls")}static async compute_(e,n){let r=await Ne.request(e.trace,n),a=await H.request(e.devtoolsLog,n),o=r.mainFrameInfo.frameId,i,c;for(let l of e.devtoolsLog)if(l.method==="Page.frameNavigated"&&l.params.frame.id===o){let{url:m}=l.params.frame;i||(i=m),c=m}if(!i||!c)throw new Error("No main frame navigations found");let u=Ht.findResourceForUrl(a,i);return u?.redirects?.length&&(i=u.redirects[0].url),{requestedUrl:i,mainDocumentUrl:c}}},hk=z(vg,["devtoolsLog","trace"])});var dK,mK,wg,Tt,Mn=b(()=>{"use strict";d();le();fu();hu();yr();mt();Lt();me();Uo();gk();dK=10,mK=/^video/,wg=class t{static{s(this,"PageDependencyGraph")}static getNetworkInitiators(e){if(!e.initiator)return[];if(e.initiator.url)return[e.initiator.url];if(e.initiator.type==="script"){let n=new Set,r=e.initiator.stack;for(;r;){let a=r.callFrames||[];for(let o of a)o.url&&n.add(o.url);r=r.parent}return Array.from(n)}return[]}static getNetworkNodeOutput(e){let n=[],r=new Map,a=new Map,o=new Map;return e.forEach(i=>{if(mK.test(i.mimeType)||i.sessionTargetType==="worker")return;for(;r.has(i.requestId);)i.requestId+=":duplicate";let c=new pu(i);n.push(c);let u=a.get(i.url)||[];if(u.push(c),r.set(i.requestId,c),a.set(i.url,u),i.frameId&&i.resourceType===G.TYPES.Document&&i.documentURL===i.url){let l=o.has(i.frameId)?null:c;o.set(i.frameId,l)}}),{nodes:n,idToNodeMap:r,urlToNodeMap:a,frameIdToNodeMap:o}}static getCPUNodes({mainThreadEvents:e}){let n=[],r=0;for(qt.assertHasToplevelEvents(e);r{let a=r.record.initiatorRequest||e.record,o=n.idToNodeMap.get(a.requestId)||e,i=!o.isDependentOn(r)&&r.canDependOn(o),c=t.getNetworkInitiators(r.record);if(c.length?c.forEach(l=>{let m=n.urlToNodeMap.get(l)||[];m.length===1&&m[0].startTime<=r.startTime&&!m[0].isDependentOn(r)?r.addDependency(m[0]):i&&o.addDependent(r)}):i&&o.addDependent(r),r!==e&&r.getDependencies().length===0&&r.canDependOn(e)&&r.addDependency(e),!r.record.redirects)return;let u=[...r.record.redirects,r.record];for(let l=1;l=h.startTime||h.addDependency(v))}s(i,"addDependencyOnFrame");function c(h,y){if(!y)return;let v=-100*1e3,D=n.urlToNodeMap.get(y)||[],E=null,T=1/0;for(let C of D){if(h.startTime<=C.startTime)return;let A=h.startTime-C.endTime;A>=v&&AE.url).filter(Boolean);switch(y.name){case"TimerInstall":u.set(y.args.data.timerId,h),D.forEach(E=>c(h,E));break;case"TimerFire":{let E=u.get(y.args.data.timerId);if(!E||E.endTime>h.startTime)break;E.addDependent(h);break}case"InvalidateLayout":case"ScheduleStyleRecalculation":i(h,y.args.data.frame),D.forEach(E=>c(h,E));break;case"EvaluateScript":i(h,y.args.data.frame),c(h,v),D.forEach(E=>c(h,E));break;case"XHRReadyStateChange":if(y.args.data.readyState!==4)break;c(h,v),D.forEach(E=>c(h,E));break;case"FunctionCall":case"v8.compile":i(h,y.args.data.frame),c(h,v);break;case"ParseAuthorStyleSheet":i(h,y.args.data.frame),c(h,y.args.data.styleSheetUrl);break;case"ResourceSendRequest":i(h,y.args.data.frame),o(h,y.args.data.requestId),D.forEach(E=>c(h,E));break}}h.getNumberOfDependencies()===0&&h.canDependOn(e)&&h.addDependency(e)}let l=dK*1e3,m=!1,p=!1,f=!1;for(let h of r){let y=!1;!m&&h.childEvents.some(v=>v.name==="Layout")&&(y=m=!0),!p&&h.childEvents.some(v=>v.name==="Paint")&&(y=p=!0),!f&&h.childEvents.some(v=>v.name==="ParseHTML")&&(y=f=!0),!(y||h.event.dur>=l)&&(h.getNumberOfDependencies()===1||h.getNumberOfDependents()<=1)&&t._pruneNode(h)}}static _pruneNode(e){let n=e.getDependencies(),r=e.getDependents();for(let a of n){e.removeDependency(a);for(let o of r)a.addDependent(o)}for(let a of r)e.removeDependent(a)}static createGraph(e,n,r){let a=t.getNetworkNodeOutput(n),o=t.getCPUNodes(e),{requestedUrl:i,mainDocumentUrl:c}=r;if(!i)throw new Error("requestedUrl is required to get the root request");if(!c)throw new Error("mainDocumentUrl is required to get the main resource");let u=Ht.findResourceForUrl(n,i);if(!u)throw new Error("rootRequest not found");let l=a.idToNodeMap.get(u.requestId);if(!l)throw new Error("rootNode not found");let m=Ht.findLastDocumentForUrl(n,c);if(!m)throw new Error("mainDocumentRequest not found");let p=a.idToNodeMap.get(m.requestId);if(!p)throw new Error("mainDocumentNode not found");if(t.linkNetworkNodes(l,a),t.linkCPUNodes(l,a,o),p.setIsMainDocument(!0),pu.hasCycle(l))throw new Error("Invalid dependency graph created, cycle detected");return l}static printGraph(e,n=100){function r(l,m,p=" "){return l+p.repeat(Math.max(m-l.length,0))}s(r,"padRight");let a=[];e.traverse(l=>a.push(l)),a.sort((l,m)=>l.startTime-m.startTime);let o=a[0].startTime,u=(a.reduce((l,m)=>Math.max(l,m.endTime),0)-o)/n;a.forEach(l=>{let m=Math.round((l.startTime-o)/u),p=Math.ceil((l.endTime-l.startTime)/u),f=r("",m)+r("",p,"="),h=l.record?l.record.url:l.type;console.log(r(f,n),`| ${h.slice(0,30)}`)})}static async compute_(e,n){let{trace:r,devtoolsLog:a}=e,[o,i]=await Promise.all([Ne.request(r,n),H.request(a,n)]),c=e.URL||await hk.request(e,n);return t.createGraph(o,i,c)}},Tt=z(wg,["devtoolsLog","trace","URL"])});var pK,Ji,Dg=b(()=>{"use strict";d();$r();_e();jt();mt();Mn();pK=Be,Ji=class t extends pK{static{s(this,"NetworkRecorder")}constructor(){super(),this._records=[],this._recordsById=new Map}getRawRecords(){return Array.from(this._records)}onRequestStarted(e){this._records.push(e),this._recordsById.set(e.requestId,e),this.emit("requeststarted",e)}onRequestFinished(e){this.emit("requestfinished",e)}onRequestWillBeSent(e){let n=e.params,r=this._findRealRequestAndSetSession(n.requestId,e.targetType,e.sessionId);if(!r){let i=new G;i.onRequestWillBeSent(n),i.sessionId=e.sessionId,i.sessionTargetType=e.targetType,this.onRequestStarted(i),k.verbose("network",`request will be sent to ${i.url}`);return}if(!n.redirectResponse)return;let a={...n,initiator:r.initiator,requestId:`${r.requestId}:redirect`},o=new G;o.onRequestWillBeSent(a),r.onRedirectResponse(n),k.verbose("network",`${r.url} redirected to ${o.url}`),r.redirectDestination=o,o.redirectSource=r,this.onRequestStarted(o),this.onRequestFinished(r)}onRequestServedFromCache(e){let n=e.params,r=this._findRealRequestAndSetSession(n.requestId,e.targetType,e.sessionId);r&&(k.verbose("network",`${r.url} served from cache`),r.onRequestServedFromCache())}onResponseReceived(e){let n=e.params,r=this._findRealRequestAndSetSession(n.requestId,e.targetType,e.sessionId);r&&(k.verbose("network",`${r.url} response received`),r.onResponseReceived(n))}onDataReceived(e){let n=e.params,r=this._findRealRequestAndSetSession(n.requestId,e.targetType,e.sessionId);r&&(k.verbose("network",`${r.url} data received`),r.onDataReceived(n))}onLoadingFinished(e){let n=e.params,r=this._findRealRequestAndSetSession(n.requestId,e.targetType,e.sessionId);r&&(k.verbose("network",`${r.url} loading finished`),r.onLoadingFinished(n),this.onRequestFinished(r))}onLoadingFailed(e){let n=e.params,r=this._findRealRequestAndSetSession(n.requestId,e.targetType,e.sessionId);r&&(k.verbose("network",`${r.url} loading failed`),r.onLoadingFailed(n),this.onRequestFinished(r))}onResourceChangedPriority(e){let n=e.params,r=this._findRealRequestAndSetSession(n.requestId,e.targetType,e.sessionId);r&&r.onResourceChangedPriority(n)}dispatch(e){switch(e.method){case"Network.requestWillBeSent":return this.onRequestWillBeSent(e);case"Network.requestServedFromCache":return this.onRequestServedFromCache(e);case"Network.responseReceived":return this.onResponseReceived(e);case"Network.dataReceived":return this.onDataReceived(e);case"Network.loadingFinished":return this.onLoadingFinished(e);case"Network.loadingFailed":return this.onLoadingFailed(e);case"Network.resourceChangedPriority":return this.onResourceChangedPriority(e);default:return}}_findRealRequestAndSetSession(e,n,r){let a=this._recordsById.get(e);if(!(!a||!a.isValid)){for(;a.redirectDestination;)a=a.redirectDestination;return a.setSession(r),a.sessionTargetType=n,a}}static _chooseInitiatorRequest(e,n){if(e.redirectSource)return e.redirectSource;let r=Tt.getNetworkInitiators(e)[0],a=n.get(r)||[];if(a=a.filter(o=>o.responseHeadersEndTime<=e.networkRequestTime&&o.finished&&!o.failed),a.length>1){let o=a.filter(i=>i.resourceType!==G.TYPES.Other);o.length&&(a=o)}if(a.length>1){let o=a.filter(i=>i.frameId===e.frameId);o.length&&(a=o)}if(a.length>1&&e.initiator.type==="parser"){let o=a.filter(i=>i.resourceType===G.TYPES.Document);o.length&&(a=o)}if(a.length>1){let o=a.filter(i=>i.isLinkPreload);if(o.length){let i=a.filter(u=>!u.isLinkPreload),c=i.every(u=>u.fromDiskCache||u.fromMemoryCache);i.length&&c&&(a=o)}}return a.length===1?a[0]:null}static recordsFromLogs(e){let n=new t;e.forEach(o=>n.dispatch(o));let r=n.getRawRecords().filter(o=>o.isValid),a=new Map;for(let o of r){let i=a.get(o.url)||[];i.push(o),a.set(o.url,i)}for(let o of r){let i=t._chooseInitiatorRequest(o,a);i&&o.setInitiatorRequest(i);let c=o;for(;c.redirectDestination;)c=c.redirectDestination;if(c===o||c.redirects)continue;let u=[];for(let l=c.redirectSource;l;l=l.redirectSource)u.unshift(l);c.redirects=u}return r}}});var Eg,H,me=b(()=>{"use strict";d();jt();le();Dg();Eg=class{static{s(this,"NetworkRecords")}static async compute_(e){return Ji.recordsFromLogs(e)}},H=z(Eg,null)});var Tg,nr,jo=b(()=>{"use strict";d();le();Uo();me();Tg=class t{static{s(this,"NetworkAnalysis")}static computeRTTAndServerResponseTime(e){let n=new Map;for(let[c,u]of Ht.estimateRTTByOrigin(e).entries())n.set(c,u.min);let r=Math.min(...Array.from(n.values())),a=Ht.estimateServerResponseTimeByOrigin(e,{rttByOrigin:n}),o=new Map,i=new Map;for(let[c,u]of a.entries()){let l=n.get(c)||r;o.set(c,l-r),i.set(c,u.median)}return{rtt:r,additionalRttByOrigin:o,serverResponseTimeByOrigin:i}}static async compute_(e,n){let r=await H.request(e,n),a=Ht.estimateThroughput(r),o=t.computeRTTAndServerResponseTime(r);return{throughput:a,...o}}},nr=z(Tg,null)});var Sg,Pt,Gn=b(()=>{"use strict";d();le();zn();hg();jo();Sg=class{static{s(this,"LoadSimulator")}static async compute_(e,n){let{throttlingMethod:r,throttling:a,precomputedLanternData:o}=e.settings,i=await nr.request(e.devtoolsLog,n),c={additionalRttByOrigin:i.additionalRttByOrigin,serverResponseTimeByOrigin:i.serverResponseTimeByOrigin,observedThroughput:i.throughput};switch(o&&(c.additionalRttByOrigin=new Map(Object.entries(o.additionalRttByOrigin)),c.serverResponseTimeByOrigin=new Map(Object.entries(o.serverResponseTimeByOrigin))),r){case"provided":c.rtt=i.rtt,c.throughput=i.throughput,c.cpuSlowdownMultiplier=1,c.layoutTaskMultiplier=1;break;case"devtools":a&&(c.rtt=a.requestLatencyMs/Nn.DEVTOOLS_RTT_ADJUSTMENT_FACTOR,c.throughput=a.downloadThroughputKbps*1024/Nn.DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR),c.cpuSlowdownMultiplier=1,c.layoutTaskMultiplier=1;break;case"simulate":a&&(c.rtt=a.rttMs,c.throughput=a.throughputKbps*1024,c.cpuSlowdownMultiplier=a.cpuSlowdownMultiplier);break;default:break}return new mu(c)}static convertAnalysisToSaveableLanternData(e){let n={additionalRttByOrigin:{},serverResponseTimeByOrigin:{}};for(let[r,a]of e.additionalRttByOrigin.entries())r.startsWith("http")&&(n.additionalRttByOrigin[r]=a);for(let[r,a]of e.serverResponseTimeByOrigin.entries())r.startsWith("http")&&(n.serverResponseTimeByOrigin[r]=a);return n}},Pt=z(Sg,["devtoolsLog","settings"])});function vk(t){if(k.log("Reading artifacts from disk:",t),!xn.existsSync(t))throw new Error("No saved artifacts found at "+t);let e=xn.readFileSync(Dt.join(t,xg),"utf8"),n=JSON.parse(e,q.parseReviver),r=xn.readdirSync(t);return r.filter(a=>a.endsWith(bu)).forEach(a=>{n.devtoolsLogs||(n.devtoolsLogs={});let o=a.replace(bu,""),i=JSON.parse(xn.readFileSync(Dt.join(t,a),"utf8"));n.devtoolsLogs[o]=i,o===gp&&(n.DevtoolsLog=i),o===yp&&(n.DevtoolsLogError=i)}),r.filter(a=>a.endsWith(yu)).forEach(a=>{n.traces||(n.traces={});let o=xn.readFileSync(Dt.join(t,a),{encoding:"utf-8"}),i=JSON.parse(o),c=a.replace(yu,"");n.traces[c]=Array.isArray(i)?{traceEvents:i}:i,c===gp&&(n.Trace=n.traces[c]),c===yp&&(n.TraceError=n.traces[c])}),Array.isArray(n.Timing)&&n.Timing.forEach(a=>a.gather=!0),n}function fK(t,e){return e instanceof Error?q.stringifyReplacer(e):e}async function wk(t,e){let n={msg:"Saving artifacts",id:"lh:assetSaver:saveArtifacts"};k.time(n),xn.mkdirSync(e,{recursive:!0});let r=xn.readdirSync(e);for(let f of r)(f.endsWith(yu)||f.endsWith(bu)||f===xg)&&xn.unlinkSync(`${e}/${f}`);let{traces:a,devtoolsLogs:o,DevtoolsLog:i,Trace:c,DevtoolsLogError:u,TraceError:l,...m}=t;c&&await yk(c,`${e}/${gp}${yu}`),l&&await yk(l,`${e}/${yp}${yu}`),i&&await bk(i,`${e}/${gp}${bu}`),u&&await bk(u,`${e}/${yp}${bu}`);let p=JSON.stringify(m,fK,2)+` -`;xn.writeFileSync(`${e}/${xg}`,p,"utf8"),k.log("Artifacts saved to disk in folder:",e),k.timeEnd(n)}function Dk(t,e){xn.writeFileSync(`${e}/lhr.report.json`,JSON.stringify(t,null,2))}function*Ek(t){if(yield`[ -`,t.length>0){let n=t[Symbol.iterator](),r=n.next().value;yield` ${JSON.stringify(r)}`;let a=500,o="";for(let i of n)o+=`, +`))):c=e.stylize("[Circular]","special")),_a(i)){if(o&&a.match(/^\d+$/))return c;i=JSON.stringify(""+a),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+c}function WY(e,t,n){var r=0,a=e.reduce(function(o,i){return r++,i.indexOf(` +`)>=0&&r++,o+i.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?n[0]+(t===""?"":t+` + `)+" "+e.join(`, + `)+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function $Y(e){return Array.isArray(e)}function tF(e){return typeof e=="boolean"}function ug(e){return e===null}function YY(e){return typeof e=="number"}function lg(e){return typeof e=="string"}function _a(e){return e===void 0}function ag(e){return pu(e)&&dg(e)==="[object RegExp]"}function pu(e){return typeof e=="object"&&e!==null}function QR(e){return pu(e)&&dg(e)==="[object Date]"}function og(e){return pu(e)&&(dg(e)==="[object Error]"||e instanceof Error)}function ig(e){return typeof e=="function"}function dg(e){return Object.prototype.toString.call(e)}function KY(e,t){if(!t||!pu(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function nF(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function XY(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(Oo&&e[Oo]){var t=e[Oo];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,Oo,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var n,r,a=new Promise(function(c,u){n=c,r=u}),o=[],i=0;i{d();Ta();ZR();BY=Object.getOwnPropertyDescriptors||s(function(t){for(var n=Object.keys(t),r={},a=0;a{d();Ci();rF=Bo;s(Bo,"BufferList");Bo.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length};Bo.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length};Bo.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}};Bo.prototype.clear=function(){this.head=this.tail=null,this.length=0};Bo.prototype.join=function(e){if(this.length===0)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n};Bo.prototype.concat=function(e){if(this.length===0)return U.alloc(0);if(this.length===1)return this.head.data;for(var t=U.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}});function ZY(e){if(e&&!JY(e))throw new Error("Unknown encoding: "+e)}function $i(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),ZY(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=eK;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=tK;break;default:this.write=QY;return}this.charBuffer=new U(6),this.charReceived=0,this.charLength=0}function QY(e){return e.toString(this.encoding)}function eK(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function tK(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var JY,oF=b(()=>{d();Ci();JY=U.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};s(ZY,"assertEncoding");s($i,"StringDecoder");$i.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&a<=56319){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,e.length===0)return t;break}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived),t+=e.toString(this.encoding,0,r);var r=t.length-1,a=t.charCodeAt(r);if(a>=55296&&a<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t};$i.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(t==1&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t};$i.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,a=this.encoding;t+=r.slice(0,n).toString(a)}return t};s(QY,"passThroughWrite");s(eK,"utf16DetectIncompleteChar");s(tK,"base64DetectIncompleteChar")});function nK(e,t,n){if(typeof e.prependListener=="function")return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function rK(e,t){return e.listeners(t).length}function uF(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof on&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new rF,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new $i(e.encoding),this.encoding=e.encoding)}function Et(e){if(!(this instanceof Et))return new Et(e);this._readableState=new uF(e,this),this.readable=!0,e&&typeof e.read=="function"&&(this._read=e.read),jn.call(this)}function lF(e,t,n,r,a){var o=iK(t,n);if(o)e.emit("error",o);else if(n===null)t.reading=!1,sK(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!a){var i=new Error("stream.push() after EOF");e.emit("error",i)}else if(t.endEmitted&&a){var c=new Error("stream.unshift() after end event");e.emit("error",c)}else{var u;t.decoder&&!a&&!r&&(n=t.decoder.write(n),u=!t.objectMode&&n.length===0),a||(t.reading=!1),u||(t.flowing&&t.length===0&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,a?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&lp(e))),cK(e,t)}else a||(t.reading=!1);return aK(t)}function aK(e){return!e.ended&&(e.needReadable||e.length=iF?e=iF:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function sF(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=oK(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function iK(e,t){var n=null;return!Buffer.isBuffer(t)&&typeof t!="string"&&t!==null&&t!==void 0&&!e.objectMode&&(n=new TypeError("Invalid non-string/buffer chunk")),n}function sK(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,lp(e)}}function lp(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(tt("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?nn(cF,e):cF(e))}function cF(e){tt("emit readable"),e.emit("readable"),pg(e)}function cK(e,t){t.readingMore||(t.readingMore=!0,nn(uK,e,t))}function uK(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(t.decoder?n=t.buffer.join(""):t.buffer.length===1?n=t.buffer.head.data:n=t.buffer.concat(t.length),t.buffer.clear()):n=fK(e,t.buffer,t.decoder),n}function fK(e,t,n){var r;return eo.length?o.length:e;if(i===o.length?a+=o:a+=o.slice(0,e),e-=i,e===0){i===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(i));break}++r}return t.length-=r,a}function gK(e,t){var n=Buffer.allocUnsafe(e),r=t.head,a=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,i),e-=i,e===0){i===o.length?(++a,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(i));break}++a}return t.length-=a,n}function mg(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,nn(yK,t,e))}function yK(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function bK(e,t){for(var n=0,r=e.length;n{"use strict";d();Kr();Fa();aF();oF();fu();Ta();Et.ReadableState=uF;tt=eF("stream");Ft(Et,jn);s(nK,"prependListener");s(rK,"listenerCount");s(uF,"ReadableState");s(Et,"Readable");Et.prototype.push=function(e,t){var n=this._readableState;return!n.objectMode&&typeof e=="string"&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=Buffer.from(e,t),t="")),lF(this,n,e,t,!1)};Et.prototype.unshift=function(e){var t=this._readableState;return lF(this,t,e,"",!0)};Et.prototype.isPaused=function(){return this._readableState.flowing===!1};s(lF,"readableAddChunk");s(aK,"needMoreData");Et.prototype.setEncoding=function(e){return this._readableState.decoder=new $i(e),this._readableState.encoding=e,this};iF=8388608;s(oK,"computeNewHighWaterMark");s(sF,"howMuchToRead");Et.prototype.read=function(e){tt("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return tt("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?mg(this):lp(this),null;if(e=sF(e,t),e===0&&t.ended)return t.length===0&&mg(this),null;var r=t.needReadable;tt("need readable",r),(t.length===0||t.length-e0?a=dF(e,t):a=null,a===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&mg(this)),a!==null&&this.emit("data",a),a};s(iK,"chunkInvalid");s(sK,"onEofChunk");s(lp,"emitReadable");s(cF,"emitReadable_");s(cK,"maybeReadMore");s(uK,"maybeReadMore_");Et.prototype._read=function(e){this.emit("error",new Error("not implemented"))};Et.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e);break}r.pipesCount+=1,tt("pipe count=%d opts=%j",r.pipesCount,t);var a=!t||t.end!==!1,o=a?c:m;r.endEmitted?nn(o):n.once("end",o),e.on("unpipe",i);function i(E){tt("onunpipe"),E===n&&m()}s(i,"onunpipe");function c(){tt("onend"),e.end()}s(c,"onend");var u=lK(n);e.on("drain",u);var l=!1;function m(){tt("cleanup"),e.removeListener("close",y),e.removeListener("finish",v),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",i),n.removeListener("end",c),n.removeListener("end",m),n.removeListener("data",h),l=!0,r.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}s(m,"cleanup");var p=!1;n.on("data",h);function h(E){tt("ondata"),p=!1;var S=e.write(E);S===!1&&!p&&((r.pipesCount===1&&r.pipes===e||r.pipesCount>1&&mF(r.pipes,e)!==-1)&&!l&&(tt("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}s(h,"ondata");function f(E){tt("onerror",E),D(),e.removeListener("error",f),rK(e,"error")===0&&e.emit("error",E)}s(f,"onerror"),nK(e,"error",f);function y(){e.removeListener("finish",v),D()}s(y,"onclose"),e.once("close",y);function v(){tt("onfinish"),e.removeListener("close",y),D()}s(v,"onfinish"),e.once("finish",v);function D(){tt("unpipe"),n.unpipe(e)}return s(D,"unpipe"),e.emit("pipe",n),r.flowing||(tt("pipe resume"),n.resume()),e};s(lK,"pipeOnDrain");Et.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a{d();Fa();Ci();Kr();fu();Ta();Yt.WritableState=gg;Ft(Yt,Be);s(vK,"nop");s(wK,"WriteReq");s(gg,"WritableState");gg.prototype.getBuffer=s(function(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},"writableStateGetBuffer");s(Yt,"Writable");Yt.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};s(DK,"writeAfterEnd");s(EK,"validChunk");Yt.prototype.write=function(e,t,n){var r=this._writableState,a=!1;return typeof t=="function"&&(n=t,t=null),U.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),typeof n!="function"&&(n=vK),r.ended?DK(this,n):EK(this,r,e,n)&&(r.pendingcb++,a=TK(this,r,e,t,n)),a};Yt.prototype.cork=function(){var e=this._writableState;e.corked++};Yt.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest&&hF(this,e))};Yt.prototype.setDefaultEncoding=s(function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},"setDefaultEncoding");s(xK,"decodeChunk");s(TK,"writeOrBuffer");s(hg,"doWrite");s(SK,"onwriteError");s(kK,"onwriteStateUpdate");s(CK,"onwrite");s(pF,"afterWrite");s(AK,"onwriteDrain");s(hF,"clearBuffer");Yt.prototype._write=function(e,t,n){n(new Error("not implemented"))};Yt.prototype._writev=null;Yt.prototype.end=function(e,t,n){var r=this._writableState;typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null),e!=null&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),!r.ending&&!r.finished&&_K(this,r,n)};s(gF,"needFinish");s(fF,"prefinish");s(yF,"finishMaybe");s(_K,"endWritable");s(bF,"CorkedRequest")});function on(e){if(!(this instanceof on))return new on(e);Et.call(this,e),Yt.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",RK)}function RK(){this.allowHalfOpen||this._writableState.ended||nn(FK,this)}function FK(e){e.end()}var vF,mp,dp,fu=b(()=>{d();Fa();Ta();fg();yg();Ft(on,Et);vF=Object.keys(Yt.prototype);for(dp=0;dp{d();fu();Fa();Ft(hn,on);s(IK,"TransformState");s(NK,"afterTransform");s(hn,"Transform");hn.prototype.push=function(e,t){return this._transformState.needTransform=!1,on.prototype.push.call(this,e,t)};hn.prototype._transform=function(e,t,n){throw new Error("Not implemented")};hn.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var a=this._readableState;(r.needTransform||a.needReadable||a.length{d();bg();Fa();Ft(Yi,hn);s(Yi,"PassThrough");Yi.prototype._transform=function(e,t,n){n(null,e)}});function Er(){jn.call(this)}var vg,wg=b(()=>{d();Kr();Fa();fu();fg();yg();bg();DF();Ft(Er,jn);Er.Readable=Et;Er.Writable=Yt;Er.Duplex=on;Er.Transform=hn;Er.PassThrough=Yi;Er.Stream=Er;vg=Er;s(Er,"Stream");Er.prototype.pipe=function(e,t){var n=this;function r(m){e.writable&&e.write(m)===!1&&n.pause&&n.pause()}s(r,"ondata"),n.on("data",r);function a(){n.readable&&n.resume&&n.resume()}s(a,"ondrain"),e.on("drain",a),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",i),n.on("close",c));var o=!1;function i(){o||(o=!0,e.end())}s(i,"onend");function c(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}s(c,"onclose");function u(m){if(l(),jn.listenerCount(this,"error")===0)throw m}s(u,"onerror"),n.on("error",u),e.on("error",u);function l(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",i),n.removeListener("close",c),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return s(l,"cleanup"),n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e}});var ye,gn=b(()=>{"use strict";d();ye=class e{static{s(this,"BaseNode")}constructor(t){this._id=t,this._isMainDocument=!1,this._dependents=[],this._dependencies=[]}get id(){return this._id}get type(){throw new Error("Unimplemented")}get startTime(){throw new Error("Unimplemented")}get endTime(){throw new Error("Unimplemented")}setIsMainDocument(t){this._isMainDocument=t}isMainDocument(){return this._isMainDocument}getDependents(){return this._dependents.slice()}getNumberOfDependents(){return this._dependents.length}getDependencies(){return this._dependencies.slice()}getNumberOfDependencies(){return this._dependencies.length}getRootNode(){let t=this;for(;t._dependencies.length;)t=t._dependencies[0];return t}addDependent(t){t.addDependency(this)}addDependency(t){if(t===this)throw new Error("Cannot add dependency on itself");this._dependencies.includes(t)||(t._dependents.push(this),this._dependencies.push(t))}removeDependent(t){t.removeDependency(this)}removeDependency(t){if(!this._dependencies.includes(t))return;let n=t._dependents.indexOf(this);t._dependents.splice(n,1),this._dependencies.splice(this._dependencies.indexOf(t),1)}removeAllDependencies(){for(let t of this._dependencies.slice())this.removeDependency(t)}isDependentOn(t){let n=!1;return this.traverse(r=>{n||(n=r===t)},r=>n?[]:r.getDependencies()),n}cloneWithoutRelationships(){let t=new e(this.id);return t.setIsMainDocument(this._isMainDocument),t}cloneWithRelationships(t){let n=this.getRootNode(),r=new Map;n.traverse(o=>{if(!r.has(o.id)){if(t===void 0){r.set(o.id,o.cloneWithoutRelationships());return}t(o)&&o.traverse(i=>r.set(i.id,i.cloneWithoutRelationships()),i=>i._dependencies.filter(c=>!r.has(c.id)))}}),n.traverse(o=>{let i=r.get(o.id);if(i)for(let c of o._dependencies){let u=r.get(c.id);if(!u)throw new Error("Dependency somehow not cloned");i.addDependency(u)}});let a=r.get(this.id);if(!a)throw new Error("Cloned graph missing node");return a}traverse(t,n){for(let{node:r,traversalPath:a}of this.traverseGenerator(n))t(r,a)}*traverseGenerator(t){t||(t=s(a=>a.getDependents(),"getNextNodes"));let n=[[this]],r=new Set([this.id]);for(;n.length;){let a=n.shift(),o=a[0];yield{node:o,traversalPath:a};for(let i of t(o))r.has(i.id)||(r.add(i.id),n.push([i,...a]))}}static hasCycle(t,n="both"){if(n==="both")return e.hasCycle(t,"dependents")||e.hasCycle(t,"dependencies");let r=new Set,a=[],o=[t],i=new Map([[t,0]]);for(;o.length;){let c=o.pop();if(a.includes(c))return!0;if(r.has(c))continue;for(;a.length>i.get(c);)a.pop();r.add(c),a.push(c);let u=n==="dependents"?c._dependents:c._dependencies;for(let l of u)o.includes(l)||(o.push(l),i.set(l,a.length))}return!1}canDependOn(t){return t.startTime<=this.startTime}};ye.TYPES={NETWORK:"network",CPU:"cpu"}});var Ki,Dg=b(()=>{"use strict";d();Ki=class e{static{s(this,"TcpConnection")}constructor(t,n,r=0,a=!0,o=!1){this._warmed=!1,this._ssl=a,this._h2=o,this._rtt=t,this._throughput=n,this._serverLatency=r,this._congestionWindow=10,this._h2OverflowBytesDownloaded=0}static maximumSaturatedConnections(t,n){let i=1e3/t*1460*8;return Math.floor(n/i)}_computeMaximumCongestionWindowInSegments(){let t=this._throughput/8,n=this._rtt/1e3,r=t*n;return Math.floor(r/1460)}setThroughput(t){this._throughput=t}setCongestionWindow(t){this._congestionWindow=t}setWarmed(t){this._warmed=t}isWarm(){return this._warmed}isH2(){return this._h2}get congestionWindow(){return this._congestionWindow}setH2OverflowBytesDownloaded(t){this._h2&&(this._h2OverflowBytesDownloaded=t)}clone(){return Object.assign(new e(this._rtt,this._throughput),this)}simulateDownloadUntil(t,n){let{timeAlreadyElapsed:r=0,maximumTimeToElapse:a=1/0,dnsResolutionTime:o=0}=n||{};this._warmed&&this._h2&&(t-=this._h2OverflowBytesDownloaded);let i=this._rtt,c=i/2,u=this._computeMaximumCongestionWindowInSegments(),l=c;this._warmed||(l=o+c+c+c+(this._ssl?i:0));let m=Math.ceil(l/i),p=l+this._serverLatency+c;this._warmed&&this._h2&&(p=0);let h=Math.max(p-r,0),f=a-h,y=Math.min(this._congestionWindow,u),v=0;h>0?v=y*1460:m=0;let D=0,E=t-v;for(;E>0&&D<=f;){m++,D+=i,y=Math.max(Math.min(u,y*2),1);let z=y*1460;v+=z,E-=z}let S=h+D,k=this._h2?Math.max(v-t,0):0,C=Math.max(Math.min(v,t),0),R;return this._warmed?this._h2?R={timeToFirstByte:p}:R={connectionTime:l,timeToFirstByte:p}:R={dnsResolutionTime:o,connectionTime:l-o,sslTime:this._ssl?i:void 0,timeToFirstByte:p},{roundTrips:m,timeElapsed:S,bytesDownloaded:C,extraBytesDownloaded:k,congestionWindow:y,connectionTiming:R}}}});function MK(e,t){return e.endsWith(t)?e.length===t.length||e[e.length-t.length-1]===".":!1}function LK(e,t){let n=e.length-t.length-2,r=e.lastIndexOf(".",n);return r===-1?e:e.slice(r+1)}function Eg(e,t,n){if(n.validHosts!==null){let a=n.validHosts;for(let o of a)if(MK(t,o))return o}let r=0;if(t.startsWith("."))for(;r{d();s(MK,"shareSameDomainSuffix");s(LK,"extractDomainWithSuffix");s(Eg,"getDomain")});function xg(e,t){return e.slice(0,-t.length-1)}var xF=b(()=>{d();s(xg,"getDomainWithoutSuffix")});function pp(e,t){let n=0,r=e.length,a=!1;if(!t){if(e.startsWith("data:"))return null;for(;nn+1&&e.charCodeAt(r-1)<=32;)r-=1;if(e.charCodeAt(n)===47&&e.charCodeAt(n+1)===47)n+=2;else{let l=e.indexOf(":/",n);if(l!==-1){let m=l-n,p=e.charCodeAt(n),h=e.charCodeAt(n+1),f=e.charCodeAt(n+2),y=e.charCodeAt(n+3),v=e.charCodeAt(n+4);if(!(m===5&&p===104&&h===116&&f===116&&y===112&&v===115)){if(!(m===4&&p===104&&h===116&&f===116&&y===112)){if(!(m===3&&p===119&&h===115&&f===115)){if(!(m===2&&p===119&&h===115))for(let D=n;D=97&&E<=122||E>=48&&E<=57||E===46||E===45||E===43))return null}}}}for(n=l+2;e.charCodeAt(n)===47;)n+=1}}let i=-1,c=-1,u=-1;for(let l=n;l=65&&m<=90&&(a=!0)}if(i!==-1&&i>n&&in&&un+1&&e.charCodeAt(r-1)===46;)r-=1;let o=n!==0||r!==e.length?e.slice(n,r):e;return a?o.toLowerCase():o}var TF=b(()=>{d();s(pp,"extractHostname")});function PK(e){if(e.length<7||e.length>15)return!1;let t=0;for(let n=0;n57)return!1}return t===3&&e.charCodeAt(0)!==46&&e.charCodeAt(e.length-1)!==46}function OK(e){if(e.length<3)return!1;let t=e.startsWith("[")?1:0,n=e.length;if(e[n-1]==="]"&&(n-=1),n-t>39)return!1;let r=!1;for(;t=48&&a<=57||a>=97&&a<=102||a>=65&&a<=90))return!1}return r}function Tg(e){return OK(e)||PK(e)}var SF=b(()=>{d();s(PK,"isProbablyIpv4");s(OK,"isProbablyIpv6");s(Tg,"isIp")});function kF(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function fp(e){if(e.length>255||e.length===0||!kF(e.charCodeAt(0))&&e.charCodeAt(0)!==46&&e.charCodeAt(0)!==95)return!1;let t=-1,n=-1,r=e.length;for(let a=0;a64||n===46||n===45||n===95)return!1;t=a}else if(!(kF(o)||o===45||o===95))return!1;n=o}return r-t-1<=63&&n!==45}var CF=b(()=>{d();s(kF,"isValidAscii");s(fp,"default")});function AF({allowIcannDomains:e=!0,allowPrivateDomains:t=!1,detectIp:n=!0,extractHostname:r=!0,mixedInputs:a=!0,validHosts:o=null,validateHostname:i=!0}){return{allowIcannDomains:e,allowPrivateDomains:t,detectIp:n,extractHostname:r,mixedInputs:a,validHosts:o,validateHostname:i}}function Sg(e){return e===void 0?BK:AF(e)}var BK,kg=b(()=>{d();s(AF,"setDefaultsImpl");BK=AF({});s(Sg,"setDefaults")});function Cg(e,t){return t.length===e.length?"":e.slice(0,-t.length-1)}var _F=b(()=>{d();s(Cg,"getSubdomain")});function Ag(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,publicSuffix:null,subdomain:null}}function _g(e){e.domain=null,e.domainWithoutSuffix=null,e.hostname=null,e.isIcann=null,e.isIp=null,e.isPrivate=null,e.publicSuffix=null,e.subdomain=null}function Rg(e,t,n,r,a){let o=Sg(r);return typeof e!="string"||(o.extractHostname?o.mixedInputs?a.hostname=pp(e,fp(e)):a.hostname=pp(e,!1):a.hostname=e,t===0||a.hostname===null)||o.detectIp&&(a.isIp=Tg(a.hostname),a.isIp)?a:o.validateHostname&&o.extractHostname&&!fp(a.hostname)?(a.hostname=null,a):(n(a.hostname,o,a),t===2||a.publicSuffix===null||(a.domain=Eg(a.publicSuffix,a.hostname,o),t===3||a.domain===null)||(a.subdomain=Cg(a.hostname,a.domain),t===4)||(a.domainWithoutSuffix=xg(a.domain,a.publicSuffix)),a)}var RF=b(()=>{d();EF();xF();TF();SF();CF();kg();_F();s(Ag,"getEmptyResult");s(_g,"resetResult");s(Rg,"parseImpl")});function hp(e,t,n){if(!t.allowPrivateDomains&&e.length>3){let r=e.length-1,a=e.charCodeAt(r),o=e.charCodeAt(r-1),i=e.charCodeAt(r-2),c=e.charCodeAt(r-3);if(a===109&&o===111&&i===99&&c===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="com",!0;if(a===103&&o===114&&i===111&&c===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="org",!0;if(a===117&&o===100&&i===101&&c===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="edu",!0;if(a===118&&o===111&&i===103&&c===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="gov",!0;if(a===116&&o===101&&i===110&&c===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="net",!0;if(a===101&&o===100&&i===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="de",!0}return!1}var FF=b(()=>{d();s(hp,"default")});var Fg=b(()=>{d();RF();FF();kg()});var IF,NF,MF=b(()=>{d();IF=function(){let e=[1,{}],t=[0,{city:e}];return[0,{ck:[0,{www:e}],jp:[0,{kawasaki:t,kitakyushu:t,kobe:t,nagoya:t,sapporo:t,sendai:t,yokohama:t}]}]}(),NF=function(){let e=[1,{}],t=[1,{com:e,edu:e,gov:e,net:e,mil:e,org:e}],n=[1,{gov:e,com:e,org:e,net:e,edu:e}],r=[1,{gov:e}],a=[1,{com:e}],o=[0,{"*":e}],i=[1,{com:e,edu:e,net:e,org:e}],c=[1,{co:e,net:e,org:e}],u=[1,{co:e,com:e,edu:e,gov:e,net:e,org:e}],l=[1,{com:e,org:e,net:e,edu:e,sch:e,gov:e,mil:e,name:e}],m=[1,{edu:e,biz:e,net:e,org:e,gov:e,info:e,com:e}],p=[1,{gs:e}],h=[0,{nes:e}],f=[1,{k12:e,cc:e,lib:e}],y=[1,{cc:e}],v=[1,{cc:e,lib:e}];return[0,{ac:t,ad:[1,{nom:e}],ae:[1,{co:e,net:e,org:e,sch:e,ac:e,gov:e,mil:e}],aero:[1,{"accident-investigation":e,"accident-prevention":e,aerobatic:e,aeroclub:e,aerodrome:e,agents:e,aircraft:e,airline:e,airport:e,"air-surveillance":e,airtraffic:e,"air-traffic-control":e,ambulance:e,amusement:e,association:e,author:e,ballooning:e,broker:e,caa:e,cargo:e,catering:e,certification:e,championship:e,charter:e,civilaviation:e,club:e,conference:e,consultant:e,consulting:e,control:e,council:e,crew:e,design:e,dgca:e,educator:e,emergency:e,engine:e,engineer:e,entertainment:e,equipment:e,exchange:e,express:e,federation:e,flight:e,fuel:e,gliding:e,government:e,groundhandling:e,group:e,hanggliding:e,homebuilt:e,insurance:e,journal:e,journalist:e,leasing:e,logistics:e,magazine:e,maintenance:e,media:e,microlight:e,modelling:e,navigation:e,parachuting:e,paragliding:e,"passenger-association":e,pilot:e,press:e,production:e,recreation:e,repbody:e,res:e,research:e,rotorcraft:e,safety:e,scientist:e,services:e,show:e,skydiving:e,software:e,student:e,trader:e,trading:e,trainer:e,union:e,workinggroup:e,works:e}],af:n,ag:[1,{com:e,org:e,net:e,co:e,nom:e}],ai:[1,{off:e,com:e,net:e,org:e}],al:t,am:[1,{co:e,com:e,commune:e,net:e,org:e}],ao:[1,{ed:e,gv:e,og:e,co:e,pb:e,it:e}],aq:e,ar:[1,{bet:e,com:e,coop:e,edu:e,gob:e,gov:e,int:e,mil:e,musica:e,mutual:e,net:e,org:e,senasa:e,tur:e}],arpa:[1,{e164:e,"in-addr":e,ip6:e,iris:e,uri:e,urn:e}],as:r,asia:e,at:[1,{ac:[1,{sth:e}],co:e,gv:e,or:e}],au:[1,{com:e,net:e,org:e,edu:[1,{act:e,catholic:e,nsw:[1,{schools:e}],nt:e,qld:e,sa:e,tas:e,vic:e,wa:e}],gov:[1,{qld:e,sa:e,tas:e,vic:e,wa:e}],asn:e,id:e,info:e,conf:e,oz:e,act:e,nsw:e,nt:e,qld:e,sa:e,tas:e,vic:e,wa:e}],aw:a,ax:e,az:[1,{com:e,net:e,int:e,gov:e,org:e,edu:e,info:e,pp:e,mil:e,name:e,pro:e,biz:e}],ba:t,bb:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,net:e,org:e,store:e,tv:e}],bd:o,be:[1,{ac:e}],bf:r,bg:[1,{0:e,1:e,2:e,3:e,4:e,5:e,6:e,7:e,8:e,9:e,a:e,b:e,c:e,d:e,e,f:e,g:e,h:e,i:e,j:e,k:e,l:e,m:e,n:e,o:e,p:e,q:e,r:e,s:e,t:e,u:e,v:e,w:e,x:e,y:e,z:e}],bh:n,bi:[1,{co:e,com:e,edu:e,or:e,org:e}],biz:e,bj:[1,{africa:e,agro:e,architectes:e,assur:e,avocats:e,co:e,com:e,eco:e,econo:e,edu:e,info:e,loisirs:e,money:e,net:e,org:e,ote:e,resto:e,restaurant:e,tourism:e,univ:e}],bm:n,bn:n,bo:[1,{com:e,edu:e,gob:e,int:e,org:e,net:e,mil:e,tv:e,web:e,academia:e,agro:e,arte:e,blog:e,bolivia:e,ciencia:e,cooperativa:e,democracia:e,deporte:e,ecologia:e,economia:e,empresa:e,indigena:e,industria:e,info:e,medicina:e,movimiento:e,musica:e,natural:e,nombre:e,noticias:e,patria:e,politica:e,profesional:e,plurinacional:e,pueblo:e,revista:e,salud:e,tecnologia:e,tksat:e,transporte:e,wiki:e}],br:[1,{"9guacu":e,abc:e,adm:e,adv:e,agr:e,aju:e,am:e,anani:e,aparecida:e,app:e,arq:e,art:e,ato:e,b:e,barueri:e,belem:e,bhz:e,bib:e,bio:e,blog:e,bmd:e,boavista:e,bsb:e,campinagrande:e,campinas:e,caxias:e,cim:e,cng:e,cnt:e,com:e,contagem:e,coop:e,coz:e,cri:e,cuiaba:e,curitiba:e,def:e,des:e,det:e,dev:e,ecn:e,eco:e,edu:e,emp:e,enf:e,eng:e,esp:e,etc:e,eti:e,far:e,feira:e,flog:e,floripa:e,fm:e,fnd:e,fortal:e,fot:e,foz:e,fst:e,g12:e,geo:e,ggf:e,goiania:e,gov:[1,{ac:e,al:e,am:e,ap:e,ba:e,ce:e,df:e,es:e,go:e,ma:e,mg:e,ms:e,mt:e,pa:e,pb:e,pe:e,pi:e,pr:e,rj:e,rn:e,ro:e,rr:e,rs:e,sc:e,se:e,sp:e,to:e}],gru:e,imb:e,ind:e,inf:e,jab:e,jampa:e,jdf:e,joinville:e,jor:e,jus:e,leg:e,lel:e,log:e,londrina:e,macapa:e,maceio:e,manaus:e,maringa:e,mat:e,med:e,mil:e,morena:e,mp:e,mus:e,natal:e,net:e,niteroi:e,nom:o,not:e,ntr:e,odo:e,ong:e,org:e,osasco:e,palmas:e,poa:e,ppg:e,pro:e,psc:e,psi:e,pvh:e,qsl:e,radio:e,rec:e,recife:e,rep:e,ribeirao:e,rio:e,riobranco:e,riopreto:e,salvador:e,sampa:e,santamaria:e,santoandre:e,saobernardo:e,saogonca:e,seg:e,sjc:e,slg:e,slz:e,sorocaba:e,srv:e,taxi:e,tc:e,tec:e,teo:e,the:e,tmp:e,trd:e,tur:e,tv:e,udi:e,vet:e,vix:e,vlog:e,wiki:e,zlg:e}],bs:n,bt:n,bv:e,bw:[1,{co:e,org:e}],by:[1,{gov:e,mil:e,com:e,of:e}],bz:n,ca:[1,{ab:e,bc:e,mb:e,nb:e,nf:e,nl:e,ns:e,nt:e,nu:e,on:e,pe:e,qc:e,sk:e,yk:e,gc:e}],cat:e,cc:e,cd:r,cf:e,cg:e,ch:e,ci:[1,{org:e,or:e,com:e,co:e,edu:e,ed:e,ac:e,net:e,go:e,asso:e,"xn--aroport-bya":e,aéroport:e,int:e,presse:e,md:e,gouv:e}],ck:o,cl:[1,{co:e,gob:e,gov:e,mil:e}],cm:[1,{co:e,com:e,gov:e,net:e}],cn:[1,{ac:e,com:e,edu:e,gov:e,net:e,org:e,mil:e,"xn--55qx5d":e,公司:e,"xn--io0a7i":e,网络:e,"xn--od0alg":e,網絡:e,ah:e,bj:e,cq:e,fj:e,gd:e,gs:e,gz:e,gx:e,ha:e,hb:e,he:e,hi:e,hl:e,hn:e,jl:e,js:e,jx:e,ln:e,nm:e,nx:e,qh:e,sc:e,sd:e,sh:e,sn:e,sx:e,tj:e,xj:e,xz:e,yn:e,zj:e,hk:e,mo:e,tw:e}],co:[1,{arts:e,com:e,edu:e,firm:e,gov:e,info:e,int:e,mil:e,net:e,nom:e,org:e,rec:e,web:e}],com:e,coop:e,cr:[1,{ac:e,co:e,ed:e,fi:e,go:e,or:e,sa:e}],cu:[1,{com:e,edu:e,org:e,net:e,gov:e,inf:e}],cv:[1,{com:e,edu:e,int:e,nome:e,org:e}],cw:i,cx:r,cy:[1,{ac:e,biz:e,com:e,ekloges:e,gov:e,ltd:e,mil:e,net:e,org:e,press:e,pro:e,tm:e}],cz:e,de:e,dj:e,dk:e,dm:n,do:[1,{art:e,com:e,edu:e,gob:e,gov:e,mil:e,net:e,org:e,sld:e,web:e}],dz:[1,{art:e,asso:e,com:e,edu:e,gov:e,org:e,net:e,pol:e,soc:e,tm:e}],ec:[1,{com:e,info:e,net:e,fin:e,k12:e,med:e,pro:e,org:e,edu:e,gov:e,gob:e,mil:e}],edu:e,ee:[1,{edu:e,gov:e,riik:e,lib:e,med:e,com:e,pri:e,aip:e,org:e,fie:e}],eg:[1,{com:e,edu:e,eun:e,gov:e,mil:e,name:e,net:e,org:e,sci:e}],er:o,es:[1,{com:e,nom:e,org:e,gob:e,edu:e}],et:[1,{com:e,gov:e,org:e,edu:e,biz:e,name:e,info:e,net:e}],eu:e,fi:[1,{aland:e}],fj:[1,{ac:e,biz:e,com:e,gov:e,info:e,mil:e,name:e,net:e,org:e,pro:e}],fk:o,fm:i,fo:e,fr:[1,{asso:e,com:e,gouv:e,nom:e,prd:e,tm:e,avoues:e,cci:e,greta:e,"huissier-justice":e}],ga:e,gb:e,gd:[1,{edu:e,gov:e}],ge:[1,{com:e,edu:e,gov:e,org:e,mil:e,net:e,pvt:e}],gf:e,gg:c,gh:[1,{com:e,edu:e,gov:e,org:e,mil:e}],gi:[1,{com:e,ltd:e,gov:e,mod:e,edu:e,org:e}],gl:[1,{co:e,com:e,edu:e,net:e,org:e}],gm:e,gn:[1,{ac:e,com:e,edu:e,gov:e,org:e,net:e}],gov:e,gp:[1,{com:e,net:e,mobi:e,edu:e,org:e,asso:e}],gq:e,gr:n,gs:e,gt:[1,{com:e,edu:e,gob:e,ind:e,mil:e,net:e,org:e}],gu:[1,{com:e,edu:e,gov:e,guam:e,info:e,net:e,org:e,web:e}],gw:e,gy:u,hk:[1,{com:e,edu:e,gov:e,idv:e,net:e,org:e,"xn--55qx5d":e,公司:e,"xn--wcvs22d":e,教育:e,"xn--lcvr32d":e,敎育:e,"xn--mxtq1m":e,政府:e,"xn--gmqw5a":e,個人:e,"xn--ciqpn":e,个人:e,"xn--gmq050i":e,箇人:e,"xn--zf0avx":e,網络:e,"xn--io0a7i":e,网络:e,"xn--mk0axi":e,组織:e,"xn--od0alg":e,網絡:e,"xn--od0aq3b":e,网絡:e,"xn--tn0ag":e,组织:e,"xn--uc0atv":e,組織:e,"xn--uc0ay4a":e,組织:e}],hm:e,hn:[1,{com:e,edu:e,org:e,net:e,mil:e,gob:e}],hr:[1,{iz:e,from:e,name:e,com:e}],ht:[1,{com:e,shop:e,firm:e,info:e,adult:e,net:e,pro:e,org:e,med:e,art:e,coop:e,pol:e,asso:e,edu:e,rel:e,gouv:e,perso:e}],hu:[1,{2e3:e,co:e,info:e,org:e,priv:e,sport:e,tm:e,agrar:e,bolt:e,casino:e,city:e,erotica:e,erotika:e,film:e,forum:e,games:e,hotel:e,ingatlan:e,jogasz:e,konyvelo:e,lakas:e,media:e,news:e,reklam:e,sex:e,shop:e,suli:e,szex:e,tozsde:e,utazas:e,video:e}],id:[1,{ac:e,biz:e,co:e,desa:e,go:e,mil:e,my:e,net:e,or:e,ponpes:e,sch:e,web:e}],ie:r,il:[1,{ac:e,co:e,gov:e,idf:e,k12:e,muni:e,net:e,org:e}],"xn--4dbrk0ce":[1,{"xn--4dbgdty6c":e,"xn--5dbhl8d":e,"xn--8dbq2a":e,"xn--hebda8b":e}],ישראל:[1,{אקדמיה:e,ישוב:e,צהל:e,ממשל:e}],im:[1,{ac:e,co:[1,{ltd:e,plc:e}],com:e,net:e,org:e,tt:e,tv:e}],in:[1,{"5g":e,"6g":e,ac:e,ai:e,am:e,bihar:e,biz:e,business:e,ca:e,cn:e,co:e,com:e,coop:e,cs:e,delhi:e,dr:e,edu:e,er:e,firm:e,gen:e,gov:e,gujarat:e,ind:e,info:e,int:e,internet:e,io:e,me:e,mil:e,net:e,nic:e,org:e,pg:e,post:e,pro:e,res:e,travel:e,tv:e,uk:e,up:e,us:e}],info:e,int:[1,{eu:e}],io:a,iq:t,ir:[1,{ac:e,co:e,gov:e,id:e,net:e,org:e,sch:e,"xn--mgba3a4f16a":e,ایران:e,"xn--mgba3a4fra":e,ايران:e}],is:[1,{net:e,com:e,edu:e,gov:e,org:e,int:e}],it:[1,{gov:e,edu:e,abr:e,abruzzo:e,"aosta-valley":e,aostavalley:e,bas:e,basilicata:e,cal:e,calabria:e,cam:e,campania:e,"emilia-romagna":e,emiliaromagna:e,emr:e,"friuli-v-giulia":e,"friuli-ve-giulia":e,"friuli-vegiulia":e,"friuli-venezia-giulia":e,"friuli-veneziagiulia":e,"friuli-vgiulia":e,"friuliv-giulia":e,"friulive-giulia":e,friulivegiulia:e,"friulivenezia-giulia":e,friuliveneziagiulia:e,friulivgiulia:e,fvg:e,laz:e,lazio:e,lig:e,liguria:e,lom:e,lombardia:e,lombardy:e,lucania:e,mar:e,marche:e,mol:e,molise:e,piedmont:e,piemonte:e,pmn:e,pug:e,puglia:e,sar:e,sardegna:e,sardinia:e,sic:e,sicilia:e,sicily:e,taa:e,tos:e,toscana:e,"trentin-sud-tirol":e,"xn--trentin-sd-tirol-rzb":e,"trentin-süd-tirol":e,"trentin-sudtirol":e,"xn--trentin-sdtirol-7vb":e,"trentin-südtirol":e,"trentin-sued-tirol":e,"trentin-suedtirol":e,"trentino-a-adige":e,"trentino-aadige":e,"trentino-alto-adige":e,"trentino-altoadige":e,"trentino-s-tirol":e,"trentino-stirol":e,"trentino-sud-tirol":e,"xn--trentino-sd-tirol-c3b":e,"trentino-süd-tirol":e,"trentino-sudtirol":e,"xn--trentino-sdtirol-szb":e,"trentino-südtirol":e,"trentino-sued-tirol":e,"trentino-suedtirol":e,trentino:e,"trentinoa-adige":e,trentinoaadige:e,"trentinoalto-adige":e,trentinoaltoadige:e,"trentinos-tirol":e,trentinostirol:e,"trentinosud-tirol":e,"xn--trentinosd-tirol-rzb":e,"trentinosüd-tirol":e,trentinosudtirol:e,"xn--trentinosdtirol-7vb":e,trentinosüdtirol:e,"trentinosued-tirol":e,trentinosuedtirol:e,"trentinsud-tirol":e,"xn--trentinsd-tirol-6vb":e,"trentinsüd-tirol":e,trentinsudtirol:e,"xn--trentinsdtirol-nsb":e,trentinsüdtirol:e,"trentinsued-tirol":e,trentinsuedtirol:e,tuscany:e,umb:e,umbria:e,"val-d-aosta":e,"val-daosta":e,"vald-aosta":e,valdaosta:e,"valle-aosta":e,"valle-d-aosta":e,"valle-daosta":e,valleaosta:e,"valled-aosta":e,valledaosta:e,"vallee-aoste":e,"xn--valle-aoste-ebb":e,"vallée-aoste":e,"vallee-d-aoste":e,"xn--valle-d-aoste-ehb":e,"vallée-d-aoste":e,valleeaoste:e,"xn--valleaoste-e7a":e,valléeaoste:e,valleedaoste:e,"xn--valledaoste-ebb":e,valléedaoste:e,vao:e,vda:e,ven:e,veneto:e,ag:e,agrigento:e,al:e,alessandria:e,"alto-adige":e,altoadige:e,an:e,ancona:e,"andria-barletta-trani":e,"andria-trani-barletta":e,andriabarlettatrani:e,andriatranibarletta:e,ao:e,aosta:e,aoste:e,ap:e,aq:e,aquila:e,ar:e,arezzo:e,"ascoli-piceno":e,ascolipiceno:e,asti:e,at:e,av:e,avellino:e,ba:e,"balsan-sudtirol":e,"xn--balsan-sdtirol-nsb":e,"balsan-südtirol":e,"balsan-suedtirol":e,balsan:e,bari:e,"barletta-trani-andria":e,barlettatraniandria:e,belluno:e,benevento:e,bergamo:e,bg:e,bi:e,biella:e,bl:e,bn:e,bo:e,bologna:e,"bolzano-altoadige":e,bolzano:e,"bozen-sudtirol":e,"xn--bozen-sdtirol-2ob":e,"bozen-südtirol":e,"bozen-suedtirol":e,bozen:e,br:e,brescia:e,brindisi:e,bs:e,bt:e,"bulsan-sudtirol":e,"xn--bulsan-sdtirol-nsb":e,"bulsan-südtirol":e,"bulsan-suedtirol":e,bulsan:e,bz:e,ca:e,cagliari:e,caltanissetta:e,"campidano-medio":e,campidanomedio:e,campobasso:e,"carbonia-iglesias":e,carboniaiglesias:e,"carrara-massa":e,carraramassa:e,caserta:e,catania:e,catanzaro:e,cb:e,ce:e,"cesena-forli":e,"xn--cesena-forl-mcb":e,"cesena-forlì":e,cesenaforli:e,"xn--cesenaforl-i8a":e,cesenaforlì:e,ch:e,chieti:e,ci:e,cl:e,cn:e,co:e,como:e,cosenza:e,cr:e,cremona:e,crotone:e,cs:e,ct:e,cuneo:e,cz:e,"dell-ogliastra":e,dellogliastra:e,en:e,enna:e,fc:e,fe:e,fermo:e,ferrara:e,fg:e,fi:e,firenze:e,florence:e,fm:e,foggia:e,"forli-cesena":e,"xn--forl-cesena-fcb":e,"forlì-cesena":e,forlicesena:e,"xn--forlcesena-c8a":e,forlìcesena:e,fr:e,frosinone:e,ge:e,genoa:e,genova:e,go:e,gorizia:e,gr:e,grosseto:e,"iglesias-carbonia":e,iglesiascarbonia:e,im:e,imperia:e,is:e,isernia:e,kr:e,"la-spezia":e,laquila:e,laspezia:e,latina:e,lc:e,le:e,lecce:e,lecco:e,li:e,livorno:e,lo:e,lodi:e,lt:e,lu:e,lucca:e,macerata:e,mantova:e,"massa-carrara":e,massacarrara:e,matera:e,mb:e,mc:e,me:e,"medio-campidano":e,mediocampidano:e,messina:e,mi:e,milan:e,milano:e,mn:e,mo:e,modena:e,"monza-brianza":e,"monza-e-della-brianza":e,monza:e,monzabrianza:e,monzaebrianza:e,monzaedellabrianza:e,ms:e,mt:e,na:e,naples:e,napoli:e,no:e,novara:e,nu:e,nuoro:e,og:e,ogliastra:e,"olbia-tempio":e,olbiatempio:e,or:e,oristano:e,ot:e,pa:e,padova:e,padua:e,palermo:e,parma:e,pavia:e,pc:e,pd:e,pe:e,perugia:e,"pesaro-urbino":e,pesarourbino:e,pescara:e,pg:e,pi:e,piacenza:e,pisa:e,pistoia:e,pn:e,po:e,pordenone:e,potenza:e,pr:e,prato:e,pt:e,pu:e,pv:e,pz:e,ra:e,ragusa:e,ravenna:e,rc:e,re:e,"reggio-calabria":e,"reggio-emilia":e,reggiocalabria:e,reggioemilia:e,rg:e,ri:e,rieti:e,rimini:e,rm:e,rn:e,ro:e,roma:e,rome:e,rovigo:e,sa:e,salerno:e,sassari:e,savona:e,si:e,siena:e,siracusa:e,so:e,sondrio:e,sp:e,sr:e,ss:e,suedtirol:e,"xn--sdtirol-n2a":e,südtirol:e,sv:e,ta:e,taranto:e,te:e,"tempio-olbia":e,tempioolbia:e,teramo:e,terni:e,tn:e,to:e,torino:e,tp:e,tr:e,"trani-andria-barletta":e,"trani-barletta-andria":e,traniandriabarletta:e,tranibarlettaandria:e,trapani:e,trento:e,treviso:e,trieste:e,ts:e,turin:e,tv:e,ud:e,udine:e,"urbino-pesaro":e,urbinopesaro:e,va:e,varese:e,vb:e,vc:e,ve:e,venezia:e,venice:e,verbania:e,vercelli:e,verona:e,vi:e,"vibo-valentia":e,vibovalentia:e,vicenza:e,viterbo:e,vr:e,vs:e,vt:e,vv:e}],je:c,jm:o,jo:l,jobs:e,jp:[1,{ac:e,ad:e,co:e,ed:e,go:e,gr:e,lg:e,ne:e,or:e,aichi:[1,{aisai:e,ama:e,anjo:e,asuke:e,chiryu:e,chita:e,fuso:e,gamagori:e,handa:e,hazu:e,hekinan:e,higashiura:e,ichinomiya:e,inazawa:e,inuyama:e,isshiki:e,iwakura:e,kanie:e,kariya:e,kasugai:e,kira:e,kiyosu:e,komaki:e,konan:e,kota:e,mihama:e,miyoshi:e,nishio:e,nisshin:e,obu:e,oguchi:e,oharu:e,okazaki:e,owariasahi:e,seto:e,shikatsu:e,shinshiro:e,shitara:e,tahara:e,takahama:e,tobishima:e,toei:e,togo:e,tokai:e,tokoname:e,toyoake:e,toyohashi:e,toyokawa:e,toyone:e,toyota:e,tsushima:e,yatomi:e}],akita:[1,{akita:e,daisen:e,fujisato:e,gojome:e,hachirogata:e,happou:e,higashinaruse:e,honjo:e,honjyo:e,ikawa:e,kamikoani:e,kamioka:e,katagami:e,kazuno:e,kitaakita:e,kosaka:e,kyowa:e,misato:e,mitane:e,moriyoshi:e,nikaho:e,noshiro:e,odate:e,oga:e,ogata:e,semboku:e,yokote:e,yurihonjo:e}],aomori:[1,{aomori:e,gonohe:e,hachinohe:e,hashikami:e,hiranai:e,hirosaki:e,itayanagi:e,kuroishi:e,misawa:e,mutsu:e,nakadomari:e,noheji:e,oirase:e,owani:e,rokunohe:e,sannohe:e,shichinohe:e,shingo:e,takko:e,towada:e,tsugaru:e,tsuruta:e}],chiba:[1,{abiko:e,asahi:e,chonan:e,chosei:e,choshi:e,chuo:e,funabashi:e,futtsu:e,hanamigawa:e,ichihara:e,ichikawa:e,ichinomiya:e,inzai:e,isumi:e,kamagaya:e,kamogawa:e,kashiwa:e,katori:e,katsuura:e,kimitsu:e,kisarazu:e,kozaki:e,kujukuri:e,kyonan:e,matsudo:e,midori:e,mihama:e,minamiboso:e,mobara:e,mutsuzawa:e,nagara:e,nagareyama:e,narashino:e,narita:e,noda:e,oamishirasato:e,omigawa:e,onjuku:e,otaki:e,sakae:e,sakura:e,shimofusa:e,shirako:e,shiroi:e,shisui:e,sodegaura:e,sosa:e,tako:e,tateyama:e,togane:e,tohnosho:e,tomisato:e,urayasu:e,yachimata:e,yachiyo:e,yokaichiba:e,yokoshibahikari:e,yotsukaido:e}],ehime:[1,{ainan:e,honai:e,ikata:e,imabari:e,iyo:e,kamijima:e,kihoku:e,kumakogen:e,masaki:e,matsuno:e,matsuyama:e,namikata:e,niihama:e,ozu:e,saijo:e,seiyo:e,shikokuchuo:e,tobe:e,toon:e,uchiko:e,uwajima:e,yawatahama:e}],fukui:[1,{echizen:e,eiheiji:e,fukui:e,ikeda:e,katsuyama:e,mihama:e,minamiechizen:e,obama:e,ohi:e,ono:e,sabae:e,sakai:e,takahama:e,tsuruga:e,wakasa:e}],fukuoka:[1,{ashiya:e,buzen:e,chikugo:e,chikuho:e,chikujo:e,chikushino:e,chikuzen:e,chuo:e,dazaifu:e,fukuchi:e,hakata:e,higashi:e,hirokawa:e,hisayama:e,iizuka:e,inatsuki:e,kaho:e,kasuga:e,kasuya:e,kawara:e,keisen:e,koga:e,kurate:e,kurogi:e,kurume:e,minami:e,miyako:e,miyama:e,miyawaka:e,mizumaki:e,munakata:e,nakagawa:e,nakama:e,nishi:e,nogata:e,ogori:e,okagaki:e,okawa:e,oki:e,omuta:e,onga:e,onojo:e,oto:e,saigawa:e,sasaguri:e,shingu:e,shinyoshitomi:e,shonai:e,soeda:e,sue:e,tachiarai:e,tagawa:e,takata:e,toho:e,toyotsu:e,tsuiki:e,ukiha:e,umi:e,usui:e,yamada:e,yame:e,yanagawa:e,yukuhashi:e}],fukushima:[1,{aizubange:e,aizumisato:e,aizuwakamatsu:e,asakawa:e,bandai:e,date:e,fukushima:e,furudono:e,futaba:e,hanawa:e,higashi:e,hirata:e,hirono:e,iitate:e,inawashiro:e,ishikawa:e,iwaki:e,izumizaki:e,kagamiishi:e,kaneyama:e,kawamata:e,kitakata:e,kitashiobara:e,koori:e,koriyama:e,kunimi:e,miharu:e,mishima:e,namie:e,nango:e,nishiaizu:e,nishigo:e,okuma:e,omotego:e,ono:e,otama:e,samegawa:e,shimogo:e,shirakawa:e,showa:e,soma:e,sukagawa:e,taishin:e,tamakawa:e,tanagura:e,tenei:e,yabuki:e,yamato:e,yamatsuri:e,yanaizu:e,yugawa:e}],gifu:[1,{anpachi:e,ena:e,gifu:e,ginan:e,godo:e,gujo:e,hashima:e,hichiso:e,hida:e,higashishirakawa:e,ibigawa:e,ikeda:e,kakamigahara:e,kani:e,kasahara:e,kasamatsu:e,kawaue:e,kitagata:e,mino:e,minokamo:e,mitake:e,mizunami:e,motosu:e,nakatsugawa:e,ogaki:e,sakahogi:e,seki:e,sekigahara:e,shirakawa:e,tajimi:e,takayama:e,tarui:e,toki:e,tomika:e,wanouchi:e,yamagata:e,yaotsu:e,yoro:e}],gunma:[1,{annaka:e,chiyoda:e,fujioka:e,higashiagatsuma:e,isesaki:e,itakura:e,kanna:e,kanra:e,katashina:e,kawaba:e,kiryu:e,kusatsu:e,maebashi:e,meiwa:e,midori:e,minakami:e,naganohara:e,nakanojo:e,nanmoku:e,numata:e,oizumi:e,ora:e,ota:e,shibukawa:e,shimonita:e,shinto:e,showa:e,takasaki:e,takayama:e,tamamura:e,tatebayashi:e,tomioka:e,tsukiyono:e,tsumagoi:e,ueno:e,yoshioka:e}],hiroshima:[1,{asaminami:e,daiwa:e,etajima:e,fuchu:e,fukuyama:e,hatsukaichi:e,higashihiroshima:e,hongo:e,jinsekikogen:e,kaita:e,kui:e,kumano:e,kure:e,mihara:e,miyoshi:e,naka:e,onomichi:e,osakikamijima:e,otake:e,saka:e,sera:e,seranishi:e,shinichi:e,shobara:e,takehara:e}],hokkaido:[1,{abashiri:e,abira:e,aibetsu:e,akabira:e,akkeshi:e,asahikawa:e,ashibetsu:e,ashoro:e,assabu:e,atsuma:e,bibai:e,biei:e,bifuka:e,bihoro:e,biratori:e,chippubetsu:e,chitose:e,date:e,ebetsu:e,embetsu:e,eniwa:e,erimo:e,esan:e,esashi:e,fukagawa:e,fukushima:e,furano:e,furubira:e,haboro:e,hakodate:e,hamatonbetsu:e,hidaka:e,higashikagura:e,higashikawa:e,hiroo:e,hokuryu:e,hokuto:e,honbetsu:e,horokanai:e,horonobe:e,ikeda:e,imakane:e,ishikari:e,iwamizawa:e,iwanai:e,kamifurano:e,kamikawa:e,kamishihoro:e,kamisunagawa:e,kamoenai:e,kayabe:e,kembuchi:e,kikonai:e,kimobetsu:e,kitahiroshima:e,kitami:e,kiyosato:e,koshimizu:e,kunneppu:e,kuriyama:e,kuromatsunai:e,kushiro:e,kutchan:e,kyowa:e,mashike:e,matsumae:e,mikasa:e,minamifurano:e,mombetsu:e,moseushi:e,mukawa:e,muroran:e,naie:e,nakagawa:e,nakasatsunai:e,nakatombetsu:e,nanae:e,nanporo:e,nayoro:e,nemuro:e,niikappu:e,niki:e,nishiokoppe:e,noboribetsu:e,numata:e,obihiro:e,obira:e,oketo:e,okoppe:e,otaru:e,otobe:e,otofuke:e,otoineppu:e,oumu:e,ozora:e,pippu:e,rankoshi:e,rebun:e,rikubetsu:e,rishiri:e,rishirifuji:e,saroma:e,sarufutsu:e,shakotan:e,shari:e,shibecha:e,shibetsu:e,shikabe:e,shikaoi:e,shimamaki:e,shimizu:e,shimokawa:e,shinshinotsu:e,shintoku:e,shiranuka:e,shiraoi:e,shiriuchi:e,sobetsu:e,sunagawa:e,taiki:e,takasu:e,takikawa:e,takinoue:e,teshikaga:e,tobetsu:e,tohma:e,tomakomai:e,tomari:e,toya:e,toyako:e,toyotomi:e,toyoura:e,tsubetsu:e,tsukigata:e,urakawa:e,urausu:e,uryu:e,utashinai:e,wakkanai:e,wassamu:e,yakumo:e,yoichi:e}],hyogo:[1,{aioi:e,akashi:e,ako:e,amagasaki:e,aogaki:e,asago:e,ashiya:e,awaji:e,fukusaki:e,goshiki:e,harima:e,himeji:e,ichikawa:e,inagawa:e,itami:e,kakogawa:e,kamigori:e,kamikawa:e,kasai:e,kasuga:e,kawanishi:e,miki:e,minamiawaji:e,nishinomiya:e,nishiwaki:e,ono:e,sanda:e,sannan:e,sasayama:e,sayo:e,shingu:e,shinonsen:e,shiso:e,sumoto:e,taishi:e,taka:e,takarazuka:e,takasago:e,takino:e,tamba:e,tatsuno:e,toyooka:e,yabu:e,yashiro:e,yoka:e,yokawa:e}],ibaraki:[1,{ami:e,asahi:e,bando:e,chikusei:e,daigo:e,fujishiro:e,hitachi:e,hitachinaka:e,hitachiomiya:e,hitachiota:e,ibaraki:e,ina:e,inashiki:e,itako:e,iwama:e,joso:e,kamisu:e,kasama:e,kashima:e,kasumigaura:e,koga:e,miho:e,mito:e,moriya:e,naka:e,namegata:e,oarai:e,ogawa:e,omitama:e,ryugasaki:e,sakai:e,sakuragawa:e,shimodate:e,shimotsuma:e,shirosato:e,sowa:e,suifu:e,takahagi:e,tamatsukuri:e,tokai:e,tomobe:e,tone:e,toride:e,tsuchiura:e,tsukuba:e,uchihara:e,ushiku:e,yachiyo:e,yamagata:e,yawara:e,yuki:e}],ishikawa:[1,{anamizu:e,hakui:e,hakusan:e,kaga:e,kahoku:e,kanazawa:e,kawakita:e,komatsu:e,nakanoto:e,nanao:e,nomi:e,nonoichi:e,noto:e,shika:e,suzu:e,tsubata:e,tsurugi:e,uchinada:e,wajima:e}],iwate:[1,{fudai:e,fujisawa:e,hanamaki:e,hiraizumi:e,hirono:e,ichinohe:e,ichinoseki:e,iwaizumi:e,iwate:e,joboji:e,kamaishi:e,kanegasaki:e,karumai:e,kawai:e,kitakami:e,kuji:e,kunohe:e,kuzumaki:e,miyako:e,mizusawa:e,morioka:e,ninohe:e,noda:e,ofunato:e,oshu:e,otsuchi:e,rikuzentakata:e,shiwa:e,shizukuishi:e,sumita:e,tanohata:e,tono:e,yahaba:e,yamada:e}],kagawa:[1,{ayagawa:e,higashikagawa:e,kanonji:e,kotohira:e,manno:e,marugame:e,mitoyo:e,naoshima:e,sanuki:e,tadotsu:e,takamatsu:e,tonosho:e,uchinomi:e,utazu:e,zentsuji:e}],kagoshima:[1,{akune:e,amami:e,hioki:e,isa:e,isen:e,izumi:e,kagoshima:e,kanoya:e,kawanabe:e,kinko:e,kouyama:e,makurazaki:e,matsumoto:e,minamitane:e,nakatane:e,nishinoomote:e,satsumasendai:e,soo:e,tarumizu:e,yusui:e}],kanagawa:[1,{aikawa:e,atsugi:e,ayase:e,chigasaki:e,ebina:e,fujisawa:e,hadano:e,hakone:e,hiratsuka:e,isehara:e,kaisei:e,kamakura:e,kiyokawa:e,matsuda:e,minamiashigara:e,miura:e,nakai:e,ninomiya:e,odawara:e,oi:e,oiso:e,sagamihara:e,samukawa:e,tsukui:e,yamakita:e,yamato:e,yokosuka:e,yugawara:e,zama:e,zushi:e}],kochi:[1,{aki:e,geisei:e,hidaka:e,higashitsuno:e,ino:e,kagami:e,kami:e,kitagawa:e,kochi:e,mihara:e,motoyama:e,muroto:e,nahari:e,nakamura:e,nankoku:e,nishitosa:e,niyodogawa:e,ochi:e,okawa:e,otoyo:e,otsuki:e,sakawa:e,sukumo:e,susaki:e,tosa:e,tosashimizu:e,toyo:e,tsuno:e,umaji:e,yasuda:e,yusuhara:e}],kumamoto:[1,{amakusa:e,arao:e,aso:e,choyo:e,gyokuto:e,kamiamakusa:e,kikuchi:e,kumamoto:e,mashiki:e,mifune:e,minamata:e,minamioguni:e,nagasu:e,nishihara:e,oguni:e,ozu:e,sumoto:e,takamori:e,uki:e,uto:e,yamaga:e,yamato:e,yatsushiro:e}],kyoto:[1,{ayabe:e,fukuchiyama:e,higashiyama:e,ide:e,ine:e,joyo:e,kameoka:e,kamo:e,kita:e,kizu:e,kumiyama:e,kyotamba:e,kyotanabe:e,kyotango:e,maizuru:e,minami:e,minamiyamashiro:e,miyazu:e,muko:e,nagaokakyo:e,nakagyo:e,nantan:e,oyamazaki:e,sakyo:e,seika:e,tanabe:e,uji:e,ujitawara:e,wazuka:e,yamashina:e,yawata:e}],mie:[1,{asahi:e,inabe:e,ise:e,kameyama:e,kawagoe:e,kiho:e,kisosaki:e,kiwa:e,komono:e,kumano:e,kuwana:e,matsusaka:e,meiwa:e,mihama:e,minamiise:e,misugi:e,miyama:e,nabari:e,shima:e,suzuka:e,tado:e,taiki:e,taki:e,tamaki:e,toba:e,tsu:e,udono:e,ureshino:e,watarai:e,yokkaichi:e}],miyagi:[1,{furukawa:e,higashimatsushima:e,ishinomaki:e,iwanuma:e,kakuda:e,kami:e,kawasaki:e,marumori:e,matsushima:e,minamisanriku:e,misato:e,murata:e,natori:e,ogawara:e,ohira:e,onagawa:e,osaki:e,rifu:e,semine:e,shibata:e,shichikashuku:e,shikama:e,shiogama:e,shiroishi:e,tagajo:e,taiwa:e,tome:e,tomiya:e,wakuya:e,watari:e,yamamoto:e,zao:e}],miyazaki:[1,{aya:e,ebino:e,gokase:e,hyuga:e,kadogawa:e,kawaminami:e,kijo:e,kitagawa:e,kitakata:e,kitaura:e,kobayashi:e,kunitomi:e,kushima:e,mimata:e,miyakonojo:e,miyazaki:e,morotsuka:e,nichinan:e,nishimera:e,nobeoka:e,saito:e,shiiba:e,shintomi:e,takaharu:e,takanabe:e,takazaki:e,tsuno:e}],nagano:[1,{achi:e,agematsu:e,anan:e,aoki:e,asahi:e,azumino:e,chikuhoku:e,chikuma:e,chino:e,fujimi:e,hakuba:e,hara:e,hiraya:e,iida:e,iijima:e,iiyama:e,iizuna:e,ikeda:e,ikusaka:e,ina:e,karuizawa:e,kawakami:e,kiso:e,kisofukushima:e,kitaaiki:e,komagane:e,komoro:e,matsukawa:e,matsumoto:e,miasa:e,minamiaiki:e,minamimaki:e,minamiminowa:e,minowa:e,miyada:e,miyota:e,mochizuki:e,nagano:e,nagawa:e,nagiso:e,nakagawa:e,nakano:e,nozawaonsen:e,obuse:e,ogawa:e,okaya:e,omachi:e,omi:e,ookuwa:e,ooshika:e,otaki:e,otari:e,sakae:e,sakaki:e,saku:e,sakuho:e,shimosuwa:e,shinanomachi:e,shiojiri:e,suwa:e,suzaka:e,takagi:e,takamori:e,takayama:e,tateshina:e,tatsuno:e,togakushi:e,togura:e,tomi:e,ueda:e,wada:e,yamagata:e,yamanouchi:e,yasaka:e,yasuoka:e}],nagasaki:[1,{chijiwa:e,futsu:e,goto:e,hasami:e,hirado:e,iki:e,isahaya:e,kawatana:e,kuchinotsu:e,matsuura:e,nagasaki:e,obama:e,omura:e,oseto:e,saikai:e,sasebo:e,seihi:e,shimabara:e,shinkamigoto:e,togitsu:e,tsushima:e,unzen:e}],nara:[1,{ando:e,gose:e,heguri:e,higashiyoshino:e,ikaruga:e,ikoma:e,kamikitayama:e,kanmaki:e,kashiba:e,kashihara:e,katsuragi:e,kawai:e,kawakami:e,kawanishi:e,koryo:e,kurotaki:e,mitsue:e,miyake:e,nara:e,nosegawa:e,oji:e,ouda:e,oyodo:e,sakurai:e,sango:e,shimoichi:e,shimokitayama:e,shinjo:e,soni:e,takatori:e,tawaramoto:e,tenkawa:e,tenri:e,uda:e,yamatokoriyama:e,yamatotakada:e,yamazoe:e,yoshino:e}],niigata:[1,{aga:e,agano:e,gosen:e,itoigawa:e,izumozaki:e,joetsu:e,kamo:e,kariwa:e,kashiwazaki:e,minamiuonuma:e,mitsuke:e,muika:e,murakami:e,myoko:e,nagaoka:e,niigata:e,ojiya:e,omi:e,sado:e,sanjo:e,seiro:e,seirou:e,sekikawa:e,shibata:e,tagami:e,tainai:e,tochio:e,tokamachi:e,tsubame:e,tsunan:e,uonuma:e,yahiko:e,yoita:e,yuzawa:e}],oita:[1,{beppu:e,bungoono:e,bungotakada:e,hasama:e,hiji:e,himeshima:e,hita:e,kamitsue:e,kokonoe:e,kuju:e,kunisaki:e,kusu:e,oita:e,saiki:e,taketa:e,tsukumi:e,usa:e,usuki:e,yufu:e}],okayama:[1,{akaiwa:e,asakuchi:e,bizen:e,hayashima:e,ibara:e,kagamino:e,kasaoka:e,kibichuo:e,kumenan:e,kurashiki:e,maniwa:e,misaki:e,nagi:e,niimi:e,nishiawakura:e,okayama:e,satosho:e,setouchi:e,shinjo:e,shoo:e,soja:e,takahashi:e,tamano:e,tsuyama:e,wake:e,yakage:e}],okinawa:[1,{aguni:e,ginowan:e,ginoza:e,gushikami:e,haebaru:e,higashi:e,hirara:e,iheya:e,ishigaki:e,ishikawa:e,itoman:e,izena:e,kadena:e,kin:e,kitadaito:e,kitanakagusuku:e,kumejima:e,kunigami:e,minamidaito:e,motobu:e,nago:e,naha:e,nakagusuku:e,nakijin:e,nanjo:e,nishihara:e,ogimi:e,okinawa:e,onna:e,shimoji:e,taketomi:e,tarama:e,tokashiki:e,tomigusuku:e,tonaki:e,urasoe:e,uruma:e,yaese:e,yomitan:e,yonabaru:e,yonaguni:e,zamami:e}],osaka:[1,{abeno:e,chihayaakasaka:e,chuo:e,daito:e,fujiidera:e,habikino:e,hannan:e,higashiosaka:e,higashisumiyoshi:e,higashiyodogawa:e,hirakata:e,ibaraki:e,ikeda:e,izumi:e,izumiotsu:e,izumisano:e,kadoma:e,kaizuka:e,kanan:e,kashiwara:e,katano:e,kawachinagano:e,kishiwada:e,kita:e,kumatori:e,matsubara:e,minato:e,minoh:e,misaki:e,moriguchi:e,neyagawa:e,nishi:e,nose:e,osakasayama:e,sakai:e,sayama:e,sennan:e,settsu:e,shijonawate:e,shimamoto:e,suita:e,tadaoka:e,taishi:e,tajiri:e,takaishi:e,takatsuki:e,tondabayashi:e,toyonaka:e,toyono:e,yao:e}],saga:[1,{ariake:e,arita:e,fukudomi:e,genkai:e,hamatama:e,hizen:e,imari:e,kamimine:e,kanzaki:e,karatsu:e,kashima:e,kitagata:e,kitahata:e,kiyama:e,kouhoku:e,kyuragi:e,nishiarita:e,ogi:e,omachi:e,ouchi:e,saga:e,shiroishi:e,taku:e,tara:e,tosu:e,yoshinogari:e}],saitama:[1,{arakawa:e,asaka:e,chichibu:e,fujimi:e,fujimino:e,fukaya:e,hanno:e,hanyu:e,hasuda:e,hatogaya:e,hatoyama:e,hidaka:e,higashichichibu:e,higashimatsuyama:e,honjo:e,ina:e,iruma:e,iwatsuki:e,kamiizumi:e,kamikawa:e,kamisato:e,kasukabe:e,kawagoe:e,kawaguchi:e,kawajima:e,kazo:e,kitamoto:e,koshigaya:e,kounosu:e,kuki:e,kumagaya:e,matsubushi:e,minano:e,misato:e,miyashiro:e,miyoshi:e,moroyama:e,nagatoro:e,namegawa:e,niiza:e,ogano:e,ogawa:e,ogose:e,okegawa:e,omiya:e,otaki:e,ranzan:e,ryokami:e,saitama:e,sakado:e,satte:e,sayama:e,shiki:e,shiraoka:e,soka:e,sugito:e,toda:e,tokigawa:e,tokorozawa:e,tsurugashima:e,urawa:e,warabi:e,yashio:e,yokoze:e,yono:e,yorii:e,yoshida:e,yoshikawa:e,yoshimi:e}],shiga:[1,{aisho:e,gamo:e,higashiomi:e,hikone:e,koka:e,konan:e,kosei:e,koto:e,kusatsu:e,maibara:e,moriyama:e,nagahama:e,nishiazai:e,notogawa:e,omihachiman:e,otsu:e,ritto:e,ryuoh:e,takashima:e,takatsuki:e,torahime:e,toyosato:e,yasu:e}],shimane:[1,{akagi:e,ama:e,gotsu:e,hamada:e,higashiizumo:e,hikawa:e,hikimi:e,izumo:e,kakinoki:e,masuda:e,matsue:e,misato:e,nishinoshima:e,ohda:e,okinoshima:e,okuizumo:e,shimane:e,tamayu:e,tsuwano:e,unnan:e,yakumo:e,yasugi:e,yatsuka:e}],shizuoka:[1,{arai:e,atami:e,fuji:e,fujieda:e,fujikawa:e,fujinomiya:e,fukuroi:e,gotemba:e,haibara:e,hamamatsu:e,higashiizu:e,ito:e,iwata:e,izu:e,izunokuni:e,kakegawa:e,kannami:e,kawanehon:e,kawazu:e,kikugawa:e,kosai:e,makinohara:e,matsuzaki:e,minamiizu:e,mishima:e,morimachi:e,nishiizu:e,numazu:e,omaezaki:e,shimada:e,shimizu:e,shimoda:e,shizuoka:e,susono:e,yaizu:e,yoshida:e}],tochigi:[1,{ashikaga:e,bato:e,haga:e,ichikai:e,iwafune:e,kaminokawa:e,kanuma:e,karasuyama:e,kuroiso:e,mashiko:e,mibu:e,moka:e,motegi:e,nasu:e,nasushiobara:e,nikko:e,nishikata:e,nogi:e,ohira:e,ohtawara:e,oyama:e,sakura:e,sano:e,shimotsuke:e,shioya:e,takanezawa:e,tochigi:e,tsuga:e,ujiie:e,utsunomiya:e,yaita:e}],tokushima:[1,{aizumi:e,anan:e,ichiba:e,itano:e,kainan:e,komatsushima:e,matsushige:e,mima:e,minami:e,miyoshi:e,mugi:e,nakagawa:e,naruto:e,sanagochi:e,shishikui:e,tokushima:e,wajiki:e}],tokyo:[1,{adachi:e,akiruno:e,akishima:e,aogashima:e,arakawa:e,bunkyo:e,chiyoda:e,chofu:e,chuo:e,edogawa:e,fuchu:e,fussa:e,hachijo:e,hachioji:e,hamura:e,higashikurume:e,higashimurayama:e,higashiyamato:e,hino:e,hinode:e,hinohara:e,inagi:e,itabashi:e,katsushika:e,kita:e,kiyose:e,kodaira:e,koganei:e,kokubunji:e,komae:e,koto:e,kouzushima:e,kunitachi:e,machida:e,meguro:e,minato:e,mitaka:e,mizuho:e,musashimurayama:e,musashino:e,nakano:e,nerima:e,ogasawara:e,okutama:e,ome:e,oshima:e,ota:e,setagaya:e,shibuya:e,shinagawa:e,shinjuku:e,suginami:e,sumida:e,tachikawa:e,taito:e,tama:e,toshima:e}],tottori:[1,{chizu:e,hino:e,kawahara:e,koge:e,kotoura:e,misasa:e,nanbu:e,nichinan:e,sakaiminato:e,tottori:e,wakasa:e,yazu:e,yonago:e}],toyama:[1,{asahi:e,fuchu:e,fukumitsu:e,funahashi:e,himi:e,imizu:e,inami:e,johana:e,kamiichi:e,kurobe:e,nakaniikawa:e,namerikawa:e,nanto:e,nyuzen:e,oyabe:e,taira:e,takaoka:e,tateyama:e,toga:e,tonami:e,toyama:e,unazuki:e,uozu:e,yamada:e}],wakayama:[1,{arida:e,aridagawa:e,gobo:e,hashimoto:e,hidaka:e,hirogawa:e,inami:e,iwade:e,kainan:e,kamitonda:e,katsuragi:e,kimino:e,kinokawa:e,kitayama:e,koya:e,koza:e,kozagawa:e,kudoyama:e,kushimoto:e,mihama:e,misato:e,nachikatsuura:e,shingu:e,shirahama:e,taiji:e,tanabe:e,wakayama:e,yuasa:e,yura:e}],yamagata:[1,{asahi:e,funagata:e,higashine:e,iide:e,kahoku:e,kaminoyama:e,kaneyama:e,kawanishi:e,mamurogawa:e,mikawa:e,murayama:e,nagai:e,nakayama:e,nanyo:e,nishikawa:e,obanazawa:e,oe:e,oguni:e,ohkura:e,oishida:e,sagae:e,sakata:e,sakegawa:e,shinjo:e,shirataka:e,shonai:e,takahata:e,tendo:e,tozawa:e,tsuruoka:e,yamagata:e,yamanobe:e,yonezawa:e,yuza:e}],yamaguchi:[1,{abu:e,hagi:e,hikari:e,hofu:e,iwakuni:e,kudamatsu:e,mitou:e,nagato:e,oshima:e,shimonoseki:e,shunan:e,tabuse:e,tokuyama:e,toyota:e,ube:e,yuu:e}],yamanashi:[1,{chuo:e,doshi:e,fuefuki:e,fujikawa:e,fujikawaguchiko:e,fujiyoshida:e,hayakawa:e,hokuto:e,ichikawamisato:e,kai:e,kofu:e,koshu:e,kosuge:e,"minami-alps":e,minobu:e,nakamichi:e,nanbu:e,narusawa:e,nirasaki:e,nishikatsura:e,oshino:e,otsuki:e,showa:e,tabayama:e,tsuru:e,uenohara:e,yamanakako:e,yamanashi:e}],"xn--4pvxs":e,栃木:e,"xn--vgu402c":e,愛知:e,"xn--c3s14m":e,愛媛:e,"xn--f6qx53a":e,兵庫:e,"xn--8pvr4u":e,熊本:e,"xn--uist22h":e,茨城:e,"xn--djrs72d6uy":e,北海道:e,"xn--mkru45i":e,千葉:e,"xn--0trq7p7nn":e,和歌山:e,"xn--8ltr62k":e,長崎:e,"xn--2m4a15e":e,長野:e,"xn--efvn9s":e,新潟:e,"xn--32vp30h":e,青森:e,"xn--4it797k":e,静岡:e,"xn--1lqs71d":e,東京:e,"xn--5rtp49c":e,石川:e,"xn--5js045d":e,埼玉:e,"xn--ehqz56n":e,三重:e,"xn--1lqs03n":e,京都:e,"xn--qqqt11m":e,佐賀:e,"xn--kbrq7o":e,大分:e,"xn--pssu33l":e,大阪:e,"xn--ntsq17g":e,奈良:e,"xn--uisz3g":e,宮城:e,"xn--6btw5a":e,宮崎:e,"xn--1ctwo":e,富山:e,"xn--6orx2r":e,山口:e,"xn--rht61e":e,山形:e,"xn--rht27z":e,山梨:e,"xn--djty4k":e,岩手:e,"xn--nit225k":e,岐阜:e,"xn--rht3d":e,岡山:e,"xn--klty5x":e,島根:e,"xn--kltx9a":e,広島:e,"xn--kltp7d":e,徳島:e,"xn--uuwu58a":e,沖縄:e,"xn--zbx025d":e,滋賀:e,"xn--ntso0iqx3a":e,神奈川:e,"xn--elqq16h":e,福井:e,"xn--4it168d":e,福岡:e,"xn--klt787d":e,福島:e,"xn--rny31h":e,秋田:e,"xn--7t0a264c":e,群馬:e,"xn--5rtq34k":e,香川:e,"xn--k7yn95e":e,高知:e,"xn--tor131o":e,鳥取:e,"xn--d5qv7z876c":e,鹿児島:e,kawasaki:o,kitakyushu:o,kobe:o,nagoya:o,sapporo:o,sendai:o,yokohama:o}],ke:[1,{ac:e,co:e,go:e,info:e,me:e,mobi:e,ne:e,or:e,sc:e}],kg:t,kh:o,ki:m,km:[1,{org:e,nom:e,gov:e,prd:e,tm:e,edu:e,mil:e,ass:e,com:e,coop:e,asso:e,presse:e,medecin:e,notaires:e,pharmaciens:e,veterinaire:e,gouv:e}],kn:[1,{net:e,org:e,edu:e,gov:e}],kp:[1,{com:e,edu:e,gov:e,org:e,rep:e,tra:e}],kr:[1,{ac:e,co:e,es:e,go:e,hs:e,kg:e,mil:e,ms:e,ne:e,or:e,pe:e,re:e,sc:e,busan:e,chungbuk:e,chungnam:e,daegu:e,daejeon:e,gangwon:e,gwangju:e,gyeongbuk:e,gyeonggi:e,gyeongnam:e,incheon:e,jeju:e,jeonbuk:e,jeonnam:e,seoul:e,ulsan:e}],kw:[1,{com:e,edu:e,emb:e,gov:e,ind:e,net:e,org:e}],ky:i,kz:t,la:[1,{int:e,net:e,info:e,edu:e,gov:e,per:e,com:e,org:e}],lb:n,lc:u,li:e,lk:[1,{gov:e,sch:e,net:e,int:e,com:e,org:e,edu:e,ngo:e,soc:e,web:e,ltd:e,assn:e,grp:e,hotel:e,ac:e}],lr:n,ls:[1,{ac:e,biz:e,co:e,edu:e,gov:e,info:e,net:e,org:e,sc:e}],lt:r,lu:e,lv:[1,{com:e,edu:e,gov:e,org:e,mil:e,id:e,net:e,asn:e,conf:e}],ly:[1,{com:e,net:e,gov:e,plc:e,edu:e,sch:e,med:e,org:e,id:e}],ma:[1,{co:e,net:e,gov:e,org:e,ac:e,press:e}],mc:[1,{tm:e,asso:e}],md:e,me:[1,{co:e,net:e,org:e,edu:e,ac:e,gov:e,its:e,priv:e}],mg:[1,{org:e,nom:e,gov:e,prd:e,tm:e,edu:e,mil:e,com:e,co:e}],mh:e,mil:e,mk:[1,{com:e,org:e,net:e,edu:e,gov:e,inf:e,name:e}],ml:[1,{com:e,edu:e,gouv:e,gov:e,net:e,org:e,presse:e}],mm:o,mn:[1,{gov:e,edu:e,org:e}],mo:n,mobi:e,mp:e,mq:e,mr:r,ms:n,mt:i,mu:[1,{com:e,net:e,org:e,gov:e,ac:e,co:e,or:e}],museum:e,mv:[1,{aero:e,biz:e,com:e,coop:e,edu:e,gov:e,info:e,int:e,mil:e,museum:e,name:e,net:e,org:e,pro:e}],mw:[1,{ac:e,biz:e,co:e,com:e,coop:e,edu:e,gov:e,int:e,museum:e,net:e,org:e}],mx:[1,{com:e,org:e,gob:e,edu:e,net:e}],my:[1,{biz:e,com:e,edu:e,gov:e,mil:e,name:e,net:e,org:e}],mz:[1,{ac:e,adv:e,co:e,edu:e,gov:e,mil:e,net:e,org:e}],na:[1,{info:e,pro:e,name:e,school:e,or:e,dr:e,us:e,mx:e,ca:e,in:e,cc:e,tv:e,ws:e,mobi:e,co:e,com:e,org:e}],name:e,nc:[1,{asso:e,nom:e}],ne:e,net:e,nf:[1,{com:e,net:e,per:e,rec:e,web:e,arts:e,firm:e,info:e,other:e,store:e}],ng:[1,{com:e,edu:e,gov:e,i:e,mil:e,mobi:e,name:e,net:e,org:e,sch:e}],ni:[1,{ac:e,biz:e,co:e,com:e,edu:e,gob:e,in:e,info:e,int:e,mil:e,net:e,nom:e,org:e,web:e}],nl:e,no:[1,{fhs:e,vgs:e,fylkesbibl:e,folkebibl:e,museum:e,idrett:e,priv:e,mil:e,stat:e,dep:e,kommune:e,herad:e,aa:p,ah:p,bu:p,fm:p,hl:p,hm:p,"jan-mayen":p,mr:p,nl:p,nt:p,of:p,ol:p,oslo:p,rl:p,sf:p,st:p,svalbard:p,tm:p,tr:p,va:p,vf:p,akrehamn:e,"xn--krehamn-dxa":e,åkrehamn:e,algard:e,"xn--lgrd-poac":e,ålgård:e,arna:e,brumunddal:e,bryne:e,bronnoysund:e,"xn--brnnysund-m8ac":e,brønnøysund:e,drobak:e,"xn--drbak-wua":e,drøbak:e,egersund:e,fetsund:e,floro:e,"xn--flor-jra":e,florø:e,fredrikstad:e,hokksund:e,honefoss:e,"xn--hnefoss-q1a":e,hønefoss:e,jessheim:e,jorpeland:e,"xn--jrpeland-54a":e,jørpeland:e,kirkenes:e,kopervik:e,krokstadelva:e,langevag:e,"xn--langevg-jxa":e,langevåg:e,leirvik:e,mjondalen:e,"xn--mjndalen-64a":e,mjøndalen:e,"mo-i-rana":e,mosjoen:e,"xn--mosjen-eya":e,mosjøen:e,nesoddtangen:e,orkanger:e,osoyro:e,"xn--osyro-wua":e,osøyro:e,raholt:e,"xn--rholt-mra":e,råholt:e,sandnessjoen:e,"xn--sandnessjen-ogb":e,sandnessjøen:e,skedsmokorset:e,slattum:e,spjelkavik:e,stathelle:e,stavern:e,stjordalshalsen:e,"xn--stjrdalshalsen-sqb":e,stjørdalshalsen:e,tananger:e,tranby:e,vossevangen:e,afjord:e,"xn--fjord-lra":e,åfjord:e,agdenes:e,al:e,"xn--l-1fa":e,ål:e,alesund:e,"xn--lesund-hua":e,ålesund:e,alstahaug:e,alta:e,"xn--lt-liac":e,áltá:e,alaheadju:e,"xn--laheadju-7ya":e,álaheadju:e,alvdal:e,amli:e,"xn--mli-tla":e,åmli:e,amot:e,"xn--mot-tla":e,åmot:e,andebu:e,andoy:e,"xn--andy-ira":e,andøy:e,andasuolo:e,ardal:e,"xn--rdal-poa":e,årdal:e,aremark:e,arendal:e,"xn--s-1fa":e,ås:e,aseral:e,"xn--seral-lra":e,åseral:e,asker:e,askim:e,askvoll:e,askoy:e,"xn--asky-ira":e,askøy:e,asnes:e,"xn--snes-poa":e,åsnes:e,audnedaln:e,aukra:e,aure:e,aurland:e,"aurskog-holand":e,"xn--aurskog-hland-jnb":e,"aurskog-høland":e,austevoll:e,austrheim:e,averoy:e,"xn--avery-yua":e,averøy:e,balestrand:e,ballangen:e,balat:e,"xn--blt-elab":e,bálát:e,balsfjord:e,bahccavuotna:e,"xn--bhccavuotna-k7a":e,báhccavuotna:e,bamble:e,bardu:e,beardu:e,beiarn:e,bajddar:e,"xn--bjddar-pta":e,bájddar:e,baidar:e,"xn--bidr-5nac":e,báidár:e,berg:e,bergen:e,berlevag:e,"xn--berlevg-jxa":e,berlevåg:e,bearalvahki:e,"xn--bearalvhki-y4a":e,bearalváhki:e,bindal:e,birkenes:e,bjarkoy:e,"xn--bjarky-fya":e,bjarkøy:e,bjerkreim:e,bjugn:e,bodo:e,"xn--bod-2na":e,bodø:e,badaddja:e,"xn--bdddj-mrabd":e,bådåddjå:e,budejju:e,bokn:e,bremanger:e,bronnoy:e,"xn--brnny-wuac":e,brønnøy:e,bygland:e,bykle:e,barum:e,"xn--brum-voa":e,bærum:e,telemark:[0,{bo:e,"xn--b-5ga":e,bø:e}],nordland:[0,{bo:e,"xn--b-5ga":e,bø:e,heroy:e,"xn--hery-ira":e,herøy:e}],bievat:e,"xn--bievt-0qa":e,bievát:e,bomlo:e,"xn--bmlo-gra":e,bømlo:e,batsfjord:e,"xn--btsfjord-9za":e,båtsfjord:e,bahcavuotna:e,"xn--bhcavuotna-s4a":e,báhcavuotna:e,dovre:e,drammen:e,drangedal:e,dyroy:e,"xn--dyry-ira":e,dyrøy:e,donna:e,"xn--dnna-gra":e,dønna:e,eid:e,eidfjord:e,eidsberg:e,eidskog:e,eidsvoll:e,eigersund:e,elverum:e,enebakk:e,engerdal:e,etne:e,etnedal:e,evenes:e,evenassi:e,"xn--eveni-0qa01ga":e,evenášši:e,"evje-og-hornnes":e,farsund:e,fauske:e,fuossko:e,fuoisku:e,fedje:e,fet:e,finnoy:e,"xn--finny-yua":e,finnøy:e,fitjar:e,fjaler:e,fjell:e,flakstad:e,flatanger:e,flekkefjord:e,flesberg:e,flora:e,fla:e,"xn--fl-zia":e,flå:e,folldal:e,forsand:e,fosnes:e,frei:e,frogn:e,froland:e,frosta:e,frana:e,"xn--frna-woa":e,fræna:e,froya:e,"xn--frya-hra":e,frøya:e,fusa:e,fyresdal:e,forde:e,"xn--frde-gra":e,førde:e,gamvik:e,gangaviika:e,"xn--ggaviika-8ya47h":e,gáŋgaviika:e,gaular:e,gausdal:e,gildeskal:e,"xn--gildeskl-g0a":e,gildeskål:e,giske:e,gjemnes:e,gjerdrum:e,gjerstad:e,gjesdal:e,gjovik:e,"xn--gjvik-wua":e,gjøvik:e,gloppen:e,gol:e,gran:e,grane:e,granvin:e,gratangen:e,grimstad:e,grong:e,kraanghke:e,"xn--kranghke-b0a":e,kråanghke:e,grue:e,gulen:e,hadsel:e,halden:e,halsa:e,hamar:e,hamaroy:e,habmer:e,"xn--hbmer-xqa":e,hábmer:e,hapmir:e,"xn--hpmir-xqa":e,hápmir:e,hammerfest:e,hammarfeasta:e,"xn--hmmrfeasta-s4ac":e,hámmárfeasta:e,haram:e,hareid:e,harstad:e,hasvik:e,aknoluokta:e,"xn--koluokta-7ya57h":e,ákŋoluokta:e,hattfjelldal:e,aarborte:e,haugesund:e,hemne:e,hemnes:e,hemsedal:e,"more-og-romsdal":[0,{heroy:e,sande:e}],"xn--mre-og-romsdal-qqb":[0,{"xn--hery-ira":e,sande:e}],"møre-og-romsdal":[0,{herøy:e,sande:e}],hitra:e,hjartdal:e,hjelmeland:e,hobol:e,"xn--hobl-ira":e,hobøl:e,hof:e,hol:e,hole:e,holmestrand:e,holtalen:e,"xn--holtlen-hxa":e,holtålen:e,hornindal:e,horten:e,hurdal:e,hurum:e,hvaler:e,hyllestad:e,hagebostad:e,"xn--hgebostad-g3a":e,hægebostad:e,hoyanger:e,"xn--hyanger-q1a":e,høyanger:e,hoylandet:e,"xn--hylandet-54a":e,høylandet:e,ha:e,"xn--h-2fa":e,hå:e,ibestad:e,inderoy:e,"xn--indery-fya":e,inderøy:e,iveland:e,jevnaker:e,jondal:e,jolster:e,"xn--jlster-bya":e,jølster:e,karasjok:e,karasjohka:e,"xn--krjohka-hwab49j":e,kárášjohka:e,karlsoy:e,galsa:e,"xn--gls-elac":e,gálsá:e,karmoy:e,"xn--karmy-yua":e,karmøy:e,kautokeino:e,guovdageaidnu:e,klepp:e,klabu:e,"xn--klbu-woa":e,klæbu:e,kongsberg:e,kongsvinger:e,kragero:e,"xn--krager-gya":e,kragerø:e,kristiansand:e,kristiansund:e,krodsherad:e,"xn--krdsherad-m8a":e,krødsherad:e,kvalsund:e,rahkkeravju:e,"xn--rhkkervju-01af":e,ráhkkerávju:e,kvam:e,kvinesdal:e,kvinnherad:e,kviteseid:e,kvitsoy:e,"xn--kvitsy-fya":e,kvitsøy:e,kvafjord:e,"xn--kvfjord-nxa":e,kvæfjord:e,giehtavuoatna:e,kvanangen:e,"xn--kvnangen-k0a":e,kvænangen:e,navuotna:e,"xn--nvuotna-hwa":e,návuotna:e,kafjord:e,"xn--kfjord-iua":e,kåfjord:e,gaivuotna:e,"xn--givuotna-8ya":e,gáivuotna:e,larvik:e,lavangen:e,lavagis:e,loabat:e,"xn--loabt-0qa":e,loabát:e,lebesby:e,davvesiida:e,leikanger:e,leirfjord:e,leka:e,leksvik:e,lenvik:e,leangaviika:e,"xn--leagaviika-52b":e,leaŋgaviika:e,lesja:e,levanger:e,lier:e,lierne:e,lillehammer:e,lillesand:e,lindesnes:e,lindas:e,"xn--linds-pra":e,lindås:e,lom:e,loppa:e,lahppi:e,"xn--lhppi-xqa":e,láhppi:e,lund:e,lunner:e,luroy:e,"xn--lury-ira":e,lurøy:e,luster:e,lyngdal:e,lyngen:e,ivgu:e,lardal:e,lerdal:e,"xn--lrdal-sra":e,lærdal:e,lodingen:e,"xn--ldingen-q1a":e,lødingen:e,lorenskog:e,"xn--lrenskog-54a":e,lørenskog:e,loten:e,"xn--lten-gra":e,løten:e,malvik:e,masoy:e,"xn--msy-ula0h":e,måsøy:e,muosat:e,"xn--muost-0qa":e,muosát:e,mandal:e,marker:e,marnardal:e,masfjorden:e,meland:e,meldal:e,melhus:e,meloy:e,"xn--mely-ira":e,meløy:e,meraker:e,"xn--merker-kua":e,meråker:e,moareke:e,"xn--moreke-jua":e,moåreke:e,midsund:e,"midtre-gauldal":e,modalen:e,modum:e,molde:e,moskenes:e,moss:e,mosvik:e,malselv:e,"xn--mlselv-iua":e,målselv:e,malatvuopmi:e,"xn--mlatvuopmi-s4a":e,málatvuopmi:e,namdalseid:e,aejrie:e,namsos:e,namsskogan:e,naamesjevuemie:e,"xn--nmesjevuemie-tcba":e,nååmesjevuemie:e,laakesvuemie:e,nannestad:e,narvik:e,narviika:e,naustdal:e,"nedre-eiker":e,akershus:h,buskerud:h,nesna:e,nesodden:e,nesseby:e,unjarga:e,"xn--unjrga-rta":e,unjárga:e,nesset:e,nissedal:e,nittedal:e,"nord-aurdal":e,"nord-fron":e,"nord-odal":e,norddal:e,nordkapp:e,davvenjarga:e,"xn--davvenjrga-y4a":e,davvenjárga:e,"nordre-land":e,nordreisa:e,raisa:e,"xn--risa-5na":e,ráisa:e,"nore-og-uvdal":e,notodden:e,naroy:e,"xn--nry-yla5g":e,nærøy:e,notteroy:e,"xn--nttery-byae":e,nøtterøy:e,odda:e,oksnes:e,"xn--ksnes-uua":e,øksnes:e,oppdal:e,oppegard:e,"xn--oppegrd-ixa":e,oppegård:e,orkdal:e,orland:e,"xn--rland-uua":e,ørland:e,orskog:e,"xn--rskog-uua":e,ørskog:e,orsta:e,"xn--rsta-fra":e,ørsta:e,hedmark:[0,{os:e,valer:e,"xn--vler-qoa":e,våler:e}],hordaland:[0,{os:e}],osen:e,osteroy:e,"xn--ostery-fya":e,osterøy:e,"ostre-toten":e,"xn--stre-toten-zcb":e,"østre-toten":e,overhalla:e,"ovre-eiker":e,"xn--vre-eiker-k8a":e,"øvre-eiker":e,oyer:e,"xn--yer-zna":e,øyer:e,oygarden:e,"xn--ygarden-p1a":e,øygarden:e,"oystre-slidre":e,"xn--ystre-slidre-ujb":e,"øystre-slidre":e,porsanger:e,porsangu:e,"xn--porsgu-sta26f":e,porsáŋgu:e,porsgrunn:e,radoy:e,"xn--rady-ira":e,radøy:e,rakkestad:e,rana:e,ruovat:e,randaberg:e,rauma:e,rendalen:e,rennebu:e,rennesoy:e,"xn--rennesy-v1a":e,rennesøy:e,rindal:e,ringebu:e,ringerike:e,ringsaker:e,rissa:e,risor:e,"xn--risr-ira":e,risør:e,roan:e,rollag:e,rygge:e,ralingen:e,"xn--rlingen-mxa":e,rælingen:e,rodoy:e,"xn--rdy-0nab":e,rødøy:e,romskog:e,"xn--rmskog-bya":e,rømskog:e,roros:e,"xn--rros-gra":e,røros:e,rost:e,"xn--rst-0na":e,røst:e,royken:e,"xn--ryken-vua":e,røyken:e,royrvik:e,"xn--ryrvik-bya":e,røyrvik:e,rade:e,"xn--rde-ula":e,råde:e,salangen:e,siellak:e,saltdal:e,salat:e,"xn--slt-elab":e,sálát:e,"xn--slat-5na":e,sálat:e,samnanger:e,vestfold:[0,{sande:e}],sandefjord:e,sandnes:e,sandoy:e,"xn--sandy-yua":e,sandøy:e,sarpsborg:e,sauda:e,sauherad:e,sel:e,selbu:e,selje:e,seljord:e,sigdal:e,siljan:e,sirdal:e,skaun:e,skedsmo:e,ski:e,skien:e,skiptvet:e,skjervoy:e,"xn--skjervy-v1a":e,skjervøy:e,skierva:e,"xn--skierv-uta":e,skiervá:e,skjak:e,"xn--skjk-soa":e,skjåk:e,skodje:e,skanland:e,"xn--sknland-fxa":e,skånland:e,skanit:e,"xn--sknit-yqa":e,skánit:e,smola:e,"xn--smla-hra":e,smøla:e,snillfjord:e,snasa:e,"xn--snsa-roa":e,snåsa:e,snoasa:e,snaase:e,"xn--snase-nra":e,snåase:e,sogndal:e,sokndal:e,sola:e,solund:e,songdalen:e,sortland:e,spydeberg:e,stange:e,stavanger:e,steigen:e,steinkjer:e,stjordal:e,"xn--stjrdal-s1a":e,stjørdal:e,stokke:e,"stor-elvdal":e,stord:e,stordal:e,storfjord:e,omasvuotna:e,strand:e,stranda:e,stryn:e,sula:e,suldal:e,sund:e,sunndal:e,surnadal:e,sveio:e,svelvik:e,sykkylven:e,sogne:e,"xn--sgne-gra":e,søgne:e,somna:e,"xn--smna-gra":e,sømna:e,"sondre-land":e,"xn--sndre-land-0cb":e,"søndre-land":e,"sor-aurdal":e,"xn--sr-aurdal-l8a":e,"sør-aurdal":e,"sor-fron":e,"xn--sr-fron-q1a":e,"sør-fron":e,"sor-odal":e,"xn--sr-odal-q1a":e,"sør-odal":e,"sor-varanger":e,"xn--sr-varanger-ggb":e,"sør-varanger":e,"matta-varjjat":e,"xn--mtta-vrjjat-k7af":e,"mátta-várjjat":e,sorfold:e,"xn--srfold-bya":e,sørfold:e,sorreisa:e,"xn--srreisa-q1a":e,sørreisa:e,sorum:e,"xn--srum-gra":e,sørum:e,tana:e,deatnu:e,time:e,tingvoll:e,tinn:e,tjeldsund:e,dielddanuorri:e,tjome:e,"xn--tjme-hra":e,tjøme:e,tokke:e,tolga:e,torsken:e,tranoy:e,"xn--trany-yua":e,tranøy:e,tromso:e,"xn--troms-zua":e,tromsø:e,tromsa:e,romsa:e,trondheim:e,troandin:e,trysil:e,trana:e,"xn--trna-woa":e,træna:e,trogstad:e,"xn--trgstad-r1a":e,trøgstad:e,tvedestrand:e,tydal:e,tynset:e,tysfjord:e,divtasvuodna:e,divttasvuotna:e,tysnes:e,tysvar:e,"xn--tysvr-vra":e,tysvær:e,tonsberg:e,"xn--tnsberg-q1a":e,tønsberg:e,ullensaker:e,ullensvang:e,ulvik:e,utsira:e,vadso:e,"xn--vads-jra":e,vadsø:e,cahcesuolo:e,"xn--hcesuolo-7ya35b":e,čáhcesuolo:e,vaksdal:e,valle:e,vang:e,vanylven:e,vardo:e,"xn--vard-jra":e,vardø:e,varggat:e,"xn--vrggt-xqad":e,várggát:e,vefsn:e,vaapste:e,vega:e,vegarshei:e,"xn--vegrshei-c0a":e,vegårshei:e,vennesla:e,verdal:e,verran:e,vestby:e,vestnes:e,"vestre-slidre":e,"vestre-toten":e,vestvagoy:e,"xn--vestvgy-ixa6o":e,vestvågøy:e,vevelstad:e,vik:e,vikna:e,vindafjord:e,volda:e,voss:e,varoy:e,"xn--vry-yla5g":e,værøy:e,vagan:e,"xn--vgan-qoa":e,vågan:e,voagat:e,vagsoy:e,"xn--vgsy-qoa0j":e,vågsøy:e,vaga:e,"xn--vg-yiab":e,vågå:e,ostfold:[0,{valer:e}],"xn--stfold-9xa":[0,{"xn--vler-qoa":e}],østfold:[0,{våler:e}]}],np:o,nr:m,nu:e,nz:[1,{ac:e,co:e,cri:e,geek:e,gen:e,govt:e,health:e,iwi:e,kiwi:e,maori:e,mil:e,"xn--mori-qsa":e,māori:e,net:e,org:e,parliament:e,school:e}],om:[1,{co:e,com:e,edu:e,gov:e,med:e,museum:e,net:e,org:e,pro:e}],onion:e,org:e,pa:[1,{ac:e,gob:e,com:e,org:e,sld:e,edu:e,net:e,ing:e,abo:e,med:e,nom:e}],pe:[1,{edu:e,gob:e,nom:e,mil:e,org:e,com:e,net:e}],pf:[1,{com:e,org:e,edu:e}],pg:o,ph:[1,{com:e,net:e,org:e,gov:e,edu:e,ngo:e,mil:e,i:e}],pk:[1,{com:e,net:e,edu:e,org:e,fam:e,biz:e,web:e,gov:e,gob:e,gok:e,gon:e,gop:e,gos:e,info:e}],pl:[1,{com:e,net:e,org:e,aid:e,agro:e,atm:e,auto:e,biz:e,edu:e,gmina:e,gsm:e,info:e,mail:e,miasta:e,media:e,mil:e,nieruchomosci:e,nom:e,pc:e,powiat:e,priv:e,realestate:e,rel:e,sex:e,shop:e,sklep:e,sos:e,szkola:e,targi:e,tm:e,tourism:e,travel:e,turystyka:e,gov:[1,{ap:e,griw:e,ic:e,is:e,kmpsp:e,konsulat:e,kppsp:e,kwp:e,kwpsp:e,mup:e,mw:e,oia:e,oirm:e,oke:e,oow:e,oschr:e,oum:e,pa:e,pinb:e,piw:e,po:e,pr:e,psp:e,psse:e,pup:e,rzgw:e,sa:e,sdn:e,sko:e,so:e,sr:e,starostwo:e,ug:e,ugim:e,um:e,umig:e,upow:e,uppo:e,us:e,uw:e,uzs:e,wif:e,wiih:e,winb:e,wios:e,witd:e,wiw:e,wkz:e,wsa:e,wskr:e,wsse:e,wuoz:e,wzmiuw:e,zp:e,zpisdn:e}],augustow:e,"babia-gora":e,bedzin:e,beskidy:e,bialowieza:e,bialystok:e,bielawa:e,bieszczady:e,boleslawiec:e,bydgoszcz:e,bytom:e,cieszyn:e,czeladz:e,czest:e,dlugoleka:e,elblag:e,elk:e,glogow:e,gniezno:e,gorlice:e,grajewo:e,ilawa:e,jaworzno:e,"jelenia-gora":e,jgora:e,kalisz:e,"kazimierz-dolny":e,karpacz:e,kartuzy:e,kaszuby:e,katowice:e,kepno:e,ketrzyn:e,klodzko:e,kobierzyce:e,kolobrzeg:e,konin:e,konskowola:e,kutno:e,lapy:e,lebork:e,legnica:e,lezajsk:e,limanowa:e,lomza:e,lowicz:e,lubin:e,lukow:e,malbork:e,malopolska:e,mazowsze:e,mazury:e,mielec:e,mielno:e,mragowo:e,naklo:e,nowaruda:e,nysa:e,olawa:e,olecko:e,olkusz:e,olsztyn:e,opoczno:e,opole:e,ostroda:e,ostroleka:e,ostrowiec:e,ostrowwlkp:e,pila:e,pisz:e,podhale:e,podlasie:e,polkowice:e,pomorze:e,pomorskie:e,prochowice:e,pruszkow:e,przeworsk:e,pulawy:e,radom:e,"rawa-maz":e,rybnik:e,rzeszow:e,sanok:e,sejny:e,slask:e,slupsk:e,sosnowiec:e,"stalowa-wola":e,skoczow:e,starachowice:e,stargard:e,suwalki:e,swidnica:e,swiebodzin:e,swinoujscie:e,szczecin:e,szczytno:e,tarnobrzeg:e,tgory:e,turek:e,tychy:e,ustka:e,walbrzych:e,warmia:e,warszawa:e,waw:e,wegrow:e,wielun:e,wlocl:e,wloclawek:e,wodzislaw:e,wolomin:e,wroclaw:e,zachpomor:e,zagan:e,zarow:e,zgora:e,zgorzelec:e}],pm:e,pn:[1,{gov:e,co:e,org:e,edu:e,net:e}],post:e,pr:[1,{com:e,net:e,org:e,gov:e,edu:e,isla:e,pro:e,biz:e,info:e,name:e,est:e,prof:e,ac:e}],pro:[1,{aaa:e,aca:e,acct:e,avocat:e,bar:e,cpa:e,eng:e,jur:e,law:e,med:e,recht:e}],ps:[1,{edu:e,gov:e,sec:e,plo:e,com:e,org:e,net:e}],pt:[1,{net:e,gov:e,org:e,edu:e,int:e,publ:e,com:e,nome:e}],pw:[1,{co:e,ne:e,or:e,ed:e,go:e,belau:e}],py:[1,{com:e,coop:e,edu:e,gov:e,mil:e,net:e,org:e}],qa:l,re:[1,{asso:e,com:e,nom:e}],ro:[1,{arts:e,com:e,firm:e,info:e,nom:e,nt:e,org:e,rec:e,store:e,tm:e,www:e}],rs:[1,{ac:e,co:e,edu:e,gov:e,in:e,org:e}],ru:e,rw:[1,{ac:e,co:e,coop:e,gov:e,mil:e,net:e,org:e}],sa:[1,{com:e,net:e,org:e,gov:e,med:e,pub:e,edu:e,sch:e}],sb:n,sc:n,sd:[1,{com:e,net:e,org:e,edu:e,med:e,tv:e,gov:e,info:e}],se:[1,{a:e,ac:e,b:e,bd:e,brand:e,c:e,d:e,e,f:e,fh:e,fhsk:e,fhv:e,g:e,h:e,i:e,k:e,komforb:e,kommunalforbund:e,komvux:e,l:e,lanbib:e,m:e,n:e,naturbruksgymn:e,o:e,org:e,p:e,parti:e,pp:e,press:e,r:e,s:e,t:e,tm:e,u:e,w:e,x:e,y:e,z:e}],sg:[1,{com:e,net:e,org:e,gov:e,edu:e,per:e}],sh:[1,{com:e,net:e,gov:e,org:e,mil:e}],si:e,sj:e,sk:e,sl:n,sm:e,sn:[1,{art:e,com:e,edu:e,gouv:e,org:e,perso:e,univ:e}],so:[1,{com:e,edu:e,gov:e,me:e,net:e,org:e}],sr:e,ss:[1,{biz:e,com:e,edu:e,gov:e,me:e,net:e,org:e,sch:e}],st:[1,{co:e,com:e,consulado:e,edu:e,embaixada:e,mil:e,net:e,org:e,principe:e,saotome:e,store:e}],su:e,sv:[1,{com:e,edu:e,gob:e,org:e,red:e}],sx:r,sy:t,sz:[1,{co:e,ac:e,org:e}],tc:e,td:e,tel:e,tf:e,tg:e,th:[1,{ac:e,co:e,go:e,in:e,mi:e,net:e,or:e}],tj:[1,{ac:e,biz:e,co:e,com:e,edu:e,go:e,gov:e,int:e,mil:e,name:e,net:e,nic:e,org:e,test:e,web:e}],tk:e,tl:r,tm:[1,{com:e,co:e,org:e,net:e,nom:e,gov:e,mil:e,edu:e}],tn:[1,{com:e,ens:e,fin:e,gov:e,ind:e,info:e,intl:e,mincom:e,nat:e,net:e,org:e,perso:e,tourism:e}],to:t,tr:[1,{av:e,bbs:e,bel:e,biz:e,com:e,dr:e,edu:e,gen:e,gov:e,info:e,mil:e,k12:e,kep:e,name:e,net:e,org:e,pol:e,tel:e,tsk:e,tv:e,web:e,nc:r}],tt:[1,{co:e,com:e,org:e,net:e,biz:e,info:e,pro:e,int:e,coop:e,jobs:e,mobi:e,travel:e,museum:e,aero:e,name:e,gov:e,edu:e}],tv:e,tw:[1,{edu:e,gov:e,mil:e,com:e,net:e,org:e,idv:e,game:e,ebiz:e,club:e,"xn--zf0ao64a":e,網路:e,"xn--uc0atv":e,組織:e,"xn--czrw28b":e,商業:e}],tz:[1,{ac:e,co:e,go:e,hotel:e,info:e,me:e,mil:e,mobi:e,ne:e,or:e,sc:e,tv:e}],ua:[1,{com:e,edu:e,gov:e,in:e,net:e,org:e,cherkassy:e,cherkasy:e,chernigov:e,chernihiv:e,chernivtsi:e,chernovtsy:e,ck:e,cn:e,cr:e,crimea:e,cv:e,dn:e,dnepropetrovsk:e,dnipropetrovsk:e,donetsk:e,dp:e,if:e,"ivano-frankivsk":e,kh:e,kharkiv:e,kharkov:e,kherson:e,khmelnitskiy:e,khmelnytskyi:e,kiev:e,kirovograd:e,km:e,kr:e,kropyvnytskyi:e,krym:e,ks:e,kv:e,kyiv:e,lg:e,lt:e,lugansk:e,luhansk:e,lutsk:e,lv:e,lviv:e,mk:e,mykolaiv:e,nikolaev:e,od:e,odesa:e,odessa:e,pl:e,poltava:e,rivne:e,rovno:e,rv:e,sb:e,sebastopol:e,sevastopol:e,sm:e,sumy:e,te:e,ternopil:e,uz:e,uzhgorod:e,uzhhorod:e,vinnica:e,vinnytsia:e,vn:e,volyn:e,yalta:e,zakarpattia:e,zaporizhzhe:e,zaporizhzhia:e,zhitomir:e,zhytomyr:e,zp:e,zt:e}],ug:[1,{co:e,or:e,ac:e,sc:e,go:e,ne:e,com:e,org:e}],uk:[1,{ac:e,co:e,gov:e,ltd:e,me:e,net:e,nhs:e,org:e,plc:e,police:e,sch:o}],us:[1,{dni:e,fed:e,isa:e,kids:e,nsn:e,ak:f,al:f,ar:f,as:f,az:f,ca:f,co:f,ct:f,dc:f,de:y,fl:f,ga:f,gu:f,hi:v,ia:f,id:f,il:f,in:f,ks:f,ky:f,la:f,ma:[1,{k12:[1,{pvt:e,chtr:e,paroch:e}],cc:e,lib:e}],md:f,me:f,mi:[1,{k12:e,cc:e,lib:e,"ann-arbor":e,cog:e,dst:e,eaton:e,gen:e,mus:e,tec:e,washtenaw:e}],mn:f,mo:f,ms:f,mt:f,nc:f,nd:v,ne:f,nh:f,nj:f,nm:f,nv:f,ny:f,oh:f,ok:f,or:f,pa:f,pr:f,ri:v,sc:f,sd:v,tn:f,tx:f,ut:f,vi:f,vt:f,va:f,wa:f,wi:f,wv:y,wy:f}],uy:[1,{com:e,edu:e,gub:e,mil:e,net:e,org:e}],uz:[1,{co:e,com:e,net:e,org:e}],va:e,vc:t,ve:[1,{arts:e,bib:e,co:e,com:e,e12:e,edu:e,firm:e,gob:e,gov:e,info:e,int:e,mil:e,net:e,nom:e,org:e,rar:e,rec:e,store:e,tec:e,web:e}],vg:e,vi:[1,{co:e,com:e,k12:e,net:e,org:e}],vn:[1,{ac:e,ai:e,biz:e,com:e,edu:e,gov:e,health:e,id:e,info:e,int:e,io:e,name:e,net:e,org:e,pro:e,angiang:e,bacgiang:e,backan:e,baclieu:e,bacninh:e,"baria-vungtau":e,bentre:e,binhdinh:e,binhduong:e,binhphuoc:e,binhthuan:e,camau:e,cantho:e,caobang:e,daklak:e,daknong:e,danang:e,dienbien:e,dongnai:e,dongthap:e,gialai:e,hagiang:e,haiduong:e,haiphong:e,hanam:e,hanoi:e,hatinh:e,haugiang:e,hoabinh:e,hungyen:e,khanhhoa:e,kiengiang:e,kontum:e,laichau:e,lamdong:e,langson:e,laocai:e,longan:e,namdinh:e,nghean:e,ninhbinh:e,ninhthuan:e,phutho:e,phuyen:e,quangbinh:e,quangnam:e,quangngai:e,quangninh:e,quangtri:e,soctrang:e,sonla:e,tayninh:e,thaibinh:e,thainguyen:e,thanhhoa:e,thanhphohochiminh:e,thuathienhue:e,tiengiang:e,travinh:e,tuyenquang:e,vinhlong:e,vinhphuc:e,yenbai:e}],vu:i,wf:e,ws:n,yt:e,"xn--mgbaam7a8h":e,امارات:e,"xn--y9a3aq":e,հայ:e,"xn--54b7fta0cc":e,বাংলা:e,"xn--90ae":e,бг:e,"xn--mgbcpq6gpa1a":e,البحرين:e,"xn--90ais":e,бел:e,"xn--fiqs8s":e,中国:e,"xn--fiqz9s":e,中國:e,"xn--lgbbat1ad8j":e,الجزائر:e,"xn--wgbh1c":e,مصر:e,"xn--e1a4c":e,ею:e,"xn--qxa6a":e,ευ:e,"xn--mgbah1a3hjkrd":e,موريتانيا:e,"xn--node":e,გე:e,"xn--qxam":e,ελ:e,"xn--j6w193g":[1,{"xn--55qx5d":e,"xn--wcvs22d":e,"xn--mxtq1m":e,"xn--gmqw5a":e,"xn--od0alg":e,"xn--uc0atv":e}],香港:[1,{公司:e,教育:e,政府:e,個人:e,網絡:e,組織:e}],"xn--2scrj9c":e,ಭಾರತ:e,"xn--3hcrj9c":e,ଭାରତ:e,"xn--45br5cyl":e,ভাৰত:e,"xn--h2breg3eve":e,भारतम्:e,"xn--h2brj9c8c":e,भारोत:e,"xn--mgbgu82a":e,ڀارت:e,"xn--rvc1e0am3e":e,ഭാരതം:e,"xn--h2brj9c":e,भारत:e,"xn--mgbbh1a":e,بارت:e,"xn--mgbbh1a71e":e,بھارت:e,"xn--fpcrj9c3d":e,భారత్:e,"xn--gecrj9c":e,ભારત:e,"xn--s9brj9c":e,ਭਾਰਤ:e,"xn--45brj9c":e,ভারত:e,"xn--xkc2dl3a5ee0h":e,இந்தியா:e,"xn--mgba3a4f16a":e,ایران:e,"xn--mgba3a4fra":e,ايران:e,"xn--mgbtx2b":e,عراق:e,"xn--mgbayh7gpa":e,الاردن:e,"xn--3e0b707e":e,한국:e,"xn--80ao21a":e,қаз:e,"xn--q7ce6a":e,ລາວ:e,"xn--fzc2c9e2c":e,ලංකා:e,"xn--xkc2al3hye2a":e,இலங்கை:e,"xn--mgbc0a9azcg":e,المغرب:e,"xn--d1alf":e,мкд:e,"xn--l1acc":e,мон:e,"xn--mix891f":e,澳門:e,"xn--mix082f":e,澳门:e,"xn--mgbx4cd0ab":e,مليسيا:e,"xn--mgb9awbf":e,عمان:e,"xn--mgbai9azgqp6j":e,پاکستان:e,"xn--mgbai9a5eva00b":e,پاكستان:e,"xn--ygbi2ammx":e,فلسطين:e,"xn--90a3ac":[1,{"xn--o1ac":e,"xn--c1avg":e,"xn--90azh":e,"xn--d1at":e,"xn--o1ach":e,"xn--80au":e}],срб:[1,{пр:e,орг:e,обр:e,од:e,упр:e,ак:e}],"xn--p1ai":e,рф:e,"xn--wgbl6a":e,قطر:e,"xn--mgberp4a5d4ar":e,السعودية:e,"xn--mgberp4a5d4a87g":e,السعودیة:e,"xn--mgbqly7c0a67fbc":e,السعودیۃ:e,"xn--mgbqly7cvafr":e,السعوديه:e,"xn--mgbpl2fh":e,سودان:e,"xn--yfro4i67o":e,新加坡:e,"xn--clchc0ea0b2g2a9gcd":e,சிங்கப்பூர்:e,"xn--ogbpf8fl":e,سورية:e,"xn--mgbtf8fl":e,سوريا:e,"xn--o3cw4h":[1,{"xn--12c1fe0br":e,"xn--12co0c3b4eva":e,"xn--h3cuzk1di":e,"xn--o3cyx2a":e,"xn--m3ch0j3a":e,"xn--12cfi8ixb8l":e}],ไทย:[1,{ศึกษา:e,ธุรกิจ:e,รัฐบาล:e,ทหาร:e,เน็ต:e,องค์กร:e}],"xn--pgbs0dh":e,تونس:e,"xn--kpry57d":e,台灣:e,"xn--kprw13d":e,台湾:e,"xn--nnx388a":e,臺灣:e,"xn--j1amh":e,укр:e,"xn--mgb2ddes":e,اليمن:e,xxx:e,ye:t,za:[0,{ac:e,agric:e,alt:e,co:e,edu:e,gov:e,grondar:e,law:e,mil:e,net:e,ngo:e,nic:e,nis:e,nom:e,org:e,school:e,tm:e,web:e}],zm:[1,{ac:e,biz:e,co:e,com:e,edu:e,gov:e,info:e,mil:e,net:e,org:e,sch:e}],zw:[1,{ac:e,co:e,gov:e,mil:e,org:e}],aaa:e,aarp:e,abb:e,abbott:e,abbvie:e,abc:e,able:e,abogado:e,abudhabi:e,academy:e,accenture:e,accountant:e,accountants:e,aco:e,actor:e,ads:e,adult:e,aeg:e,aetna:e,afl:e,africa:e,agakhan:e,agency:e,aig:e,airbus:e,airforce:e,airtel:e,akdn:e,alibaba:e,alipay:e,allfinanz:e,allstate:e,ally:e,alsace:e,alstom:e,amazon:e,americanexpress:e,americanfamily:e,amex:e,amfam:e,amica:e,amsterdam:e,analytics:e,android:e,anquan:e,anz:e,aol:e,apartments:e,app:e,apple:e,aquarelle:e,arab:e,aramco:e,archi:e,army:e,art:e,arte:e,asda:e,associates:e,athleta:e,attorney:e,auction:e,audi:e,audible:e,audio:e,auspost:e,author:e,auto:e,autos:e,avianca:e,aws:e,axa:e,azure:e,baby:e,baidu:e,banamex:e,bananarepublic:e,band:e,bank:e,bar:e,barcelona:e,barclaycard:e,barclays:e,barefoot:e,bargains:e,baseball:e,basketball:e,bauhaus:e,bayern:e,bbc:e,bbt:e,bbva:e,bcg:e,bcn:e,beats:e,beauty:e,beer:e,bentley:e,berlin:e,best:e,bestbuy:e,bet:e,bharti:e,bible:e,bid:e,bike:e,bing:e,bingo:e,bio:e,black:e,blackfriday:e,blockbuster:e,blog:e,bloomberg:e,blue:e,bms:e,bmw:e,bnpparibas:e,boats:e,boehringer:e,bofa:e,bom:e,bond:e,boo:e,book:e,booking:e,bosch:e,bostik:e,boston:e,bot:e,boutique:e,box:e,bradesco:e,bridgestone:e,broadway:e,broker:e,brother:e,brussels:e,build:e,builders:e,business:e,buy:e,buzz:e,bzh:e,cab:e,cafe:e,cal:e,call:e,calvinklein:e,cam:e,camera:e,camp:e,canon:e,capetown:e,capital:e,capitalone:e,car:e,caravan:e,cards:e,care:e,career:e,careers:e,cars:e,casa:e,case:e,cash:e,casino:e,catering:e,catholic:e,cba:e,cbn:e,cbre:e,center:e,ceo:e,cern:e,cfa:e,cfd:e,chanel:e,channel:e,charity:e,chase:e,chat:e,cheap:e,chintai:e,christmas:e,chrome:e,church:e,cipriani:e,circle:e,cisco:e,citadel:e,citi:e,citic:e,city:e,claims:e,cleaning:e,click:e,clinic:e,clinique:e,clothing:e,cloud:e,club:e,clubmed:e,coach:e,codes:e,coffee:e,college:e,cologne:e,comcast:e,commbank:e,community:e,company:e,compare:e,computer:e,comsec:e,condos:e,construction:e,consulting:e,contact:e,contractors:e,cooking:e,cool:e,corsica:e,country:e,coupon:e,coupons:e,courses:e,cpa:e,credit:e,creditcard:e,creditunion:e,cricket:e,crown:e,crs:e,cruise:e,cruises:e,cuisinella:e,cymru:e,cyou:e,dabur:e,dad:e,dance:e,data:e,date:e,dating:e,datsun:e,day:e,dclk:e,dds:e,deal:e,dealer:e,deals:e,degree:e,delivery:e,dell:e,deloitte:e,delta:e,democrat:e,dental:e,dentist:e,desi:e,design:e,dev:e,dhl:e,diamonds:e,diet:e,digital:e,direct:e,directory:e,discount:e,discover:e,dish:e,diy:e,dnp:e,docs:e,doctor:e,dog:e,domains:e,dot:e,download:e,drive:e,dtv:e,dubai:e,dunlop:e,dupont:e,durban:e,dvag:e,dvr:e,earth:e,eat:e,eco:e,edeka:e,education:e,email:e,emerck:e,energy:e,engineer:e,engineering:e,enterprises:e,epson:e,equipment:e,ericsson:e,erni:e,esq:e,estate:e,eurovision:e,eus:e,events:e,exchange:e,expert:e,exposed:e,express:e,extraspace:e,fage:e,fail:e,fairwinds:e,faith:e,family:e,fan:e,fans:e,farm:e,farmers:e,fashion:e,fast:e,fedex:e,feedback:e,ferrari:e,ferrero:e,fidelity:e,fido:e,film:e,final:e,finance:e,financial:e,fire:e,firestone:e,firmdale:e,fish:e,fishing:e,fit:e,fitness:e,flickr:e,flights:e,flir:e,florist:e,flowers:e,fly:e,foo:e,food:e,football:e,ford:e,forex:e,forsale:e,forum:e,foundation:e,fox:e,free:e,fresenius:e,frl:e,frogans:e,frontier:e,ftr:e,fujitsu:e,fun:e,fund:e,furniture:e,futbol:e,fyi:e,gal:e,gallery:e,gallo:e,gallup:e,game:e,games:e,gap:e,garden:e,gay:e,gbiz:e,gdn:e,gea:e,gent:e,genting:e,george:e,ggee:e,gift:e,gifts:e,gives:e,giving:e,glass:e,gle:e,global:e,globo:e,gmail:e,gmbh:e,gmo:e,gmx:e,godaddy:e,gold:e,goldpoint:e,golf:e,goo:e,goodyear:e,goog:e,google:e,gop:e,got:e,grainger:e,graphics:e,gratis:e,green:e,gripe:e,grocery:e,group:e,guardian:e,gucci:e,guge:e,guide:e,guitars:e,guru:e,hair:e,hamburg:e,hangout:e,haus:e,hbo:e,hdfc:e,hdfcbank:e,health:e,healthcare:e,help:e,helsinki:e,here:e,hermes:e,hiphop:e,hisamitsu:e,hitachi:e,hiv:e,hkt:e,hockey:e,holdings:e,holiday:e,homedepot:e,homegoods:e,homes:e,homesense:e,honda:e,horse:e,hospital:e,host:e,hosting:e,hot:e,hotels:e,hotmail:e,house:e,how:e,hsbc:e,hughes:e,hyatt:e,hyundai:e,ibm:e,icbc:e,ice:e,icu:e,ieee:e,ifm:e,ikano:e,imamat:e,imdb:e,immo:e,immobilien:e,inc:e,industries:e,infiniti:e,ing:e,ink:e,institute:e,insurance:e,insure:e,international:e,intuit:e,investments:e,ipiranga:e,irish:e,ismaili:e,ist:e,istanbul:e,itau:e,itv:e,jaguar:e,java:e,jcb:e,jeep:e,jetzt:e,jewelry:e,jio:e,jll:e,jmp:e,jnj:e,joburg:e,jot:e,joy:e,jpmorgan:e,jprs:e,juegos:e,juniper:e,kaufen:e,kddi:e,kerryhotels:e,kerrylogistics:e,kerryproperties:e,kfh:e,kia:e,kids:e,kim:e,kindle:e,kitchen:e,kiwi:e,koeln:e,komatsu:e,kosher:e,kpmg:e,kpn:e,krd:e,kred:e,kuokgroup:e,kyoto:e,lacaixa:e,lamborghini:e,lamer:e,lancaster:e,land:e,landrover:e,lanxess:e,lasalle:e,lat:e,latino:e,latrobe:e,law:e,lawyer:e,lds:e,lease:e,leclerc:e,lefrak:e,legal:e,lego:e,lexus:e,lgbt:e,lidl:e,life:e,lifeinsurance:e,lifestyle:e,lighting:e,like:e,lilly:e,limited:e,limo:e,lincoln:e,link:e,lipsy:e,live:e,living:e,llc:e,llp:e,loan:e,loans:e,locker:e,locus:e,lol:e,london:e,lotte:e,lotto:e,love:e,lpl:e,lplfinancial:e,ltd:e,ltda:e,lundbeck:e,luxe:e,luxury:e,madrid:e,maif:e,maison:e,makeup:e,man:e,management:e,mango:e,map:e,market:e,marketing:e,markets:e,marriott:e,marshalls:e,mattel:e,mba:e,mckinsey:e,med:e,media:e,meet:e,melbourne:e,meme:e,memorial:e,men:e,menu:e,merckmsd:e,miami:e,microsoft:e,mini:e,mint:e,mit:e,mitsubishi:e,mlb:e,mls:e,mma:e,mobile:e,moda:e,moe:e,moi:e,mom:e,monash:e,money:e,monster:e,mormon:e,mortgage:e,moscow:e,moto:e,motorcycles:e,mov:e,movie:e,msd:e,mtn:e,mtr:e,music:e,nab:e,nagoya:e,natura:e,navy:e,nba:e,nec:e,netbank:e,netflix:e,network:e,neustar:e,new:e,news:e,next:e,nextdirect:e,nexus:e,nfl:e,ngo:e,nhk:e,nico:e,nike:e,nikon:e,ninja:e,nissan:e,nissay:e,nokia:e,norton:e,now:e,nowruz:e,nowtv:e,nra:e,nrw:e,ntt:e,nyc:e,obi:e,observer:e,office:e,okinawa:e,olayan:e,olayangroup:e,oldnavy:e,ollo:e,omega:e,one:e,ong:e,onl:e,online:e,ooo:e,open:e,oracle:e,orange:e,organic:e,origins:e,osaka:e,otsuka:e,ott:e,ovh:e,page:e,panasonic:e,paris:e,pars:e,partners:e,parts:e,party:e,pay:e,pccw:e,pet:e,pfizer:e,pharmacy:e,phd:e,philips:e,phone:e,photo:e,photography:e,photos:e,physio:e,pics:e,pictet:e,pictures:e,pid:e,pin:e,ping:e,pink:e,pioneer:e,pizza:e,place:e,play:e,playstation:e,plumbing:e,plus:e,pnc:e,pohl:e,poker:e,politie:e,porn:e,pramerica:e,praxi:e,press:e,prime:e,prod:e,productions:e,prof:e,progressive:e,promo:e,properties:e,property:e,protection:e,pru:e,prudential:e,pub:e,pwc:e,qpon:e,quebec:e,quest:e,racing:e,radio:e,read:e,realestate:e,realtor:e,realty:e,recipes:e,red:e,redstone:e,redumbrella:e,rehab:e,reise:e,reisen:e,reit:e,reliance:e,ren:e,rent:e,rentals:e,repair:e,report:e,republican:e,rest:e,restaurant:e,review:e,reviews:e,rexroth:e,rich:e,richardli:e,ricoh:e,ril:e,rio:e,rip:e,rocks:e,rodeo:e,rogers:e,room:e,rsvp:e,rugby:e,ruhr:e,run:e,rwe:e,ryukyu:e,saarland:e,safe:e,safety:e,sakura:e,sale:e,salon:e,samsclub:e,samsung:e,sandvik:e,sandvikcoromant:e,sanofi:e,sap:e,sarl:e,sas:e,save:e,saxo:e,sbi:e,sbs:e,sca:e,scb:e,schaeffler:e,schmidt:e,scholarships:e,school:e,schule:e,schwarz:e,science:e,scot:e,search:e,seat:e,secure:e,security:e,seek:e,select:e,sener:e,services:e,seven:e,sew:e,sex:e,sexy:e,sfr:e,shangrila:e,sharp:e,shaw:e,shell:e,shia:e,shiksha:e,shoes:e,shop:e,shopping:e,shouji:e,show:e,silk:e,sina:e,singles:e,site:e,ski:e,skin:e,sky:e,skype:e,sling:e,smart:e,smile:e,sncf:e,soccer:e,social:e,softbank:e,software:e,sohu:e,solar:e,solutions:e,song:e,sony:e,soy:e,spa:e,space:e,sport:e,spot:e,srl:e,stada:e,staples:e,star:e,statebank:e,statefarm:e,stc:e,stcgroup:e,stockholm:e,storage:e,store:e,stream:e,studio:e,study:e,style:e,sucks:e,supplies:e,supply:e,support:e,surf:e,surgery:e,suzuki:e,swatch:e,swiss:e,sydney:e,systems:e,tab:e,taipei:e,talk:e,taobao:e,target:e,tatamotors:e,tatar:e,tattoo:e,tax:e,taxi:e,tci:e,tdk:e,team:e,tech:e,technology:e,temasek:e,tennis:e,teva:e,thd:e,theater:e,theatre:e,tiaa:e,tickets:e,tienda:e,tips:e,tires:e,tirol:e,tjmaxx:e,tjx:e,tkmaxx:e,tmall:e,today:e,tokyo:e,tools:e,top:e,toray:e,toshiba:e,total:e,tours:e,town:e,toyota:e,toys:e,trade:e,trading:e,training:e,travel:e,travelers:e,travelersinsurance:e,trust:e,trv:e,tube:e,tui:e,tunes:e,tushu:e,tvs:e,ubank:e,ubs:e,unicom:e,university:e,uno:e,uol:e,ups:e,vacations:e,vana:e,vanguard:e,vegas:e,ventures:e,verisign:e,versicherung:e,vet:e,viajes:e,video:e,vig:e,viking:e,villas:e,vin:e,vip:e,virgin:e,visa:e,vision:e,viva:e,vivo:e,vlaanderen:e,vodka:e,volvo:e,vote:e,voting:e,voto:e,voyage:e,wales:e,walmart:e,walter:e,wang:e,wanggou:e,watch:e,watches:e,weather:e,weatherchannel:e,webcam:e,weber:e,website:e,wed:e,wedding:e,weibo:e,weir:e,whoswho:e,wien:e,wiki:e,williamhill:e,win:e,windows:e,wine:e,winners:e,wme:e,wolterskluwer:e,woodside:e,work:e,works:e,world:e,wow:e,wtc:e,wtf:e,xbox:e,xerox:e,xfinity:e,xihuan:e,xin:e,"xn--11b4c3d":e,कॉम:e,"xn--1ck2e1b":e,セール:e,"xn--1qqw23a":e,佛山:e,"xn--30rr7y":e,慈善:e,"xn--3bst00m":e,集团:e,"xn--3ds443g":e,在线:e,"xn--3pxu8k":e,点看:e,"xn--42c2d9a":e,คอม:e,"xn--45q11c":e,八卦:e,"xn--4gbrim":e,موقع:e,"xn--55qw42g":e,公益:e,"xn--55qx5d":e,公司:e,"xn--5su34j936bgsg":e,香格里拉:e,"xn--5tzm5g":e,网站:e,"xn--6frz82g":e,移动:e,"xn--6qq986b3xl":e,我爱你:e,"xn--80adxhks":e,москва:e,"xn--80aqecdr1a":e,католик:e,"xn--80asehdb":e,онлайн:e,"xn--80aswg":e,сайт:e,"xn--8y0a063a":e,联通:e,"xn--9dbq2a":e,קום:e,"xn--9et52u":e,时尚:e,"xn--9krt00a":e,微博:e,"xn--b4w605ferd":e,淡马锡:e,"xn--bck1b9a5dre4c":e,ファッション:e,"xn--c1avg":e,орг:e,"xn--c2br7g":e,नेट:e,"xn--cck2b3b":e,ストア:e,"xn--cckwcxetd":e,アマゾン:e,"xn--cg4bki":e,삼성:e,"xn--czr694b":e,商标:e,"xn--czrs0t":e,商店:e,"xn--czru2d":e,商城:e,"xn--d1acj3b":e,дети:e,"xn--eckvdtc9d":e,ポイント:e,"xn--efvy88h":e,新闻:e,"xn--fct429k":e,家電:e,"xn--fhbei":e,كوم:e,"xn--fiq228c5hs":e,中文网:e,"xn--fiq64b":e,中信:e,"xn--fjq720a":e,娱乐:e,"xn--flw351e":e,谷歌:e,"xn--fzys8d69uvgm":e,電訊盈科:e,"xn--g2xx48c":e,购物:e,"xn--gckr3f0f":e,クラウド:e,"xn--gk3at1e":e,通販:e,"xn--hxt814e":e,网店:e,"xn--i1b6b1a6a2e":e,संगठन:e,"xn--imr513n":e,餐厅:e,"xn--io0a7i":e,网络:e,"xn--j1aef":e,ком:e,"xn--jlq480n2rg":e,亚马逊:e,"xn--jvr189m":e,食品:e,"xn--kcrx77d1x4a":e,飞利浦:e,"xn--kput3i":e,手机:e,"xn--mgba3a3ejt":e,ارامكو:e,"xn--mgba7c0bbn0a":e,العليان:e,"xn--mgbab2bd":e,بازار:e,"xn--mgbca7dzdo":e,ابوظبي:e,"xn--mgbi4ecexp":e,كاثوليك:e,"xn--mgbt3dhd":e,همراه:e,"xn--mk1bu44c":e,닷컴:e,"xn--mxtq1m":e,政府:e,"xn--ngbc5azd":e,شبكة:e,"xn--ngbe9e0a":e,بيتك:e,"xn--ngbrx":e,عرب:e,"xn--nqv7f":e,机构:e,"xn--nqv7fs00ema":e,组织机构:e,"xn--nyqy26a":e,健康:e,"xn--otu796d":e,招聘:e,"xn--p1acf":e,рус:e,"xn--pssy2u":e,大拿:e,"xn--q9jyb4c":e,みんな:e,"xn--qcka1pmc":e,グーグル:e,"xn--rhqv96g":e,世界:e,"xn--rovu88b":e,書籍:e,"xn--ses554g":e,网址:e,"xn--t60b56a":e,닷넷:e,"xn--tckwe":e,コム:e,"xn--tiq49xqyj":e,天主教:e,"xn--unup4y":e,游戏:e,"xn--vermgensberater-ctb":e,vermögensberater:e,"xn--vermgensberatung-pwb":e,vermögensberatung:e,"xn--vhquv":e,企业:e,"xn--vuq861b":e,信息:e,"xn--w4r85el8fhu5dnra":e,嘉里大酒店:e,"xn--w4rs40l":e,嘉里:e,"xn--xhq521b":e,广东:e,"xn--zfr164b":e,政务:e,xyz:e,yachts:e,yahoo:e,yamaxun:e,yandex:e,yodobashi:e,yoga:e,yokohama:e,you:e,youtube:e,yun:e,zappos:e,zara:e,zero:e,zip:e,zone:e,zuerich:e}]}()});function LF(e,t,n){let r=null,a=t;for(;a!==void 0&&(a[0]===1&&(r={index:n+1}),n!==-1);){let o=a[1];a=Object.prototype.hasOwnProperty.call(o,e[n])?o[e[n]]:o["*"],n-=1}return r}function Ig(e,t,n){var r;if(hp(e,t,n))return;let a=e.split("."),o=LF(a,IF,a.length-1);if(o!==null){n.publicSuffix=a.slice(o.index+1).join(".");return}let i=LF(a,NF,a.length-1);if(i!==null){n.publicSuffix=a.slice(i.index).join(".");return}n.publicSuffix=(r=a[a.length-1])!==null&&r!==void 0?r:null}var PF=b(()=>{d();Fg();MF();s(LF,"lookupInTrie");s(Ig,"suffixLookup")});function BF(e,t={}){return _g(OF),Rg(e,3,Ig,t,OF).domain}var OF,UF=b(()=>{d();Fg();PF();OF=Ag();s(BF,"getDomain")});var Ke,UK,jF,qF,j,jK,It=b(()=>{"use strict";d();A();Ke={didntCollectScreenshots:"Chrome didn't collect any screenshots during the page load. Please make sure there is content visible on the page, and then try re-running Lighthouse. ({errorCode})",badTraceRecording:"Something went wrong with recording the trace over your page load. Please run Lighthouse again. ({errorCode})",noFcp:"The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again. ({errorCode})",noLcp:"The page did not display content that qualifies as a Largest Contentful Paint (LCP). Ensure the page has a valid LCP element and then try again. ({errorCode})",pageLoadTookTooLong:"Your page took too long to load. Please follow the opportunities in the report to reduce your page load time, and then try re-running Lighthouse. ({errorCode})",pageLoadFailed:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests.",pageLoadFailedWithStatusCode:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: {statusCode})",pageLoadFailedWithDetails:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: {errorDetails})",pageLoadFailedInsecure:"The URL you have provided does not have a valid security certificate. {securityMessages}",pageLoadFailedInterstitial:"Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests.",internalChromeError:"An internal Chrome error occurred. Please restart Chrome and try re-running Lighthouse.",requestContentTimeout:"Fetching resource content has exceeded the allotted time",notHtml:"The page provided is not HTML (served as MIME type {mimeType}).",urlInvalid:"The URL you have provided appears to be invalid.",protocolTimeout:"Waiting for DevTools protocol response has exceeded the allotted time. (Method: {protocolMethod})",dnsFailure:"DNS servers could not resolve the provided domain.",pageLoadFailedHung:"Lighthouse was unable to reliably load the URL you requested because the page stopped responding.",criTimeout:"Timeout waiting for initial Debugger Protocol connection.",missingRequiredArtifact:"Required {artifactName} gatherer did not run.",erroredRequiredArtifact:"Required {artifactName} gatherer encountered an error: {errorMessage}",oldChromeDoesNotSupportFeature:"This version of Chrome is too old to support '{featureName}'. Use a newer version to see full results."},UK=w("core/lib/lh-error.js",Ke),jF="__LighthouseErrorSentinel",qF="__ErrorSentinel",j=class e extends Error{static{s(this,"LighthouseError")}constructor(t,n,r){super(t.code,r),this.name="LighthouseError",this.code=t.code,this.friendlyMessage=UK(t.message,{errorCode:this.code,...n}),this.lhrRuntimeError=!!t.lhrRuntimeError,n&&Object.assign(this,n),Error.captureStackTrace(this,e)}static fromProtocolMessage(t,n){let r=Object.values(e.errors).filter(i=>i.pattern).find(i=>i.pattern&&i.pattern.test(n.message));if(r)return new e(r);let a=`(${t}): ${n.message}`;n.data&&(a+=` (${n.data})`);let o=new Error(`Protocol error ${a}`);return Object.assign(o,{protocolMethod:t,protocolError:n.message})}static stringifyReplacer(t){if(t instanceof e){let{name:n,code:r,message:a,friendlyMessage:o,lhrRuntimeError:i,stack:c,cause:u,...l}=t;return{sentinel:jF,code:r,stack:c,cause:u,properties:l}}if(t instanceof Error){let{message:n,stack:r,cause:a}=t,o=t.code;return{sentinel:qF,message:n,code:o,stack:r,cause:a}}throw new Error("Invalid value for LighthouseError stringification")}static parseReviver(t,n){if(typeof n=="object"&&n!==null){if(n.sentinel===jF){let{code:r,stack:a,cause:o,properties:i}=n,c=e.errors[r],u=new e(c,i,{cause:o});return u.stack=a,u}if(n.sentinel===qF){let{message:r,code:a,stack:o,cause:i}=n,c=i?{cause:i}:void 0,u=new Error(r,c);return Object.assign(u,{code:a,stack:o}),u}}return n}},jK={NO_SPEEDLINE_FRAMES:{code:"NO_SPEEDLINE_FRAMES",message:Ke.didntCollectScreenshots,lhrRuntimeError:!0},SPEEDINDEX_OF_ZERO:{code:"SPEEDINDEX_OF_ZERO",message:Ke.didntCollectScreenshots,lhrRuntimeError:!0},NO_SCREENSHOTS:{code:"NO_SCREENSHOTS",message:Ke.didntCollectScreenshots,lhrRuntimeError:!0},INVALID_SPEEDLINE:{code:"INVALID_SPEEDLINE",message:Ke.didntCollectScreenshots,lhrRuntimeError:!0},NO_TRACING_STARTED:{code:"NO_TRACING_STARTED",message:Ke.badTraceRecording,lhrRuntimeError:!0},NO_RESOURCE_REQUEST:{code:"NO_RESOURCE_REQUEST",message:Ke.badTraceRecording,lhrRuntimeError:!0},NO_NAVSTART:{code:"NO_NAVSTART",message:Ke.badTraceRecording,lhrRuntimeError:!0},NO_FCP:{code:"NO_FCP",message:Ke.noFcp,lhrRuntimeError:!0},NO_DCL:{code:"NO_DCL",message:Ke.badTraceRecording,lhrRuntimeError:!0},NO_FMP:{code:"NO_FMP",message:Ke.badTraceRecording},NO_LCP:{code:"NO_LCP",message:Ke.noLcp},NO_LCP_ALL_FRAMES:{code:"NO_LCP_ALL_FRAMES",message:Ke.noLcp},UNSUPPORTED_OLD_CHROME:{code:"UNSUPPORTED_OLD_CHROME",message:Ke.oldChromeDoesNotSupportFeature},NO_TTI_CPU_IDLE_PERIOD:{code:"NO_TTI_CPU_IDLE_PERIOD",message:Ke.pageLoadTookTooLong},NO_TTI_NETWORK_IDLE_PERIOD:{code:"NO_TTI_NETWORK_IDLE_PERIOD",message:Ke.pageLoadTookTooLong},NO_DOCUMENT_REQUEST:{code:"NO_DOCUMENT_REQUEST",message:Ke.pageLoadFailed,lhrRuntimeError:!0},FAILED_DOCUMENT_REQUEST:{code:"FAILED_DOCUMENT_REQUEST",message:Ke.pageLoadFailedWithDetails,lhrRuntimeError:!0},ERRORED_DOCUMENT_REQUEST:{code:"ERRORED_DOCUMENT_REQUEST",message:Ke.pageLoadFailedWithStatusCode,lhrRuntimeError:!0},INSECURE_DOCUMENT_REQUEST:{code:"INSECURE_DOCUMENT_REQUEST",message:Ke.pageLoadFailedInsecure,lhrRuntimeError:!0},CHROME_INTERSTITIAL_ERROR:{code:"CHROME_INTERSTITIAL_ERROR",message:Ke.pageLoadFailedInterstitial,lhrRuntimeError:!0},PAGE_HUNG:{code:"PAGE_HUNG",message:Ke.pageLoadFailedHung,lhrRuntimeError:!0},NOT_HTML:{code:"NOT_HTML",message:Ke.notHtml,lhrRuntimeError:!0},TRACING_ALREADY_STARTED:{code:"TRACING_ALREADY_STARTED",message:Ke.internalChromeError,pattern:/Tracing.*started/,lhrRuntimeError:!0},PARSING_PROBLEM:{code:"PARSING_PROBLEM",message:Ke.internalChromeError,pattern:/Parsing problem/,lhrRuntimeError:!0},READ_FAILED:{code:"READ_FAILED",message:Ke.internalChromeError,pattern:/Read failed/,lhrRuntimeError:!0},INVALID_URL:{code:"INVALID_URL",message:Ke.urlInvalid},PROTOCOL_TIMEOUT:{code:"PROTOCOL_TIMEOUT",message:Ke.protocolTimeout,lhrRuntimeError:!0},DNS_FAILURE:{code:"DNS_FAILURE",message:Ke.dnsFailure,lhrRuntimeError:!0},CRI_TIMEOUT:{code:"CRI_TIMEOUT",message:Ke.criTimeout,lhrRuntimeError:!0},MISSING_REQUIRED_ARTIFACT:{code:"MISSING_REQUIRED_ARTIFACT",message:Ke.missingRequiredArtifact},ERRORED_REQUIRED_ARTIFACT:{code:"ERRORED_REQUIRED_ARTIFACT",message:Ke.erroredRequiredArtifact}};j.errors=jK;j.NO_ERROR="NO_ERROR";j.UNKNOWN_ERROR="UNKNOWN_ERROR"});function VK(e){return!e||!e.startsWith("chrome://")?e:(e.endsWith("/")&&(e=e.replace(/\/$/,"")),e.replace(/^chrome:\/\/chrome\//,"chrome://"))}var qK,zK,HK,GK,gp,Y,Ze=b(()=>{"use strict";d();UF();Fn();It();qK=["https:","http:","chrome:","chrome-extension:"],zK=["data","https","wss","blob","chrome","chrome-extension","about","filesystem"],HK=["localhost","127.0.0.1"],GK=["blob","data","intent","file","filesystem","chrome-extension"];s(VK,"rewriteChromeInternalUrl");gp=class e{static{s(this,"UrlUtils")}static isValid(t){try{return new URL(t),!0}catch{return!1}}static hostsMatch(t,n){try{return new URL(t).host===new URL(n).host}catch{return!1}}static originsMatch(t,n){try{return new URL(t).origin===new URL(n).origin}catch{return!1}}static getOrigin(t){try{let n=new URL(t);return n.protocol==="chrome-extension:"?Me.getChromeExtensionOrigin(t):n.host&&n.origin||null}catch{return null}}static getRootDomain(t){let n=Me.createOrReturnURL(t);return BF(n.href)||n.hostname}static rootDomainsMatch(t,n){let r,a;try{r=Me.createOrReturnURL(t),a=Me.createOrReturnURL(n)}catch{return!1}if(!r.hostname||!a.hostname)return!1;let o=e.getRootDomain(r),i=e.getRootDomain(a);return o===i}static getURLDisplayName(t,n){return Me.getURLDisplayName(new URL(t),n)}static elideDataURI(t){try{return new URL(t).protocol==="data:"?Me.truncate(t,100):t}catch{return t}}static equalWithExcludedFragments(t,n){[t,n]=[t,n].map(VK);try{let r=new URL(t);r.hash="";let a=new URL(n);return a.hash="",r.href===a.href}catch{return!1}}static isProtocolAllowed(t){try{let n=new URL(t);return qK.includes(n.protocol)}catch{return!1}}static isLikeLocalhost(t){return HK.includes(t)||t.endsWith(".localhost")}static isSecureScheme(t){return zK.includes(t)}static isNonNetworkProtocol(t){let n=t.includes(":")?t.slice(0,t.indexOf(":")):t;return GK.includes(n)}static guessMimeType(t){let n;try{n=new URL(t)}catch{return}if(n.protocol==="data:"){let o=n.pathname.match(/^(image\/(png|jpeg|svg\+xml|webp|gif|avif))[;,]/);return o?o[1]:void 0}let r=n.pathname.toLowerCase().match(/\.(png|jpeg|jpg|svg|webp|gif|avif)$/);if(!r)return;let a=r[1];return a==="svg"?"image/svg+xml":a==="jpg"?"image/jpeg":`image/${a}`}static normalizeUrl(t){if(t&&this.isValid(t)&&this.isProtocolAllowed(t))return new URL(t).href;throw new j(j.errors.INVALID_URL)}};gp.INVALID_URL_DEBUG_STRING="Lighthouse was unable to determine the URL of some script executions. It's possible a Chrome extension or other eval'd code is the source.";Y=gp});var zF,WK,$K,Gt,Uo=b(()=>{"use strict";d();Ze();zF=14*1024,WK=.4,$K={Document:.9,XHR:.9,Fetch:.9},Gt=class e{static{s(this,"NetworkAnalyzer")}static get SUMMARY(){return"__SUMMARY__"}static groupByOrigin(t){let n=new Map;return t.forEach(r=>{let a=r.parsedURL.securityOrigin,o=n.get(a)||[];o.push(r),n.set(a,o)}),n}static getSummary(t){t.sort((r,a)=>r-a);let n;if(t.length===0)n=t[0];else if(t.length%2===0){let r=t[Math.floor((t.length-1)/2)],a=t[Math.floor((t.length-1)/2)+1];n=(r+a)/2}else n=t[Math.floor((t.length-1)/2)];return{min:t[0],max:t[t.length-1],avg:t.reduce((r,a)=>r+a,0)/t.length,median:n}}static summarize(t){let n=new Map,r=[];for(let[a,o]of t)n.set(a,e.getSummary(o)),r.push(...o);return n.set(e.SUMMARY,e.getSummary(r)),n}static _estimateValueByOrigin(t,n){let r=e.estimateIfConnectionWasReused(t),a=e.groupByOrigin(t),o=new Map;for(let[i,c]of a.entries()){let u=[];for(let l of c){let m=l.timing;if(!m)continue;let p=n({record:l,timing:m,connectionReused:r.get(l.requestId)});typeof p<"u"&&(u=u.concat(p))}u.length&&o.set(i,u)}return o}static _estimateRTTViaConnectionTiming(t){let{timing:n,connectionReused:r,record:a}=t;if(r)return;if(globalThis.isLightrider&&a.lrStatistics)return a.protocol.startsWith("h3")?a.lrStatistics.TCPMs:[a.lrStatistics.TCPMs/2,a.lrStatistics.TCPMs/2];let{connectStart:o,sslStart:i,sslEnd:c,connectEnd:u}=n;if(u>=0&&o>=0&&a.protocol.startsWith("h3"))return u-o;if(i>=0&&c>=0&&i!==o)return[u-i,i-o];if(o>=0&&u>=0)return u-o}static _estimateRTTViaDownloadTiming(t){let{timing:n,connectionReused:r,record:a}=t;if(r||a.transferSize<=zF||!Number.isFinite(n.receiveHeadersEnd)||n.receiveHeadersEnd<0)return;let i=a.networkEndTime-a.networkRequestTime-n.receiveHeadersEnd,c=Math.log2(a.transferSize/zF);if(!(c>5))return i/c}static _estimateRTTViaSendStartTiming(t){let{timing:n,connectionReused:r,record:a}=t;if(r||!Number.isFinite(n.sendStart)||n.sendStart<0)return;let o=1;return a.protocol.startsWith("h3")||(o+=1),a.parsedURL.scheme==="https"&&(o+=1),n.sendStart/o}static _estimateRTTViaHeadersEndTiming(t){let{timing:n,connectionReused:r,record:a}=t;if(!Number.isFinite(n.receiveHeadersEnd)||n.receiveHeadersEnd<0||!a.resourceType)return;let o=$K[a.resourceType]||WK,i=n.receiveHeadersEnd*o,c=1;return r||(c+=1,a.protocol.startsWith("h3")||(c+=1),a.parsedURL.scheme==="https"&&(c+=1)),Math.max((n.receiveHeadersEnd-i)/c,3)}static _estimateResponseTimeByOrigin(t,n){return e._estimateValueByOrigin(t,({record:r,timing:a})=>{if(globalThis.isLightrider&&r.lrStatistics)return r.lrStatistics.requestMs;if(!Number.isFinite(a.receiveHeadersEnd)||a.receiveHeadersEnd<0||!Number.isFinite(a.sendEnd)||a.sendEnd<0)return;let o=a.receiveHeadersEnd-a.sendEnd,i=r.parsedURL.securityOrigin,c=n.get(i)||n.get(e.SUMMARY)||0;return Math.max(o-c,0)})}static canTrustConnectionInformation(t){let n=new Map;for(let r of t){let a=n.get(r.connectionId)||!r.connectionReused;n.set(r.connectionId,a)}return n.size<=1?!1:Array.from(n.values()).every(r=>r)}static estimateIfConnectionWasReused(t,n){let{forceCoarseEstimates:r=!1}=n||{};if(!r&&e.canTrustConnectionInformation(t))return new Map(t.map(i=>[i.requestId,!!i.connectionReused]));let a=new Map,o=e.groupByOrigin(t);for(let[i,c]of o.entries()){let u=c.map(m=>m.networkEndTime).reduce((m,p)=>Math.min(m,p),1/0);for(let m of c)a.set(m.requestId,m.networkRequestTime>=u||m.protocol==="h2");let l=c.reduce((m,p)=>m.networkRequestTime>p.networkRequestTime?p:m);a.set(l.requestId,!1)}return a}static estimateRTTByOrigin(t,n){let{forceCoarseEstimates:r=!1,coarseEstimateMultiplier:a=.3,useDownloadEstimates:o=!0,useSendStartEstimates:i=!0,useHeadersEndEstimates:c=!0}=n||{},u=e.estimateIfConnectionWasReused(t),l=e.groupByOrigin(t),m=new Map;for(let[h,f]of l.entries()){let v=function(D,E=1){for(let S of f){let k=S.timing;if(!k)continue;let C=D({record:S,timing:k,connectionReused:u.get(S.requestId)});C!==void 0&&(Array.isArray(C)?y.push(...C.map(R=>R*E)):y.push(C*E))}};var p=v;s(v,"collectEstimates");let y=[];r||v(this._estimateRTTViaConnectionTiming),y.length||(o&&v(this._estimateRTTViaDownloadTiming,a),i&&v(this._estimateRTTViaSendStartTiming,a),c&&v(this._estimateRTTViaHeadersEndTiming,a)),y.length&&m.set(h,y)}if(!m.size)throw new Error("No timing information available");return e.summarize(m)}static estimateServerResponseTimeByOrigin(t,n){let r=(n||{}).rttByOrigin;if(!r){r=new Map;let o=e.estimateRTTByOrigin(t,n);for(let[i,c]of o.entries())r.set(i,c.min)}let a=e._estimateResponseTimeByOrigin(t,r);return e.summarize(a)}static estimateThroughput(t){let n=0,r=t.reduce((c,u)=>(u.parsedURL?.scheme==="data"||u.failed||!u.finished||u.statusCode>300||!u.transferSize||(n+=u.transferSize,c.push({time:u.responseHeadersEndTime/1e3,isStart:!0}),c.push({time:u.networkEndTime/1e3,isStart:!1})),c),[]).sort((c,u)=>c.time-u.time);if(!r.length)return 1/0;let a=0,o=0,i=0;return r.forEach(c=>{c.isStart?(a===0&&(o=c.time),a++):(a--,a===0&&(i+=c.time-o))}),n*8/i}static findResourceForUrl(t,n){return t.find(r=>n.startsWith(r.url)&&Y.equalWithExcludedFragments(r.url,n))}static findLastDocumentForUrl(t,n){let r=t.filter(a=>a.resourceType==="Document"&&n.startsWith(a.url)&&Y.equalWithExcludedFragments(a.url,n));return r[r.length-1]}static resolveRedirects(t){for(;t.redirectDestination;)t=t.redirectDestination;return t}}});var YK,KK,XK,yp,HF=b(()=>{"use strict";d();jt();Uo();Dg();YK=30,KK=["https","wss"],XK=6,yp=class{static{s(this,"ConnectionPool")}constructor(t,n){this._options=n,this._records=t,this._connectionsByOrigin=new Map,this._connectionsByRecord=new Map,this._connectionsInUse=new Set,this._connectionReusedByRequestId=Gt.estimateIfConnectionWasReused(t,{forceCoarseEstimates:!0}),this._initializeConnections()}connectionsInUse(){return Array.from(this._connectionsInUse)}_initializeConnections(){let t=this._connectionReusedByRequestId,n=this._options.additionalRttByOrigin,r=this._options.serverResponseTimeByOrigin,a=Gt.groupByOrigin(this._records);for(let[o,i]of a.entries()){let c=[],u=n.get(o)||0,l=r.get(o)||YK;for(let p of i){if(t.get(p.requestId))continue;let h=KK.includes(p.parsedURL.scheme),f=p.protocol==="h2",y=new Ki(this._options.rtt+u,this._options.throughput,l,h,f);c.push(y)}if(!c.length)throw new Error(`Could not find a connection for origin: ${o}`);let m=c[0].isH2()?1:XK;for(;c.lengthu&&(o=c)}return o}acquire(t,n={}){if(this._connectionsByRecord.has(t))throw new Error("Record already has a connection");let r=t.parsedURL.securityOrigin,a=!!this._connectionReusedByRequestId.get(t.requestId),o=this._connectionsByOrigin.get(r)||[],i=this._findAvailableConnectionWithLargestCongestionWindow(o,{ignoreConnectionReused:n.ignoreConnectionReused,observedConnectionWasReused:a});return i?(this._connectionsInUse.add(i),this._connectionsByRecord.set(t,i),i):null}acquireActiveConnectionFromRecord(t){let n=this._connectionsByRecord.get(t);if(!n)throw new Error("Could not find an active connection for record");return n}release(t){let n=this._connectionsByRecord.get(t);this._connectionsByRecord.delete(t),this._connectionsInUse.delete(n)}}});var JK,Xi,GF=b(()=>{"use strict";d();jt();JK=2,Xi=class e{static{s(this,"DNSCache")}constructor({rtt:t}){this._rtt=t,this._resolvedDomainNames=new Map}getTimeUntilResolution(t,n){let{requestedAt:r=0,shouldUpdateCache:a=!1}=n||{},o=t.parsedURL.host,i=this._resolvedDomainNames.get(o),c=this._rtt*e.RTT_MULTIPLIER;if(i){let l=Math.max(i.resolvedAt-r,0);c=Math.min(l,c)}let u=r+c;return a&&this._updateCacheResolvedAtIfNeeded(t,u),c}_updateCacheResolvedAtIfNeeded(t,n){let r=t.parsedURL.host,a=this._resolvedDomainNames.get(r)||{resolvedAt:n};a.resolvedAt=Math.min(a.resolvedAt,n),this._resolvedDomainNames.set(r,a)}setResolvedAt(t,n){this._resolvedDomainNames.set(t,{resolvedAt:n})}};Xi.RTT_MULTIPLIER=JK});var hu,VF=b(()=>{"use strict";d();gn();hu=class{static{s(this,"SimulatorTimingMap")}constructor(){this._nodeTimings=new Map}getNodes(){return Array.from(this._nodeTimings.keys())}setReadyToStart(t,n){this._nodeTimings.set(t,n)}setInProgress(t,n){let r={...this.getQueued(t),startTime:n.startTime,timeElapsed:0};this._nodeTimings.set(t,t.type===ye.TYPES.NETWORK?{...r,timeElapsedOvershoot:0,bytesDownloaded:0}:r)}setCompleted(t,n){let r={...this.getInProgress(t),endTime:n.endTime,connectionTiming:n.connectionTiming};this._nodeTimings.set(t,r)}setCpu(t,n){let r={...this.getCpuStarted(t),timeElapsed:n.timeElapsed};this._nodeTimings.set(t,r)}setCpuEstimated(t,n){let r={...this.getCpuStarted(t),estimatedTimeElapsed:n.estimatedTimeElapsed};this._nodeTimings.set(t,r)}setNetwork(t,n){let r={...this.getNetworkStarted(t),timeElapsed:n.timeElapsed,timeElapsedOvershoot:n.timeElapsedOvershoot,bytesDownloaded:n.bytesDownloaded};this._nodeTimings.set(t,r)}setNetworkEstimated(t,n){let r={...this.getNetworkStarted(t),estimatedTimeElapsed:n.estimatedTimeElapsed};this._nodeTimings.set(t,r)}getQueued(t){let n=this._nodeTimings.get(t);if(!n)throw new Error(`Node ${t.id} not yet queued`);return n}getCpuStarted(t){let n=this._nodeTimings.get(t);if(!n)throw new Error(`Node ${t.id} not yet queued`);if(!("startTime"in n))throw new Error(`Node ${t.id} not yet started`);if("bytesDownloaded"in n)throw new Error(`Node ${t.id} timing not valid`);return n}getNetworkStarted(t){let n=this._nodeTimings.get(t);if(!n)throw new Error(`Node ${t.id} not yet queued`);if(!("startTime"in n))throw new Error(`Node ${t.id} not yet started`);if(!("bytesDownloaded"in n))throw new Error(`Node ${t.id} timing not valid`);return n}getInProgress(t){let n=this._nodeTimings.get(t);if(!n)throw new Error(`Node ${t.id} not yet queued`);if(!("startTime"in n))throw new Error(`Node ${t.id} not yet started`);if(!("estimatedTimeElapsed"in n))throw new Error(`Node ${t.id} not yet in progress`);return n}getCompleted(t){let n=this._nodeTimings.get(t);if(!n)throw new Error(`Node ${t.id} not yet queued`);if(!("startTime"in n))throw new Error(`Node ${t.id} not yet started`);if(!("estimatedTimeElapsed"in n))throw new Error(`Node ${t.id} not yet in progress`);if(!("endTime"in n))throw new Error(`Node ${t.id} not yet completed`);return n}}});var xr={};T(xr,{defaultSettings:()=>qn,nonSimulatedSettingsOverrides:()=>Ji,screenEmulationMetrics:()=>bp,throttling:()=>In,userAgents:()=>Ia});var In,ZK,QK,bp,eX,tX,Ia,qn,Ji,zn=b(()=>{"use strict";d();In={DEVTOOLS_RTT_ADJUSTMENT_FACTOR:3.75,DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR:.9,mobileSlow4G:{rttMs:150,throughputKbps:1638.4,requestLatencyMs:562.5,downloadThroughputKbps:1474.5600000000002,uploadThroughputKbps:675,cpuSlowdownMultiplier:4},mobileRegular3G:{rttMs:300,throughputKbps:700,requestLatencyMs:1125,downloadThroughputKbps:630,uploadThroughputKbps:630,cpuSlowdownMultiplier:4},desktopDense4G:{rttMs:40,throughputKbps:10240,cpuSlowdownMultiplier:1,requestLatencyMs:0,downloadThroughputKbps:0,uploadThroughputKbps:0}},ZK={mobile:!0,width:412,height:823,deviceScaleFactor:1.75,disabled:!1},QK={mobile:!1,width:1350,height:940,deviceScaleFactor:1,disabled:!1},bp={mobile:ZK,desktop:QK},eX="Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36",tX="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",Ia={mobile:eX,desktop:tX},qn={output:"json",maxWaitForFcp:30*1e3,maxWaitForLoad:45*1e3,pauseAfterFcpMs:1e3,pauseAfterLoadMs:1e3,networkQuietThresholdMs:1e3,cpuQuietThresholdMs:1e3,formFactor:"mobile",throttling:In.mobileSlow4G,throttlingMethod:"simulate",screenEmulation:bp.mobile,emulatedUserAgent:Ia.mobile,auditMode:!1,gatherMode:!1,clearStorageTypes:["file_systems","shader_cache","service_workers","cache_storage"],disableStorageReset:!1,debugNavigation:!1,channel:"node",usePassiveGathering:!1,disableFullPageScreenshot:!1,skipAboutBlank:!1,blankPage:"about:blank",ignoreStatusCode:!1,budgets:null,locale:"en-US",blockedUrlPatterns:null,additionalTraceCategories:null,extraHeaders:null,precomputedLanternData:null,onlyAudits:null,onlyCategories:null,skipAudits:null},Ji={pauseAfterFcpMs:5250,pauseAfterLoadMs:5250,networkQuietThresholdMs:5250,cpuQuietThresholdMs:5250}});var Ng,nX,rX,aX,Hn,oX,WF,gu,Mg=b(()=>{"use strict";d();jt();gn();Dg();HF();GF();VF();zn();Ng=In.mobileSlow4G,nX=10,rX=.5,aX=1e4,Hn={NotReadyToStart:0,ReadyToStart:1,InProgress:2,Complete:3},oX={VeryHigh:0,High:.25,Medium:.5,Low:1,VeryLow:2},WF=new Map,gu=class e{static{s(this,"Simulator")}constructor(t){if(this._options=Object.assign({rtt:Ng.rttMs,throughput:Ng.throughputKbps*1024,maximumConcurrentRequests:nX,cpuSlowdownMultiplier:Ng.cpuSlowdownMultiplier,layoutTaskMultiplier:rX,additionalRttByOrigin:new Map,serverResponseTimeByOrigin:new Map},t),this._rtt=this._options.rtt,this._throughput=this._options.throughput,this._maximumConcurrentRequests=Math.max(Math.min(Ki.maximumSaturatedConnections(this._rtt,this._throughput),this._options.maximumConcurrentRequests),1),this._cpuSlowdownMultiplier=this._options.cpuSlowdownMultiplier,this._layoutTaskMultiplier=this._cpuSlowdownMultiplier*this._options.layoutTaskMultiplier,this._cachedNodeListByStartPosition=[],this._flexibleOrdering=!1,this._nodeTimings=new hu,this._numberInProgressByType=new Map,this._nodes={},this._dns=new Xi({rtt:this._rtt}),this._connectionPool=null,!Number.isFinite(this._rtt))throw new Error(`Invalid rtt ${this._rtt}`);if(!Number.isFinite(this._throughput))throw new Error(`Invalid rtt ${this._throughput}`)}get rtt(){return this._rtt}_initializeConnectionPool(t){let n=[];t.getRootNode().traverse(r=>{r.type===ye.TYPES.NETWORK&&n.push(r.record)}),this._connectionPool=new yp(n,this._options)}_initializeAuxiliaryData(){this._nodeTimings=new hu,this._numberInProgressByType=new Map,this._nodes={},this._cachedNodeListByStartPosition=[];for(let t of Object.values(Hn))this._nodes[t]=new Set}_numberInProgress(t){return this._numberInProgressByType.get(t)||0}_markNodeAsReadyToStart(t,n){let r=e._computeNodeStartPosition(t),a=this._cachedNodeListByStartPosition.findIndex(i=>e._computeNodeStartPosition(i)>r),o=a===-1?this._cachedNodeListByStartPosition.length:a;this._cachedNodeListByStartPosition.splice(o,0,t),this._nodes[Hn.ReadyToStart].add(t),this._nodes[Hn.NotReadyToStart].delete(t),this._nodeTimings.setReadyToStart(t,{queuedTime:n})}_markNodeAsInProgress(t,n){let r=this._cachedNodeListByStartPosition.indexOf(t);this._cachedNodeListByStartPosition.splice(r,1),this._nodes[Hn.InProgress].add(t),this._nodes[Hn.ReadyToStart].delete(t),this._numberInProgressByType.set(t.type,this._numberInProgress(t.type)+1),this._nodeTimings.setInProgress(t,{startTime:n})}_markNodeAsComplete(t,n,r){this._nodes[Hn.Complete].add(t),this._nodes[Hn.InProgress].delete(t),this._numberInProgressByType.set(t.type,this._numberInProgress(t.type)-1),this._nodeTimings.setCompleted(t,{endTime:n,connectionTiming:r});for(let a of t.getDependents())a.getDependencies().some(i=>!this._nodes[Hn.Complete].has(i))||this._markNodeAsReadyToStart(a,n)}_acquireConnection(t){return this._connectionPool.acquire(t,{ignoreConnectionReused:this._flexibleOrdering})}_getNodesSortedByStartPosition(){return Array.from(this._cachedNodeListByStartPosition)}_startNodeIfPossible(t,n){if(t.type===ye.TYPES.CPU){this._numberInProgress(t.type)===0&&this._markNodeAsInProgress(t,n);return}if(t.type!==ye.TYPES.NETWORK)throw new Error("Unsupported");!t.isConnectionless&&(this._numberInProgress(t.type)>=this._maximumConcurrentRequests||!this._acquireConnection(t.record))||this._markNodeAsInProgress(t,n)}_updateNetworkCapacity(){let t=this._numberInProgress(ye.TYPES.NETWORK);if(t!==0)for(let n of this._connectionPool.connectionsInUse())n.setThroughput(this._throughput/t)}_estimateTimeRemaining(t){if(t.type===ye.TYPES.CPU)return this._estimateCPUTimeRemaining(t);if(t.type===ye.TYPES.NETWORK)return this._estimateNetworkTimeRemaining(t);throw new Error("Unsupported")}_estimateCPUTimeRemaining(t){let n=this._nodeTimings.getCpuStarted(t),r=t.didPerformLayout()?this._layoutTaskMultiplier:this._cpuSlowdownMultiplier,o=Math.min(Math.round(t.event.dur/1e3*r),aX)-n.timeElapsed;return this._nodeTimings.setCpuEstimated(t,{estimatedTimeElapsed:o}),o}_estimateNetworkTimeRemaining(t){let n=t.record,r=this._nodeTimings.getNetworkStarted(t),a=0;if(t.fromDiskCache)a=8+20*((n.resourceSize||0)/1024/1024)-r.timeElapsed;else if(t.isNonNetworkProtocol)a=2+10*((n.resourceSize||0)/1024/1024)-r.timeElapsed;else{let i=this._connectionPool.acquireActiveConnectionFromRecord(n),c=this._dns.getTimeUntilResolution(n,{requestedAt:r.startTime,shouldUpdateCache:!0}),u=r.timeElapsed;a=i.simulateDownloadUntil(n.transferSize-r.bytesDownloaded,{timeAlreadyElapsed:u,dnsResolutionTime:c,maximumTimeToElapse:1/0}).timeElapsed}let o=a+r.timeElapsedOvershoot;return this._nodeTimings.setNetworkEstimated(t,{estimatedTimeElapsed:o}),o}_findNextNodeCompletionTime(){let t=1/0;for(let n of this._nodes[Hn.InProgress])t=Math.min(t,this._estimateTimeRemaining(n));return t}_updateProgressMadeInTimePeriod(t,n,r){let a=this._nodeTimings.getInProgress(t),o=a.estimatedTimeElapsed===n;if(t.type===ye.TYPES.CPU||t.isConnectionless)return o?this._markNodeAsComplete(t,r):a.timeElapsed+=n;if(t.type!==ye.TYPES.NETWORK)throw new Error("Unsupported");if(!("bytesDownloaded"in a))throw new Error("Invalid timing data");let i=t.record,c=this._connectionPool.acquireActiveConnectionFromRecord(i),u=this._dns.getTimeUntilResolution(i,{requestedAt:a.startTime,shouldUpdateCache:!0}),l=c.simulateDownloadUntil(i.transferSize-a.bytesDownloaded,{dnsResolutionTime:u,timeAlreadyElapsed:a.timeElapsed,maximumTimeToElapse:n-a.timeElapsedOvershoot});c.setCongestionWindow(l.congestionWindow),c.setH2OverflowBytesDownloaded(l.extraBytesDownloaded),o?(c.setWarmed(!0),this._connectionPool.release(i),this._markNodeAsComplete(t,r,l.connectionTiming)):(a.timeElapsed+=l.timeElapsed,a.timeElapsedOvershoot+=l.timeElapsed-n,a.bytesDownloaded+=l.bytesDownloaded)}_computeFinalNodeTimings(){let t=this._nodeTimings.getNodes().map(r=>[r,this._nodeTimings.getCompleted(r)]);t.sort((r,a)=>r[1].startTime-a[1].startTime);let n=t.map(([r,a])=>[r,{startTime:a.startTime,endTime:a.endTime,duration:a.endTime-a.startTime}]);return{nodeTimings:new Map(n),completeNodeTimings:new Map(t)}}getOptions(){return this._options}simulate(t,n){if(ye.hasCycle(t))throw new Error("Cannot simulate graph with cycle");n=Object.assign({label:void 0,flexibleOrdering:!1},n),this._flexibleOrdering=!!n.flexibleOrdering,this._dns=new Xi({rtt:this._rtt}),this._initializeConnectionPool(t),this._initializeAuxiliaryData();let r=this._nodes[Hn.NotReadyToStart],a=this._nodes[Hn.ReadyToStart],o=this._nodes[Hn.InProgress],i=t.getRootNode();i.traverse(p=>r.add(p));let c=0,u=0;for(this._markNodeAsReadyToStart(i,c);a.size||o.size;){for(let h of this._getNodesSortedByStartPosition())this._startNodeIfPossible(h,c);if(!o.size){if(this._flexibleOrdering)throw new Error("Failed to start a node");this._flexibleOrdering=!0;continue}this._updateNetworkCapacity();let p=this._findNextNodeCompletionTime();if(c+=p,!Number.isFinite(p)||u>1e5)throw new Error("Simulation failed, depth exceeded");u++;for(let h of o)this._updateProgressMadeInTimePeriod(h,p,c)}let{nodeTimings:l,completeNodeTimings:m}=this._computeFinalNodeTimings();return WF.set(n.label||"unlabeled",m),{timeInMs:c,nodeTimings:l}}computeWastedMsFromWastedBytes(t){let{throughput:n,observedThroughput:r}=this._options,a=n===0?r:n;if(a===0)return 0;let i=t*8/a*1e3;return Math.round(i/10)*10}static get ALL_NODE_TIMINGS(){return WF}static _computeNodeStartPosition(t){return t.type==="cpu"?t.startTime:t.startTime+(oX[t.record.priority]*1e3*1e3||0)}}});var $F=b(()=>{"use strict";d();});var YF=b(()=>{"use strict";d();Ae();vr();});var KF,vp,XF=b(()=>{"use strict";d();KF=Lt(iu(),1);vp=class e{static{s(this,"ArbitraryEqualityMap")}constructor(){this._equalsFn=e.deepEquals,this._entries=[]}setEqualityFn(t){this._equalsFn=t}has(t){return this._findIndexOf(t)!==-1}get(t){return this._entries[this._findIndexOf(t)]?.value}set(t,n){let r=this._findIndexOf(t);r===-1&&(r=this._entries.length),this._entries[r]={key:t,value:n}}_findIndexOf(t){for(let n=0;n{let o=t?Object.fromEntries(t.map(h=>[h,r[h]])):r,i=a.computedCache,c=e.name,u=i.get(c)||new vp;i.set(c,u);let l=u.get(o);if(l)return l;let m={msg:`Computing artifact: ${c}`,id:`lh:computed:${c}`};F.time(m,"verbose");let p=e.compute_(o,a);return u.set(o,p),p.then(()=>F.timeEnd(m)).catch(()=>F.timeEnd(m)),p},"request")})}var ue=b(()=>{"use strict";d();Ae();XF();s(q,"makeComputedArtifact")});var JF,ZF,QF,eI,tI,nI,rI,wp,G,lt=b(()=>{"use strict";d();jt();Ze();JF="X-TCPMs",ZF="X-SSLMs",QF="X-RequestMs",eI="X-ResponseMs",tI="X-TotalMs",nI="X-TotalFetchedSize",rI="X-ProtocolIsH2",wp={XHR:"XHR",Fetch:"Fetch",EventSource:"EventSource",Script:"Script",Stylesheet:"Stylesheet",Image:"Image",Media:"Media",Font:"Font",Document:"Document",TextTrack:"TextTrack",WebSocket:"WebSocket",Other:"Other",Manifest:"Manifest",SignedExchange:"SignedExchange",Ping:"Ping",Preflight:"Preflight",CSPViolationReport:"CSPViolationReport",Prefetch:"Prefetch"},G=class e{static{s(this,"NetworkRequest")}constructor(){this.requestId="",this.connectionId="0",this.connectionReused=!1,this.url="",this.protocol="",this.isSecure=!1,this.isValid=!1,this.parsedURL={scheme:""},this.documentURL="",this.rendererStartTime=-1,this.networkRequestTime=-1,this.responseHeadersEndTime=-1,this.networkEndTime=-1,this.transferSize=0,this.responseHeadersTransferSize=0,this.resourceSize=0,this.fromDiskCache=!1,this.fromMemoryCache=!1,this.fromPrefetchCache=!1,this.lrStatistics=void 0,this.finished=!1,this.requestMethod="",this.statusCode=-1,this.redirectSource=void 0,this.redirectDestination=void 0,this.redirects=void 0,this.failed=!1,this.localizedFailDescription="",this.initiator={type:"other"},this.timing=void 0,this.resourceType=void 0,this.mimeType="",this.priority="Low",this.initiatorRequest=void 0,this.responseHeaders=[],this.responseHeadersText="",this.fetchedViaServiceWorker=!1,this.frameId="",this.sessionId=void 0,this.sessionTargetType=void 0,this.isLinkPreload=!1}hasErrorStatusCode(){return this.statusCode>=400}setInitiatorRequest(t){this.initiatorRequest=t}onRequestWillBeSent(t){this.requestId=t.requestId;let n;try{n=new URL(t.request.url)}catch{return}this.url=t.request.url,this.documentURL=t.documentURL,this.parsedURL={scheme:n.protocol.split(":")[0],host:n.hostname,securityOrigin:n.origin},this.isSecure=Y.isSecureScheme(this.parsedURL.scheme),this.rendererStartTime=t.timestamp*1e3,this.networkRequestTime=this.rendererStartTime,this.requestMethod=t.request.method,this.initiator=t.initiator,this.resourceType=t.type&&wp[t.type],this.priority=t.request.initialPriority,this.frameId=t.frameId,this.isLinkPreload=t.initiator.type==="preload"||!!t.request.isLinkPreload,this.isValid=!0}onRequestServedFromCache(){this.fromMemoryCache=!0}onResponseReceived(t){this._onResponse(t.response,t.timestamp,t.type),this._updateProtocolForLightrider(),this.frameId=t.frameId}onResponseReceivedExtraInfo(t){this.responseHeadersText=t.headersText||""}onDataReceived(t){this.resourceSize+=t.dataLength,t.encodedDataLength!==-1&&(this.transferSize+=t.encodedDataLength)}onLoadingFinished(t){this.finished||(this.finished=!0,this.networkEndTime=t.timestamp*1e3,t.encodedDataLength>=0&&(this.transferSize=t.encodedDataLength),this._updateResponseHeadersEndTimeIfNecessary(),this._backfillReceiveHeaderStartTiming(),this._updateTransferSizeForLightrider(),this._updateTimingsForLightrider())}onLoadingFailed(t){this.finished||(this.finished=!0,this.networkEndTime=t.timestamp*1e3,this.failed=!0,this.resourceType=t.type&&wp[t.type],this.localizedFailDescription=t.errorText,this._updateResponseHeadersEndTimeIfNecessary(),this._backfillReceiveHeaderStartTiming(),this._updateTransferSizeForLightrider(),this._updateTimingsForLightrider())}onResourceChangedPriority(t){this.priority=t.newPriority}onRedirectResponse(t){if(!t.redirectResponse)throw new Error("Missing redirectResponse data");this._onResponse(t.redirectResponse,t.timestamp,t.type),this.resourceType=void 0,this.finished=!0,this.networkEndTime=t.timestamp*1e3,this._updateResponseHeadersEndTimeIfNecessary(),this._backfillReceiveHeaderStartTiming()}setSession(t){this.sessionId=t}get isOutOfProcessIframe(){return this.sessionTargetType==="iframe"}_onResponse(t,n,r){this.url=t.url,this.connectionId=String(t.connectionId),this.connectionReused=t.connectionReused,t.protocol&&(this.protocol=t.protocol),this.responseHeadersEndTime=n*1e3,this.transferSize=t.encodedDataLength,this.responseHeadersTransferSize=t.encodedDataLength,typeof t.fromDiskCache=="boolean"&&(this.fromDiskCache=t.fromDiskCache),typeof t.fromPrefetchCache=="boolean"&&(this.fromPrefetchCache=t.fromPrefetchCache),this.statusCode=t.status,this.timing=t.timing,r&&(this.resourceType=wp[r]),this.mimeType=t.mimeType,this.responseHeaders=e._headersDictToHeadersArray(t.headers),this.fetchedViaServiceWorker=!!t.fromServiceWorker,this.fromMemoryCache&&(this.timing=void 0),this.timing&&this._recomputeTimesWithResourceTiming(this.timing)}_recomputeTimesWithResourceTiming(t){if(t.requestTime===0||t.receiveHeadersEnd===-1)return;this.networkRequestTime=t.requestTime*1e3;let n=this.networkRequestTime+t.receiveHeadersEnd,r=this.responseHeadersEndTime;this.responseHeadersEndTime=n,this.responseHeadersEndTime=Math.min(this.responseHeadersEndTime,r),this.responseHeadersEndTime=Math.max(this.responseHeadersEndTime,this.networkRequestTime),this.networkEndTime=Math.max(this.networkEndTime,this.responseHeadersEndTime)}_updateResponseHeadersEndTimeIfNecessary(){this.responseHeadersEndTime=Math.min(this.networkEndTime,this.responseHeadersEndTime)}_updateTransferSizeForLightrider(){if(!globalThis.isLightrider)return;let t=this.responseHeaders.find(r=>r.name===nI);if(!t)return;let n=parseFloat(t.value);isNaN(n)||(this.transferSize=n)}_updateProtocolForLightrider(){globalThis.isLightrider&&this.responseHeaders.some(t=>t.name===rI)&&(this.protocol="h2")}_backfillReceiveHeaderStartTiming(){!this.timing||this.timing.receiveHeadersStart!==void 0||(this.timing.receiveHeadersStart=this.timing.receiveHeadersEnd)}_updateTimingsForLightrider(){if(!globalThis.isLightrider)return;let t=this.responseHeaders.find(p=>p.name===tI);if(!t)return;let n=parseInt(t.value),r=this.responseHeaders.find(p=>p.name===JF),a=this.responseHeaders.find(p=>p.name===ZF),o=this.responseHeaders.find(p=>p.name===QF),i=this.responseHeaders.find(p=>p.name===eI),c=r?Math.max(0,parseInt(r.value)):0,u=a?Math.max(0,parseInt(a.value)):0,l=o?Math.max(0,parseInt(o.value)):0,m=i?Math.max(0,parseInt(i.value)):0;if(!Number.isNaN(c+l+m+n)){if(c+l+m!==n){if(Math.abs(c+l+m-n)>=25)return;n=c+l+m}u>c||(this.lrStatistics={endTimeDeltaMs:this.networkEndTime-(this.networkRequestTime+n),TCPMs:c,requestMs:l,responseMs:m})}}static getRequestIdForBackend(t){return t.replace(/(:redirect)+$/,"")}static _headersDictToHeadersArray(t){let n=[];for(let r of Object.keys(t)){let a=t[r].split(` +`);for(let o=0;oo.name==="Non-Authoritative-Reason")?.value==="HSTS"&&e.isSecureRequest(n):!1}static isContentEncoded(t){let n=/^content-encoding$/i;return t.responseHeaders.some(r=>r.name.match(n))}static getResourceSizeOnNetwork(t){return Math.min(t.resourceSize||0,t.transferSize||1/0)}};G.HEADER_TCP=JF;G.HEADER_SSL=ZF;G.HEADER_REQ=QF;G.HEADER_RES=eI;G.HEADER_TOTAL=tI;G.HEADER_FETCHED_SIZE=nI;G.HEADER_PROTOCOL_IS_H2=rI});var yu,bu=b(()=>{"use strict";d();jt();gn();lt();yu=class e extends ye{static{s(this,"NetworkNode")}constructor(t){super(t.requestId),this._record=t}get type(){return ye.TYPES.NETWORK}get startTime(){return this._record.networkRequestTime*1e3}get endTime(){return this._record.networkEndTime*1e3}get record(){return this._record}get initiatorType(){return this._record.initiator&&this._record.initiator.type}get fromDiskCache(){return!!this._record.fromDiskCache}get isNonNetworkProtocol(){return G.isNonNetworkRequest(this._record)}get isConnectionless(){return this.fromDiskCache||this.isNonNetworkProtocol}hasRenderBlockingPriority(){let t=this._record.priority,n=this._record.resourceType===G.TYPES.Script,r=this._record.resourceType===G.TYPES.Document;return t==="VeryHigh"||t==="High"&&n||t==="High"&&r}cloneWithoutRelationships(){let t=new e(this._record);return t.setIsMainDocument(this._isMainDocument),t}}});var Dp,vu=b(()=>{"use strict";d();jt();gn();Dp=class e extends ye{static{s(this,"CPUNode")}constructor(t,n=[]){let r=`${t.tid}.${t.ts}`;super(r),this._event=t,this._childEvents=n}get type(){return ye.TYPES.CPU}get startTime(){return this._event.ts}get endTime(){return this._event.ts+this._event.dur}get event(){return this._event}get childEvents(){return this._childEvents}didPerformLayout(){return this._childEvents.some(t=>t.name==="Layout")}getEvaluateScriptURLs(){let t=new Set;for(let n of this._childEvents)n.name==="EvaluateScript"&&(!n.args.data||!n.args.data.url||t.add(n.args.data.url));return t}cloneWithoutRelationships(){return new e(this._event,this._childEvents)}}});var Lg,wu,Pg=b(()=>{"use strict";d();It();vr();Lg=class extends qt{static{s(this,"LHTraceProcessor")}static createNoNavstartError(){return new j(j.errors.NO_NAVSTART)}static createNoResourceSendRequestError(){return new j(j.errors.NO_RESOURCE_REQUEST)}static createNoTracingStartedError(){return new j(j.errors.NO_TRACING_STARTED)}static createNoFirstContentfulPaintError(){return new j(j.errors.NO_FCP)}},wu=Lg});var Og,ke,Nt=b(()=>{"use strict";d();ue();Pg();Og=class{static{s(this,"ProcessedTrace")}static async compute_(t){return wu.processTrace(t)}},ke=q(Og,null)});var Bg,aI,oI=b(()=>{"use strict";d();Uo();ue();de();Nt();Bg=class{static{s(this,"DocumentUrls")}static async compute_(t,n){let r=await ke.request(t.trace,n),a=await H.request(t.devtoolsLog,n),o=r.mainFrameInfo.frameId,i,c;for(let l of t.devtoolsLog)if(l.method==="Page.frameNavigated"&&l.params.frame.id===o){let{url:m}=l.params.frame;i||(i=m),c=m}if(!i||!c)throw new Error("No main frame navigations found");let u=Gt.findResourceForUrl(a,i);return u?.redirects?.length&&(i=u.redirects[0].url),{requestedUrl:i,mainDocumentUrl:c}}},aI=q(Bg,["devtoolsLog","trace"])});var iX,sX,Ug,xt,Nn=b(()=>{"use strict";d();ue();bu();vu();vr();lt();Nt();de();Uo();oI();iX=10,sX=/^video/,Ug=class e{static{s(this,"PageDependencyGraph")}static getNetworkInitiators(t){if(!t.initiator)return[];if(t.initiator.url)return[t.initiator.url];if(t.initiator.type==="script"){let n=new Set,r=t.initiator.stack;for(;r;){let a=r.callFrames||[];for(let o of a)o.url&&n.add(o.url);r=r.parent}return Array.from(n)}return[]}static getNetworkNodeOutput(t){let n=[],r=new Map,a=new Map,o=new Map;return t.forEach(i=>{if(sX.test(i.mimeType)||i.sessionTargetType==="worker")return;for(;r.has(i.requestId);)i.requestId+=":duplicate";let c=new yu(i);n.push(c);let u=a.get(i.url)||[];if(u.push(c),r.set(i.requestId,c),a.set(i.url,u),i.frameId&&i.resourceType===G.TYPES.Document&&i.documentURL===i.url){let l=o.has(i.frameId)?null:c;o.set(i.frameId,l)}}),{nodes:n,idToNodeMap:r,urlToNodeMap:a,frameIdToNodeMap:o}}static getCPUNodes({mainThreadEvents:t}){let n=[],r=0;for(qt.assertHasToplevelEvents(t);r{let a=r.record.initiatorRequest||t.record,o=n.idToNodeMap.get(a.requestId)||t,i=!o.isDependentOn(r)&&r.canDependOn(o),c=e.getNetworkInitiators(r.record);if(c.length?c.forEach(l=>{let m=n.urlToNodeMap.get(l)||[];m.length===1&&m[0].startTime<=r.startTime&&!m[0].isDependentOn(r)?r.addDependency(m[0]):i&&o.addDependent(r)}):i&&o.addDependent(r),r!==t&&r.getDependencies().length===0&&r.canDependOn(t)&&r.addDependency(t),!r.record.redirects)return;let u=[...r.record.redirects,r.record];for(let l=1;l=f.startTime||f.addDependency(v))}s(i,"addDependencyOnFrame");function c(f,y){if(!y)return;let v=-100*1e3,D=n.urlToNodeMap.get(y)||[],E=null,S=1/0;for(let k of D){if(f.startTime<=k.startTime)return;let C=f.startTime-k.endTime;C>=v&&CE.url).filter(Boolean);switch(y.name){case"TimerInstall":u.set(y.args.data.timerId,f),D.forEach(E=>c(f,E));break;case"TimerFire":{let E=u.get(y.args.data.timerId);if(!E||E.endTime>f.startTime)break;E.addDependent(f);break}case"InvalidateLayout":case"ScheduleStyleRecalculation":i(f,y.args.data.frame),D.forEach(E=>c(f,E));break;case"EvaluateScript":i(f,y.args.data.frame),c(f,v),D.forEach(E=>c(f,E));break;case"XHRReadyStateChange":if(y.args.data.readyState!==4)break;c(f,v),D.forEach(E=>c(f,E));break;case"FunctionCall":case"v8.compile":i(f,y.args.data.frame),c(f,v);break;case"ParseAuthorStyleSheet":i(f,y.args.data.frame),c(f,y.args.data.styleSheetUrl);break;case"ResourceSendRequest":i(f,y.args.data.frame),o(f,y.args.data.requestId),D.forEach(E=>c(f,E));break}}f.getNumberOfDependencies()===0&&f.canDependOn(t)&&f.addDependency(t)}let l=iX*1e3,m=!1,p=!1,h=!1;for(let f of r){let y=!1;!m&&f.childEvents.some(v=>v.name==="Layout")&&(y=m=!0),!p&&f.childEvents.some(v=>v.name==="Paint")&&(y=p=!0),!h&&f.childEvents.some(v=>v.name==="ParseHTML")&&(y=h=!0),!(y||f.event.dur>=l)&&(f.getNumberOfDependencies()===1||f.getNumberOfDependents()<=1)&&e._pruneNode(f)}}static _pruneNode(t){let n=t.getDependencies(),r=t.getDependents();for(let a of n){t.removeDependency(a);for(let o of r)a.addDependent(o)}for(let a of r)t.removeDependent(a)}static createGraph(t,n,r){let a=e.getNetworkNodeOutput(n),o=e.getCPUNodes(t),{requestedUrl:i,mainDocumentUrl:c}=r;if(!i)throw new Error("requestedUrl is required to get the root request");if(!c)throw new Error("mainDocumentUrl is required to get the main resource");let u=Gt.findResourceForUrl(n,i);if(!u)throw new Error("rootRequest not found");let l=a.idToNodeMap.get(u.requestId);if(!l)throw new Error("rootNode not found");let m=Gt.findLastDocumentForUrl(n,c);if(!m)throw new Error("mainDocumentRequest not found");let p=a.idToNodeMap.get(m.requestId);if(!p)throw new Error("mainDocumentNode not found");if(e.linkNetworkNodes(l,a),e.linkCPUNodes(l,a,o),p.setIsMainDocument(!0),yu.hasCycle(l))throw new Error("Invalid dependency graph created, cycle detected");return l}static printGraph(t,n=100){function r(l,m,p=" "){return l+p.repeat(Math.max(m-l.length,0))}s(r,"padRight");let a=[];t.traverse(l=>a.push(l)),a.sort((l,m)=>l.startTime-m.startTime);let o=a[0].startTime,u=(a.reduce((l,m)=>Math.max(l,m.endTime),0)-o)/n;a.forEach(l=>{let m=Math.round((l.startTime-o)/u),p=Math.ceil((l.endTime-l.startTime)/u),h=r("",m)+r("",p,"="),f=l.record?l.record.url:l.type;console.log(r(h,n),`| ${f.slice(0,30)}`)})}static async compute_(t,n){let{trace:r,devtoolsLog:a}=t,[o,i]=await Promise.all([ke.request(r,n),H.request(a,n)]),c=t.URL||await aI.request(t,n);return e.createGraph(o,i,c)}},xt=q(Ug,["devtoolsLog","trace","URL"])});var cX,Zi,jg=b(()=>{"use strict";d();Kr();Ae();jt();lt();Nn();cX=Be,Zi=class e extends cX{static{s(this,"NetworkRecorder")}constructor(){super(),this._records=[],this._recordsById=new Map}getRawRecords(){return Array.from(this._records)}onRequestStarted(t){this._records.push(t),this._recordsById.set(t.requestId,t),this.emit("requeststarted",t)}onRequestFinished(t){this.emit("requestfinished",t)}onRequestWillBeSent(t){let n=t.params,r=this._findRealRequestAndSetSession(n.requestId,t.targetType,t.sessionId);if(!r){let i=new G;i.onRequestWillBeSent(n),i.sessionId=t.sessionId,i.sessionTargetType=t.targetType,this.onRequestStarted(i),F.verbose("network",`request will be sent to ${i.url}`);return}if(!n.redirectResponse)return;let a={...n,initiator:r.initiator,requestId:`${r.requestId}:redirect`},o=new G;o.onRequestWillBeSent(a),r.onRedirectResponse(n),F.verbose("network",`${r.url} redirected to ${o.url}`),r.redirectDestination=o,o.redirectSource=r,this.onRequestStarted(o),this.onRequestFinished(r)}onRequestServedFromCache(t){let n=t.params,r=this._findRealRequestAndSetSession(n.requestId,t.targetType,t.sessionId);r&&(F.verbose("network",`${r.url} served from cache`),r.onRequestServedFromCache())}onResponseReceived(t){let n=t.params,r=this._findRealRequestAndSetSession(n.requestId,t.targetType,t.sessionId);r&&(F.verbose("network",`${r.url} response received`),r.onResponseReceived(n))}onResponseReceivedExtraInfo(t){let n=t.params,r=this._findRealRequestAndSetSession(n.requestId,t.targetType,t.sessionId);r&&(F.verbose("network",`${r.url} response received extra info`),r.onResponseReceivedExtraInfo(n))}onDataReceived(t){let n=t.params,r=this._findRealRequestAndSetSession(n.requestId,t.targetType,t.sessionId);r&&(F.verbose("network",`${r.url} data received`),r.onDataReceived(n))}onLoadingFinished(t){let n=t.params,r=this._findRealRequestAndSetSession(n.requestId,t.targetType,t.sessionId);r&&(F.verbose("network",`${r.url} loading finished`),r.onLoadingFinished(n),this.onRequestFinished(r))}onLoadingFailed(t){let n=t.params,r=this._findRealRequestAndSetSession(n.requestId,t.targetType,t.sessionId);r&&(F.verbose("network",`${r.url} loading failed`),r.onLoadingFailed(n),this.onRequestFinished(r))}onResourceChangedPriority(t){let n=t.params,r=this._findRealRequestAndSetSession(n.requestId,t.targetType,t.sessionId);r&&r.onResourceChangedPriority(n)}dispatch(t){switch(t.method){case"Network.requestWillBeSent":return this.onRequestWillBeSent(t);case"Network.requestServedFromCache":return this.onRequestServedFromCache(t);case"Network.responseReceived":return this.onResponseReceived(t);case"Network.responseReceivedExtraInfo":return this.onResponseReceivedExtraInfo(t);case"Network.dataReceived":return this.onDataReceived(t);case"Network.loadingFinished":return this.onLoadingFinished(t);case"Network.loadingFailed":return this.onLoadingFailed(t);case"Network.resourceChangedPriority":return this.onResourceChangedPriority(t);default:return}}_findRealRequestAndSetSession(t,n,r){let a=this._recordsById.get(t);if(!(!a||!a.isValid)){for(;a.redirectDestination;)a=a.redirectDestination;return a.setSession(r),a.sessionTargetType=n,a}}static _chooseInitiatorRequest(t,n){if(t.redirectSource)return t.redirectSource;let r=xt.getNetworkInitiators(t)[0],a=n.get(r)||[];if(a=a.filter(o=>o.responseHeadersEndTime<=t.networkRequestTime&&o.finished&&!o.failed),a.length>1){let o=a.filter(i=>i.resourceType!==G.TYPES.Other);o.length&&(a=o)}if(a.length>1){let o=a.filter(i=>i.frameId===t.frameId);o.length&&(a=o)}if(a.length>1&&t.initiator.type==="parser"){let o=a.filter(i=>i.resourceType===G.TYPES.Document);o.length&&(a=o)}if(a.length>1){let o=a.filter(i=>i.isLinkPreload);if(o.length){let i=a.filter(u=>!u.isLinkPreload),c=i.every(u=>u.fromDiskCache||u.fromMemoryCache);i.length&&c&&(a=o)}}return a.length===1?a[0]:null}static recordsFromLogs(t){let n=new e;t.forEach(o=>n.dispatch(o));let r=n.getRawRecords().filter(o=>o.isValid),a=new Map;for(let o of r){let i=a.get(o.url)||[];i.push(o),a.set(o.url,i)}for(let o of r){let i=e._chooseInitiatorRequest(o,a);i&&o.setInitiatorRequest(i);let c=o;for(;c.redirectDestination;)c=c.redirectDestination;if(c===o||c.redirects)continue;let u=[];for(let l=c.redirectSource;l;l=l.redirectSource)u.unshift(l);c.redirects=u}return r}}});var qg,H,de=b(()=>{"use strict";d();jt();ue();jg();qg=class{static{s(this,"NetworkRecords")}static async compute_(t){return Zi.recordsFromLogs(t)}},H=q(qg,null)});var zg,ar,jo=b(()=>{"use strict";d();ue();Uo();de();zg=class e{static{s(this,"NetworkAnalysis")}static computeRTTAndServerResponseTime(t){let n=new Map;for(let[c,u]of Gt.estimateRTTByOrigin(t).entries())n.set(c,u.min);let r=Math.min(...Array.from(n.values())),a=Gt.estimateServerResponseTimeByOrigin(t,{rttByOrigin:n}),o=new Map,i=new Map;for(let[c,u]of a.entries()){let l=n.get(c)||r;o.set(c,l-r),i.set(c,u.median)}return{rtt:r,additionalRttByOrigin:o,serverResponseTimeByOrigin:i}}static async compute_(t,n){let r=await H.request(t,n),a=Gt.estimateThroughput(r),o=e.computeRTTAndServerResponseTime(r);return{throughput:a,...o}}},ar=q(zg,null)});var Hg,Pt,Gn=b(()=>{"use strict";d();ue();zn();Mg();jo();Hg=class{static{s(this,"LoadSimulator")}static async compute_(t,n){let{throttlingMethod:r,throttling:a,precomputedLanternData:o}=t.settings,i=await ar.request(t.devtoolsLog,n),c={additionalRttByOrigin:i.additionalRttByOrigin,serverResponseTimeByOrigin:i.serverResponseTimeByOrigin,observedThroughput:i.throughput};switch(o&&(c.additionalRttByOrigin=new Map(Object.entries(o.additionalRttByOrigin)),c.serverResponseTimeByOrigin=new Map(Object.entries(o.serverResponseTimeByOrigin))),r){case"provided":c.rtt=i.rtt,c.throughput=i.throughput,c.cpuSlowdownMultiplier=1,c.layoutTaskMultiplier=1;break;case"devtools":a&&(c.rtt=a.requestLatencyMs/In.DEVTOOLS_RTT_ADJUSTMENT_FACTOR,c.throughput=a.downloadThroughputKbps*1024/In.DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR),c.cpuSlowdownMultiplier=1,c.layoutTaskMultiplier=1;break;case"simulate":a&&(c.rtt=a.rttMs,c.throughput=a.throughputKbps*1024,c.cpuSlowdownMultiplier=a.cpuSlowdownMultiplier);break;default:break}return new gu(c)}static convertAnalysisToSaveableLanternData(t){let n={additionalRttByOrigin:{},serverResponseTimeByOrigin:{}};for(let[r,a]of t.additionalRttByOrigin.entries())r.startsWith("http")&&(n.additionalRttByOrigin[r]=a);for(let[r,a]of t.serverResponseTimeByOrigin.entries())r.startsWith("http")&&(n.serverResponseTimeByOrigin[r]=a);return n}},Pt=q(Hg,["devtoolsLog","settings"])});function cI(e){if(F.log("Reading artifacts from disk:",e),!Sn.existsSync(e))throw new Error("No saved artifacts found at "+e);let t=Sn.readFileSync(Dt.join(e,Gg),"utf8"),n=JSON.parse(t,j.parseReviver),r=Sn.readdirSync(e);return r.filter(a=>a.endsWith(Eu)).forEach(a=>{n.devtoolsLogs||(n.devtoolsLogs={});let o=a.replace(Eu,""),i=JSON.parse(Sn.readFileSync(Dt.join(e,a),"utf8"));n.devtoolsLogs[o]=i,o===Ep&&(n.DevtoolsLog=i),o===xp&&(n.DevtoolsLogError=i)}),r.filter(a=>a.endsWith(Du)).forEach(a=>{n.traces||(n.traces={});let o=Sn.readFileSync(Dt.join(e,a),{encoding:"utf-8"}),i=JSON.parse(o),c=a.replace(Du,"");n.traces[c]=Array.isArray(i)?{traceEvents:i}:i,c===Ep&&(n.Trace=n.traces[c]),c===xp&&(n.TraceError=n.traces[c])}),Array.isArray(n.Timing)&&n.Timing.forEach(a=>a.gather=!0),n}function uX(e,t){return t instanceof Error?j.stringifyReplacer(t):t}async function uI(e,t){let n={msg:"Saving artifacts",id:"lh:assetSaver:saveArtifacts"};F.time(n),Sn.mkdirSync(t,{recursive:!0});let r=Sn.readdirSync(t);for(let h of r)(h.endsWith(Du)||h.endsWith(Eu)||h===Gg)&&Sn.unlinkSync(`${t}/${h}`);let{traces:a,devtoolsLogs:o,DevtoolsLog:i,Trace:c,DevtoolsLogError:u,TraceError:l,...m}=e;c&&await iI(c,`${t}/${Ep}${Du}`),l&&await iI(l,`${t}/${xp}${Du}`),i&&await sI(i,`${t}/${Ep}${Eu}`),u&&await sI(u,`${t}/${xp}${Eu}`);let p=JSON.stringify(m,uX,2)+` +`;Sn.writeFileSync(`${t}/${Gg}`,p,"utf8"),F.log("Artifacts saved to disk in folder:",t),F.timeEnd(n)}function lI(e,t){Sn.writeFileSync(`${t}/lhr.report.json`,JSON.stringify(e,null,2))}function*dI(e){if(yield`[ +`,e.length>0){let n=e[Symbol.iterator](),r=n.next().value;yield` ${JSON.stringify(r)}`;let a=500,o="";for(let i of n)o+=`, ${JSON.stringify(i)}`,a--,a===0&&(yield o,a=500,o="");yield o}yield` -]`}function*hK(t){let{traceEvents:e,...n}=t;yield`{ -`,yield'"traceEvents": ',yield*Ek(e);for(let[r,a]of Object.entries(n))yield`, +]`}function*lX(e){let{traceEvents:t,...n}=e;yield`{ +`,yield'"traceEvents": ',yield*dI(t);for(let[r,a]of Object.entries(n))yield`, "${r}": ${JSON.stringify(a,null,2)}`;yield`} -`}async function yk(t,e){let n=hK(t),r=xn.createWriteStream(e);return dg.promises.pipeline(n,r)}function bk(t,e){let n=xn.createWriteStream(e);return dg.promises.pipeline(function*(){yield*Ek(t),yield` -`},n)}var xg,yu,bu,gp,yp,Tk=b(()=>{"use strict";d();Kr();Aa();mg();cu();_e();hg();ak();ok();jo();Gn();It();Vi();xg="artifacts.json",yu=".trace.json",bu=".devtoolslog.json",gp="defaultPass",yp="pageLoadError-defaultPass";s(vk,"loadArtifacts");s(fK,"stringifyReplacer");s(wk,"saveArtifacts");s(Dk,"saveLhr");s(Ek,"arrayOfObjectsJsonGenerator");s(hK,"traceJsonGenerator");s(yk,"saveTrace");s(bk,"saveDevtoolsLog")});var Sk,yK,bK,vK,wK,Zi,xk=b(()=>{"use strict";d();Sk=["server-response-time","render-blocking-resources","redirects","critical-request-chains","uses-text-compression","uses-rel-preconnect","uses-rel-preload","font-display","unminified-javascript","unminified-css","unused-css-rules"],yK=[...Sk,"largest-contentful-paint-element","prioritize-lcp-image","unused-javascript","efficient-animated-content","total-byte-weight","lcp-lazy-loaded"],bK=["long-tasks","third-party-summary","third-party-facades","bootup-time","mainthread-work-breakdown","dom-size","duplicated-javascript","legacy-javascript","viewport"],vK=["layout-shift-elements","non-composited-animations","unsized-images"],wK=["work-during-interaction"],Zi={fcpRelevantAudits:Sk,lcpRelevantAudits:yK,tbtRelevantAudits:bK,clsRelevantAudits:vK,inpRelevantAudits:wK}});var ge,ve,Ck,bp,Cg=b(()=>{"use strict";d();jt();zn();_();xk();ge={performanceCategoryTitle:"Performance",budgetsGroupTitle:"Budgets",budgetsGroupDescription:"Performance budgets set standards for the performance of your site.",metricGroupTitle:"Metrics",loadOpportunitiesGroupTitle:"Opportunities",loadOpportunitiesGroupDescription:"These suggestions can help your page load faster. They don't [directly affect](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/) the Performance score.",firstPaintImprovementsGroupTitle:"First Paint Improvements",firstPaintImprovementsGroupDescription:"The most critical aspect of performance is how quickly pixels are rendered onscreen. Key metrics: First Contentful Paint, First Meaningful Paint",overallImprovementsGroupTitle:"Overall Improvements",overallImprovementsGroupDescription:"Enhance the overall loading experience, so the page is responsive and ready to use as soon as possible. Key metrics: Time to Interactive, Speed Index",diagnosticsGroupTitle:"Diagnostics",diagnosticsGroupDescription:"More information about the performance of your application. These numbers don't [directly affect](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/) the Performance score.",a11yCategoryTitle:"Accessibility",a11yCategoryDescription:"These checks highlight opportunities to [improve the accessibility of your web app](https://developer.chrome.com/docs/lighthouse/accessibility/). Automatic detection can only detect a subset of issues and does not guarantee the accessibility of your web app, so [manual testing](https://web.dev/articles/how-to-review) is also encouraged.",a11yCategoryManualDescription:"These items address areas which an automated testing tool cannot cover. Learn more in our guide on [conducting an accessibility review](https://web.dev/articles/how-to-review).",a11yBestPracticesGroupTitle:"Best practices",a11yBestPracticesGroupDescription:"These items highlight common accessibility best practices.",a11yColorContrastGroupTitle:"Contrast",a11yColorContrastGroupDescription:"These are opportunities to improve the legibility of your content.",a11yNamesLabelsGroupTitle:"Names and labels",a11yNamesLabelsGroupDescription:"These are opportunities to improve the semantics of the controls in your application. This may enhance the experience for users of assistive technology, like a screen reader.",a11yNavigationGroupTitle:"Navigation",a11yNavigationGroupDescription:"These are opportunities to improve keyboard navigation in your application.",a11yAriaGroupTitle:"ARIA",a11yAriaGroupDescription:"These are opportunities to improve the usage of ARIA in your application which may enhance the experience for users of assistive technology, like a screen reader.",a11yLanguageGroupTitle:"Internationalization and localization",a11yLanguageGroupDescription:"These are opportunities to improve the interpretation of your content by users in different locales.",a11yAudioVideoGroupTitle:"Audio and video",a11yAudioVideoGroupDescription:"These are opportunities to provide alternative content for audio and video. This may improve the experience for users with hearing or vision impairments.",a11yTablesListsVideoGroupTitle:"Tables and lists",a11yTablesListsVideoGroupDescription:"These are opportunities to improve the experience of reading tabular or list data using assistive technology, like a screen reader.",seoCategoryTitle:"SEO",seoCategoryDescription:"These checks ensure that your page is following basic search engine optimization advice. There are many additional factors Lighthouse does not score here that may affect your search ranking, including performance on [Core Web Vitals](https://web.dev/explore/vitals). [Learn more about Google Search Essentials](https://support.google.com/webmasters/answer/35769).",seoCategoryManualDescription:"Run these additional validators on your site to check additional SEO best practices.",seoMobileGroupTitle:"Mobile Friendly",seoMobileGroupDescription:"Make sure your pages are mobile friendly so users don’t have to pinch or zoom in order to read the content pages. [Learn how to make pages mobile-friendly](https://developers.google.com/search/mobile-sites/).",seoContentGroupTitle:"Content Best Practices",seoContentGroupDescription:"Format your HTML in a way that enables crawlers to better understand your app’s content.",seoCrawlingGroupTitle:"Crawling and Indexing",seoCrawlingGroupDescription:"To appear in search results, crawlers need access to your app.",pwaCategoryTitle:"PWA",pwaCategoryDescription:"These checks validate the aspects of a Progressive Web App. [Learn what makes a good Progressive Web App](https://web.dev/articles/pwa-checklist).",pwaCategoryManualDescription:"These checks are required by the baseline [PWA Checklist](https://web.dev/articles/pwa-checklist) but are not automatically checked by Lighthouse. They do not affect your score but it's important that you verify them manually.",bestPracticesCategoryTitle:"Best Practices",bestPracticesTrustSafetyGroupTitle:"Trust and Safety",bestPracticesUXGroupTitle:"User Experience",bestPracticesBrowserCompatGroupTitle:"Browser Compatibility",bestPracticesGeneralGroupTitle:"General",pwaInstallableGroupTitle:"Installable",pwaOptimizedGroupTitle:"PWA Optimized"},ve=w("core/config/default-config.js",ge),Ck={settings:qn,artifacts:[{id:"DevtoolsLog",gatherer:"devtools-log"},{id:"Trace",gatherer:"trace"},{id:"Accessibility",gatherer:"accessibility"},{id:"AnchorElements",gatherer:"anchor-elements"},{id:"CacheContents",gatherer:"cache-contents"},{id:"ConsoleMessages",gatherer:"console-messages"},{id:"CSSUsage",gatherer:"css-usage"},{id:"Doctype",gatherer:"dobetterweb/doctype"},{id:"DOMStats",gatherer:"dobetterweb/domstats"},{id:"EmbeddedContent",gatherer:"seo/embedded-content"},{id:"FontSize",gatherer:"seo/font-size"},{id:"Inputs",gatherer:"inputs"},{id:"GlobalListeners",gatherer:"global-listeners"},{id:"IFrameElements",gatherer:"iframe-elements"},{id:"ImageElements",gatherer:"image-elements"},{id:"InstallabilityErrors",gatherer:"installability-errors"},{id:"InspectorIssues",gatherer:"inspector-issues"},{id:"JsUsage",gatherer:"js-usage"},{id:"LinkElements",gatherer:"link-elements"},{id:"MainDocumentContent",gatherer:"main-document-content"},{id:"MetaElements",gatherer:"meta-elements"},{id:"NetworkUserAgent",gatherer:"network-user-agent"},{id:"OptimizedImages",gatherer:"dobetterweb/optimized-images"},{id:"ResponseCompression",gatherer:"dobetterweb/response-compression"},{id:"RobotsTxt",gatherer:"seo/robots-txt"},{id:"ServiceWorker",gatherer:"service-worker"},{id:"ScriptElements",gatherer:"script-elements"},{id:"Scripts",gatherer:"scripts"},{id:"SourceMaps",gatherer:"source-maps"},{id:"Stacks",gatherer:"stacks"},{id:"TagsBlockingFirstPaint",gatherer:"dobetterweb/tags-blocking-first-paint"},{id:"TapTargets",gatherer:"seo/tap-targets"},{id:"TraceElements",gatherer:"trace-elements"},{id:"ViewportDimensions",gatherer:"viewport-dimensions"},{id:"WebAppManifest",gatherer:"web-app-manifest"},{id:"devtoolsLogs",gatherer:"devtools-log-compat"},{id:"traces",gatherer:"trace-compat"},{id:"FullPageScreenshot",gatherer:"full-page-screenshot"},{id:"BFCacheFailures",gatherer:"bf-cache-failures"}],audits:["is-on-https","viewport","metrics/first-contentful-paint","metrics/largest-contentful-paint","metrics/first-meaningful-paint","metrics/speed-index","screenshot-thumbnails","final-screenshot","metrics/total-blocking-time","metrics/max-potential-fid","metrics/cumulative-layout-shift","metrics/interaction-to-next-paint","errors-in-console","server-response-time","metrics/interactive","user-timings","critical-request-chains","redirects","installable-manifest","splash-screen","themed-omnibox","maskable-icon","content-width","image-aspect-ratio","image-size-responsive","preload-fonts","deprecations","mainthread-work-breakdown","bootup-time","uses-rel-preload","uses-rel-preconnect","font-display","diagnostics","network-requests","network-rtt","network-server-latency","main-thread-tasks","metrics","performance-budget","timing-budget","third-party-summary","third-party-facades","largest-contentful-paint-element","lcp-lazy-loaded","layout-shift-elements","long-tasks","no-unload-listeners","non-composited-animations","unsized-images","valid-source-maps","prioritize-lcp-image","csp-xss","script-treemap-data","manual/pwa-cross-browser","manual/pwa-page-transitions","manual/pwa-each-page-has-url","accessibility/accesskeys","accessibility/aria-allowed-attr","accessibility/aria-allowed-role","accessibility/aria-command-name","accessibility/aria-dialog-name","accessibility/aria-hidden-body","accessibility/aria-hidden-focus","accessibility/aria-input-field-name","accessibility/aria-meter-name","accessibility/aria-progressbar-name","accessibility/aria-required-attr","accessibility/aria-required-children","accessibility/aria-required-parent","accessibility/aria-roles","accessibility/aria-text","accessibility/aria-toggle-field-name","accessibility/aria-tooltip-name","accessibility/aria-treeitem-name","accessibility/aria-valid-attr-value","accessibility/aria-valid-attr","accessibility/button-name","accessibility/bypass","accessibility/color-contrast","accessibility/definition-list","accessibility/dlitem","accessibility/document-title","accessibility/duplicate-id-active","accessibility/duplicate-id-aria","accessibility/empty-heading","accessibility/form-field-multiple-labels","accessibility/frame-title","accessibility/heading-order","accessibility/html-has-lang","accessibility/html-lang-valid","accessibility/html-xml-lang-mismatch","accessibility/identical-links-same-purpose","accessibility/image-alt","accessibility/image-redundant-alt","accessibility/input-button-name","accessibility/input-image-alt","accessibility/label-content-name-mismatch","accessibility/label","accessibility/landmark-one-main","accessibility/link-name","accessibility/link-in-text-block","accessibility/list","accessibility/listitem","accessibility/meta-refresh","accessibility/meta-viewport","accessibility/object-alt","accessibility/select-name","accessibility/skip-link","accessibility/tabindex","accessibility/table-duplicate-name","accessibility/table-fake-caption","accessibility/target-size","accessibility/td-has-header","accessibility/td-headers-attr","accessibility/th-has-data-cells","accessibility/valid-lang","accessibility/video-caption","accessibility/manual/custom-controls-labels","accessibility/manual/custom-controls-roles","accessibility/manual/focus-traps","accessibility/manual/focusable-controls","accessibility/manual/interactive-element-affordance","accessibility/manual/logical-tab-order","accessibility/manual/managed-focus","accessibility/manual/offscreen-content-hidden","accessibility/manual/use-landmarks","accessibility/manual/visual-order-follows-dom","byte-efficiency/uses-long-cache-ttl","byte-efficiency/total-byte-weight","byte-efficiency/offscreen-images","byte-efficiency/render-blocking-resources","byte-efficiency/unminified-css","byte-efficiency/unminified-javascript","byte-efficiency/unused-css-rules","byte-efficiency/unused-javascript","byte-efficiency/modern-image-formats","byte-efficiency/uses-optimized-images","byte-efficiency/uses-text-compression","byte-efficiency/uses-responsive-images","byte-efficiency/efficient-animated-content","byte-efficiency/duplicated-javascript","byte-efficiency/legacy-javascript","byte-efficiency/uses-responsive-images-snapshot","dobetterweb/doctype","dobetterweb/charset","dobetterweb/dom-size","dobetterweb/geolocation-on-start","dobetterweb/inspector-issues","dobetterweb/no-document-write","dobetterweb/js-libraries","dobetterweb/notification-on-start","dobetterweb/paste-preventing-inputs","dobetterweb/uses-http2","dobetterweb/uses-passive-event-listeners","seo/meta-description","seo/http-status-code","seo/font-size","seo/link-text","seo/crawlable-anchors","seo/is-crawlable","seo/robots-txt","seo/tap-targets","seo/hreflang","seo/plugins","seo/canonical","seo/manual/structured-data","work-during-interaction","bf-cache"],groups:{metrics:{title:ve(ge.metricGroupTitle)},"load-opportunities":{title:ve(ge.loadOpportunitiesGroupTitle),description:ve(ge.loadOpportunitiesGroupDescription)},budgets:{title:ve(ge.budgetsGroupTitle),description:ve(ge.budgetsGroupDescription)},diagnostics:{title:ve(ge.diagnosticsGroupTitle),description:ve(ge.diagnosticsGroupDescription)},"pwa-installable":{title:ve(ge.pwaInstallableGroupTitle)},"pwa-optimized":{title:ve(ge.pwaOptimizedGroupTitle)},"a11y-best-practices":{title:ve(ge.a11yBestPracticesGroupTitle),description:ve(ge.a11yBestPracticesGroupDescription)},"a11y-color-contrast":{title:ve(ge.a11yColorContrastGroupTitle),description:ve(ge.a11yColorContrastGroupDescription)},"a11y-names-labels":{title:ve(ge.a11yNamesLabelsGroupTitle),description:ve(ge.a11yNamesLabelsGroupDescription)},"a11y-navigation":{title:ve(ge.a11yNavigationGroupTitle),description:ve(ge.a11yNavigationGroupDescription)},"a11y-aria":{title:ve(ge.a11yAriaGroupTitle),description:ve(ge.a11yAriaGroupDescription)},"a11y-language":{title:ve(ge.a11yLanguageGroupTitle),description:ve(ge.a11yLanguageGroupDescription)},"a11y-audio-video":{title:ve(ge.a11yAudioVideoGroupTitle),description:ve(ge.a11yAudioVideoGroupDescription)},"a11y-tables-lists":{title:ve(ge.a11yTablesListsVideoGroupTitle),description:ve(ge.a11yTablesListsVideoGroupDescription)},"seo-mobile":{title:ve(ge.seoMobileGroupTitle),description:ve(ge.seoMobileGroupDescription)},"seo-content":{title:ve(ge.seoContentGroupTitle),description:ve(ge.seoContentGroupDescription)},"seo-crawl":{title:ve(ge.seoCrawlingGroupTitle),description:ve(ge.seoCrawlingGroupDescription)},"best-practices-trust-safety":{title:ve(ge.bestPracticesTrustSafetyGroupTitle)},"best-practices-ux":{title:ve(ge.bestPracticesUXGroupTitle)},"best-practices-browser-compat":{title:ve(ge.bestPracticesBrowserCompatGroupTitle)},"best-practices-general":{title:ve(ge.bestPracticesGeneralGroupTitle)},hidden:{title:""}},categories:{performance:{title:ve(ge.performanceCategoryTitle),supportedModes:["navigation","timespan","snapshot"],auditRefs:[{id:"first-contentful-paint",weight:10,group:"metrics",acronym:"FCP",relevantAudits:Zi.fcpRelevantAudits},{id:"largest-contentful-paint",weight:25,group:"metrics",acronym:"LCP",relevantAudits:Zi.lcpRelevantAudits},{id:"total-blocking-time",weight:30,group:"metrics",acronym:"TBT",relevantAudits:Zi.tbtRelevantAudits},{id:"cumulative-layout-shift",weight:25,group:"metrics",acronym:"CLS",relevantAudits:Zi.clsRelevantAudits},{id:"speed-index",weight:10,group:"metrics",acronym:"SI"},{id:"interaction-to-next-paint",weight:0,group:"metrics",acronym:"INP",relevantAudits:Zi.inpRelevantAudits},{id:"interactive",weight:0,group:"hidden",acronym:"TTI"},{id:"max-potential-fid",weight:0,group:"hidden"},{id:"first-meaningful-paint",weight:0,acronym:"FMP",group:"hidden"},{id:"render-blocking-resources",weight:0},{id:"uses-responsive-images",weight:0},{id:"offscreen-images",weight:0},{id:"unminified-css",weight:0},{id:"unminified-javascript",weight:0},{id:"unused-css-rules",weight:0},{id:"unused-javascript",weight:0},{id:"uses-optimized-images",weight:0},{id:"modern-image-formats",weight:0},{id:"uses-text-compression",weight:0},{id:"uses-rel-preconnect",weight:0},{id:"server-response-time",weight:0},{id:"redirects",weight:0},{id:"uses-rel-preload",weight:0},{id:"uses-http2",weight:0},{id:"efficient-animated-content",weight:0},{id:"duplicated-javascript",weight:0},{id:"legacy-javascript",weight:0},{id:"prioritize-lcp-image",weight:0},{id:"total-byte-weight",weight:0},{id:"uses-long-cache-ttl",weight:0},{id:"dom-size",weight:0},{id:"critical-request-chains",weight:0},{id:"user-timings",weight:0},{id:"bootup-time",weight:0},{id:"mainthread-work-breakdown",weight:0},{id:"font-display",weight:0},{id:"third-party-summary",weight:0},{id:"third-party-facades",weight:0},{id:"largest-contentful-paint-element",weight:0},{id:"lcp-lazy-loaded",weight:0},{id:"layout-shift-elements",weight:0},{id:"uses-passive-event-listeners",weight:0},{id:"no-document-write",weight:0},{id:"long-tasks",weight:0},{id:"non-composited-animations",weight:0},{id:"unsized-images",weight:0},{id:"viewport",weight:0},{id:"uses-responsive-images-snapshot",weight:0},{id:"work-during-interaction",weight:0},{id:"bf-cache",weight:0},{id:"performance-budget",weight:0,group:"budgets"},{id:"timing-budget",weight:0,group:"budgets"},{id:"network-requests",weight:0,group:"hidden"},{id:"network-rtt",weight:0,group:"hidden"},{id:"network-server-latency",weight:0,group:"hidden"},{id:"main-thread-tasks",weight:0,group:"hidden"},{id:"diagnostics",weight:0,group:"hidden"},{id:"metrics",weight:0,group:"hidden"},{id:"screenshot-thumbnails",weight:0,group:"hidden"},{id:"final-screenshot",weight:0,group:"hidden"},{id:"script-treemap-data",weight:0,group:"hidden"}]},accessibility:{title:ve(ge.a11yCategoryTitle),description:ve(ge.a11yCategoryDescription),manualDescription:ve(ge.a11yCategoryManualDescription),supportedModes:["navigation","snapshot"],auditRefs:[{id:"accesskeys",weight:7,group:"a11y-navigation"},{id:"aria-allowed-attr",weight:10,group:"a11y-aria"},{id:"aria-allowed-role",weight:1,group:"a11y-aria"},{id:"aria-command-name",weight:7,group:"a11y-aria"},{id:"aria-dialog-name",weight:7,group:"a11y-aria"},{id:"aria-hidden-body",weight:10,group:"a11y-aria"},{id:"aria-hidden-focus",weight:7,group:"a11y-aria"},{id:"aria-input-field-name",weight:7,group:"a11y-aria"},{id:"aria-meter-name",weight:7,group:"a11y-aria"},{id:"aria-progressbar-name",weight:7,group:"a11y-aria"},{id:"aria-required-attr",weight:10,group:"a11y-aria"},{id:"aria-required-children",weight:10,group:"a11y-aria"},{id:"aria-required-parent",weight:10,group:"a11y-aria"},{id:"aria-roles",weight:7,group:"a11y-aria"},{id:"aria-text",weight:7,group:"a11y-aria"},{id:"aria-toggle-field-name",weight:7,group:"a11y-aria"},{id:"aria-tooltip-name",weight:7,group:"a11y-aria"},{id:"aria-treeitem-name",weight:7,group:"a11y-aria"},{id:"aria-valid-attr-value",weight:10,group:"a11y-aria"},{id:"aria-valid-attr",weight:10,group:"a11y-aria"},{id:"button-name",weight:10,group:"a11y-names-labels"},{id:"bypass",weight:7,group:"a11y-navigation"},{id:"color-contrast",weight:7,group:"a11y-color-contrast"},{id:"definition-list",weight:7,group:"a11y-tables-lists"},{id:"dlitem",weight:7,group:"a11y-tables-lists"},{id:"document-title",weight:7,group:"a11y-names-labels"},{id:"duplicate-id-active",weight:7,group:"a11y-navigation"},{id:"duplicate-id-aria",weight:10,group:"a11y-aria"},{id:"form-field-multiple-labels",weight:3,group:"a11y-names-labels"},{id:"frame-title",weight:7,group:"a11y-names-labels"},{id:"heading-order",weight:3,group:"a11y-navigation"},{id:"html-has-lang",weight:7,group:"a11y-language"},{id:"html-lang-valid",weight:7,group:"a11y-language"},{id:"html-xml-lang-mismatch",weight:3,group:"a11y-language"},{id:"image-alt",weight:10,group:"a11y-names-labels"},{id:"image-redundant-alt",weight:1,group:"a11y-names-labels"},{id:"input-button-name",weight:10,group:"a11y-names-labels"},{id:"input-image-alt",weight:10,group:"a11y-names-labels"},{id:"label",weight:7,group:"a11y-names-labels"},{id:"link-in-text-block",weight:7,group:"a11y-color-contrast"},{id:"link-name",weight:7,group:"a11y-names-labels"},{id:"list",weight:7,group:"a11y-tables-lists"},{id:"listitem",weight:7,group:"a11y-tables-lists"},{id:"meta-refresh",weight:10,group:"a11y-best-practices"},{id:"meta-viewport",weight:10,group:"a11y-best-practices"},{id:"object-alt",weight:7,group:"a11y-names-labels"},{id:"select-name",weight:7,group:"a11y-names-labels"},{id:"skip-link",weight:3,group:"a11y-names-labels"},{id:"tabindex",weight:7,group:"a11y-navigation"},{id:"table-duplicate-name",weight:1,group:"a11y-tables-lists"},{id:"td-headers-attr",weight:7,group:"a11y-tables-lists"},{id:"th-has-data-cells",weight:7,group:"a11y-tables-lists"},{id:"valid-lang",weight:7,group:"a11y-language"},{id:"video-caption",weight:10,group:"a11y-audio-video"},{id:"focusable-controls",weight:0},{id:"interactive-element-affordance",weight:0},{id:"logical-tab-order",weight:0},{id:"visual-order-follows-dom",weight:0},{id:"focus-traps",weight:0},{id:"managed-focus",weight:0},{id:"use-landmarks",weight:0},{id:"offscreen-content-hidden",weight:0},{id:"custom-controls-labels",weight:0},{id:"custom-controls-roles",weight:0},{id:"empty-heading",weight:0,group:"hidden"},{id:"identical-links-same-purpose",weight:0,group:"hidden"},{id:"landmark-one-main",weight:0,group:"hidden"},{id:"target-size",weight:0,group:"hidden"},{id:"label-content-name-mismatch",weight:0,group:"hidden"},{id:"table-fake-caption",weight:0,group:"hidden"},{id:"td-has-header",weight:0,group:"hidden"}]},"best-practices":{title:ve(ge.bestPracticesCategoryTitle),supportedModes:["navigation","timespan","snapshot"],auditRefs:[{id:"is-on-https",weight:5,group:"best-practices-trust-safety"},{id:"geolocation-on-start",weight:1,group:"best-practices-trust-safety"},{id:"notification-on-start",weight:1,group:"best-practices-trust-safety"},{id:"csp-xss",weight:0,group:"best-practices-trust-safety"},{id:"paste-preventing-inputs",weight:3,group:"best-practices-ux"},{id:"image-aspect-ratio",weight:1,group:"best-practices-ux"},{id:"image-size-responsive",weight:1,group:"best-practices-ux"},{id:"preload-fonts",weight:1,group:"best-practices-ux"},{id:"doctype",weight:1,group:"best-practices-browser-compat"},{id:"charset",weight:1,group:"best-practices-browser-compat"},{id:"no-unload-listeners",weight:1,group:"best-practices-general"},{id:"js-libraries",weight:0,group:"best-practices-general"},{id:"deprecations",weight:5,group:"best-practices-general"},{id:"errors-in-console",weight:1,group:"best-practices-general"},{id:"valid-source-maps",weight:0,group:"best-practices-general"},{id:"inspector-issues",weight:1,group:"best-practices-general"}]},seo:{title:ve(ge.seoCategoryTitle),description:ve(ge.seoCategoryDescription),manualDescription:ve(ge.seoCategoryManualDescription),supportedModes:["navigation","snapshot"],auditRefs:[{id:"viewport",weight:1,group:"seo-mobile"},{id:"document-title",weight:1,group:"seo-content"},{id:"meta-description",weight:1,group:"seo-content"},{id:"http-status-code",weight:1,group:"seo-crawl"},{id:"link-text",weight:1,group:"seo-content"},{id:"crawlable-anchors",weight:1,group:"seo-crawl"},{id:"is-crawlable",weight:1,group:"seo-crawl"},{id:"robots-txt",weight:1,group:"seo-crawl"},{id:"image-alt",weight:1,group:"seo-content"},{id:"hreflang",weight:1,group:"seo-content"},{id:"canonical",weight:1,group:"seo-content"},{id:"font-size",weight:1,group:"seo-mobile"},{id:"plugins",weight:1,group:"seo-content"},{id:"tap-targets",weight:1,group:"seo-mobile"},{id:"structured-data",weight:0}]},pwa:{title:ve(ge.pwaCategoryTitle),description:ve(ge.pwaCategoryDescription),manualDescription:ve(ge.pwaCategoryManualDescription),supportedModes:["navigation"],auditRefs:[{id:"installable-manifest",weight:2,group:"pwa-installable"},{id:"splash-screen",weight:1,group:"pwa-optimized"},{id:"themed-omnibox",weight:1,group:"pwa-optimized"},{id:"content-width",weight:1,group:"pwa-optimized"},{id:"viewport",weight:2,group:"pwa-optimized"},{id:"maskable-icon",weight:1,group:"pwa-optimized"},{id:"pwa-cross-browser",weight:0},{id:"pwa-page-transitions",weight:0},{id:"pwa-each-page-has-url",weight:0}]}}};Object.defineProperty(Ck,"UIStrings",{enumerable:!1,get:()=>ge});bp=Ck});function Ak(t,e){let n={timespan:0,snapshot:1,navigation:2},r=Math.min(...t.instance.meta.supportedModes.map(o=>n[o])),a=Math.min(...e.instance.meta.supportedModes.map(o=>n[o]));return r===n.timespan?a===n.timespan:r===n.snapshot?a===n.snapshot:!0}function _k(t,e){if(!e.startsWith("lighthouse-plugin-"))throw new Error(`plugin name '${e}' does not start with 'lighthouse-plugin-'`);if(t.categories?.[e])throw new Error(`plugin name '${e}' not allowed because it is the id of a category already found in config`)}function DK(t){let e=t.gatherer.instance;if(typeof e.meta!="object")throw new Error(`Gatherer for ${t.id} did not provide a meta object.`);if(e.meta.supportedModes.length===0)throw new Error(`Gatherer for ${t.id} did not support any gather modes.`);if(typeof e.getArtifact!="function"||e.getArtifact===$.prototype.getArtifact)throw new Error(`Gatherer for ${t.id} did not define a "getArtifact" method.`)}function Ag(t){let{implementation:e,path:n}=t,r=n||e?.meta?.id||"Unknown audit";if(typeof e.audit!="function"||e.audit===g.audit)throw new Error(`${r} has no audit() method.`);if(typeof e.meta.id!="string")throw new Error(`${r} has no meta.id property, or the property is not a string.`);if(!vr(e.meta.title))throw new Error(`${r} has no meta.title property, or the property is not a string.`);let a=e.meta.scoreDisplayMode||g.SCORING_MODES.BINARY;if(!vr(e.meta.failureTitle)&&a===g.SCORING_MODES.BINARY)throw new Error(`${r} has no meta.failureTitle and should.`);if(vr(e.meta.description)){if(e.meta.description==="")throw new Error(`${r} has an empty meta.description string. Please add a description for the UI.`)}else throw new Error(`${r} has no meta.description property, or the property is not a string.`);if(!Array.isArray(e.meta.requiredArtifacts))throw new Error(`${r} has no meta.requiredArtifacts property, or the property is not an array.`)}function EK(t,e,n){if(!t)return;let r=new Map((e||[]).map(a=>[a.implementation.meta.id,a]));Object.keys(t).forEach(a=>{t[a].auditRefs.forEach((o,i)=>{if(!o.id)throw new Error(`missing an audit id at ${a}[${i}]`);let c=r.get(o.id);if(!c)throw new Error(`could not find ${o.id} audit for category ${a}`);let l=c.implementation.meta.scoreDisplayMode==="manual";if(a==="accessibility"&&!o.group&&!l)throw new Error(`${o.id} accessibility audit does not have a group`);if(o.weight>0&&l)throw new Error(`${o.id} is manual but has a positive weight`);if(o.group&&(!n||!n[o.group]))throw new Error(`${o.id} references unknown group ${o.group}`)})})}function _g(t){if(!t.formFactor)throw new Error("`settings.formFactor` must be defined as 'mobile' or 'desktop'. See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md");if(!t.screenEmulation.disabled&&t.screenEmulation.mobile!==(t.formFactor==="mobile"))throw new Error(`Screen emulation mobile setting (${t.screenEmulation.mobile}) does not match formFactor setting (${t.formFactor}). See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md`);let e=t.skipAudits?.find(n=>t.onlyAudits?.includes(n));if(e)throw new Error(`${e} appears in both skipAudits and onlyAudits`)}function TK(t){let e=new Set;for(let n of t){if(DK(n),e.has(n.id))throw new Error(`Config defined multiple artifacts with id '${n.id}'`);if(e.add(n.id),!!n.dependencies)for(let[r,{id:a}]of Object.entries(n.dependencies))e.has(a)||Rg(n.id,r)}}function Rk(t){TK(t.artifacts||[]);for(let e of t.audits||[])Ag(e);EK(t.categories,t.audits,t.groups),_g(t.settings)}function Rg(t,e){throw new Error([`Failed to find dependency "${e}" for "${t}" artifact`,"Check that...",` 1. A gatherer exposes a matching Symbol that satisfies "${e}".`,` 2. "${e}" is configured to run before "${t}"`].join(` -`))}function Fk(t,e){throw new Error([`Dependency "${e}" for "${t}" artifact is invalid.`,"The dependency must be collected before the dependent."].join(` -`))}var Fg=b(()=>{"use strict";d();V();Ce();_();s(Ak,"isValidArtifactDependency");s(_k,"assertValidPluginName");s(DK,"assertValidArtifact");s(Ag,"assertValidAudit");s(EK,"assertValidCategories");s(_g,"assertValidSettings");s(TK,"assertValidArtifacts");s(Rk,"assertValidConfig");s(Rg,"throwInvalidDependencyOrder");s(Fk,"throwInvalidArtifactDependency")});function kk(t,e){if(!t)return new Set;e=e||Object.keys(t);let r=e.map(a=>t[a]).flatMap(a=>a?.auditRefs||[]);return new Set(r.map(a=>a.id))}function RK(t,e){if(!t)return null;if(!e)return t;let n=new Map(t.map(o=>[o.id,o])),r=new Set([..._K,...e.flatMap(o=>o.implementation.meta.requiredArtifacts)]),a=0;for(;a!==r.size;){a=r.size;for(let o of r){let i=n.get(o);if(i&&i.dependencies)for(let c of Object.values(i.dependencies))r.add(c.id)}}return t.filter(o=>r.has(o.id))}function FK(t,e){return t?t.filter(n=>n.gatherer.instance.meta.supportedModes.includes(e)):null}function kK(t,e){if(!t)return null;let n=new Set(e.map(r=>r.id).concat(CK));return t.filter(r=>r.implementation.meta.requiredArtifacts.every(o=>n.has(o)))}function IK(t,e){return t?t.filter(n=>{let r=n.implementation.meta;return!r.supportedModes||r.supportedModes.includes(e)}):null}function NK(t,e){if(!t)return null;let n=Object.entries(t).filter(([r,a])=>!a.supportedModes||a.supportedModes.includes(e));return Object.fromEntries(n)}function MK(t,e){if(!t||!e)return t;let n=Object.entries(t).filter(([r])=>e.includes(r));return Object.fromEntries(n)}function LK(t,e){if(e)for(let n of e)t?.[n]||k.warn("config",`unrecognized category in 'onlyCategories': ${n}`)}function Ik(t,e){if(!t)return t;let n=new Map(e.map(a=>[a.implementation.meta.id,a.implementation.meta])),r=Object.entries(t).map(([a,o])=>{let i={...o,auditRefs:o.auditRefs.filter(l=>n.has(l.id))},c=i.auditRefs.length{let m=n.get(l.id);return m?m.scoreDisplayMode===g.SCORING_MODES.MANUAL:!1});return c&&u&&(i.auditRefs=[]),[a,i]}).filter(a=>typeof a[1]=="object"&&a[1].auditRefs.length);return Object.fromEntries(r)}function Nk(t,e){let n=FK(t.artifacts,e),r=IK(t.audits,e),a=kK(r,n||[]),o=NK(t.categories,e),i=Ik(o,a||[]);return{...t,artifacts:n,audits:a,categories:i}}function Mk(t,e){let{onlyAudits:n,onlyCategories:r,skipAudits:a}=e;LK(t.categories,r);let o=kk(t.categories,void 0);r?o=kk(t.categories,r):n?o=new Set:(!t.categories||!Object.keys(t.categories).length)&&(o=new Set(t.audits?.map(p=>p.implementation.meta.id)));let i=new Set([...o,...n||[],...AK].filter(p=>!a||!a.includes(p))),c=i.size&&t.audits?t.audits.filter(p=>i.has(p.implementation.meta.id)):t.audits,u=Ik(t.categories,c||[]),l=MK(u,r),m=RK(t.artifacts,c);return m&&t.settings.disableFullPageScreenshot&&(m=m.filter(({id:p})=>p!=="FullPageScreenshot")),{...t,artifacts:m,audits:c,categories:l}}var xK,CK,AK,_K,Lk=b(()=>{"use strict";d();_e();V();xK={fetchTime:"",LighthouseRunWarnings:"",BenchmarkIndex:"",BenchmarkIndexes:"",settings:"",Timing:"",URL:"",PageLoadError:"",HostFormFactor:"",HostUserAgent:"",GatherContext:""},CK=Object.keys(xK),AK=[],_K=["Stacks","NetworkUserAgent","FullPageScreenshot"];s(kk,"getAuditIdsInCategories");s(RK,"filterArtifactsByAvailableAudits");s(FK,"filterArtifactsByGatherMode");s(kK,"filterAuditsByAvailableArtifacts");s(IK,"filterAuditsByGatherMode");s(NK,"filterCategoriesByGatherMode");s(MK,"filterCategoriesByExplicitFilters");s(LK,"warnOnUnknownOnlyCategories");s(Ik,"filterCategoriesByAvailableAudits");s(Nk,"filterConfigByGatherMode");s(Mk,"filterConfigByExplicitFilters")});function vp(t){return Array.isArray(t)&&t.every(Ok)}function Ok(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Pk(t){return typeof t=="number"&&!isNaN(t)}var Er,vu=b(()=>{"use strict";d();s(vp,"isArrayOfUnknownObjects");s(Ok,"isObjectOfUnknownProperties");s(Pk,"isNumber");Er=class t{static{s(this,"Budget")}static assertNoExcessProperties(e,n){let r=Object.keys(e);if(r.length>0){let a=r.join(", ");throw new Error(`${n} has unrecognized properties: [${a}]`)}}static assertNoDuplicateStrings(e,n){let r=new Set;for(let a of e){if(r.has(a))throw new Error(`${n} has duplicate entry of type '${a}'`);r.add(a)}}static validateResourceBudget(e){let{resourceType:n,budget:r,...a}=e;t.assertNoExcessProperties(a,"Resource Budget");let o=["total","document","script","stylesheet","image","media","font","other","third-party"];if(!o.includes(n))throw new Error(`Invalid resource type: ${n}. -Valid resource types are: ${o.join(", ")}`);if(!Pk(r))throw new Error(`Invalid budget: ${r}`);return{resourceType:n,budget:r}}static throwInvalidPathError(e,n){throw new Error(`Invalid path ${e}. ${n} +`}async function iI(e,t){let n=lX(e),r=Sn.createWriteStream(t);return vg.promises.pipeline(n,r)}function sI(e,t){let n=Sn.createWriteStream(t);return vg.promises.pipeline(function*(){yield*dI(e),yield` +`},n)}var Gg,Du,Eu,Ep,xp,mI=b(()=>{"use strict";d();Jr();Aa();wg();mu();Ae();Mg();$F();YF();jo();Gn();It();Wi();Gg="artifacts.json",Du=".trace.json",Eu=".devtoolslog.json",Ep="defaultPass",xp="pageLoadError-defaultPass";s(cI,"loadArtifacts");s(uX,"stringifyReplacer");s(uI,"saveArtifacts");s(lI,"saveLhr");s(dI,"arrayOfObjectsJsonGenerator");s(lX,"traceJsonGenerator");s(iI,"saveTrace");s(sI,"saveDevtoolsLog")});var pI,mX,pX,fX,hX,Qi,fI=b(()=>{"use strict";d();pI=["server-response-time","render-blocking-resources","redirects","critical-request-chains","uses-text-compression","uses-rel-preconnect","uses-rel-preload","font-display","unminified-javascript","unminified-css","unused-css-rules"],mX=[...pI,"largest-contentful-paint-element","prioritize-lcp-image","unused-javascript","efficient-animated-content","total-byte-weight","lcp-lazy-loaded"],pX=["long-tasks","third-party-summary","third-party-facades","bootup-time","mainthread-work-breakdown","dom-size","duplicated-javascript","legacy-javascript","viewport"],fX=["layout-shift-elements","non-composited-animations","unsized-images"],hX=["work-during-interaction"],Qi={fcpRelevantAudits:pI,lcpRelevantAudits:mX,tbtRelevantAudits:pX,clsRelevantAudits:fX,inpRelevantAudits:hX}});var he,be,hI,Tp,Vg=b(()=>{"use strict";d();jt();zn();A();fI();he={performanceCategoryTitle:"Performance",budgetsGroupTitle:"Budgets",budgetsGroupDescription:"Performance budgets set standards for the performance of your site.",metricGroupTitle:"Metrics",loadOpportunitiesGroupTitle:"Opportunities",loadOpportunitiesGroupDescription:"These suggestions can help your page load faster. They don't [directly affect](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/) the Performance score.",firstPaintImprovementsGroupTitle:"First Paint Improvements",firstPaintImprovementsGroupDescription:"The most critical aspect of performance is how quickly pixels are rendered onscreen. Key metrics: First Contentful Paint, First Meaningful Paint",overallImprovementsGroupTitle:"Overall Improvements",overallImprovementsGroupDescription:"Enhance the overall loading experience, so the page is responsive and ready to use as soon as possible. Key metrics: Time to Interactive, Speed Index",diagnosticsGroupTitle:"Diagnostics",diagnosticsGroupDescription:"More information about the performance of your application. These numbers don't [directly affect](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/) the Performance score.",a11yCategoryTitle:"Accessibility",a11yCategoryDescription:"These checks highlight opportunities to [improve the accessibility of your web app](https://developer.chrome.com/docs/lighthouse/accessibility/). Automatic detection can only detect a subset of issues and does not guarantee the accessibility of your web app, so [manual testing](https://web.dev/articles/how-to-review) is also encouraged.",a11yCategoryManualDescription:"These items address areas which an automated testing tool cannot cover. Learn more in our guide on [conducting an accessibility review](https://web.dev/articles/how-to-review).",a11yBestPracticesGroupTitle:"Best practices",a11yBestPracticesGroupDescription:"These items highlight common accessibility best practices.",a11yColorContrastGroupTitle:"Contrast",a11yColorContrastGroupDescription:"These are opportunities to improve the legibility of your content.",a11yNamesLabelsGroupTitle:"Names and labels",a11yNamesLabelsGroupDescription:"These are opportunities to improve the semantics of the controls in your application. This may enhance the experience for users of assistive technology, like a screen reader.",a11yNavigationGroupTitle:"Navigation",a11yNavigationGroupDescription:"These are opportunities to improve keyboard navigation in your application.",a11yAriaGroupTitle:"ARIA",a11yAriaGroupDescription:"These are opportunities to improve the usage of ARIA in your application which may enhance the experience for users of assistive technology, like a screen reader.",a11yLanguageGroupTitle:"Internationalization and localization",a11yLanguageGroupDescription:"These are opportunities to improve the interpretation of your content by users in different locales.",a11yAudioVideoGroupTitle:"Audio and video",a11yAudioVideoGroupDescription:"These are opportunities to provide alternative content for audio and video. This may improve the experience for users with hearing or vision impairments.",a11yTablesListsVideoGroupTitle:"Tables and lists",a11yTablesListsVideoGroupDescription:"These are opportunities to improve the experience of reading tabular or list data using assistive technology, like a screen reader.",seoCategoryTitle:"SEO",seoCategoryDescription:"These checks ensure that your page is following basic search engine optimization advice. There are many additional factors Lighthouse does not score here that may affect your search ranking, including performance on [Core Web Vitals](https://web.dev/explore/vitals). [Learn more about Google Search Essentials](https://support.google.com/webmasters/answer/35769).",seoCategoryManualDescription:"Run these additional validators on your site to check additional SEO best practices.",seoMobileGroupTitle:"Mobile Friendly",seoMobileGroupDescription:"Make sure your pages are mobile friendly so users don’t have to pinch or zoom in order to read the content pages. [Learn how to make pages mobile-friendly](https://developers.google.com/search/mobile-sites/).",seoContentGroupTitle:"Content Best Practices",seoContentGroupDescription:"Format your HTML in a way that enables crawlers to better understand your app’s content.",seoCrawlingGroupTitle:"Crawling and Indexing",seoCrawlingGroupDescription:"To appear in search results, crawlers need access to your app.",pwaCategoryTitle:"PWA",pwaCategoryDescription:"These checks validate the aspects of a Progressive Web App. [Learn what makes a good Progressive Web App](https://web.dev/articles/pwa-checklist).",pwaCategoryManualDescription:"These checks are required by the baseline [PWA Checklist](https://web.dev/articles/pwa-checklist) but are not automatically checked by Lighthouse. They do not affect your score but it's important that you verify them manually.",bestPracticesCategoryTitle:"Best Practices",bestPracticesTrustSafetyGroupTitle:"Trust and Safety",bestPracticesUXGroupTitle:"User Experience",bestPracticesBrowserCompatGroupTitle:"Browser Compatibility",bestPracticesGeneralGroupTitle:"General",pwaInstallableGroupTitle:"Installable",pwaOptimizedGroupTitle:"PWA Optimized"},be=w("core/config/default-config.js",he),hI={settings:qn,artifacts:[{id:"DevtoolsLog",gatherer:"devtools-log"},{id:"Trace",gatherer:"trace"},{id:"Accessibility",gatherer:"accessibility"},{id:"AnchorElements",gatherer:"anchor-elements"},{id:"CacheContents",gatherer:"cache-contents"},{id:"ConsoleMessages",gatherer:"console-messages"},{id:"CSSUsage",gatherer:"css-usage"},{id:"Doctype",gatherer:"dobetterweb/doctype"},{id:"DOMStats",gatherer:"dobetterweb/domstats"},{id:"EmbeddedContent",gatherer:"seo/embedded-content"},{id:"FontSize",gatherer:"seo/font-size"},{id:"Inputs",gatherer:"inputs"},{id:"GlobalListeners",gatherer:"global-listeners"},{id:"IFrameElements",gatherer:"iframe-elements"},{id:"ImageElements",gatherer:"image-elements"},{id:"InstallabilityErrors",gatherer:"installability-errors"},{id:"InspectorIssues",gatherer:"inspector-issues"},{id:"JsUsage",gatherer:"js-usage"},{id:"LinkElements",gatherer:"link-elements"},{id:"MainDocumentContent",gatherer:"main-document-content"},{id:"MetaElements",gatherer:"meta-elements"},{id:"NetworkUserAgent",gatherer:"network-user-agent"},{id:"OptimizedImages",gatherer:"dobetterweb/optimized-images"},{id:"ResponseCompression",gatherer:"dobetterweb/response-compression"},{id:"RobotsTxt",gatherer:"seo/robots-txt"},{id:"ServiceWorker",gatherer:"service-worker"},{id:"ScriptElements",gatherer:"script-elements"},{id:"Scripts",gatherer:"scripts"},{id:"SourceMaps",gatherer:"source-maps"},{id:"Stacks",gatherer:"stacks"},{id:"TagsBlockingFirstPaint",gatherer:"dobetterweb/tags-blocking-first-paint"},{id:"TapTargets",gatherer:"seo/tap-targets"},{id:"TraceElements",gatherer:"trace-elements"},{id:"ViewportDimensions",gatherer:"viewport-dimensions"},{id:"WebAppManifest",gatherer:"web-app-manifest"},{id:"devtoolsLogs",gatherer:"devtools-log-compat"},{id:"traces",gatherer:"trace-compat"},{id:"FullPageScreenshot",gatherer:"full-page-screenshot"},{id:"BFCacheFailures",gatherer:"bf-cache-failures"}],audits:["is-on-https","viewport","metrics/first-contentful-paint","metrics/largest-contentful-paint","metrics/first-meaningful-paint","metrics/speed-index","screenshot-thumbnails","final-screenshot","metrics/total-blocking-time","metrics/max-potential-fid","metrics/cumulative-layout-shift","metrics/interaction-to-next-paint","errors-in-console","server-response-time","metrics/interactive","user-timings","critical-request-chains","redirects","installable-manifest","splash-screen","themed-omnibox","maskable-icon","content-width","image-aspect-ratio","image-size-responsive","preload-fonts","deprecations","third-party-cookies","mainthread-work-breakdown","bootup-time","uses-rel-preload","uses-rel-preconnect","font-display","diagnostics","network-requests","network-rtt","network-server-latency","main-thread-tasks","metrics","performance-budget","timing-budget","resource-summary","third-party-summary","third-party-facades","largest-contentful-paint-element","lcp-lazy-loaded","layout-shift-elements","long-tasks","no-unload-listeners","non-composited-animations","unsized-images","valid-source-maps","prioritize-lcp-image","csp-xss","script-treemap-data","manual/pwa-cross-browser","manual/pwa-page-transitions","manual/pwa-each-page-has-url","accessibility/accesskeys","accessibility/aria-allowed-attr","accessibility/aria-allowed-role","accessibility/aria-command-name","accessibility/aria-dialog-name","accessibility/aria-hidden-body","accessibility/aria-hidden-focus","accessibility/aria-input-field-name","accessibility/aria-meter-name","accessibility/aria-progressbar-name","accessibility/aria-required-attr","accessibility/aria-required-children","accessibility/aria-required-parent","accessibility/aria-roles","accessibility/aria-text","accessibility/aria-toggle-field-name","accessibility/aria-tooltip-name","accessibility/aria-treeitem-name","accessibility/aria-valid-attr-value","accessibility/aria-valid-attr","accessibility/button-name","accessibility/bypass","accessibility/color-contrast","accessibility/definition-list","accessibility/dlitem","accessibility/document-title","accessibility/duplicate-id-active","accessibility/duplicate-id-aria","accessibility/empty-heading","accessibility/form-field-multiple-labels","accessibility/frame-title","accessibility/heading-order","accessibility/html-has-lang","accessibility/html-lang-valid","accessibility/html-xml-lang-mismatch","accessibility/identical-links-same-purpose","accessibility/image-alt","accessibility/image-redundant-alt","accessibility/input-button-name","accessibility/input-image-alt","accessibility/label-content-name-mismatch","accessibility/label","accessibility/landmark-one-main","accessibility/link-name","accessibility/link-in-text-block","accessibility/list","accessibility/listitem","accessibility/meta-refresh","accessibility/meta-viewport","accessibility/object-alt","accessibility/select-name","accessibility/skip-link","accessibility/tabindex","accessibility/table-duplicate-name","accessibility/table-fake-caption","accessibility/target-size","accessibility/td-has-header","accessibility/td-headers-attr","accessibility/th-has-data-cells","accessibility/valid-lang","accessibility/video-caption","accessibility/manual/custom-controls-labels","accessibility/manual/custom-controls-roles","accessibility/manual/focus-traps","accessibility/manual/focusable-controls","accessibility/manual/interactive-element-affordance","accessibility/manual/logical-tab-order","accessibility/manual/managed-focus","accessibility/manual/offscreen-content-hidden","accessibility/manual/use-landmarks","accessibility/manual/visual-order-follows-dom","byte-efficiency/uses-long-cache-ttl","byte-efficiency/total-byte-weight","byte-efficiency/offscreen-images","byte-efficiency/render-blocking-resources","byte-efficiency/unminified-css","byte-efficiency/unminified-javascript","byte-efficiency/unused-css-rules","byte-efficiency/unused-javascript","byte-efficiency/modern-image-formats","byte-efficiency/uses-optimized-images","byte-efficiency/uses-text-compression","byte-efficiency/uses-responsive-images","byte-efficiency/efficient-animated-content","byte-efficiency/duplicated-javascript","byte-efficiency/legacy-javascript","byte-efficiency/uses-responsive-images-snapshot","dobetterweb/doctype","dobetterweb/charset","dobetterweb/dom-size","dobetterweb/geolocation-on-start","dobetterweb/inspector-issues","dobetterweb/no-document-write","dobetterweb/js-libraries","dobetterweb/notification-on-start","dobetterweb/paste-preventing-inputs","dobetterweb/uses-http2","dobetterweb/uses-passive-event-listeners","seo/meta-description","seo/http-status-code","seo/font-size","seo/link-text","seo/crawlable-anchors","seo/is-crawlable","seo/robots-txt","seo/tap-targets","seo/hreflang","seo/plugins","seo/canonical","seo/manual/structured-data","work-during-interaction","bf-cache"],groups:{metrics:{title:be(he.metricGroupTitle)},"load-opportunities":{title:be(he.loadOpportunitiesGroupTitle),description:be(he.loadOpportunitiesGroupDescription)},budgets:{title:be(he.budgetsGroupTitle),description:be(he.budgetsGroupDescription)},diagnostics:{title:be(he.diagnosticsGroupTitle),description:be(he.diagnosticsGroupDescription)},"pwa-installable":{title:be(he.pwaInstallableGroupTitle)},"pwa-optimized":{title:be(he.pwaOptimizedGroupTitle)},"a11y-best-practices":{title:be(he.a11yBestPracticesGroupTitle),description:be(he.a11yBestPracticesGroupDescription)},"a11y-color-contrast":{title:be(he.a11yColorContrastGroupTitle),description:be(he.a11yColorContrastGroupDescription)},"a11y-names-labels":{title:be(he.a11yNamesLabelsGroupTitle),description:be(he.a11yNamesLabelsGroupDescription)},"a11y-navigation":{title:be(he.a11yNavigationGroupTitle),description:be(he.a11yNavigationGroupDescription)},"a11y-aria":{title:be(he.a11yAriaGroupTitle),description:be(he.a11yAriaGroupDescription)},"a11y-language":{title:be(he.a11yLanguageGroupTitle),description:be(he.a11yLanguageGroupDescription)},"a11y-audio-video":{title:be(he.a11yAudioVideoGroupTitle),description:be(he.a11yAudioVideoGroupDescription)},"a11y-tables-lists":{title:be(he.a11yTablesListsVideoGroupTitle),description:be(he.a11yTablesListsVideoGroupDescription)},"seo-mobile":{title:be(he.seoMobileGroupTitle),description:be(he.seoMobileGroupDescription)},"seo-content":{title:be(he.seoContentGroupTitle),description:be(he.seoContentGroupDescription)},"seo-crawl":{title:be(he.seoCrawlingGroupTitle),description:be(he.seoCrawlingGroupDescription)},"best-practices-trust-safety":{title:be(he.bestPracticesTrustSafetyGroupTitle)},"best-practices-ux":{title:be(he.bestPracticesUXGroupTitle)},"best-practices-browser-compat":{title:be(he.bestPracticesBrowserCompatGroupTitle)},"best-practices-general":{title:be(he.bestPracticesGeneralGroupTitle)},hidden:{title:""}},categories:{performance:{title:be(he.performanceCategoryTitle),supportedModes:["navigation","timespan","snapshot"],auditRefs:[{id:"first-contentful-paint",weight:10,group:"metrics",acronym:"FCP",relevantAudits:Qi.fcpRelevantAudits},{id:"largest-contentful-paint",weight:25,group:"metrics",acronym:"LCP",relevantAudits:Qi.lcpRelevantAudits},{id:"total-blocking-time",weight:30,group:"metrics",acronym:"TBT",relevantAudits:Qi.tbtRelevantAudits},{id:"cumulative-layout-shift",weight:25,group:"metrics",acronym:"CLS",relevantAudits:Qi.clsRelevantAudits},{id:"speed-index",weight:10,group:"metrics",acronym:"SI"},{id:"interaction-to-next-paint",weight:0,group:"metrics",acronym:"INP",relevantAudits:Qi.inpRelevantAudits},{id:"interactive",weight:0,group:"hidden",acronym:"TTI"},{id:"max-potential-fid",weight:0,group:"hidden"},{id:"first-meaningful-paint",weight:0,acronym:"FMP",group:"hidden"},{id:"render-blocking-resources",weight:0},{id:"uses-responsive-images",weight:0},{id:"offscreen-images",weight:0},{id:"unminified-css",weight:0},{id:"unminified-javascript",weight:0},{id:"unused-css-rules",weight:0},{id:"unused-javascript",weight:0},{id:"uses-optimized-images",weight:0},{id:"modern-image-formats",weight:0},{id:"uses-text-compression",weight:0},{id:"uses-rel-preconnect",weight:0},{id:"server-response-time",weight:0},{id:"redirects",weight:0},{id:"uses-rel-preload",weight:0},{id:"uses-http2",weight:0},{id:"efficient-animated-content",weight:0},{id:"duplicated-javascript",weight:0},{id:"legacy-javascript",weight:0},{id:"prioritize-lcp-image",weight:0},{id:"total-byte-weight",weight:0},{id:"uses-long-cache-ttl",weight:0},{id:"dom-size",weight:0},{id:"critical-request-chains",weight:0},{id:"user-timings",weight:0},{id:"bootup-time",weight:0},{id:"mainthread-work-breakdown",weight:0},{id:"font-display",weight:0},{id:"third-party-summary",weight:0},{id:"third-party-facades",weight:0},{id:"largest-contentful-paint-element",weight:0},{id:"lcp-lazy-loaded",weight:0},{id:"layout-shift-elements",weight:0},{id:"uses-passive-event-listeners",weight:0},{id:"no-document-write",weight:0},{id:"long-tasks",weight:0},{id:"non-composited-animations",weight:0},{id:"unsized-images",weight:0},{id:"viewport",weight:0},{id:"uses-responsive-images-snapshot",weight:0},{id:"work-during-interaction",weight:0},{id:"bf-cache",weight:0},{id:"performance-budget",weight:0,group:"budgets"},{id:"timing-budget",weight:0,group:"budgets"},{id:"network-requests",weight:0,group:"hidden"},{id:"network-rtt",weight:0,group:"hidden"},{id:"network-server-latency",weight:0,group:"hidden"},{id:"main-thread-tasks",weight:0,group:"hidden"},{id:"diagnostics",weight:0,group:"hidden"},{id:"metrics",weight:0,group:"hidden"},{id:"screenshot-thumbnails",weight:0,group:"hidden"},{id:"final-screenshot",weight:0,group:"hidden"},{id:"script-treemap-data",weight:0,group:"hidden"},{id:"resource-summary",weight:0,group:"hidden"}]},accessibility:{title:be(he.a11yCategoryTitle),description:be(he.a11yCategoryDescription),manualDescription:be(he.a11yCategoryManualDescription),supportedModes:["navigation","snapshot"],auditRefs:[{id:"accesskeys",weight:7,group:"a11y-navigation"},{id:"aria-allowed-attr",weight:10,group:"a11y-aria"},{id:"aria-allowed-role",weight:1,group:"a11y-aria"},{id:"aria-command-name",weight:7,group:"a11y-aria"},{id:"aria-dialog-name",weight:7,group:"a11y-aria"},{id:"aria-hidden-body",weight:10,group:"a11y-aria"},{id:"aria-hidden-focus",weight:7,group:"a11y-aria"},{id:"aria-input-field-name",weight:7,group:"a11y-aria"},{id:"aria-meter-name",weight:7,group:"a11y-aria"},{id:"aria-progressbar-name",weight:7,group:"a11y-aria"},{id:"aria-required-attr",weight:10,group:"a11y-aria"},{id:"aria-required-children",weight:10,group:"a11y-aria"},{id:"aria-required-parent",weight:10,group:"a11y-aria"},{id:"aria-roles",weight:7,group:"a11y-aria"},{id:"aria-text",weight:7,group:"a11y-aria"},{id:"aria-toggle-field-name",weight:7,group:"a11y-aria"},{id:"aria-tooltip-name",weight:7,group:"a11y-aria"},{id:"aria-treeitem-name",weight:7,group:"a11y-aria"},{id:"aria-valid-attr-value",weight:10,group:"a11y-aria"},{id:"aria-valid-attr",weight:10,group:"a11y-aria"},{id:"button-name",weight:10,group:"a11y-names-labels"},{id:"bypass",weight:7,group:"a11y-navigation"},{id:"color-contrast",weight:7,group:"a11y-color-contrast"},{id:"definition-list",weight:7,group:"a11y-tables-lists"},{id:"dlitem",weight:7,group:"a11y-tables-lists"},{id:"document-title",weight:7,group:"a11y-names-labels"},{id:"duplicate-id-active",weight:7,group:"a11y-navigation"},{id:"duplicate-id-aria",weight:10,group:"a11y-aria"},{id:"form-field-multiple-labels",weight:3,group:"a11y-names-labels"},{id:"frame-title",weight:7,group:"a11y-names-labels"},{id:"heading-order",weight:3,group:"a11y-navigation"},{id:"html-has-lang",weight:7,group:"a11y-language"},{id:"html-lang-valid",weight:7,group:"a11y-language"},{id:"html-xml-lang-mismatch",weight:3,group:"a11y-language"},{id:"image-alt",weight:10,group:"a11y-names-labels"},{id:"image-redundant-alt",weight:1,group:"a11y-names-labels"},{id:"input-button-name",weight:10,group:"a11y-names-labels"},{id:"input-image-alt",weight:10,group:"a11y-names-labels"},{id:"label",weight:7,group:"a11y-names-labels"},{id:"link-in-text-block",weight:7,group:"a11y-color-contrast"},{id:"link-name",weight:7,group:"a11y-names-labels"},{id:"list",weight:7,group:"a11y-tables-lists"},{id:"listitem",weight:7,group:"a11y-tables-lists"},{id:"meta-refresh",weight:10,group:"a11y-best-practices"},{id:"meta-viewport",weight:10,group:"a11y-best-practices"},{id:"object-alt",weight:7,group:"a11y-names-labels"},{id:"select-name",weight:7,group:"a11y-names-labels"},{id:"skip-link",weight:3,group:"a11y-names-labels"},{id:"tabindex",weight:7,group:"a11y-navigation"},{id:"table-duplicate-name",weight:1,group:"a11y-tables-lists"},{id:"td-headers-attr",weight:7,group:"a11y-tables-lists"},{id:"th-has-data-cells",weight:7,group:"a11y-tables-lists"},{id:"valid-lang",weight:7,group:"a11y-language"},{id:"video-caption",weight:10,group:"a11y-audio-video"},{id:"focusable-controls",weight:0},{id:"interactive-element-affordance",weight:0},{id:"logical-tab-order",weight:0},{id:"visual-order-follows-dom",weight:0},{id:"focus-traps",weight:0},{id:"managed-focus",weight:0},{id:"use-landmarks",weight:0},{id:"offscreen-content-hidden",weight:0},{id:"custom-controls-labels",weight:0},{id:"custom-controls-roles",weight:0},{id:"empty-heading",weight:0,group:"hidden"},{id:"identical-links-same-purpose",weight:0,group:"hidden"},{id:"landmark-one-main",weight:0,group:"hidden"},{id:"target-size",weight:0,group:"hidden"},{id:"label-content-name-mismatch",weight:0,group:"hidden"},{id:"table-fake-caption",weight:0,group:"hidden"},{id:"td-has-header",weight:0,group:"hidden"}]},"best-practices":{title:be(he.bestPracticesCategoryTitle),supportedModes:["navigation","timespan","snapshot"],auditRefs:[{id:"is-on-https",weight:5,group:"best-practices-trust-safety"},{id:"geolocation-on-start",weight:1,group:"best-practices-trust-safety"},{id:"notification-on-start",weight:1,group:"best-practices-trust-safety"},{id:"csp-xss",weight:0,group:"best-practices-trust-safety"},{id:"paste-preventing-inputs",weight:3,group:"best-practices-ux"},{id:"image-aspect-ratio",weight:1,group:"best-practices-ux"},{id:"image-size-responsive",weight:1,group:"best-practices-ux"},{id:"preload-fonts",weight:1,group:"best-practices-ux"},{id:"doctype",weight:1,group:"best-practices-browser-compat"},{id:"charset",weight:1,group:"best-practices-browser-compat"},{id:"no-unload-listeners",weight:1,group:"best-practices-general"},{id:"js-libraries",weight:0,group:"best-practices-general"},{id:"deprecations",weight:5,group:"best-practices-general"},{id:"third-party-cookies",weight:5,group:"best-practices-general"},{id:"errors-in-console",weight:1,group:"best-practices-general"},{id:"valid-source-maps",weight:0,group:"best-practices-general"},{id:"inspector-issues",weight:1,group:"best-practices-general"}]},seo:{title:be(he.seoCategoryTitle),description:be(he.seoCategoryDescription),manualDescription:be(he.seoCategoryManualDescription),supportedModes:["navigation","snapshot"],auditRefs:[{id:"viewport",weight:1,group:"seo-mobile"},{id:"document-title",weight:1,group:"seo-content"},{id:"meta-description",weight:1,group:"seo-content"},{id:"http-status-code",weight:1,group:"seo-crawl"},{id:"link-text",weight:1,group:"seo-content"},{id:"crawlable-anchors",weight:1,group:"seo-crawl"},{id:"is-crawlable",weight:1,group:"seo-crawl"},{id:"robots-txt",weight:1,group:"seo-crawl"},{id:"image-alt",weight:1,group:"seo-content"},{id:"hreflang",weight:1,group:"seo-content"},{id:"canonical",weight:1,group:"seo-content"},{id:"font-size",weight:1,group:"seo-mobile"},{id:"plugins",weight:1,group:"seo-content"},{id:"tap-targets",weight:1,group:"seo-mobile"},{id:"structured-data",weight:0}]},pwa:{title:be(he.pwaCategoryTitle),description:be(he.pwaCategoryDescription),manualDescription:be(he.pwaCategoryManualDescription),supportedModes:["navigation"],auditRefs:[{id:"installable-manifest",weight:2,group:"pwa-installable"},{id:"splash-screen",weight:1,group:"pwa-optimized"},{id:"themed-omnibox",weight:1,group:"pwa-optimized"},{id:"content-width",weight:1,group:"pwa-optimized"},{id:"viewport",weight:2,group:"pwa-optimized"},{id:"maskable-icon",weight:1,group:"pwa-optimized"},{id:"pwa-cross-browser",weight:0},{id:"pwa-page-transitions",weight:0},{id:"pwa-each-page-has-url",weight:0}]}}};Object.defineProperty(hI,"UIStrings",{enumerable:!1,get:()=>he});Tp=hI});function gI(e,t){let n={timespan:0,snapshot:1,navigation:2},r=Math.min(...e.instance.meta.supportedModes.map(o=>n[o])),a=Math.min(...t.instance.meta.supportedModes.map(o=>n[o]));return r===n.timespan?a===n.timespan:r===n.snapshot?a===n.snapshot:!0}function yI(e,t){if(!t.startsWith("lighthouse-plugin-"))throw new Error(`plugin name '${t}' does not start with 'lighthouse-plugin-'`);if(e.categories?.[t])throw new Error(`plugin name '${t}' not allowed because it is the id of a category already found in config`)}function gX(e){let t=e.gatherer.instance;if(typeof t.meta!="object")throw new Error(`Gatherer for ${e.id} did not provide a meta object.`);if(t.meta.supportedModes.length===0)throw new Error(`Gatherer for ${e.id} did not support any gather modes.`);if(typeof t.getArtifact!="function"||t.getArtifact===$.prototype.getArtifact)throw new Error(`Gatherer for ${e.id} did not define a "getArtifact" method.`)}function Wg(e){let{implementation:t,path:n}=e,r=n||t?.meta?.id||"Unknown audit";if(typeof t.audit!="function"||t.audit===g.audit)throw new Error(`${r} has no audit() method.`);if(typeof t.meta.id!="string")throw new Error(`${r} has no meta.id property, or the property is not a string.`);if(!Dr(t.meta.title))throw new Error(`${r} has no meta.title property, or the property is not a string.`);let a=t.meta.scoreDisplayMode||g.SCORING_MODES.BINARY;if(!Dr(t.meta.failureTitle)&&a===g.SCORING_MODES.BINARY)throw new Error(`${r} has no meta.failureTitle and should.`);if(Dr(t.meta.description)){if(t.meta.description==="")throw new Error(`${r} has an empty meta.description string. Please add a description for the UI.`)}else throw new Error(`${r} has no meta.description property, or the property is not a string.`);if(!Array.isArray(t.meta.requiredArtifacts))throw new Error(`${r} has no meta.requiredArtifacts property, or the property is not an array.`)}function yX(e,t,n){if(!e)return;let r=new Map((t||[]).map(a=>[a.implementation.meta.id,a]));Object.keys(e).forEach(a=>{e[a].auditRefs.forEach((o,i)=>{if(!o.id)throw new Error(`missing an audit id at ${a}[${i}]`);let c=r.get(o.id);if(!c)throw new Error(`could not find ${o.id} audit for category ${a}`);let l=c.implementation.meta.scoreDisplayMode==="manual";if(a==="accessibility"&&!o.group&&!l)throw new Error(`${o.id} accessibility audit does not have a group`);if(o.weight>0&&l)throw new Error(`${o.id} is manual but has a positive weight`);if(o.group&&(!n||!n[o.group]))throw new Error(`${o.id} references unknown group ${o.group}`)})})}function $g(e){if(!e.formFactor)throw new Error("`settings.formFactor` must be defined as 'mobile' or 'desktop'. See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md");if(!e.screenEmulation.disabled&&e.screenEmulation.mobile!==(e.formFactor==="mobile"))throw new Error(`Screen emulation mobile setting (${e.screenEmulation.mobile}) does not match formFactor setting (${e.formFactor}). See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md`);let t=e.skipAudits?.find(n=>e.onlyAudits?.includes(n));if(t)throw new Error(`${t} appears in both skipAudits and onlyAudits`)}function bX(e){let t=new Set;for(let n of e){if(gX(n),t.has(n.id))throw new Error(`Config defined multiple artifacts with id '${n.id}'`);if(t.add(n.id),!!n.dependencies)for(let[r,{id:a}]of Object.entries(n.dependencies))t.has(a)||Yg(n.id,r)}}function bI(e){bX(e.artifacts||[]);for(let t of e.audits||[])Wg(t);yX(e.categories,e.audits,e.groups),$g(e.settings)}function Yg(e,t){throw new Error([`Failed to find dependency "${t}" for "${e}" artifact`,"Check that...",` 1. A gatherer exposes a matching Symbol that satisfies "${t}".`,` 2. "${t}" is configured to run before "${e}"`].join(` +`))}function vI(e,t){throw new Error([`Dependency "${t}" for "${e}" artifact is invalid.`,"The dependency must be collected before the dependent."].join(` +`))}var Kg=b(()=>{"use strict";d();V();Se();A();s(gI,"isValidArtifactDependency");s(yI,"assertValidPluginName");s(gX,"assertValidArtifact");s(Wg,"assertValidAudit");s(yX,"assertValidCategories");s($g,"assertValidSettings");s(bX,"assertValidArtifacts");s(bI,"assertValidConfig");s(Yg,"throwInvalidDependencyOrder");s(vI,"throwInvalidArtifactDependency")});function wI(e,t){if(!e)return new Set;t=t||Object.keys(e);let r=t.map(a=>e[a]).flatMap(a=>a?.auditRefs||[]);return new Set(r.map(a=>a.id))}function TX(e,t){if(!e)return null;if(!t)return e;let n=new Map(e.map(o=>[o.id,o])),r=new Set([...xX,...t.flatMap(o=>o.implementation.meta.requiredArtifacts)]),a=0;for(;a!==r.size;){a=r.size;for(let o of r){let i=n.get(o);if(i&&i.dependencies)for(let c of Object.values(i.dependencies))r.add(c.id)}}return e.filter(o=>r.has(o.id))}function SX(e,t){return e?e.filter(n=>n.gatherer.instance.meta.supportedModes.includes(t)):null}function kX(e,t){if(!e)return null;let n=new Set(t.map(r=>r.id).concat(DX));return e.filter(r=>r.implementation.meta.requiredArtifacts.every(o=>n.has(o)))}function CX(e,t){return e?e.filter(n=>{let r=n.implementation.meta;return!r.supportedModes||r.supportedModes.includes(t)}):null}function AX(e,t){if(!e)return null;let n=Object.entries(e).filter(([r,a])=>!a.supportedModes||a.supportedModes.includes(t));return Object.fromEntries(n)}function _X(e,t){if(!e||!t)return e;let n=Object.entries(e).filter(([r])=>t.includes(r));return Object.fromEntries(n)}function RX(e,t){if(t)for(let n of t)e?.[n]||F.warn("config",`unrecognized category in 'onlyCategories': ${n}`)}function DI(e,t){if(!e)return e;let n=new Map(t.map(a=>[a.implementation.meta.id,a.implementation.meta])),r=Object.entries(e).map(([a,o])=>{let i={...o,auditRefs:o.auditRefs.filter(l=>n.has(l.id))},c=i.auditRefs.length{let m=n.get(l.id);return m?m.scoreDisplayMode===g.SCORING_MODES.MANUAL:!1});return c&&u&&(i.auditRefs=[]),[a,i]}).filter(a=>typeof a[1]=="object"&&a[1].auditRefs.length);return Object.fromEntries(r)}function EI(e,t){let n=SX(e.artifacts,t),r=CX(e.audits,t),a=kX(r,n||[]),o=AX(e.categories,t),i=DI(o,a||[]);return{...e,artifacts:n,audits:a,categories:i}}function xI(e,t){let{onlyAudits:n,onlyCategories:r,skipAudits:a}=t;RX(e.categories,r);let o=wI(e.categories,void 0);r?o=wI(e.categories,r):n?o=new Set:(!e.categories||!Object.keys(e.categories).length)&&(o=new Set(e.audits?.map(p=>p.implementation.meta.id)));let i=new Set([...o,...n||[],...EX].filter(p=>!a||!a.includes(p))),c=i.size&&e.audits?e.audits.filter(p=>i.has(p.implementation.meta.id)):e.audits,u=DI(e.categories,c||[]),l=_X(u,r),m=TX(e.artifacts,c);return m&&e.settings.disableFullPageScreenshot&&(m=m.filter(({id:p})=>p!=="FullPageScreenshot")),{...e,artifacts:m,audits:c,categories:l}}var wX,DX,EX,xX,TI=b(()=>{"use strict";d();Ae();V();wX={fetchTime:"",LighthouseRunWarnings:"",BenchmarkIndex:"",BenchmarkIndexes:"",settings:"",Timing:"",URL:"",PageLoadError:"",HostFormFactor:"",HostUserAgent:"",HostProduct:"",GatherContext:""},DX=Object.keys(wX),EX=[],xX=["Stacks","NetworkUserAgent","FullPageScreenshot"];s(wI,"getAuditIdsInCategories");s(TX,"filterArtifactsByAvailableAudits");s(SX,"filterArtifactsByGatherMode");s(kX,"filterAuditsByAvailableArtifacts");s(CX,"filterAuditsByGatherMode");s(AX,"filterCategoriesByGatherMode");s(_X,"filterCategoriesByExplicitFilters");s(RX,"warnOnUnknownOnlyCategories");s(DI,"filterCategoriesByAvailableAudits");s(EI,"filterConfigByGatherMode");s(xI,"filterConfigByExplicitFilters")});function Sp(e){return Array.isArray(e)&&e.every(kI)}function kI(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function SI(e){return typeof e=="number"&&!isNaN(e)}var Tr,xu=b(()=>{"use strict";d();s(Sp,"isArrayOfUnknownObjects");s(kI,"isObjectOfUnknownProperties");s(SI,"isNumber");Tr=class e{static{s(this,"Budget")}static assertNoExcessProperties(t,n){let r=Object.keys(t);if(r.length>0){let a=r.join(", ");throw new Error(`${n} has unrecognized properties: [${a}]`)}}static assertNoDuplicateStrings(t,n){let r=new Set;for(let a of t){if(r.has(a))throw new Error(`${n} has duplicate entry of type '${a}'`);r.add(a)}}static validateResourceBudget(t){let{resourceType:n,budget:r,...a}=t;e.assertNoExcessProperties(a,"Resource Budget");let o=["total","document","script","stylesheet","image","media","font","other","third-party"];if(!o.includes(n))throw new Error(`Invalid resource type: ${n}. +Valid resource types are: ${o.join(", ")}`);if(!SI(r))throw new Error(`Invalid budget: ${r}`);return{resourceType:n,budget:r}}static throwInvalidPathError(t,n){throw new Error(`Invalid path ${t}. ${n} 'Path' should be specified using the 'robots.txt' format. Learn more about the 'robots.txt' format here: -https://developers.google.com/search/reference/robots_txt#url-matching-based-on-path-values`)}static validatePath(e){if(e!==void 0){if(typeof e!="string"){this.throwInvalidPathError(e,"Path should be a string.");return}else e.startsWith("/")?(e.match(/\*/g)||[]).length>1?this.throwInvalidPathError(e,"Path should only contain one '*'."):(e.match(/\$/g)||[]).length>1?this.throwInvalidPathError(e,"Path should only contain one '$' character."):e.includes("$")&&!e.endsWith("$")&&this.throwInvalidPathError(e,"'$' character should only occur at end of path."):this.throwInvalidPathError(e,"Path should start with '/'.");return e}}static getMatchingBudget(e,n){if(!(e===null||n===void 0))for(let r=e.length-1;r>=0;r--){let a=e[r];if(this.urlMatchesPattern(n,a.path))return a}}static urlMatchesPattern(e,n="/"){let r=new URL(e),a=r.pathname+r.search,o=n.includes("*"),i=n.includes("$");if(!o&&!i)return a.startsWith(n);if(!o&&i)return a===n.slice(0,-1);if(o&&!i){let[c,u]=n.split("*"),l=a.slice(c.length);return a.startsWith(c)&&l.includes(u)}else if(o&&i){let[c,u]=n.split("*"),l=a.slice(c.length);return a.startsWith(c)&&l.endsWith(u.slice(0,-1))}return!1}static validateTimingBudget(e){let{metric:n,budget:r,...a}=e;t.assertNoExcessProperties(a,"Timing Budget");let o=["first-contentful-paint","interactive","first-meaningful-paint","max-potential-fid","total-blocking-time","speed-index","largest-contentful-paint","cumulative-layout-shift"];if(!o.includes(n))throw new Error(`Invalid timing metric: ${n}. -Valid timing metrics are: ${o.join(", ")}`);if(!Pk(r))throw new Error(`Invalid budget: ${r}`);return{metric:n,budget:r}}static validateHostname(e){let n=`${e} is not a valid hostname.`;if(e.length===0)throw new Error(n);if(e.includes("/"))throw new Error(n);if(e.includes(":"))throw new Error(n);if(e.includes("*")&&(!e.startsWith("*.")||e.lastIndexOf("*")>0))throw new Error(n);return e}static validateHostnames(e){if(Array.isArray(e)&&e.every(n=>typeof n=="string"))return e.map(t.validateHostname);if(e!==void 0)throw new Error("firstPartyHostnames should be defined as an array of strings.")}static initializeBudget(e){if(e=JSON.parse(JSON.stringify(e)),!vp(e))throw new Error("Budget file is not defined as an array of budgets.");return e.map((r,a)=>{let o={},{path:i,options:c,resourceSizes:u,resourceCounts:l,timings:m,...p}=r;if(t.assertNoExcessProperties(p,"Budget"),o.path=t.validatePath(i),Ok(c)){let{firstPartyHostnames:f,...h}=c;t.assertNoExcessProperties(h,"Options property"),o.options={},o.options.firstPartyHostnames=t.validateHostnames(f)}else if(c!==void 0)throw new Error(`Invalid options property in budget at index ${a}`);if(vp(u))o.resourceSizes=u.map(t.validateResourceBudget),t.assertNoDuplicateStrings(o.resourceSizes.map(f=>f.resourceType),`budgets[${a}].resourceSizes`);else if(u!==void 0)throw new Error(`Invalid resourceSizes entry in budget at index ${a}`);if(vp(l))o.resourceCounts=l.map(t.validateResourceBudget),t.assertNoDuplicateStrings(o.resourceCounts.map(f=>f.resourceType),`budgets[${a}].resourceCounts`);else if(l!==void 0)throw new Error(`Invalid resourceCounts entry in budget at index ${a}`);if(vp(m))o.timings=m.map(t.validateTimingBudget),t.assertNoDuplicateStrings(o.timings.map(f=>f.metric),`budgets[${a}].timings`);else if(m!==void 0)throw new Error(`Invalid timings entry in budget at index ${a}`);return o})}}});function Bk(t){return Array.isArray(t)&&t.every(Du)}function Du(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function PK(t){return typeof t!="string"?!1:t==="navigation"||t==="timespan"||t==="snapshot"}function OK(t){return Array.isArray(t)?t.every(PK):!1}function wu(t,e,n=""){n&&(n+=" ");let r=Object.keys(t);if(r.length>0){let a=r.join(", ");throw new Error(`${e} has unrecognized ${n}properties: [${a}]`)}}var kg,Uk,jk=b(()=>{"use strict";d();_();s(Bk,"isArrayOfUnknownObjects");s(Du,"isObjectOfUnknownProperties");s(PK,"objectIsGatherMode");s(OK,"isArrayOfGatherModes");s(wu,"assertNoExcessProperties");kg=class t{static{s(this,"ConfigPlugin")}static _parseAuditsList(e,n){if(e!==void 0){if(!Bk(e))throw new Error(`${n} has an invalid audits array.`);return e.map(r=>{let{path:a,...o}=r;if(wu(o,n,"audit"),typeof a!="string")throw new Error(`${n} has a missing audit path.`);return{path:a}})}}static _parseAuditRefsList(e,n){if(!Bk(e))throw new Error(`${n} has no valid auditsRefs.`);return e.map(r=>{let{id:a,weight:o,group:i,...c}=r;if(wu(c,n,"auditRef"),typeof a!="string")throw new Error(`${n} has an invalid auditRef id.`);if(typeof o!="number")throw new Error(`${n} has an invalid auditRef weight.`);if(typeof i!="string"&&typeof i<"u")throw new Error(`${n} has an invalid auditRef group.`);let u=i&&`${n}-${i}`;return{id:a,weight:o,group:u}})}static _parseCategory(e,n){if(!Du(e))throw new Error(`${n} has no valid category.`);let{title:r,description:a,manualDescription:o,auditRefs:i,supportedModes:c,...u}=e;if(wu(u,n,"category"),!vr(r))throw new Error(`${n} has an invalid category tile.`);if(!vr(a)&&a!==void 0)throw new Error(`${n} has an invalid category description.`);if(!vr(o)&&o!==void 0)throw new Error(`${n} has an invalid category manualDescription.`);if(!OK(c)&&c!==void 0)throw new Error(`${n} supportedModes must be an array, valid array values are "navigation", "timespan", and "snapshot".`);let l=t._parseAuditRefsList(i,n);return{title:r,auditRefs:l,description:a,manualDescription:o,supportedModes:c}}static _parseGroups(e,n){if(e===void 0)return;if(!Du(e))throw new Error(`${n} groups json is not defined as an object.`);let r=Object.entries(e),a={};return r.forEach(([o,i])=>{if(!Du(i))throw new Error(`${n} has a group not defined as an object.`);let{title:c,description:u,...l}=i;if(wu(l,n,"group"),!vr(c))throw new Error(`${n} has an invalid group title.`);if(!vr(u)&&u!==void 0)throw new Error(`${n} has an invalid group description.`);a[`${n}-${o}`]={title:c,description:u}}),a}static parsePlugin(e,n){if(e=JSON.parse(JSON.stringify(e)),!Du(e))throw new Error(`${n} is not defined as an object.`);let{audits:r,category:a,groups:o,...i}=e;return wu(i,n),{audits:t._parseAuditsList(r,n),categories:{[n]:t._parseCategory(a,n)},groups:t._parseGroups(o,n)}}},Uk=kg});var qk,zk=b(()=>{"use strict";d();Kr();zi();qk=`/*! axe v4.8.1 +https://developers.google.com/search/reference/robots_txt#url-matching-based-on-path-values`)}static validatePath(t){if(t!==void 0){if(typeof t!="string"){this.throwInvalidPathError(t,"Path should be a string.");return}else t.startsWith("/")?(t.match(/\*/g)||[]).length>1?this.throwInvalidPathError(t,"Path should only contain one '*'."):(t.match(/\$/g)||[]).length>1?this.throwInvalidPathError(t,"Path should only contain one '$' character."):t.includes("$")&&!t.endsWith("$")&&this.throwInvalidPathError(t,"'$' character should only occur at end of path."):this.throwInvalidPathError(t,"Path should start with '/'.");return t}}static getMatchingBudget(t,n){if(!(t===null||n===void 0))for(let r=t.length-1;r>=0;r--){let a=t[r];if(this.urlMatchesPattern(n,a.path))return a}}static urlMatchesPattern(t,n="/"){let r=new URL(t),a=r.pathname+r.search,o=n.includes("*"),i=n.includes("$");if(!o&&!i)return a.startsWith(n);if(!o&&i)return a===n.slice(0,-1);if(o&&!i){let[c,u]=n.split("*"),l=a.slice(c.length);return a.startsWith(c)&&l.includes(u)}else if(o&&i){let[c,u]=n.split("*"),l=a.slice(c.length);return a.startsWith(c)&&l.endsWith(u.slice(0,-1))}return!1}static validateTimingBudget(t){let{metric:n,budget:r,...a}=t;e.assertNoExcessProperties(a,"Timing Budget");let o=["first-contentful-paint","interactive","first-meaningful-paint","max-potential-fid","total-blocking-time","speed-index","largest-contentful-paint","cumulative-layout-shift"];if(!o.includes(n))throw new Error(`Invalid timing metric: ${n}. +Valid timing metrics are: ${o.join(", ")}`);if(!SI(r))throw new Error(`Invalid budget: ${r}`);return{metric:n,budget:r}}static validateHostname(t){let n=`${t} is not a valid hostname.`;if(t.length===0)throw new Error(n);if(t.includes("/"))throw new Error(n);if(t.includes(":"))throw new Error(n);if(t.includes("*")&&(!t.startsWith("*.")||t.lastIndexOf("*")>0))throw new Error(n);return t}static validateHostnames(t){if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t.map(e.validateHostname);if(t!==void 0)throw new Error("firstPartyHostnames should be defined as an array of strings.")}static initializeBudget(t){if(t=JSON.parse(JSON.stringify(t)),!Sp(t))throw new Error("Budget file is not defined as an array of budgets.");return t.map((r,a)=>{let o={},{path:i,options:c,resourceSizes:u,resourceCounts:l,timings:m,...p}=r;if(e.assertNoExcessProperties(p,"Budget"),o.path=e.validatePath(i),kI(c)){let{firstPartyHostnames:h,...f}=c;e.assertNoExcessProperties(f,"Options property"),o.options={},o.options.firstPartyHostnames=e.validateHostnames(h)}else if(c!==void 0)throw new Error(`Invalid options property in budget at index ${a}`);if(Sp(u))o.resourceSizes=u.map(e.validateResourceBudget),e.assertNoDuplicateStrings(o.resourceSizes.map(h=>h.resourceType),`budgets[${a}].resourceSizes`);else if(u!==void 0)throw new Error(`Invalid resourceSizes entry in budget at index ${a}`);if(Sp(l))o.resourceCounts=l.map(e.validateResourceBudget),e.assertNoDuplicateStrings(o.resourceCounts.map(h=>h.resourceType),`budgets[${a}].resourceCounts`);else if(l!==void 0)throw new Error(`Invalid resourceCounts entry in budget at index ${a}`);if(Sp(m))o.timings=m.map(e.validateTimingBudget),e.assertNoDuplicateStrings(o.timings.map(h=>h.metric),`budgets[${a}].timings`);else if(m!==void 0)throw new Error(`Invalid timings entry in budget at index ${a}`);return o})}}});function CI(e){return Array.isArray(e)&&e.every(Su)}function Su(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function FX(e){return typeof e!="string"?!1:e==="navigation"||e==="timespan"||e==="snapshot"}function IX(e){return Array.isArray(e)?e.every(FX):!1}function Tu(e,t,n=""){n&&(n+=" ");let r=Object.keys(e);if(r.length>0){let a=r.join(", ");throw new Error(`${t} has unrecognized ${n}properties: [${a}]`)}}var Xg,AI,_I=b(()=>{"use strict";d();A();s(CI,"isArrayOfUnknownObjects");s(Su,"isObjectOfUnknownProperties");s(FX,"objectIsGatherMode");s(IX,"isArrayOfGatherModes");s(Tu,"assertNoExcessProperties");Xg=class e{static{s(this,"ConfigPlugin")}static _parseAuditsList(t,n){if(t!==void 0){if(!CI(t))throw new Error(`${n} has an invalid audits array.`);return t.map(r=>{let{path:a,...o}=r;if(Tu(o,n,"audit"),typeof a!="string")throw new Error(`${n} has a missing audit path.`);return{path:a}})}}static _parseAuditRefsList(t,n){if(!CI(t))throw new Error(`${n} has no valid auditsRefs.`);return t.map(r=>{let{id:a,weight:o,group:i,...c}=r;if(Tu(c,n,"auditRef"),typeof a!="string")throw new Error(`${n} has an invalid auditRef id.`);if(typeof o!="number")throw new Error(`${n} has an invalid auditRef weight.`);if(typeof i!="string"&&typeof i<"u")throw new Error(`${n} has an invalid auditRef group.`);let u=i&&`${n}-${i}`;return{id:a,weight:o,group:u}})}static _parseCategory(t,n){if(!Su(t))throw new Error(`${n} has no valid category.`);let{title:r,description:a,manualDescription:o,auditRefs:i,supportedModes:c,...u}=t;if(Tu(u,n,"category"),!Dr(r))throw new Error(`${n} has an invalid category tile.`);if(!Dr(a)&&a!==void 0)throw new Error(`${n} has an invalid category description.`);if(!Dr(o)&&o!==void 0)throw new Error(`${n} has an invalid category manualDescription.`);if(!IX(c)&&c!==void 0)throw new Error(`${n} supportedModes must be an array, valid array values are "navigation", "timespan", and "snapshot".`);let l=e._parseAuditRefsList(i,n);return{title:r,auditRefs:l,description:a,manualDescription:o,supportedModes:c}}static _parseGroups(t,n){if(t===void 0)return;if(!Su(t))throw new Error(`${n} groups json is not defined as an object.`);let r=Object.entries(t),a={};return r.forEach(([o,i])=>{if(!Su(i))throw new Error(`${n} has a group not defined as an object.`);let{title:c,description:u,...l}=i;if(Tu(l,n,"group"),!Dr(c))throw new Error(`${n} has an invalid group title.`);if(!Dr(u)&&u!==void 0)throw new Error(`${n} has an invalid group description.`);a[`${n}-${o}`]={title:c,description:u}}),a}static parsePlugin(t,n){if(t=JSON.parse(JSON.stringify(t)),!Su(t))throw new Error(`${n} is not defined as an object.`);let{audits:r,category:a,groups:o,...i}=t;return Tu(i,n),{audits:e._parseAuditsList(r,n),categories:{[n]:e._parseCategory(a,n)},groups:e._parseGroups(o,n)}}},AI=Xg});var RI,FI=b(()=>{"use strict";d();Jr();Hi();RI=`/*! axe v4.8.1 * Copyright (c) 2015 - 2023 Deque Systems, Inc. * * Your use of this Source Code Form is subject to the terms of the Mozilla Public @@ -276,58 +277,58 @@ Valid timing metrics are: ${o.join(", ")}`);if(!Pk(r))throw new Error(`Invalid b * distribute or in any file that contains substantial portions of this source * code. */ -!function e(t){var n=t,a=t.document;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=o||{};function i(e){this.name="SupportError",this.cause=e.cause,this.message="\`".concat(e.cause,"\` - feature unsupported in your environment."),e.ruleId&&(this.ruleId=e.ruleId,this.message+=" Skipping ".concat(this.ruleId," rule.")),this.stack=(new Error).stack}o.version="4.8.1","function"==typeof define&&define.amd&&define("axe-core",[],(function(){return o})),"object"===("undefined"==typeof module?"undefined":r(module))&&module.exports&&"function"==typeof e.toString&&(o.source="("+e.toString()+')(typeof window === "object" ? window : this);',module.exports=o),"function"==typeof t.getComputedStyle&&(t.axe=o),(i.prototype=Object.create(Error.prototype)).constructor=i;var u=["node"],l=["relatedNodes"],s=["node"],c=["variant"],d=["matches"],p=["chromium"],f=["noImplicit"],m=["noPresentational"],D=["precision","format","inGamut"],h=["space"],g=["algorithm"],b=["method"],v=["maxDeltaE","deltaEMethod","steps","maxSteps"],y=["node"],F=["environmentData"],w=["environmentData"],E=["environmentData"],C=["environmentData"],x=["environmentData"];function A(e,t,n){return(A=R()?Reflect.construct.bind():function(e,t,n){var a=[null];return a.push.apply(a,t),t=new(Function.bind.apply(e,a)),n&&N(t,n.prototype),t}).apply(null,arguments)}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function N(e,t){return(N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function B(e){var t=R();return function(){var n,a=_(e);n=t?(n=_(this).constructor,Reflect.construct(a,arguments,n)):a.apply(this,arguments),a=this;if(n&&("object"===r(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return T(a)}}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t,n){M(e,t),t.set(e,n)}function O(e,t){M(e,t),t.add(e)}function M(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function P(e,t){return(t=j(e,t,"get")).get?t.get.call(e):t.value}function I(e,t,n){if(t.has(e))return n;throw new TypeError("attempted to get private field on non-instance")}function L(e,t,n){if((t=j(e,t,"set")).set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function j(e,t,n){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+n+" private field on non-instance")}function q(e,t){if(null==e)return{};var n,a=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function J(e,t){var n;if(e)return"string"==typeof e?Q(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n"}}})),St=ee((function(e,t){"use strict";var n=_t(),a=/[\\n\\r\\u2028\\u2029]/g;t.exports=function(e){return(e=100<(e=n(e)).length?e.slice(0,99)+"…":e).replace(a,(function(e){return JSON.stringify(e).slice(1,-1)}))}})),Ot=ee((function(e,t){function n(e){return!!e&&("object"===r(e)||"function"==typeof e)&&"function"==typeof e.then}t.exports=n,t.exports.default=n})),Mt=ee((function(){"use strict";var e=xt(),t=Nt(),n=Rt(),a=St(),r=Ot(),o=At(),i=Object.create,u=t("then","then:finally","done","done:finally");ke().promise=function(t,l){var s=i(null),c=i(null),d=i(null);if(!0===t)t=null;else if(t=n(t),!u[t])throw new TypeError("'"+a(t)+"' is not valid promise mode");l.on("set",(function(e,n,a){var i=!1;if(r(a)){s[e]=1,d[e]=a;var u=function(t){var n=s[e];if(i)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\\nConsider to rely on 'then' or 'done' mode instead.");n&&(delete s[e],c[e]=t,l.emit("setasync",e,n))},p=function(){i=!0,s[e]&&(delete s[e],delete d[e],l.delete(e))},f=t;if("then"===(f=f||"then")){var m=function(){o(p)};"function"==typeof(a=a.then((function(e){o(u.bind(this,e))}),m)).finally&&a.finally(m)}else if("done"===f){if("function"!=typeof a.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");a.done(u,p)}else if("done:finally"===f){if("function"!=typeof a.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof a.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");a.done(u),a.finally(p)}}else c[e]=a,l.emit("setasync",e,1)})),l.on("get",(function(e,t,n){var a,i;s[e]?++s[e]:(a=d[e],i=function(){l.emit("getasync",e,t,n)},r(a)?"function"==typeof a.done?a.done(i):a.then((function(){o(i)})):i())})),l.on("delete",(function(e){var t;delete d[e],s[e]?delete s[e]:hasOwnProperty.call(c,e)&&(t=c[e],delete c[e],l.emit("deleteasync",e,[t]))})),l.on("clear",(function(){var t=c;c=i(null),s=i(null),d=i(null),l.emit("clearasync",e(t,(function(e){return[e]})))}))}})),Pt=ee((function(){"use strict";var e=Ee(),t=Ae(),n=ke(),a=Function.prototype.apply;n.dispose=function(r,o,i){var u;e(r),i.async&&n.async||i.promise&&n.promise?(o.on("deleteasync",u=function(e,t){a.call(r,null,t)}),o.on("clearasync",(function(e){t(e,(function(e,t){u(t,e)}))}))):(o.on("delete",u=function(e,t){r(t)}),o.on("clear",(function(e){t(e,(function(e,t){u(t,e)}))})))}})),It=ee((function(e,t){"use strict";t.exports=2147483647})),Lt=ee((function(e,t){"use strict";var n=Fe(),a=It();t.exports=function(e){if(e=n(e),a":!0,"?":!0,"@":!0,"[":!0,"\\\\":!0,"]":!0,"^":!0,"\`":!0,"{":!0,"|":!0,"}":!0,"~":!0},e.strReplacementsRev={"\\n":"\\\\n","\\r":"\\\\r","\\t":"\\\\t","\\f":"\\\\f","\\v":"\\\\v"},e.singleQuoteEscapeChars={n:"\\n",r:"\\r",t:"\\t",f:"\\f","\\\\":"\\\\","'":"'"},e.doubleQuotesEscapeChars={n:"\\n",r:"\\r",t:"\\t",f:"\\f","\\\\":"\\\\",'"':'"'}})),Ut=ee((function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ht();e.parseCssSelector=function(e,n,a,r,o,i){var u=e.length,l="";function s(a,r){var o="";for(n++,l=e.charAt(n);n":">",'"':""","'":"'","/":"/"},n=e?/[&<>"'\\/]/g:/&(?!#?\\w+;)|<|>|"|'|\\//g;return function(e){return e?e.toString().replace(n,(function(e){return t[e]||e})):""}},void 0!==a&&a.exports?a.exports=e:"function"==typeof define&&define.amd?define((function(){return e})):globalThis.doT=e;var o={append:{start:"'+(",end:")+'",startencode:"'+encodeHTML("},split:{start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("}},i=/$^/;function u(e){return e.replace(/\\\\('|\\\\)/g,"$1").replace(/[\\r\\t\\n]/g," ")}e.template=function(t,n,a){var r,l,s=(n=n||e.templateSettings).append?o.append:o.split,c=0;a=n.use||n.define?function e(t,n,a){return("string"==typeof n?n:n.toString()).replace(t.define||i,(function(e,n,r,o){return(n=0===n.indexOf("def.")?n.substring(4):n)in a||(":"===r?(t.defineParams&&o.replace(t.defineParams,(function(e,t,r){a[n]={arg:t,text:r}})),n in a||(a[n]=o)):new Function("def","def['"+n+"']="+o)(a)),""})).replace(t.use||i,(function(n,r){return t.useParams&&(r=r.replace(t.useParams,(function(e,t,n,r){var o;if(a[n]&&a[n].arg&&r)return o=(n+":"+r).replace(/'|\\\\/g,"_"),a.__exp=a.__exp||{},a.__exp[o]=a[n].text.replace(new RegExp("(^|[^\\\\w$])"+a[n].arg+"([^\\\\w$])","g"),"$1"+r+"$2"),t+"def.__exp['"+o+"']"}))),(r=new Function("def","return "+r)(a))&&e(t,r,a)}))}(n,t,a||{}):t,a=("var out='"+(n.strip?a.replace(/(^|\\r|\\n)\\t* +| +\\t*(\\r|\\n|$)/g," ").replace(/\\r|\\n|\\t|\\/\\*[\\s\\S]*?\\*\\//g,""):a).replace(/'|\\\\/g,"\\\\$&").replace(n.interpolate||i,(function(e,t){return s.start+u(t)+s.end})).replace(n.encode||i,(function(e,t){return r=!0,s.startencode+u(t)+s.end})).replace(n.conditional||i,(function(e,t,n){return t?n?"';}else if("+u(n)+"){out+='":"';}else{out+='":n?"';if("+u(n)+"){out+='":"';}out+='"})).replace(n.iterate||i,(function(e,t,n,a){return t?(c+=1,l=a||"i"+c,t=u(t),"';var arr"+c+"="+t+";if(arr"+c+"){var "+n+","+l+"=-1,l"+c+"=arr"+c+".length-1;while("+l+">0},ToUint32:function(e){return e>>>0}}),i=Math.LN2,u=Math.abs,l=Math.floor,s=Math.log,c=Math.min,d=Math.pow,p=Math.round;function f(e,t,n){return ea)throw new RangeError("Array too large for polyfill");for(var t=0;t>t}function B(e,t){return e<<(t=32-t)>>>t}function T(e){return B(e[0],8)}function R(e,t,n){var a,r,o,p,f,m,D,h=(1<=d(2,1-h)?(r=c(l(s(e)/i),1023),2<=(o=g(e/d(2,r)*d(2,n)))/d(2,n)&&(r+=1,o=1),h>=1;return s.reverse(),l=s.join(""),o=(1<this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=o.ToUint32(n),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(this.length=o.ToUint32((u=e).length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new S(this.byteLength),l=this.byteOffset=0;l=this.length)){for(var t=[],n=0,a=this.byteOffset+e*this.BYTES_PER_ELEMENT;nthis.length)throw new RangeError("Offset plus length of array is out of range");if(d=this.byteOffset+i*this.BYTES_PER_ELEMENT,p=n.length*this.BYTES_PER_ELEMENT,n.buffer===this.buffer){for(f=[],l=0,s=n.byteOffset;lthis.length)throw new RangeError("Offset plus length of array is out of range");for(l=0;lthis.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteLength=arguments.length<3?this.buffer.byteLength-this.byteOffset:o.ToUint32(a),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");A(this)}function L(t){return function(n,a){if((n=o.ToUint32(n))+t.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");n+=this.byteOffset;for(var r=new e.Uint8Array(this.buffer,n,t.BYTES_PER_ELEMENT),i=[],u=0;uthis.byteLength)throw new RangeError("Array index out of range");a=new t([a]);for(var i=new e.Uint8Array(a.buffer),u=[],l=0;l>8&255,255&e]}),(function(e){return N(e[0]<<8|e[1],16)})),b=M(2,(function(e){return[e>>8&255,255&e]}),(function(e){return B(e[0]<<8|e[1],16)})),v=M(4,(function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}),(function(e){return N(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)})),y=M(4,(function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}),(function(e){return B(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)})),F=M(4,(function(e){return R(e,8,23)}),(function(e){return _(e,8,23)})),w=M(8,(function(e){return R(e,11,52)}),(function(e){return _(e,11,52)})),e.Int8Array=e.Int8Array||E,e.Uint8Array=e.Uint8Array||D,e.Uint8ClampedArray=e.Uint8ClampedArray||h,e.Int16Array=e.Int16Array||g,e.Uint16Array=e.Uint16Array||b,e.Int32Array=e.Int32Array||v,e.Uint32Array=e.Uint32Array||y,e.Float32Array=e.Float32Array||F,e.Float64Array=e.Float64Array||w,E=new e.Uint16Array([4660]),C=18===P(new e.Uint8Array(E.buffer),0),I.prototype.getUint8=L(e.Uint8Array),I.prototype.getInt8=L(e.Int8Array),I.prototype.getUint16=L(e.Uint16Array),I.prototype.getInt16=L(e.Int16Array),I.prototype.getUint32=L(e.Uint32Array),I.prototype.getInt32=L(e.Int32Array),I.prototype.getFloat32=L(e.Float32Array),I.prototype.getFloat64=L(e.Float64Array),I.prototype.setUint8=j(e.Uint8Array),I.prototype.setInt8=j(e.Int8Array),I.prototype.setUint16=j(e.Uint16Array),I.prototype.setInt16=j(e.Int16Array),I.prototype.setUint32=j(e.Uint32Array),I.prototype.setInt32=j(e.Int32Array),I.prototype.setFloat32=j(e.Float32Array),I.prototype.setFloat64=j(e.Float64Array),e.DataView=e.DataView||I})),Zt=ee((function(e){!function(e){"use strict";var t,n,a;function o(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(a(this,"_id","_WeakMap_"+u()+"."+u()),0",sameOrigin:""},Qt=([{name:"NA",value:"inapplicable",priority:0,group:"inapplicable"},{name:"PASS",value:"passed",priority:1,group:"passes"},{name:"CANTTELL",value:"cantTell",priority:2,group:"incomplete"},{name:"FAIL",value:"failed",priority:3,group:"violations"}].forEach((function(e){var t=e.name,n=e.value,a=e.priority;e=e.group;Jt[t]=n,Jt[t+"_PRIO"]=a,Jt[t+"_GROUP"]=e,Jt.results[a]=n,Jt.resultGroups[a]=e,Jt.resultGroupMap[n]=e})),Object.freeze(Jt.results),Object.freeze(Jt.resultGroups),Object.freeze(Jt.resultGroupMap),Object.freeze(Jt),Jt),en=function(){"object"===("undefined"==typeof console?"undefined":r(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},tn=/[\\t\\r\\n\\f]/g;function nn(){W(this,nn),this.parent=void 0}K(nn,[{key:"props",get:function(){throw new Error('VirtualNode class must have a "props" object consisting of "nodeType" and "nodeName" properties')}},{key:"attrNames",get:function(){throw new Error('VirtualNode class must have an "attrNames" property')}},{key:"attr",value:function(){throw new Error('VirtualNode class must have an "attr" function')}},{key:"hasAttr",value:function(){throw new Error('VirtualNode class must have a "hasAttr" function')}},{key:"hasClass",value:function(e){var t=this.attr("class");return!!t&&(e=" "+e+" ",0<=(" "+t+" ").replace(tn," ").indexOf(e))}}]);var an=nn,rn={},on=(te(rn,{DqElement:function(){return Jn},aggregate:function(){return on},aggregateChecks:function(){return pn},aggregateNodeResults:function(){return mn},aggregateResult:function(){return hn},areStylesSet:function(){return gn},assert:function(){return bn},checkHelper:function(){return Qn},clone:function(){return ea},closest:function(){return ca},collectResultsFromFrames:function(){return rr},contains:function(){return or},convertSelector:function(){return la},cssParser:function(){return ta},deepMerge:function(){return ir},escapeSelector:function(){return yn},extendMetaData:function(){return ur},filterHtmlAttrs:function(){return hp},finalizeRuleResult:function(){return fn},findBy:function(){return tr},getAllChecks:function(){return er},getAncestry:function(){return Un},getBaseLang:function(){return od},getCheckMessage:function(){return md},getCheckOption:function(){return Dd},getEnvironmentData:function(){return hd},getFlattenedTree:function(){return ad},getFrameContexts:function(){return Nd},getFriendlyUriEnd:function(){return Cn},getNodeAttributes:function(){return xn},getNodeFromTree:function(){return Kn},getPreloadConfig:function(){return cp},getRootNode:function(){return dr},getRule:function(){return Bd},getScroll:function(){return Rd},getScrollState:function(){return _d},getSelector:function(){return $n},getSelectorData:function(){return jn},getShadowSelector:function(){return Tn},getStandards:function(){return Sd},getStyleSheetFactory:function(){return Md},getXpath:function(){return Gn},injectStyle:function(){return Pd},isHidden:function(){return Id},isHtmlElement:function(){return Ld},isNodeInContext:function(){return jd},isShadowRoot:function(){return sr},isValidLang:function(){return Ap},isXHTML:function(){return Bn},matchAncestry:function(){return zd},matches:function(){return na},matchesExpression:function(){return sa},matchesSelector:function(){return An},memoize:function(){return Nn},mergeResults:function(){return ar},nodeLookup:function(){return $d},nodeSerializer:function(){return Qa},nodeSorter:function(){return Vd},parseCrossOriginStylesheet:function(){return Yd},parseSameOriginStylesheet:function(){return Gd},parseStylesheet:function(){return Wd},performanceTimer:function(){return Jd},pollyfillElementsFromPoint:function(){return Qd},preload:function(){return lp},preloadCssom:function(){return rp},preloadMedia:function(){return up},processMessage:function(){return fd},publishMetaData:function(){return dp},querySelectorAll:function(){return fp},querySelectorAllFilter:function(){return ap},queue:function(){return ha},respondable:function(){return Ga},ruleShouldRun:function(){return Dp},select:function(){return bp},sendCommandToFrame:function(){return Ya},setScrollState:function(){return vp},shadowSelect:function(){return yp},shadowSelectAll:function(){return Fp},shouldPreload:function(){return sp},toArray:function(){return vn},tokenList:function(){return Xc},uniqueArray:function(){return tp},uuid:function(){return Ba},validInputTypes:function(){return wp},validLangs:function(){return Cp}}),function(e,t,n){return t=t.slice(),n&&t.push(n),n=t.map((function(t){return e.indexOf(t)})).sort(),e[n.pop()]}),un=Qt.CANTTELL_PRIO,ln=Qt.FAIL_PRIO,sn=[],cn=(sn[Qt.PASS_PRIO]=!0,sn[Qt.CANTTELL_PRIO]=null,sn[Qt.FAIL_PRIO]=!1,["any","all","none"]);function dn(e,t){cn.reduce((function(n,a){return n[a]=(e[a]||[]).map((function(e){return t(e,a)})),n}),{})}var pn=function(e){var t=Object.assign({},e),n=(dn(t,(function(e,t){var n=void 0===e.result?-1:sn.indexOf(e.result);e.priority=-1!==n?n:Qt.CANTTELL_PRIO,"none"===t&&(e.priority===Qt.PASS_PRIO?e.priority=Qt.FAIL_PRIO:e.priority===Qt.FAIL_PRIO&&(e.priority=Qt.PASS_PRIO))})),{all:t.all.reduce((function(e,t){return Math.max(e,t.priority)}),0),none:t.none.reduce((function(e,t){return Math.max(e,t.priority)}),0),any:t.any.reduce((function(e,t){return Math.min(e,t.priority)}),4)%4}),a=(t.priority=Math.max(n.all,n.none,n.any),[]);return cn.forEach((function(e){t[e]=t[e].filter((function(a){return a.priority===t.priority&&a.priority===n[e]})),t[e].forEach((function(e){return a.push(e.impact)}))})),[un,ln].includes(t.priority)?t.impact=on(Qt.impact,a):t.impact=null,dn(t,(function(e){delete e.result,delete e.priority})),t.result=Qt.results[t.priority],delete t.priority,t};function fn(e){var t=o._audit.rules.find((function(t){return t.id===e.id}));return t&&t.impact&&e.nodes.forEach((function(e){["any","all","none"].forEach((function(n){(e[n]||[]).forEach((function(e){e.impact=t.impact}))}))})),Object.assign(e,mn(e.nodes)),delete e.nodes,e}var mn=function(e){var t={},n=((e=e.map((function(e){if(e.any&&e.all&&e.none)return pn(e);if(Array.isArray(e.node))return fn(e);throw new TypeError("Invalid Result type")})))&&e.length?(n=e.map((function(e){return e.result})),t.result=on(Qt.results,n,t.result)):t.result="inapplicable",Qt.resultGroups.forEach((function(e){return t[e]=[]})),e.forEach((function(e){var n=Qt.resultGroupMap[e.result];t[n].push(e)})),Qt.FAIL_GROUP);return 0===t[n].length&&(n=Qt.CANTTELL_GROUP),0=t.length/2}(u)?wn(u):void 0},xn=function(e){return(e.attributes instanceof t.NamedNodeMap?e:e.cloneNode(!1)).attributes},An=function(e,t){return!!e[En=En&&e[En]?En:function(e){for(var t,n=["matches","matchesSelector","mozMatchesSelector","webkitMatchesSelector","msMatchesSelector"],a=n.length,r=0;r "+r:l,i=i?i.filter((function(e){return An(e,r)})):Array.from(n.querySelectorAll(r)),e=e.parentElement}while((1 ")?":root"+r.substring(r.indexOf(" > ")):":root"}function $n(e,t){return Tn(Vn,e,t)}function Hn(e){var t,n=e.nodeName.toLowerCase(),a=e.parentElement;return a?(t="","head"!==n&&"body"!==n&&1 "+n+t):n}function Un(e,t){return Tn(Hn,e,t)}var Gn=function(e){return function e(t,n){var a,r,o,i;if(!t)return[];if(!n&&9===t.nodeType)return[{str:"html"}];if(n=n||[],t.parentNode&&t.parentNode!==t&&(n=e(t.parentNode,n)),t.previousSibling){for(r=1,a=t.previousSibling;1===a.nodeType&&a.nodeName===t.nodeName&&r++,a=a.previousSibling;);1===r&&(r=null)}else if(t.nextSibling)for(a=t.nextSibling;a=1===a.nodeType&&a.nodeName===t.nodeName?(r=1,null):(r=null,a.previousSibling););return 1===t.nodeType&&((o={}).str=t.nodeName.toLowerCase(),(i=t.getAttribute&&yn(t.getAttribute("id")))&&1===t.ownerDocument.querySelectorAll("#"+i).length&&(o.id=t.getAttribute("id")),1(a=a||300)&&(a=r.indexOf(">"),r=r.substring(0,a+1)),r):"")}Zn.prototype={get selector(){return this.spec.selector||[$n(this.element,this._options)]},get ancestry(){return this.spec.ancestry||[Un(this.element)]},get xpath(){return this.spec.xpath||[Gn(this.element)]},get element(){return this._element},toJSON:function(){var e={selector:this.selector,source:this.source,xpath:this.xpath,ancestry:this.ancestry,nodeIndexes:this.nodeIndexes,fromFrame:this.fromFrame};return this._includeElementInJson&&(e.element=this._element),e}},Zn.fromFrame=function(e,t,n){return e=Zn.mergeSpecs(e,n),new Zn(n.element,t,e)},Zn.mergeSpecs=function(e,t){return $({},e,{selector:[].concat(z(t.selector),z(e.selector)),ancestry:[].concat(z(t.ancestry),z(e.ancestry)),xpath:[].concat(z(t.xpath),z(e.xpath)),nodeIndexes:[].concat(z(t.nodeIndexes),z(e.nodeIndexes)),fromFrame:!0})},Zn.setRunOptions=function(e){var t=e.elementRef;e=e.absolutePaths;Yn.set(Xn,{elementRef:t,absolutePaths:e})};var Jn=Zn,Qn=function(e,n,a,r){return{isAsync:!1,async:function(){return this.isAsync=!0,function(t){t instanceof Error==0?(e.result=t,a(e)):r(t)}},data:function(t){e.data=t},relatedNodes:function(n){t.Node&&(n=n instanceof t.Node||n instanceof an?[n]:vn(n),e.relatedNodes=[],n.forEach((function(n){(n=n instanceof an?n.actualNode:n)instanceof t.Node&&(n=new Jn(n),e.relatedNodes.push(n))})))}}};function ea(e){return function e(n,a){var o,i;if(null===n||"object"!==r(n))return n;if(null!=(o=t)&&o.Node&&n instanceof t.Node||null!=(o=t)&&o.HTMLCollection&&n instanceof t.HTMLCollection||"nodeName"in n&&"nodeType"in n&&"ownerDocument"in n)return n;if(a.has(n))return a.get(n);if(Array.isArray(n))return i=[],a.set(n,i),n.forEach((function(t){i.push(e(t,a))})),i;var u={};for(var l in a.set(n,u),n)u[l]=e(n[l],a);return u}(e,new Map)}(Go=new(ne(Wt()).CssSelectorParser)).registerSelectorPseudos("not"),Go.registerSelectorPseudos("is"),Go.registerNestingOperators(">"),Go.registerAttrEqualityMods("^","$","*","~");var ta=Go;function na(e,t){return la(t).some((function(t){return sa(e,t)}))}function aa(e,t){return i=t,1===(o=e).props.nodeType&&("*"===i.tag||o.props.nodeName===i.tag)&&(r=e,!(o=t).classes||o.classes.every((function(e){return r.hasClass(e.value)})))&&(a=e,!(i=t).attributes||i.attributes.every((function(e){var t=a.attr(e.key);return null!==t&&e.test(t)})))&&(o=e,!(i=t).id||o.props.id===i.id)&&(n=e,!((o=t).pseudos&&!o.pseudos.every((function(e){if("not"===e.name)return!e.expressions.some((function(e){return sa(n,e)}));if("is"===e.name)return e.expressions.some((function(e){return sa(n,e)}));throw new Error("the pseudo selector "+e.name+" has not yet been implemented")}))));var n,a,r,o,i}ra=/(?=[\\-\\[\\]{}()*+?.\\\\\\^$|,#\\s])/g;var ra,oa=function(e){return e.replace(ra,"\\\\")},ia=/\\\\/g;function ua(e){return e.map((function(e){for(var t=[],n=e.rule;n;)t.push({tag:n.tagName?n.tagName.toLowerCase():"*",combinator:n.nestingOperator||" ",id:n.id,attributes:function(e){if(e)return e.map((function(e){var t,n,a=e.name.replace(ia,""),r=(e.value||"").replace(ia,"");switch(e.operator){case"^=":n=new RegExp("^"+oa(r));break;case"$=":n=new RegExp(oa(r)+"$");break;case"~=":n=new RegExp("(^|\\\\s)"+oa(r)+"(\\\\s|$)");break;case"|=":n=new RegExp("^"+oa(r)+"(-|$)");break;case"=":t=function(e){return r===e};break;case"*=":t=function(e){return e&&e.includes(r)};break;case"!=":t=function(e){return r!==e};break;default:t=function(e){return null!==e}}return""===r&&/^[*$^]=$/.test(e.operator)&&(t=function(){return!1}),{key:a,value:r,type:void 0===e.value?"attrExist":"attrValue",test:t=t||function(e){return e&&n.test(e)}}}))}(n.attrs),classes:function(e){if(e)return e.map((function(e){return{value:e=e.replace(ia,""),regexp:new RegExp("(^|\\\\s)"+oa(e)+"(\\\\s|$)")}}))}(n.classNames),pseudos:function(e){if(e)return e.map((function(e){var t;return["is","not"].includes(e.name)&&(t=ua(t=(t=e.value).selectors||[t])),{name:e.name,expressions:t,value:e.value}}))}(n.pseudos)}),n=n.rule;return t}))}function la(e){return ua((e=ta.parse(e)).selectors||[e])}function sa(e,t,n){return function e(t,n,a,r){if(!t)return!1;for(var o=Array.isArray(n)?n[a]:n,i=aa(t,o);!i&&r&&t.parent;)i=aa(t=t.parent,o);if(0"].includes(o.combinator))throw new Error("axe.utils.matchesExpression does not support the combinator: "+o.combinator);i=i&&e(t.parent,n,a-1," "===o.combinator)}return i}(e,t,t.length-1,n)}var ca=function(e,t){for(;e;){if(na(e,t))return e;if(void 0===e.parent)throw new TypeError("Cannot resolve parent for non-DOM nodes");e=e.parent}return null};function da(){}function pa(e){if("function"!=typeof e)throw new TypeError("Queue methods require functions as arguments")}for(var fa,ma,Da,ha=function(){function e(e){t=e,setTimeout((function(){null!=t&&en("Uncaught error (of queue)",t)}),1)}var t,n=[],a=0,o=0,i=da,u=!1,l=e;function s(e){return i=da,l(e),n}function c(){for(var e=n.length;a>>((3&t)<<3)&255;return Da}),"function"==typeof t.Buffer?t.Buffer:Array),va=[],ya={},Fa=0;Fa<256;Fa++)va[Fa]=(Fa+256).toString(16).substr(1),ya[va[Fa]]=Fa;function wa(e,t){return t=t||0,va[e[t++]]+va[e[t++]]+va[e[t++]]+va[e[t++]]+"-"+va[e[t++]]+va[e[t++]]+"-"+va[e[t++]]+va[e[t++]]+"-"+va[e[t++]]+va[e[t++]]+"-"+va[e[t++]]+va[e[t++]]+va[e[t++]]+va[e[t++]]+va[e[t++]]+va[e[+t]]}var Ea=[1|(Go=fa())[0],Go[1],Go[2],Go[3],Go[4],Go[5]],Ca=16383&(Go[6]<<8|Go[7]),xa=0,Aa=0;function ka(e,t,n){var a=t&&n||0,r=t||[],o=(n=null!=(e=e||{}).clockseq?e.clockseq:Ca,null!=e.msecs?e.msecs:(new Date).getTime()),i=null!=e.nsecs?e.nsecs:Aa+1;if((u=o-xa+(i-Aa)/1e4)<0&&null==e.clockseq&&(n=n+1&16383),1e4<=(i=(u<0||xa>>24&255,r[a++]=u>>>16&255,r[a++]=u>>>8&255,r[a++]=255&u,o/4294967296*1e4&268435455),r[a++]=i>>>8&255,r[a++]=255&i,r[a++]=i>>>24&15|16,r[a++]=i>>>16&255,r[a++]=n>>>8|128,r[a++]=255&n,e.node||Ea),s=0;s<6;s++)r[a+s]=l[s];return t||wa(r)}function Na(e,t,n){var a=t&&n||0,r=("string"==typeof e&&(t="binary"==e?new ba(16):null,e=null),(e=e||{}).random||(e.rng||fa)());if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var o=0;o<16;o++)t[a+o]=r[o];return t||wa(r)}(Go=Na).v1=ka,Go.v4=Na,Go.parse=function(e,t,n){var a=t&&n||0,r=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){r<16&&(t[a+r++]=ya[e])}));r<16;)t[a+r++]=0;return t},Go.unparse=wa,Go.BufferClass=ba,o._uuid=ka();var Ba=Na,Ta=Object.freeze(["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function Ra(){var e="axeAPI",t="";return(e=void 0!==o&&o._audit&&o._audit.application?o._audit.application:e)+"."+(void 0!==o?o.version:t)}function _a(e){Oa(e),bn(t.parent===e,"Source of the response must be the parent window.")}function Sa(e){Oa(e),bn(e.parent===t,"Respondable target must be a frame in the current window")}function Oa(e){bn(t!==e,"Messages can not be sent to the same window.")}var Ma={},Pa=[];function Ia(){var e="".concat(Na(),":").concat(Na());return Pa.includes(e)?Ia():(Pa.push(e),e)}function La(e,t,n,a){var r,i,u,l,s;return(n?_a:Sa)(e),t.message instanceof Error&&!n?(o.log(t.message),!1):(s=(i=$({messageId:Ia()},t)).topic,u=i.channelId,l=i.message,u={channelId:u,topic:s,messageId:i.messageId,keepalive:!!i.keepalive,source:Ra()},l instanceof Error?u.error={name:l.name,message:l.message,stack:l.stack}:u.payload=l,r=JSON.stringify(u),!(!(s=o._audit.allowedOrigins)||!s.length||("function"==typeof a&&function(e,t,n){var a=!(2(0|t.left)&&(0|e.top)<(0|t.bottom)&&(0|e.bottom)>(0|t.top)}var gr=Nn((function(e){var t=[];return e?("hidden"===e.getComputedStylePropertyValue("overflow")&&t.push(e),t.concat(gr(e.parent))):t})),br=gr,vr=/rect\\s*\\(([0-9]+)px,?\\s*([0-9]+)px,?\\s*([0-9]+)px,?\\s*([0-9]+)px\\s*\\)/,yr=/(\\w+)\\((\\d+)/;function Fr(e){return["style","script","noscript","template"].includes(e.props.nodeName)}function wr(e){return"area"!==e.props.nodeName&&"none"===e.getComputedStylePropertyValue("display")}function Er(e){return!(1=n)return!0;return!1}},zr=[Ar,kr,Nr,Br,qr];function Vr(e){return e=$d(e).vNode,$r(e)}var $r=Nn((function(e,t){return e.actualNode&&"area"===e.props.nodeName?!Tr(e,$r):!(Sr(e,{skipAncestors:!0,isAncestor:t})||e.actualNode&&zr.some((function(n){return n(e,{isAncestor:t})})))&&(!e.parent||$r(e.parent,!0))}));function Hr(e,n){var a=Math.min(e.top,n.top),r=Math.max(e.right,n.right),o=Math.max(e.bottom,n.bottom);e=Math.min(e.left,n.left);return new t.DOMRect(e,a,r-e,o-a)}function Ur(e,t){var n=e.x,a=(e=e.y,t.top),r=t.right,o=t.bottom;t=t.left;return a<=e&&n<=r&&e<=o&&t<=n}var Gr={};function Wr(e,n){var a=Math.max(e.left,n.left),r=Math.min(e.right,n.right),o=Math.max(e.top,n.top);e=Math.min(e.bottom,n.bottom);return r<=a||e<=o?null:new t.DOMRect(a,o,r-a,e-o)}function Yr(e){var n=e.left,a=e.top,r=e.width;e=e.height;return new t.DOMPoint(n+r/2,a+e/2)}te(Gr,{getBoundingRect:function(){return Hr},getIntersectionRect:function(){return Wr},getOffset:function(){return Zr},getRectCenter:function(){return Yr},hasVisualOverlap:function(){return Qr},isPointInRect:function(){return Ur},rectHasMinimumSize:function(){return Xr},rectsOverlap:function(){return hr},splitRects:function(){return eo}});var Kr=.05;function Xr(e,t){var n=t.width;t=t.height;return e<=n+Kr&&e<=t+Kr}function Zr(e,t){var n=2t.right?t.right:e.x,y:t=e.yt.bottom?t.bottom:e.y}}(i,s));u=Math.min(u,c)}}catch(e){l.e(e)}finally{l.f()}return Xr(2*n,Lo(t))?u:(a=Jr(i,Yr(r.reduce(Hr)))-n,Math.max(0,Math.min(u,a)))}function Jr(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function Qr(e,t){var n=e.boundingClientRect,a=t.boundingClientRect;return!(n.left>=a.right||n.right<=a.left||n.top>=a.bottom||n.bottom<=a.top)&&0t.top,u=at.left,l=[];if(to(t.top,n,r)&&u&&l.push({top:n,left:a,bottom:t.top,right:o}),to(t.right,a,o)&&i&&l.push({top:n,left:t.right,bottom:r,right:o}),to(t.bottom,n,r)&&u&&l.push({top:t.bottom,right:o,bottom:r,left:a}),to(t.left,a,o)&&i&&l.push({top:n,left:a,bottom:r,right:t.left}),0===l.length){if(function(e,t){return e.top>=t.top&&e.left>=t.left&&e.bottom<=t.bottom&&e.right<=t.right}(e,t))return[];l.push(e)}return l.map(no)}(n,e))}),[])}for(r.s();!(n=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}return a}var to=function(e,t,n){return te._stackingOrder[r].stackLevel)return 1;if(n._stackingOrder[r].stackLevel=Math.floor(t)&&l=Math.floor(n)}))}));return(i=e.container)&&(o=Ro(i._grid,i.boundingClientRect,!0).concat(o)),r?o:o.sort(Bo).map((function(e){return e.actualNode})).concat(a.documentElement).filter((function(e,t,n){return n.indexOf(e)===t}))}var _o=function(e){lo();var t=(e=Kn(e))._grid;return t?Ro(t,e.boundingClientRect):[]},So=function(e){return fp(e,"*").filter((function(e){var t=e.isFocusable;return(e=(e=e.actualNode.getAttribute("tabindex"))&&!isNaN(parseInt(e,10))?parseInt(e):null)?t&&0<=e:t}))},Oo=function(e){var t=$d(e).vNode;if(t&&!Co(t))switch(t.props.nodeName){case"a":case"area":if(t.hasAttr("href"))return!0;break;case"input":return"hidden"!==t.props.type;case"textarea":case"select":case"summary":case"button":return!0;case"details":return!fp(t,"summary").length}return!1};function Mo(e){return 1===(e=$d(e).vNode).props.nodeType&&!(Co(e)||!Oo(e)&&(!(e=e.attr("tabindex"))||isNaN(parseInt(e,10))))}function Po(e){return 1===(e=$d(e).vNode).props.nodeType&&!(parseInt(e.attr("tabindex",10))<=-1)&&Mo(e)}var Io=Nn((function(e){var t=e.boundingClientRect,n=go(e).filter((function(t){return Qr(e,t)&&"none"!==t.getComputedStylePropertyValue("pointer-events")&&!(e.actualNode.contains(t.actualNode)&&!Po(t))}));return n.length?(n=n.map((function(e){return e.boundingClientRect})),eo(t,n)):[t]})),Lo=Nn((function(e,t){return function(e,t){return e.reduce((function(e,n){var a=Xr(t,e);return a!==Xr(t,n)?a?e:n:(a=e.width*e.height,n.width*n.height?@\\[\\]^_\`{|}~\\xb1]/g.test(e):r};function iu(e){var n=1=r){if(i.numLigatures/i.occurrences==1)return!0;if(0===i.numLigatures)return!1}i.occurrences++;var s="".concat(r=30,"px ").concat(m),c=(u.font=s,o.charAt(0)),d=u.measureText(c).width;if(0===d)return i.numLigatures++,!0;d<30&&(d*=p=30/d,s="".concat(r*=p,"px ").concat(m)),l.width=d,l.height=r,u.font=s,u.textAlign="left",u.textBaseline="top",u.fillText(c,0,0);var p=new Uint32Array(u.getImageData(0,0,d,r).data.buffer);if(!p.some((function(e){return e})))return i.numLigatures++,!0;u.clearRect(0,0,d,r),u.fillText(o,0,0);var f=new Uint32Array(u.getImageData(0,0,d,r).data.buffer),m=p.reduce((function(e,t,n){return 0===t&&0===f[n]||0!==t&&0!==f[n]?e:++e}),0);l=o.split("").reduce((function(e,t){return e+u.measureText(t).width}),0),s=u.measureText(o).width;return n<=m/p.length&&n<=1-s/l&&(i.numLigatures++,!0)}function uu(e){var t,n,a,r,i,u=function(e,t){return t.startNode||(t=$({startNode:e},t)),1===e.props.nodeType&&t.inLabelledByContext&&void 0===t.includeHidden&&(t=$({includeHidden:!Mi(e)},t)),t}(e,1?@\\[\\]^_\`{|}~\\xb1]/g,""):e},cu=function(e){return e.length&&!["x","i"].includes(e)&&(e=su(e,{emoji:!0,nonBmp:!0,punctuations:!0}),li(e))?1:0},du={stateTerms:["on","off"],standaloneTerms:["name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","username","new-password","current-password","organization-title","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","one-time-code"],qualifiers:["home","work","mobile","fax","pager"],qualifiedTerms:["tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"],locations:["billing","shipping"]},pu=function(e){var t=void 0!==(t=(i=1r.length))},Iu=function(e){if(e=(e=e||{}).modalPercent||.75,Yn.get("isModalOpen"))return Yn.get("isModalOpen");if(ap(o._tree[0],"dialog, [role=dialog], [aria-modal=true]",Vr).length)return Yn.set("isModalOpen",!0),!0;for(var n=jr(t),i=n.width*e,u=n.height*e,l=(e=(n.width-i)/2,(n.height-u)/2),s=[{x:e,y:l},{x:n.width-e,y:l},{x:n.width/2,y:n.height/2},{x:e,y:n.height-l},{x:n.width-e,y:n.height-l}].map((function(e){return Array.from(a.elementsFromPoint(e.x,e.y))})),c=0;c=i&&parseInt(e.height,10)>=u&&"none"!==e.getPropertyValue("pointer-events")&&("absolute"===e.position||"fixed"===e.position)}));if(n&&s.every((function(e){return e.includes(n)})))return Yn.set("isModalOpen",!0),{v:!0}}(c);if("object"===r(d))return d.v}Yn.set("isModalOpen",void 0)};function Lu(e){var t,n=1u.top+n)r=Math.max(r,u.bottom);else{if(0!==o)return!0;r=u.bottom,o++}}}catch(e){i.e(e)}finally{i.f()}return!1}var ju=function(e){return e instanceof t.Node},qu="color.incompleteData",zu={set:function(e,t){if("string"!=typeof e)throw new Error("Incomplete data: key must be a string");var n=Yn.get(qu,(function(){return{}}));return t&&(n[e]=t),n[e]},get:function(e){var t=Yn.get(qu);return null==t?void 0:t[e]},clear:function(){Yn.set(qu,{})}},Vu=function(e,n){var a=e.nodeName.toUpperCase();return["IMG","CANVAS","OBJECT","IFRAME","VIDEO","SVG"].includes(a)?(zu.set("bgColor","imgNode"),!0):((e="none"!==(a=(n=n||t.getComputedStyle(e)).getPropertyValue("background-image")))&&(n=/gradient/.test(a),zu.set("bgColor",n?"bgGradient":"bgImage")),e)},$u=(te(Go={},{Colorjs:function(){return yc},CssSelectorParser:function(){return $u.CssSelectorParser},doT:function(){return Hu.default},emojiRegexText:function(){return ru},memoize:function(){return Uu.default}}),ne(Wt())),Hu=ne(Yt()),Uu=ne($t());function Gu(e,t){var n=e.length,a=(Array.isArray(e[0])||(e=[e]),(t=Array.isArray(t[0])?t:t.map((function(e){return[e]})))[0].length),r=t[0].map((function(e,n){return t.map((function(e){return e[n]}))}));e=e.map((function(e){return r.map((function(t){var n=0;if(Array.isArray(e))for(var a=0;a)\\[(-?[.\\d]+),\\s*(-?[.\\d]+)\\]?$/);return n?((t=new String(n[1])).range=[+n[2],+n[3]],t):e}))}))}function nl(){W(this,nl)}Wo=Object.freeze({__proto__:null,isString:Wu,type:Yu,toPrecision:Ku,parseFunction:Xu,last:Zu,interpolate:Ju,interpolateInv:Qu,mapRange:el,parseCoordGrammar:tl,multiplyMatrices:Gu}),K(nl,[{key:"add",value:function(e,t,n){if("string"!=typeof arguments[0])for(var e in arguments[0])this.add(e,arguments[0][e],t);else(Array.isArray(e)?e:[e]).forEach((function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)}),this)}},{key:"run",value:function(e,t){this[e]=this[e]||[],this[e].forEach((function(e){e.call(t&&t.context?t.context:t,t)}))}}]);var al=new nl,rl={gamut_mapping:"lch.c",precision:5,deltaE:"76"},ol={D50:[.3457/.3585,1,.2958/.3585],D65:[.3127/.329,1,.3583/.329]};function il(e){return Array.isArray(e)?e:ol[e]}function ul(e,t,n,a){var r=3"==n?(a=[0,100],r="%"):""==n&&(r="deg"),{fromRange:t,toRange:a,suffix:r}})),e.serializeCoords=function(e,n){return e.map((function(e,a){var r=(a=t[a]).fromRange,o=a.toRange;a=a.suffix;return e=Ku(e=r&&o?el(r,o,e):e,n),a&&(e+=a),e}))}),e}function cl(){for(var e=[this],t=this;t=t.base;)e.push(t);return e}re=new WeakSet,oe=new WeakMap,ie=new WeakSet,K(ll,[{key:"inGamut",value:function(e){var t,n=(1"===u?r||[0,1]:r)&&l&&(a[n]=el(r,l,a[n]))})),{v:{v:{spaceId:r.id,coords:a,alpha:n}}}}();if("object"===r(D))return D.v}}catch(n){m.e(n)}finally{m.f()}}();if("object"===r(n))return n.v}else{var a,o=Z(pl.all);try{for(o.s();!(a=o.n()).done;){var i,u=a.value;for(i in u.formats){var l=u.formats[i];if("custom"===l.type&&(!l.test||l.test(t.str))){var s=l.parse(t.str);if(s)return null==s.alpha&&(s.alpha=1),s}}}}catch(e){o.e(e)}finally{o.f()}}throw new TypeError("Could not parse ".concat(e," as a color. Missing a plugin?"))}function hl(e){var t;if(e)return(t=(e=Wu(e)?Dl(e):e).space||e.spaceId)instanceof pl||(e.space=pl.get(t)),void 0===e.alpha&&(e.alpha=1),e;throw new TypeError("Empty color reference")}function gl(e,t){return(t=pl.get(t)).from(e)}function bl(e,t){var n=(t=pl.resolveCoord(t,e.space)).space;t=t.index;return gl(e,n)[t]}function vl(e,t,n){return t=pl.get(t),e.coords=t.to(e.space,n),e}function yl(e,t,n){if(e=hl(e),2===arguments.length&&"object"===Yu(t)){var a,r=t;for(a in r)yl(e,a,r[a])}else{"function"==typeof n&&(n=n(bl(e,t)));var o=(i=pl.resolveCoord(t,e.space)).space,i=i.index,u=gl(e,o);u[i]=n,vl(e,o,u)}return e}$t=new pl({id:"xyz-d50",name:"XYZ D50",white:"D50",base:fl,fromBase:function(e){return ul(fl.white,"D50",e)},toBase:function(e){return ul("D50",fl.white,e)},formats:{color:{}}});var Fl=24389/27,wl=ol.D50,El=new pl({id:"lab",name:"Lab",coords:{l:{refRange:[0,100],name:"L"},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:wl,base:$t,fromBase:function(e){return e=e.map((function(e,t){return e/wl[t]})).map((function(e){return 216/24389 | ","",""]}}});function Cl(e){return(e%360+360)%360}var xl=new pl({id:"lch",name:"LCH",coords:{l:{refRange:[0,100],name:"Lightness"},c:{refRange:[0,150],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:El,fromBase:function(e){var t=(e=H(e,3))[0],n=e[1],a=(e=e[2],Math.abs(n)<.02&&Math.abs(e)<.02?NaN:180*Math.atan2(e,n)/Math.PI);return[t,Math.sqrt(Math.pow(n,2)+Math.pow(e,2)),Cl(a)]},toBase:function(e){var t=(e=H(e,3))[0],n=e[1];e=e[2];return n<0&&(n=0),isNaN(e)&&(e=0),[t,n*Math.cos(e*Math.PI/180),n*Math.sin(e*Math.PI/180)]},formats:{lch:{coords:[" | ",""," | "]}}}),Al=Math.pow(25,7),kl=Math.PI,Nl=180/kl,Bl=kl/180;function Tl(e,t){var n=void 0===(n=(r=2 | [0, 255]")},rgb_number:{name:"rgb",commas:!0,coords:Ul=Array(3).fill("[0, 255]"),noAlpha:!0},color:{},rgba:{coords:Hl,commas:!0,lastAlpha:!0},rgba_number:{name:"rgba",commas:!0,coords:Ul},hex:{type:"custom",toGamut:!0,test:function(e){return/^#([a-f0-9]{3,4}){1,2}$/i.test(e)},parse:function(e){e.length<=5&&(e=e.replace(/[a-f0-9]/gi,"$&$&"));var t=[];return e.replace(/[a-f0-9]{2}/gi,(function(e){t.push(parseInt(e,16)/255)})),{spaceId:"srgb",coords:t.slice(0,3),alpha:t.slice(3)[0]}},serialize:function(e,t){var n=void 0===(n=(2 | ","",""]}}}),os=.5*Math.pow(5,.5)+.5,is=Object.freeze({__proto__:null,contrastWCAG21:function(e,t){var n;return e=hl(e),t=hl(t),(e=Math.max(Zl(e),0))<(t=Math.max(Zl(t),0))&&(e=(n=[t,e])[0],t=n[1]),(e+.05)/(t+.05)},contrastAPCA:function(e,t){t=hl(t),e=hl(e);var n=(t=H((t=Ml(t,"srgb")).coords,3))[0],a=t[1],r=(t=t[2],.2126729*ts(n)+.7151522*ts(a)+.072175*ts(t));n=(e=H((e=Ml(e,"srgb")).coords,3))[0],a=e[1],t=e[2],e=.2126729*ts(n)+.7151522*ts(a)+.072175*ts(t),t=(n=es(r))<(a=es(e)),r=Math.abs(a-n)<5e-4?0:t?1.14*(Math.pow(a,.56)-Math.pow(n,.57)):1.14*(Math.pow(a,.65)-Math.pow(n,.62));return 100*(Math.abs(r)<.1?0:0 | ","",""]}}}),Is=Object.freeze({__proto__:null,deltaE76:function(e,t){return Xl(e,t,"lab")},deltaECMC:function(e,t){var n=void 0===(n=(a=2"}),e.defineFunction("steps",zs,{returns:"array"})}}),Us=new pl({id:"hsl",name:"HSL",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},l:{range:[0,100],name:"Lightness"}},base:Hl,fromBase:function(e){var t=Math.max.apply(Math,z(e)),n=Math.min.apply(Math,z(e)),a=(e=H(e,3))[0],r=e[1],o=e[2],i=NaN,u=(e=0,(n+t)/2),l=t-n;if(0!=l){switch(e=0==u||1==u?0:(t-u)/Math.min(u,1-u),t){case a:i=(r-o)/l+(r | ","",""]},hsla:{coords:[" | ","",""],commas:!0,lastAlpha:!0}}}),Gs=new pl({id:"hsv",name:"HSV",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},v:{range:[0,100],name:"Value"}},base:Us,fromBase:function(e){var t=(e=H(e,3))[0],n=e[1];e=e[2];return[t,0==(n=(e/=100)+(n/=100)*Math.min(e,1-e))?0:200*(1-e/n),100*n]},toBase:function(e){var t=(e=H(e,3))[0],n=e[1];e=e[2];return[t,0==(n=(e/=100)*(1-(n/=100)/2))||1==n?0:(e-n)/Math.min(n,1-n)*100,100*n]},formats:{color:{toGamut:!0}}}),Ws=new pl({id:"hwb",name:"HWB",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},w:{range:[0,100],name:"Whiteness"},b:{range:[0,100],name:"Blackness"}},base:Gs,fromBase:function(e){var t=(e=H(e,3))[0],n=e[1];return[t,(e=e[2])*(100-n)/100,100-e]},toBase:function(e){var t=(e=H(e,3))[0],n=e[1],a=(e=e[2],(n/=100)+(e/=100));return 1<=a?[t,0,n/a*100]:[t,100*(0==(a=1-e)?0:1-n/a),100*a]},formats:{hwb:{toGamut:!0,coords:[" | ","",""]}}}),Ys=new Wt({id:"a98rgb-linear",name:"Linear Adobe® 98 RGB compatible",white:"D65",toXYZ_M:[[.5766690429101305,.1855582379065463,.1882286462349947],[.29734497525053605,.6273635662554661,.07529145849399788],[.02703136138641234,.07068885253582723,.9913375368376388]],fromXYZ_M:[[2.0415879038107465,-.5650069742788596,-.34473135077832956],[-.9692436362808795,1.8759675015077202,.04155505740717557],[.013444280632031142,-.11836239223101838,1.0151749943912054]]}),Ks=new Wt({id:"a98rgb",name:"Adobe® 98 RGB compatible",base:Ys,toBase:function(e){return e.map((function(e){return Math.pow(Math.abs(e),563/256)*Math.sign(e)}))},fromBase:function(e){return e.map((function(e){return Math.pow(Math.abs(e),256/563)*Math.sign(e)}))},formats:{color:{id:"a98-rgb"}}}),Xs=new Wt({id:"prophoto-linear",name:"Linear ProPhoto",white:"D50",base:$t,toXYZ_M:[[.7977604896723027,.13518583717574031,.0313493495815248],[.2880711282292934,.7118432178101014,8565396060525902e-20],[0,0,.8251046025104601]],fromXYZ_M:[[1.3457989731028281,-.25558010007997534,-.05110628506753401],[-.5446224939028347,1.5082327413132781,.02053603239147973],[0,0,1.2119675456389454]]}),Zs=new Wt({id:"prophoto",name:"ProPhoto",base:Xs,toBase:function(e){return e.map((function(e){return e<.03125?e/16:Math.pow(e,1.8)}))},fromBase:function(e){return e.map((function(e){return 1/512<=e?Math.pow(e,1/1.8):16*e}))},formats:{color:{id:"prophoto-rgb"}}}),Js=new pl({id:"oklch",name:"OKLCh",coords:{l:{refRange:[0,1],name:"Lightness"},c:{refRange:[0,.4],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},white:"D65",base:Ps,fromBase:function(e){var t=(e=H(e,3))[0],n=e[1],a=(e=e[2],Math.abs(n)<2e-4&&Math.abs(e)<2e-4?NaN:180*Math.atan2(e,n)/Math.PI);return[t,Math.sqrt(Math.pow(n,2)+Math.pow(e,2)),Cl(a)]},toBase:function(e){var t,n=(e=H(e,3))[0],a=e[1];e=e[2],a=isNaN(e)?t=0:(t=a*Math.cos(e*Math.PI/180),a*Math.sin(e*Math.PI/180));return[n,t,a]},formats:{oklch:{coords:[" | ",""," | "]}}}),Qs=2610/Math.pow(2,14),ec=Math.pow(2,14)/2610,tc=2523/Math.pow(2,5),nc=Math.pow(2,5)/2523,ac=3424/Math.pow(2,12),rc=2413/Math.pow(2,7),oc=2392/Math.pow(2,7),ic=new Wt({id:"rec2100pq",name:"REC.2100-PQ",base:Il,toBase:function(e){return e.map((function(e){return 1e4*Math.pow(Math.max(Math.pow(e,nc)-ac,0)/(rc-oc*Math.pow(e,nc)),ec)/203}))},fromBase:function(e){return e.map((function(e){e=Math.max(203*e/1e4,0);var t=ac+rc*Math.pow(e,Qs);e=1+oc*Math.pow(e,Qs);return Math.pow(t/e,tc)}))},formats:{color:{id:"rec2100-pq"}}}),uc=.17883277,lc=.28466892,sc=.55991073,cc=3.7743,dc=new Wt({id:"rec2100hlg",cssid:"rec2100-hlg",name:"REC.2100-HLG",referred:"scene",base:Il,toBase:function(e){return e.map((function(e){return e<=.5?Math.pow(e,2)/3*cc:Math.exp((e-sc)/uc+lc)/12*cc}))},fromBase:function(e){return e.map((function(e){return(e/=cc)<=1/12?Math.sqrt(3*e):uc*Math.log(12*e-lc)+sc}))},formats:{color:{id:"rec2100-hlg"}}}),pc={};function fc(e){var t=e.id;e.toCone_M,e.fromCone_M,pc[t]=e}function mc(e,t,n){var a=pc[2"===o?(e=n,n=function(){var t=e.apply(void 0,arguments);return Fc.get(t)},Object.assign(n,e)):"array"===o&&(n=n.map((function(e){return Fc.get(e)}))),n}var a=2Math.ceil(s.left+s.width)||Math.floor(e.top+e.height)>Math.ceil(s.top+s.height))})))}while(e=c);return!1}function zc(e){for(var t=Kn(e).parent;t;){if(Rd(t.actualNode))return t.actualNode;t=t.parent}}var Vc,$c=function e(t,n){var r=2o&&e.left>a.right||e.top>r&&e.top>a.bottom||e.righta.right||e.top>a.bottom)||"scroll"===o.overflow||"auto"===o.overflow||n instanceof t.HTMLBodyElement||n instanceof t.HTMLHtmlElement)},Gc=0;function Wc(e,t,n){var a;return W(this,Wc),(a=Vc.call(this)).shadowId=n,a.children=[],a.actualNode=e,(a.parent=t)||(Gc=0),a.nodeIndex=Gc++,a._isHidden=null,a._cache={},a._isXHTML=Bn(e.ownerDocument),"input"===e.nodeName.toLowerCase()&&(n=e.getAttribute("type"),n=a._isXHTML?n:(n||"").toLowerCase(),wp().includes(n)||(n="text"),a._type=n),Yn.get("nodeMap")&&Yn.get("nodeMap").set(e,T(a)),a}k(Wc,an),Vc=B(Wc),K(Wc,[{key:"props",get:function(){var e,t,n,a,r,o,i,u,l;return this._cache.hasOwnProperty("props")||(e=(l=this.actualNode).nodeType,t=l.nodeName,n=l.id,a=l.multiple,r=l.nodeValue,o=l.value,i=l.selected,u=l.checked,l=l.indeterminate,this._cache.props={nodeType:e,nodeName:this._isXHTML?t:t.toLowerCase(),id:n,type:this._type,multiple:a,nodeValue:r,value:o,selected:i,checked:u,indeterminate:l}),this._cache.props}},{key:"attr",value:function(e){return"function"!=typeof this.actualNode.getAttribute?null:this.actualNode.getAttribute(e)}},{key:"hasAttr",value:function(e){return"function"==typeof this.actualNode.hasAttribute&&this.actualNode.hasAttribute(e)}},{key:"attrNames",get:function(){var e;return this._cache.hasOwnProperty("attrNames")||(e=(this.actualNode.attributes instanceof t.NamedNodeMap?this.actualNode:this.actualNode.cloneNode(!1)).attributes,this._cache.attrNames=Array.from(e).map((function(e){return e.name}))),this._cache.attrNames}},{key:"getComputedStylePropertyValue",value:function(e){var n="computedStyle_"+e;return this._cache.hasOwnProperty(n)||(this._cache.hasOwnProperty("computedStyle")||(this._cache.computedStyle=t.getComputedStyle(this.actualNode)),this._cache[n]=this._cache.computedStyle.getPropertyValue(e)),this._cache[n]}},{key:"isFocusable",get:function(){return this._cache.hasOwnProperty("isFocusable")||(this._cache.isFocusable=Mo(this.actualNode)),this._cache.isFocusable}},{key:"tabbableElements",get:function(){return this._cache.hasOwnProperty("tabbableElements")||(this._cache.tabbableElements=So(this)),this._cache.tabbableElements}},{key:"clientRects",get:function(){return this._cache.hasOwnProperty("clientRects")||(this._cache.clientRects=Array.from(this.actualNode.getClientRects()).filter((function(e){return 0e.clientWidth+r;r=e.scrollHeight>e.clientHeight+r;if(o||r)return n=Td(a=t.getComputedStyle(e),"overflow-x"),a=Td(a,"overflow-y"),o&&n||r&&a?{elm:e,top:e.scrollTop,left:e.scrollLeft}:void 0})),_d=function(){var e=0=a.startTime})),o=0;o>>0,r=arguments[1],o=0;o>>0,o=0;o>>0,a=2<=arguments.length?arguments[1]:void 0,r=0;rthis.length)&&-1!==this.indexOf(e,t)}),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function e(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,(function(n,a){return Array.isArray(a)?n.push.apply(n,e.call(a,t-1)):n.push(a),n}),[]):Array.prototype.slice.call(this)},writable:!0}),!t.Node||"isConnected"in t.Node.prototype||Object.defineProperty(t.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}});var tp=function(e,t){return e.concat(t).filter((function(e,t,n){return n.indexOf(e)===t}))};function np(e,t,n,a,r){return(r=r||{}).vNodes=e,r.vNodesIndex=0,r.anyLevel=t,r.thisLevel=n,r.parentShadowId=a,r}var ap=function(e,t,n){if(a=Jc(e=Array.isArray(e)?e:[e],t=la(t),n))return a;for(var a=e,r=(e=t,n),o=Yn.get("qsa.recycledLocalVariables",(function(){return[]})),i=[],u=np(Array.isArray(a)?a:[a],e,null,a[0].shadowId,o.pop()),l=[];u.vNodesIndex"].includes(g[0].combinator))throw new Error("axe.utils.querySelectorAll does not support the combinator: "+h[1].combinator);(">"===g[0].combinator?d=d||[]:p=p||[]).push(g)}h[0].id&&c.shadowId!==u.parentShadowId||null==(g=u.anyLevel)||!g.includes(h)||(p=p||[]).push(h)}for(c.children&&c.children.length&&(i.push(u),u=np(c.children,p,d,c.shadowId,o.pop()));u.vNodesIndex===u.vNodes.length&&i.length;)o.push(u),u=i.pop()}return l},rp=function(e){var t,n,r,i;e=void 0===(e=e.treeRoot)?o._tree[0]:e;return t=[],e=ap(e,"*",(function(e){return!t.includes(e.shadowId)&&(t.push(e.shadowId),!0)})).map((function(e){return{shadowId:e.shadowId,rootNode:dr(e.actualNode)}})),(e=tp(e,[])).length?(n=a.implementation.createHTMLDocument("Dynamic document for loading cssom"),n=Md(n),r=n,i=[],e.forEach((function(e,t){var n=e.rootNode,a=function(e,t,n){return t=11===e.nodeType&&t?function(e,t){return Array.from(e.children).filter(op).reduce((function(n,a){var r=a.nodeName.toUpperCase();a="STYLE"===r?a.textContent:a;return(a=t({data:a,isLink:"LINK"===r,root:e})).sheet&&n.push(a.sheet),n}),[])}(e,n):function(e){return Array.from(e.styleSheets).filter((function(e){return!!e.media&&ip(e.media.mediaText)}))}(e),function(e){var t=[];return e.filter((function(e){if(e.href){if(t.includes(e.href))return!1;t.push(e.href)}return!0}))}(t)}(n,e=e.shadowId,r);if(!a)return Promise.all(i);var o=t+1,u={rootNode:n,shadowId:e,convertDataToStylesheet:r,rootIndex:o},l=[];t=Promise.all(a.map((function(e,t){return Wd(e,u,[o,t],l)})));i.push(t)})),Promise.all(i).then((function e(t){return t.reduce((function(t,n){return Array.isArray(n)?t.concat(e(n)):t.concat(n)}),[])}))):Promise.resolve()};function op(e){var t=e.nodeName.toUpperCase(),n=e.getAttribute("href"),a=e.getAttribute("rel");n="LINK"===t&&n&&a&&e.rel.toUpperCase().includes("STYLESHEET");return"STYLE"===t||n&&ip(e.media)}function ip(e){return!e||!e.toUpperCase().includes("PRINT")}var up=function(e){return e=void 0===(e=e.treeRoot)?o._tree[0]:e,e=ap(e,"video, audio",(function(e){return(e=e.actualNode).hasAttribute("src")?!!e.getAttribute("src"):!(Array.from(e.getElementsByTagName("source")).filter((function(e){return!!e.getAttribute("src")})).length<=0)})),Promise.all(e.map((function(e){var t;e=e.actualNode;return t=e,new Promise((function(e){0 option, datalist > option, optgroup > option")},SELECT:function(e){var t=e.node;e=e.role;return!t.multiple&&t.size<=1&&"menu"===e},SVG:function(e){var t=e.node;e=e.out;return!(!t.parentNode||"http://www.w3.org/2000/svg"!==t.parentNode.namespaceURI)||e}},Vl.rolesOfType={widget:["button","checkbox","dialog","gridcell","link","log","marquee","menuitem","menuitemcheckbox","menuitemradio","option","progressbar","radio","scrollbar","searchbox","slider","spinbutton","status","switch","tab","tabpanel","textbox","timer","tooltip","tree","treeitem"]},Vl),Zp=function(e){var t=null;return(e=Xp.role[e])&&e.implicit?ea(e.implicit):t},Jp=function(e){return!!jp(e).length};function Qp(e){var t=(1=o}},uf=function(e){return!!Xo.ariaAttrs[e]};function lf(e,t,n){var a=(r=n.props).nodeName,r=r.type,o=function(e){return e?(e=e.toLowerCase(),["mixed","true"].includes(e)?e:"false"):""}(n.attr("aria-checked"));return"input"!==a||"checkbox"!==r||!o||o===(a=function(e){return e.props.indeterminate?"mixed":e.props.checked?"true":"false"}(n))||(this.data({messageKey:"checkbox",checkState:a}),!1)}function sf(e){var t,n,a=(1t.innerWidth||e.top>t.innerHeight))return{x:Math.min(Math.ceil(e.left+e.width/2),t.innerWidth-1),y:Math.min(Math.ceil(e.top+e.height/2),t.innerHeight-1)}});function bf(e){return e.getPropertyValue("font-family").split(/[,;]/g).map((function(e){return e.trim().toLowerCase()}))}var vf=function(e,n){var a,r=t.getComputedStyle(e);return"none"!==r.getPropertyValue("background-image")||!!["border-bottom","border-top","outline"].reduce((function(e,t){var n=new Tc;return n.parseString(r.getPropertyValue(t+"-color")),e||"none"!==r.getPropertyValue(t+"-style")&&0=a.top&&e.bottom<=o&&e.left>=a.left&&e.right<=r}))}function Vf(e){return e||void 0}var $f=function(e,t){return t&&e?(t.alpha<1&&(t=Cf(t,e)),e=e.getRelativeLuminance(),t=t.getRelativeLuminance(),(Math.max(t,e)+.05)/(Math.min(t,e)+.05)):null};function Hf(e,n,a){for(var r=3=t.top&&e.left>=t.left&&e.bottom<=t.bottom&&e.right<=t.right}function om(e){return{width:Math.round(10*e.width)/10,height:Math.round(10*e.height)/10}}function im(e,t){return e.actualNode.contains(t.actualNode)&&!Po(t)}function um(e){return e.map((function(e){return e.actualNode}))}function lm(e,t){var n=null==(n=t.data)?void 0:n.headingOrder,a=cm(t.node.ancestry,1);return n&&(t=n.map((function(e){return $({},e,{ancestry:a.concat(e.ancestry)})})),-1===(n=function(e,t){for(;t.length;){var n=sm(e,t);if(-1!==n)return n;t=cm(t,1)}return-1}(e,a))?e.push.apply(e,z(t)):e.splice.apply(e,[n,0].concat(z(t)))),e}function sm(e,t){return e.findIndex((function(e){return zd(e.ancestry,t)}))}function cm(e,t){return e.slice(0,e.length-t)}te(Hl={},{aria:function(){return Pp},color:function(){return hf},dom:function(){return cr},forms:function(){return dm},matches:function(){return Ci},math:function(){return Gr},standards:function(){return df},table:function(){return mm},text:function(){return jo},utils:function(){return rn}});var dm={},pm=(te(dm,{isAriaCombobox:function(){return $i},isAriaListbox:function(){return Vi},isAriaRange:function(){return Ui},isAriaTextbox:function(){return zi},isDisabled:function(){return fm},isNativeSelect:function(){return qi},isNativeTextbox:function(){return ji}}),["fieldset","button","select","input","textarea"]),fm=function e(t){var n,a,r=t._isDisabled;return"boolean"!=typeof r&&(n=t.props.nodeName,a=t.attr("aria-disabled"),r=!(!pm.includes(n)||!t.hasAttr("disabled"))||(a?"true"===a.toLowerCase():!!t.parent&&e(t.parent)),t._isDisabled=r),r},mm={},Dm=(te(mm,{getAllCells:function(){return Dm},getCellPosition:function(){return ai},getHeaders:function(){return gm},getScope:function(){return ri},isColumnHeader:function(){return oi},isDataCell:function(){return bm},isDataTable:function(){return vm},isHeader:function(){return ym},isRowHeader:function(){return ii},toArray:function(){return ni},toGrid:function(){return ni},traverse:function(){return Fm}}),function(e){for(var t,n,a=[],r=0,o=e.rows.length;r.95*jr(t).width||l<10||e.querySelector("object, embed, iframe, applet"))},ym=function(e){return!(!oi(e)&&!ii(e))||!!e.getAttribute("id")&&(e=yn(e.getAttribute("id")),!!a.querySelector('[headers~="'.concat(e,'"]')))},Fm=function(e,t,n,a){if(Array.isArray(t)&&(a=n,n=t,t={x:0,y:0}),"string"==typeof e)switch(e){case"left":e={x:-1,y:0};break;case"up":e={x:0,y:-1};break;case"right":e={x:1,y:0};break;case"down":e={x:0,y:1}}return function e(t,n,a,r){var o,i=a[n.y]?a[n.y][n.x]:void 0;return i?"function"==typeof r&&!0===(o=r(i,n,a))?[i]:((o=e(t,{x:n.x+t.x,y:n.y+t.y},a,r)).unshift(i),o):[]}(e,{x:t.x+e.x,y:t.y+e.y},n,a)};var wm=/[;,\\s]/,Em=/^[0-9.]+$/;function Cm(e){return e=t.getComputedStyle(function(e){for(var t=e,n=e.textContent.trim(),a=n;a===n&&void 0!==t;){var r=-1;if(0===(e=t).children.length)return e;for(;r++,""===(a=e.children[r].textContent.trim())&&r+1t.fontSize)&&(!a.weight||e.fontWeight-a.weight>t.fontWeight)&&(!a.italic||e.isItalic&&!t.isItalic)}),!1)}var Am=["alert","log","status"];function km(e){return"caption"===e.props.nodeName}Us=Vr;var Nm=function(e,t,n){return n.initiator};var Bm={emoji:!0,nonBmp:!1,punctuations:!0};var Tm=function(e,t){try{return"svg"===t.props.nodeName||!!ca(t,"svg")}catch(e){return!1}};var Rm=["article","aside","main","nav","section"].join(",");var _m=function(e,t){var n=Qo(t);return!(n&&!["none","presentation"].includes(n)&&!(Uo[n]||{}).accessibleNameRequired&&!Mo(t))};var Sm=[function(e,t){return Om(t)},function(e,t){return"area"!==t.props.nodeName},function(e,t){return!Tm(0,t)},function(e,t){return Mo(t)},function(e,t){return Po(t)||!Mm(t)},function(e){return!Pu(e,{noLengthCompare:!0})}];function Om(e){return"widget"===Su(e)}var Mm=Nn((function e(t){return!(null==t||!t.parent)&&(!(!Om(t.parent)||!Po(t.parent))||e(t.parent))})),Pm={"abstractrole-evaluate":function(e,t,n){return 0<(n=Xc(n.attr("role")).filter((function(e){return"abstract"===Su(e)}))).length&&(this.data(n),!0)},"accesskeys-after":function(e){var t={};return e.filter((function(e){if(e.data){var n=e.data.toUpperCase();if(!t[n])return(t[n]=e).relatedNodes=[],!0;t[n].relatedNodes.push(e.relatedNodes[0])}return!1})).map((function(e){return e.result=!!e.relatedNodes.length,e}))},"accesskeys-evaluate":function(e,t,n){return Sr(n)||(this.data(n.attr("accesskey")),this.relatedNodes([e])),!0},"alt-space-value-evaluate":function(e,t,n){return"string"==typeof(n=n.attr("alt"))&&/^\\s+$/.test(n)},"aria-allowed-attr-evaluate":function(e,t,n){var a,r=[],o=Bi(n),i=Ip(o),u=(Array.isArray(t[o])&&(i=tp(t[o].concat(i))),Z(n.attrNames));try{for(u.s();!(a=u.n()).done;){var l=a.value;uf(l)&&!i.includes(l)&&r.push(l)}}catch(e){u.e(e)}finally{u.f()}return!r.length||(this.data(r.map((function(e){return e+'="'+n.attr(e)+'"'}))),!(o||Ld(n)||Mo(n))&&void 0)},"aria-allowed-attr-matches":function(e,t){var n=/^aria-/,a=t.attrNames;if(a.length)for(var r=0,o=a.length;r=u||"bold"===r,r=Math.ceil(72*D)/96,r=(l=u&&r "),t[n]=e,!0):(n=e.node.ancestry.slice(0,e.node.ancestry.length-1).flat(1/0).join(" > "),t[n]&&(t[n].result=!0),!1)}))},"frame-tested-evaluate":function(e,t){return!t.isViolation&&void 0},"frame-title-has-text-matches":function(e){return e=e.getAttribute("title"),!!li(e)},"has-alt-evaluate":function(e,t,n){var a=n.props.nodeName;return!!["img","input","area"].includes(a)&&n.hasAttr("alt")},"has-descendant-after":function(e){return e.some((function(e){return!0===e.result}))&&e.forEach((function(e){e.result=!0})),e},"has-descendant-evaluate":function(e,t,n){if(t&&t.selector&&"string"==typeof t.selector)return!(!t.passForModal||!Iu())||(n=ap(n,t.selector,Mi),this.relatedNodes(n.map((function(e){return e.actualNode}))),0 ":"";return 3===o&&""!==i.trim()?t+"#text":!(1!==o||!Mi(e))&&((i=Qo(e))?!a.includes(i)&&t+"[role=".concat(i,"]"):!n.includes(r)&&t+r)}(i,u,t),l&&(r.includes(l)||r.push(l),1===(null==i||null==(u=i.actualNode)?void 0:u.nodeType))&&a.push(i.actualNode)}return 0!==r.length&&(this.data({values:r.join(", ")}),this.relatedNodes(a),!0)}},"invalidrole-evaluate":function(e,t,n){return!!(n=Xc(n.attr("role"))).every((function(e){return!Jo(e,{allowAbstract:!0})}))&&(this.data(n),!0)},"is-element-focusable-evaluate":function(e,t,n){return Mo(n)},"is-initiator-matches":Nm,"is-on-screen-evaluate":Us,"is-visible-matches":Vr,"is-visible-on-screen-matches":function(e,t){return Vr(t)},"label-content-name-mismatch-evaluate":function(e,t,n){var a=null==t?void 0:t.pixelThreshold,r=null!=(r=null==t?void 0:t.occurrenceThreshold)?r:null==t?void 0:t.occuranceThreshold;if(t=zo(e).toLowerCase(),!(cu(t)<1))return!(e=li(Zi(n,{subtreeDescendant:!0,ignoreIconLigature:!0,pixelThreshold:a,occurrenceThreshold:r})).toLowerCase())||(cu(e)<1?!!em(e,t)||void 0:em(e,t))},"label-content-name-mismatch-matches":function(e,t){var n=Bi(e);return!!(n&&Hp("widget").includes(n)&&Gp().includes(n)&&(li($o(t))||li(Vo(e)))&&li(Ii(t)))},"label-matches":function(e,t){return"input"!==t.props.nodeName||!1===t.hasAttr("type")||(t=t.attr("type").toLowerCase(),!1===["hidden","image","button","submit","reset"].includes(t))},"landmark-has-body-context-matches":function(e,t){return e.hasAttribute("role")||!mr(t,"article, aside, main, nav, section")},"landmark-is-top-level-evaluate":function(e){var t=Hp("landmark"),n=Pr(e),a=Bi(e);for(this.data({role:a});n;){var r=n.getAttribute("role");if((r=r||"FORM"===n.nodeName.toUpperCase()?r:Ai(n))&&t.includes(r)&&("main"!==r||"complementary"!==a))return!1;n=Pr(n)}return!0},"landmark-is-unique-after":function(e){var t=[];return e.filter((function(e){var n=t.find((function(t){return e.data.role===t.data.role&&e.data.accessibleText===t.data.accessibleText}));return n?(n.result=!1,n.relatedNodes.push(e.relatedNodes[0]),!1):(t.push(e),e.relatedNodes=[],!0)}))},"landmark-is-unique-evaluate":function(e,t,n){var a=Bi(e);return n=(n=uu(n))?n.toLowerCase():null,this.data({role:a,accessibleText:n}),this.relatedNodes([e]),!0},"landmark-unique-matches":function(e,t){return n=t,r=Hp("landmark"),!!(o=Bi(n))&&("header"!==(a=n.props.nodeName)&&"footer"!==a?"section"!==a&&"form"!==a?0<=r.indexOf(o)||"region"===o:!!uu(n):!ca(n,Rm))&&Mi(t);var n,a,r,o},"layout-table-matches":function(e){return!vm(e)&&!Mo(e)},"link-in-text-block-evaluate":function(e,t){var n=t.requiredContrastRatio;if(t=t.allowSameColor,Xf(e))return!1;for(var a=Pr(e);a&&1===a.nodeType&&!Xf(a);)a=Pr(a);if(a){this.relatedNodes([a]);var r=Hf(e),o=Hf(a),i=(e=qf(e),qf(a)),u=r&&o?Yf(r,o):void 0;if((u=u&&Math.floor(100*u)/100)&&n<=u)return!0;var l=e&&i?Yf(e,i):void 0;if((l=l&&Math.floor(100*l)/100)&&n<=l)return!0;if(l){if(u)return!(!t||1!==u||1!==l)||(1===u&&1t.maxDelay},"meta-viewport-scale-evaluate":function(e,t,n){var a,r=void 0===(r=(t=t||{}).scaleMinimum)?2:r;return t=void 0!==(t=t.lowerBound)&&t,!((n=n.attr("content")||"")&&(n=n.split(/[;,]/).reduce((function(e,t){var n;return(t=t.trim())&&(n=(t=H(t.split("="),2))[0],t=t[1],n)&&t&&(n=n.toLowerCase().trim(),t=t.toLowerCase().trim(),"maximum-scale"===n&&"yes"===t&&(t=1),"maximum-scale"===n&&parseFloat(t)<0||(e[n]=t)),e}),{}),!(t&&n["maximum-scale"]&&parseFloat(n["maximum-scale"]) elements of image maps have alternate text",help:"Active elements must have alternate text"},"aria-allowed-attr":{description:"Ensures an element's role supports its ARIA attributes",help:"Elements must only use supported ARIA attributes"},"aria-allowed-role":{description:"Ensures role attribute has an appropriate value for the element",help:"ARIA role should be appropriate for the element"},"aria-braille-equivalent":{description:"Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent",help:"aria-braille attributes must have a non-braille equivalent"},"aria-command-name":{description:"Ensures every ARIA button, link and menuitem has an accessible name",help:"ARIA commands must have an accessible name"},"aria-conditional-attr":{description:"Ensures ARIA attributes are used as described in the specification of the element's role",help:"ARIA attributes must be used as specified for the element's role"},"aria-deprecated-role":{description:"Ensures elements do not use deprecated roles",help:"Deprecated ARIA roles must not be used"},"aria-dialog-name":{description:"Ensures every ARIA dialog and alertdialog node has an accessible name",help:"ARIA dialog and alertdialog nodes should have an accessible name"},"aria-hidden-body":{description:'Ensures aria-hidden="true" is not present on the document body.',help:'aria-hidden="true" must not be present on the document body'},"aria-hidden-focus":{description:"Ensures aria-hidden elements are not focusable nor contain focusable elements",help:"ARIA hidden element must not be focusable or contain focusable elements"},"aria-input-field-name":{description:"Ensures every ARIA input field has an accessible name",help:"ARIA input fields must have an accessible name"},"aria-meter-name":{description:"Ensures every ARIA meter node has an accessible name",help:"ARIA meter nodes must have an accessible name"},"aria-progressbar-name":{description:"Ensures every ARIA progressbar node has an accessible name",help:"ARIA progressbar nodes must have an accessible name"},"aria-prohibited-attr":{description:"Ensures ARIA attributes are not prohibited for an element's role",help:"Elements must only use permitted ARIA attributes"},"aria-required-attr":{description:"Ensures elements with ARIA roles have all required ARIA attributes",help:"Required ARIA attributes must be provided"},"aria-required-children":{description:"Ensures elements with an ARIA role that require child roles contain them",help:"Certain ARIA roles must contain particular children"},"aria-required-parent":{description:"Ensures elements with an ARIA role that require parent roles are contained by them",help:"Certain ARIA roles must be contained by particular parents"},"aria-roledescription":{description:"Ensure aria-roledescription is only used on elements with an implicit or explicit role",help:"aria-roledescription must be on elements with a semantic role"},"aria-roles":{description:"Ensures all elements with a role attribute use a valid value",help:"ARIA roles used must conform to valid values"},"aria-text":{description:'Ensures role="text" is used on elements with no focusable descendants',help:'"role=text" should have no focusable descendants'},"aria-toggle-field-name":{description:"Ensures every ARIA toggle field has an accessible name",help:"ARIA toggle fields must have an accessible name"},"aria-tooltip-name":{description:"Ensures every ARIA tooltip node has an accessible name",help:"ARIA tooltip nodes must have an accessible name"},"aria-treeitem-name":{description:"Ensures every ARIA treeitem node has an accessible name",help:"ARIA treeitem nodes should have an accessible name"},"aria-valid-attr-value":{description:"Ensures all ARIA attributes have valid values",help:"ARIA attributes must conform to valid values"},"aria-valid-attr":{description:"Ensures attributes that begin with aria- are valid ARIA attributes",help:"ARIA attributes must conform to valid names"},"audio-caption":{description:"Ensures