diff --git a/public/Images/Images.js b/public/Images/Images.js
index 64628882..52b2aa60 100644
--- a/public/Images/Images.js
+++ b/public/Images/Images.js
@@ -42,6 +42,7 @@ style.setProperty('--image-file-align-self-center', 'url(\"' + new URL(new URL('
style.setProperty('--image-file-align-self-end', 'url(\"' + new URL(new URL('align-self-end.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-align-self-start', 'url(\"' + new URL(new URL('align-self-start.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-align-self-stretch', 'url(\"' + new URL(new URL('align-self-stretch.svg', import.meta.url).href, import.meta.url).toString() + '\")');
+style.setProperty('--image-file-animation', 'url(\"' + new URL(new URL('animation.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-arrow-back', 'url(\"' + new URL(new URL('arrow-back.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-arrow-down', 'url(\"' + new URL(new URL('arrow-down.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-arrow-drop-down-dark', 'url(\"' + new URL(new URL('arrow-drop-down-dark.svg', import.meta.url).href, import.meta.url).toString() + '\")');
@@ -60,6 +61,7 @@ style.setProperty('--image-file-brackets', 'url(\"' + new URL(new URL('brackets.
style.setProperty('--image-file-breakpoint-circle', 'url(\"' + new URL(new URL('breakpoint-circle.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-breakpoint-crossed-filled', 'url(\"' + new URL(new URL('breakpoint-crossed-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-breakpoint-crossed', 'url(\"' + new URL(new URL('breakpoint-crossed.svg', import.meta.url).href, import.meta.url).toString() + '\")');
+style.setProperty('--image-file-brush-2', 'url(\"' + new URL(new URL('brush-2.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-brush-filled', 'url(\"' + new URL(new URL('brush-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-brush', 'url(\"' + new URL(new URL('brush.svg', import.meta.url).href, import.meta.url).toString() + '\")');
style.setProperty('--image-file-bug', 'url(\"' + new URL(new URL('bug.svg', import.meta.url).href, import.meta.url).toString() + '\")');
diff --git a/public/Images/Images.prebundle.js b/public/Images/Images.prebundle.js
index 571bd435..1d8270c3 100644
--- a/public/Images/Images.prebundle.js
+++ b/public/Images/Images.prebundle.js
@@ -43,6 +43,7 @@ style.setProperty('--image-file-align-self-center', 'url(\"' + new URL('./src/al
style.setProperty('--image-file-align-self-end', 'url(\"' + new URL('./src/align-self-end.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-align-self-start', 'url(\"' + new URL('./src/align-self-start.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-align-self-stretch', 'url(\"' + new URL('./src/align-self-stretch.svg', import.meta.url).toString() + '\")');
+style.setProperty('--image-file-animation', 'url(\"' + new URL('./src/animation.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-arrow-back', 'url(\"' + new URL('./src/arrow-back.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-arrow-down', 'url(\"' + new URL('./src/arrow-down.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-arrow-drop-down-dark', 'url(\"' + new URL('./src/arrow-drop-down-dark.svg', import.meta.url).toString() + '\")');
@@ -61,6 +62,7 @@ style.setProperty('--image-file-brackets', 'url(\"' + new URL('./src/brackets.sv
style.setProperty('--image-file-breakpoint-circle', 'url(\"' + new URL('./src/breakpoint-circle.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-breakpoint-crossed-filled', 'url(\"' + new URL('./src/breakpoint-crossed-filled.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-breakpoint-crossed', 'url(\"' + new URL('./src/breakpoint-crossed.svg', import.meta.url).toString() + '\")');
+style.setProperty('--image-file-brush-2', 'url(\"' + new URL('./src/brush-2.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-brush-filled', 'url(\"' + new URL('./src/brush-filled.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-brush', 'url(\"' + new URL('./src/brush.svg', import.meta.url).toString() + '\")');
style.setProperty('--image-file-bug', 'url(\"' + new URL('./src/bug.svg', import.meta.url).toString() + '\")');
diff --git a/public/Images/animation.svg b/public/Images/animation.svg
new file mode 100644
index 00000000..35537565
--- /dev/null
+++ b/public/Images/animation.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/Images/brush-2.svg b/public/Images/brush-2.svg
new file mode 100644
index 00000000..31d2f9c5
--- /dev/null
+++ b/public/Images/brush-2.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/Images/src/animation.svg b/public/Images/src/animation.svg
new file mode 100644
index 00000000..63924592
--- /dev/null
+++ b/public/Images/src/animation.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/Images/src/brush-2.svg b/public/Images/src/brush-2.svg
new file mode 100644
index 00000000..e2c6c98b
--- /dev/null
+++ b/public/Images/src/brush-2.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/core/common/SettingRegistration.d.ts b/public/core/common/SettingRegistration.d.ts
index e21b8bc8..57bc0b88 100644
--- a/public/core/common/SettingRegistration.d.ts
+++ b/public/core/common/SettingRegistration.d.ts
@@ -142,7 +142,7 @@ export interface SettingRegistration {
*/
export interface LearnMore {
tooltip: () => Platform.UIString.LocalizedString;
- url: Platform.DevToolsPath.UrlString;
+ url?: Platform.DevToolsPath.UrlString;
}
interface LocalizedSettingExtensionOption {
value: boolean | string;
diff --git a/public/core/common/SettingRegistration.js.map b/public/core/common/SettingRegistration.js.map
index 976afe7b..c1a62fcd 100644
--- a/public/core/common/SettingRegistration.js.map
+++ b/public/core/common/SettingRegistration.js.map
@@ -1 +1 @@
-{"version":3,"file":"SettingRegistration.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/SettingRegistration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE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AC;QACpC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;AACH,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 '../i18n/i18n.js';\nimport type * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport type {SettingStorageType} from './Settings.js';\n\nconst UIStrings = {\n /**\n *@description Title of the Elements Panel\n */\n elements: 'Elements',\n /**\n *@description Text for DevTools appearance\n */\n appearance: 'Appearance',\n /**\n *@description Name of the Sources panel\n */\n sources: 'Sources',\n /**\n *@description Title of the Network tool\n */\n network: 'Network',\n /**\n *@description Text for the performance of something\n */\n performance: 'Performance',\n /**\n *@description Title of the Console tool\n */\n console: 'Console',\n /**\n *@description A title of the 'Persistence' setting category\n */\n persistence: 'Persistence',\n /**\n *@description Text that refers to the debugger\n */\n debugger: 'Debugger',\n /**\n *@description Text describing global shortcuts and settings that are available throughout the DevTools\n */\n global: 'Global',\n /**\n *@description Title of the Rendering tool\n */\n rendering: 'Rendering',\n /**\n *@description Title of a section on CSS Grid tooling\n */\n grid: 'Grid',\n /**\n *@description Text for the mobile platform, as opposed to desktop\n */\n mobile: 'Mobile',\n /**\n *@description Text for the memory of the page\n */\n memory: 'Memory',\n /**\n *@description Text for the extension of the page\n */\n extension: 'Extension',\n /**\n *@description Text for the adorner of the page\n */\n adorner: 'Adorner',\n /**\n * @description Header for the \"Sync\" section in the settings UI. The \"Sync\"\n * section allows users to configure which DevTools data is synced via Chrome Sync.\n */\n sync: 'Sync',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/common/SettingRegistration.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet registeredSettings: Array = [];\nconst settingNameSet = new Set();\n\nexport function registerSettingExtension(registration: SettingRegistration): void {\n const settingName = registration.settingName;\n if (settingNameSet.has(settingName)) {\n throw new Error(`Duplicate setting name '${settingName}'`);\n }\n settingNameSet.add(settingName);\n registeredSettings.push(registration);\n}\n\nexport function getRegisteredSettings(config: Root.Runtime.HostConfig): Array {\n return registeredSettings.filter(\n setting => Root.Runtime.Runtime.isDescriptorEnabled(\n {experiment: setting.experiment, condition: setting.condition}, config));\n}\n\nexport function registerSettingsForTest(settings: Array, forceReset: boolean = false): void {\n if (registeredSettings.length === 0 || forceReset) {\n registeredSettings = settings;\n settingNameSet.clear();\n for (const setting of settings) {\n const settingName = setting.settingName;\n if (settingNameSet.has(settingName)) {\n throw new Error(`Duplicate setting name '${settingName}'`);\n }\n settingNameSet.add(settingName);\n }\n }\n}\n\nexport function resetSettings(): void {\n registeredSettings = [];\n settingNameSet.clear();\n}\n\nexport function maybeRemoveSettingExtension(settingName: string): boolean {\n const settingIndex = registeredSettings.findIndex(setting => setting.settingName === settingName);\n if (settingIndex < 0 || !settingNameSet.delete(settingName)) {\n return false;\n }\n registeredSettings.splice(settingIndex, 1);\n return true;\n}\n\nexport const enum SettingCategory {\n NONE = '', // `NONE` must be a falsy value. Legacy code uses if-checks for the category.\n ELEMENTS = 'ELEMENTS',\n APPEARANCE = 'APPEARANCE',\n SOURCES = 'SOURCES',\n NETWORK = 'NETWORK',\n PERFORMANCE = 'PERFORMANCE',\n CONSOLE = 'CONSOLE',\n PERSISTENCE = 'PERSISTENCE',\n DEBUGGER = 'DEBUGGER',\n GLOBAL = 'GLOBAL',\n RENDERING = 'RENDERING',\n GRID = 'GRID',\n MOBILE = 'MOBILE',\n EMULATION = 'EMULATION',\n MEMORY = 'MEMORY',\n EXTENSIONS = 'EXTENSIONS',\n ADORNER = 'ADORNER',\n SYNC = 'SYNC',\n}\n\nexport function getLocalizedSettingsCategory(category: SettingCategory): Platform.UIString.LocalizedString {\n switch (category) {\n case SettingCategory.ELEMENTS:\n return i18nString(UIStrings.elements);\n case SettingCategory.APPEARANCE:\n return i18nString(UIStrings.appearance);\n case SettingCategory.SOURCES:\n return i18nString(UIStrings.sources);\n case SettingCategory.NETWORK:\n return i18nString(UIStrings.network);\n case SettingCategory.PERFORMANCE:\n return i18nString(UIStrings.performance);\n case SettingCategory.CONSOLE:\n return i18nString(UIStrings.console);\n case SettingCategory.PERSISTENCE:\n return i18nString(UIStrings.persistence);\n case SettingCategory.DEBUGGER:\n return i18nString(UIStrings.debugger);\n case SettingCategory.GLOBAL:\n return i18nString(UIStrings.global);\n case SettingCategory.RENDERING:\n return i18nString(UIStrings.rendering);\n case SettingCategory.GRID:\n return i18nString(UIStrings.grid);\n case SettingCategory.MOBILE:\n return i18nString(UIStrings.mobile);\n case SettingCategory.EMULATION:\n return i18nString(UIStrings.console);\n case SettingCategory.MEMORY:\n return i18nString(UIStrings.memory);\n case SettingCategory.EXTENSIONS:\n return i18nString(UIStrings.extension);\n case SettingCategory.ADORNER:\n return i18nString(UIStrings.adorner);\n case SettingCategory.NONE:\n return i18n.i18n.lockedString('');\n case SettingCategory.SYNC:\n return i18nString(UIStrings.sync);\n }\n}\n\nexport const enum SettingType {\n ARRAY = 'array',\n REGEX = 'regex',\n ENUM = 'enum',\n BOOLEAN = 'boolean',\n}\n\nexport interface RegExpSettingItem {\n /**\n * A regular expression matched against URLs for ignore listing.\n */\n pattern: string;\n /**\n * If true, ignore this rule.\n */\n disabled?: boolean;\n /**\n * When a rule is disabled due to requesting through a script's context menu\n * that it no longer be ignore listed, this field is set to the URL of that\n * script, so that if the user requests through the same context menu to\n * enable ignore listing, the rule can be reenabled.\n */\n disabledForUrl?: Platform.DevToolsPath.UrlString;\n}\n\nexport interface SettingRegistration {\n /**\n * The category with which the setting is displayed in the UI.\n */\n category?: SettingCategory;\n /**\n * Used to sort on screen the settings that belong to the same category.\n */\n order?: number;\n /**\n * The title with which the setting is shown on screen.\n */\n title?: () => Platform.UIString.LocalizedString;\n /**\n * The identifier of the setting.\n */\n settingName: string;\n /**\n * Determines how the possible values of the setting are expressed.\n *\n * - If the setting can only be enabled and disabled use BOOLEAN\n * - If the setting has a list of possible values use ENUM\n * - If each setting value is a set of objects use ARRAY\n * - If the setting value is a regular expression use REGEX\n */\n settingType: SettingType;\n /**\n * The value set by default to the setting.\n */\n defaultValue: unknown;\n /**\n * Words used to find a setting in the Command Menu.\n */\n tags?: Array<() => Platform.UIString.LocalizedString>;\n /**\n * The possible values the setting can have, each with a description composed of a title and an optional text.\n */\n options?: Array;\n /**\n * Whether DevTools must be reloaded for a change in the setting to take effect.\n */\n reloadRequired?: boolean;\n /**\n * Determines if the setting value is stored in the global, local or session storage.\n */\n storageType?: SettingStorageType;\n /**\n * A condition that, when present in the queryParamsObject of Runtime, constraints the value\n * of the setting to be changed only if the user set it.\n */\n userActionCondition?: string;\n /**\n * The name of the experiment a setting is associated with. Enabling and disabling the declared\n * experiment will enable and disable the setting respectively.\n */\n experiment?: Root.Runtime.ExperimentName;\n /**\n * A condition is a function that will make the setting available if it\n * returns true, and not available, otherwise. Make sure that objects you\n * access from inside the condition function are ready at the time when the\n * setting conditions are checked.\n */\n condition?: Root.Runtime.Condition;\n\n /**\n * A function that returns true if the setting should be disabled, along with\n * the reason why.\n */\n disabledCondition?: (config?: Root.Runtime.HostConfig) => DisabledConditionResult;\n\n /**\n * If a setting is deprecated, define this notice to show an appropriate warning according to the `warning` property.\n * If `disabled` is set, the setting will be disabled in the settings UI. In that case, `experiment` optionally can be\n * set to link to an experiment (by experiment name). The information icon in the settings UI can then be clicked to\n * jump to the experiment. If a setting is not disabled, the experiment entry will be ignored.\n */\n deprecationNotice?: {disabled: boolean, warning: () => Platform.UIString.LocalizedString, experiment?: string};\n\n /**\n * Optional information to learn more about the setting. If provided, a `(?)` icon will show next to the setting\n * in the Settings panel with a link to learn more, and the `tooltip` will be presented to the user when hovering\n * the `(?)` icon.\n */\n learnMore?: LearnMore;\n}\n\n/**\n * Metadata to learn more about a setting. The `url` will be used to construct\n * a `(?)` icon link and the `tooltip` will be shown when hovering the icon.\n */\nexport interface LearnMore {\n tooltip: () => Platform.UIString.LocalizedString;\n url: Platform.DevToolsPath.UrlString;\n}\n\ninterface LocalizedSettingExtensionOption {\n value: boolean|string;\n title: () => Platform.UIString.LocalizedString;\n text?: () => Platform.UIString.LocalizedString;\n raw?: false;\n}\ninterface RawSettingExtensionOption {\n value: boolean|string;\n title: () => Platform.UIString.LocalizedString;\n /**\n * Text used to describe the option. Must be localized if 'raw' is false.\n */\n text?: string;\n raw: true;\n}\nexport type SettingExtensionOption = LocalizedSettingExtensionOption|RawSettingExtensionOption;\nexport type DisabledConditionResult = {\n disabled: true,\n reason: string,\n}|{disabled: false};\n"]}
\ No newline at end of file
+{"version":3,"file":"SettingRegistration.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/SettingRegistration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,UAAU,EAAE,YAAY;IACxB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;;OAGG;IACH,IAAI,EAAE,MAAM;CACb,CAAC;AACF,MAAM,IAAI,GAAG,IA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AAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QACpC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;AACH,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 '../i18n/i18n.js';\nimport type * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport type {SettingStorageType} from './Settings.js';\n\nconst UIStrings = {\n /**\n *@description Title of the Elements Panel\n */\n elements: 'Elements',\n /**\n *@description Text for DevTools appearance\n */\n appearance: 'Appearance',\n /**\n *@description Name of the Sources panel\n */\n sources: 'Sources',\n /**\n *@description Title of the Network tool\n */\n network: 'Network',\n /**\n *@description Text for the performance of something\n */\n performance: 'Performance',\n /**\n *@description Title of the Console tool\n */\n console: 'Console',\n /**\n *@description A title of the 'Persistence' setting category\n */\n persistence: 'Persistence',\n /**\n *@description Text that refers to the debugger\n */\n debugger: 'Debugger',\n /**\n *@description Text describing global shortcuts and settings that are available throughout the DevTools\n */\n global: 'Global',\n /**\n *@description Title of the Rendering tool\n */\n rendering: 'Rendering',\n /**\n *@description Title of a section on CSS Grid tooling\n */\n grid: 'Grid',\n /**\n *@description Text for the mobile platform, as opposed to desktop\n */\n mobile: 'Mobile',\n /**\n *@description Text for the memory of the page\n */\n memory: 'Memory',\n /**\n *@description Text for the extension of the page\n */\n extension: 'Extension',\n /**\n *@description Text for the adorner of the page\n */\n adorner: 'Adorner',\n /**\n * @description Header for the \"Sync\" section in the settings UI. The \"Sync\"\n * section allows users to configure which DevTools data is synced via Chrome Sync.\n */\n sync: 'Sync',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/common/SettingRegistration.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet registeredSettings: Array = [];\nconst settingNameSet = new Set();\n\nexport function registerSettingExtension(registration: SettingRegistration): void {\n const settingName = registration.settingName;\n if (settingNameSet.has(settingName)) {\n throw new Error(`Duplicate setting name '${settingName}'`);\n }\n settingNameSet.add(settingName);\n registeredSettings.push(registration);\n}\n\nexport function getRegisteredSettings(config: Root.Runtime.HostConfig): Array {\n return registeredSettings.filter(\n setting => Root.Runtime.Runtime.isDescriptorEnabled(\n {experiment: setting.experiment, condition: setting.condition}, config));\n}\n\nexport function registerSettingsForTest(settings: Array, forceReset: boolean = false): void {\n if (registeredSettings.length === 0 || forceReset) {\n registeredSettings = settings;\n settingNameSet.clear();\n for (const setting of settings) {\n const settingName = setting.settingName;\n if (settingNameSet.has(settingName)) {\n throw new Error(`Duplicate setting name '${settingName}'`);\n }\n settingNameSet.add(settingName);\n }\n }\n}\n\nexport function resetSettings(): void {\n registeredSettings = [];\n settingNameSet.clear();\n}\n\nexport function maybeRemoveSettingExtension(settingName: string): boolean {\n const settingIndex = registeredSettings.findIndex(setting => setting.settingName === settingName);\n if (settingIndex < 0 || !settingNameSet.delete(settingName)) {\n return false;\n }\n registeredSettings.splice(settingIndex, 1);\n return true;\n}\n\nexport const enum SettingCategory {\n NONE = '', // `NONE` must be a falsy value. Legacy code uses if-checks for the category.\n ELEMENTS = 'ELEMENTS',\n APPEARANCE = 'APPEARANCE',\n SOURCES = 'SOURCES',\n NETWORK = 'NETWORK',\n PERFORMANCE = 'PERFORMANCE',\n CONSOLE = 'CONSOLE',\n PERSISTENCE = 'PERSISTENCE',\n DEBUGGER = 'DEBUGGER',\n GLOBAL = 'GLOBAL',\n RENDERING = 'RENDERING',\n GRID = 'GRID',\n MOBILE = 'MOBILE',\n EMULATION = 'EMULATION',\n MEMORY = 'MEMORY',\n EXTENSIONS = 'EXTENSIONS',\n ADORNER = 'ADORNER',\n SYNC = 'SYNC',\n}\n\nexport function getLocalizedSettingsCategory(category: SettingCategory): Platform.UIString.LocalizedString {\n switch (category) {\n case SettingCategory.ELEMENTS:\n return i18nString(UIStrings.elements);\n case SettingCategory.APPEARANCE:\n return i18nString(UIStrings.appearance);\n case SettingCategory.SOURCES:\n return i18nString(UIStrings.sources);\n case SettingCategory.NETWORK:\n return i18nString(UIStrings.network);\n case SettingCategory.PERFORMANCE:\n return i18nString(UIStrings.performance);\n case SettingCategory.CONSOLE:\n return i18nString(UIStrings.console);\n case SettingCategory.PERSISTENCE:\n return i18nString(UIStrings.persistence);\n case SettingCategory.DEBUGGER:\n return i18nString(UIStrings.debugger);\n case SettingCategory.GLOBAL:\n return i18nString(UIStrings.global);\n case SettingCategory.RENDERING:\n return i18nString(UIStrings.rendering);\n case SettingCategory.GRID:\n return i18nString(UIStrings.grid);\n case SettingCategory.MOBILE:\n return i18nString(UIStrings.mobile);\n case SettingCategory.EMULATION:\n return i18nString(UIStrings.console);\n case SettingCategory.MEMORY:\n return i18nString(UIStrings.memory);\n case SettingCategory.EXTENSIONS:\n return i18nString(UIStrings.extension);\n case SettingCategory.ADORNER:\n return i18nString(UIStrings.adorner);\n case SettingCategory.NONE:\n return i18n.i18n.lockedString('');\n case SettingCategory.SYNC:\n return i18nString(UIStrings.sync);\n }\n}\n\nexport const enum SettingType {\n ARRAY = 'array',\n REGEX = 'regex',\n ENUM = 'enum',\n BOOLEAN = 'boolean',\n}\n\nexport interface RegExpSettingItem {\n /**\n * A regular expression matched against URLs for ignore listing.\n */\n pattern: string;\n /**\n * If true, ignore this rule.\n */\n disabled?: boolean;\n /**\n * When a rule is disabled due to requesting through a script's context menu\n * that it no longer be ignore listed, this field is set to the URL of that\n * script, so that if the user requests through the same context menu to\n * enable ignore listing, the rule can be reenabled.\n */\n disabledForUrl?: Platform.DevToolsPath.UrlString;\n}\n\nexport interface SettingRegistration {\n /**\n * The category with which the setting is displayed in the UI.\n */\n category?: SettingCategory;\n /**\n * Used to sort on screen the settings that belong to the same category.\n */\n order?: number;\n /**\n * The title with which the setting is shown on screen.\n */\n title?: () => Platform.UIString.LocalizedString;\n /**\n * The identifier of the setting.\n */\n settingName: string;\n /**\n * Determines how the possible values of the setting are expressed.\n *\n * - If the setting can only be enabled and disabled use BOOLEAN\n * - If the setting has a list of possible values use ENUM\n * - If each setting value is a set of objects use ARRAY\n * - If the setting value is a regular expression use REGEX\n */\n settingType: SettingType;\n /**\n * The value set by default to the setting.\n */\n defaultValue: unknown;\n /**\n * Words used to find a setting in the Command Menu.\n */\n tags?: Array<() => Platform.UIString.LocalizedString>;\n /**\n * The possible values the setting can have, each with a description composed of a title and an optional text.\n */\n options?: Array;\n /**\n * Whether DevTools must be reloaded for a change in the setting to take effect.\n */\n reloadRequired?: boolean;\n /**\n * Determines if the setting value is stored in the global, local or session storage.\n */\n storageType?: SettingStorageType;\n /**\n * A condition that, when present in the queryParamsObject of Runtime, constraints the value\n * of the setting to be changed only if the user set it.\n */\n userActionCondition?: string;\n /**\n * The name of the experiment a setting is associated with. Enabling and disabling the declared\n * experiment will enable and disable the setting respectively.\n */\n experiment?: Root.Runtime.ExperimentName;\n /**\n * A condition is a function that will make the setting available if it\n * returns true, and not available, otherwise. Make sure that objects you\n * access from inside the condition function are ready at the time when the\n * setting conditions are checked.\n */\n condition?: Root.Runtime.Condition;\n\n /**\n * A function that returns true if the setting should be disabled, along with\n * the reason why.\n */\n disabledCondition?: (config?: Root.Runtime.HostConfig) => DisabledConditionResult;\n\n /**\n * If a setting is deprecated, define this notice to show an appropriate warning according to the `warning` property.\n * If `disabled` is set, the setting will be disabled in the settings UI. In that case, `experiment` optionally can be\n * set to link to an experiment (by experiment name). The information icon in the settings UI can then be clicked to\n * jump to the experiment. If a setting is not disabled, the experiment entry will be ignored.\n */\n deprecationNotice?: {disabled: boolean, warning: () => Platform.UIString.LocalizedString, experiment?: string};\n\n /**\n * Optional information to learn more about the setting. If provided, a `(?)` icon will show next to the setting\n * in the Settings panel with a link to learn more, and the `tooltip` will be presented to the user when hovering\n * the `(?)` icon.\n */\n learnMore?: LearnMore;\n}\n\n/**\n * Metadata to learn more about a setting. The `url` will be used to construct\n * a `(?)` icon link and the `tooltip` will be shown when hovering the icon.\n */\nexport interface LearnMore {\n tooltip: () => Platform.UIString.LocalizedString;\n url?: Platform.DevToolsPath.UrlString;\n}\n\ninterface LocalizedSettingExtensionOption {\n value: boolean|string;\n title: () => Platform.UIString.LocalizedString;\n text?: () => Platform.UIString.LocalizedString;\n raw?: false;\n}\ninterface RawSettingExtensionOption {\n value: boolean|string;\n title: () => Platform.UIString.LocalizedString;\n /**\n * Text used to describe the option. Must be localized if 'raw' is false.\n */\n text?: string;\n raw: true;\n}\nexport type SettingExtensionOption = LocalizedSettingExtensionOption|RawSettingExtensionOption;\nexport type DisabledConditionResult = {\n disabled: true,\n reason: string,\n}|{disabled: false};\n"]}
\ No newline at end of file
diff --git a/public/core/host/AidaClient.d.ts b/public/core/host/AidaClient.d.ts
index 6799dda2..968c9742 100644
--- a/public/core/host/AidaClient.d.ts
+++ b/public/core/host/AidaClient.d.ts
@@ -6,6 +6,7 @@ export declare enum Entity {
SYSTEM = 2
}
export declare const enum Rating {
+ SENTIMENT_UNSPECIFIED = "SENTIMENT_UNSPECIFIED",
POSITIVE = "POSITIVE",
NEGATIVE = "NEGATIVE"
}
diff --git a/public/core/host/AidaClient.js.map b/public/core/host/AidaClient.js.map
index 95fcb3a1..d8829b0d 100644
--- a/public/core/host/AidaClient.js.map
+++ b/public/core/host/AidaClient.js.map
@@ -1 +1 @@
-{"version":3,"file":"AidaClient.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/AidaClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AAEzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,yCAAW,CAAA;IACX,mCAAQ,CAAA;IACR,uCAAU,CAAA;AACZ,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB;AAYD,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,kCAAkC;IAClC,6GAAkC,CAAA;IAClC,wCAAwC;IACxC,yDAAQ,CAAA;IACR,mCAAmC;IACnC,2EAAiB,CAAA;AACnB,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED,MAAM,CAAN,IAAY,aAaX;AAbD,WAAY,aAAa;IACvB,8BAA8B;IAC9B,6FAA8B,CAAA;IAC9B,mCAAmC;IACnC,uFAA2B,CAAA;IAC3B,qBAAqB;IACrB,2EAAqB,CAAA;IACrB,gCAAgC;IAChC,iGAAgC,CAAA;IAChC,oCAAoC;IACpC,yGAAoC,CAAA;IACpC,6BAA6B;IAC7B,2FAA6B,CAAA;AAC/B,CAAC,EAbW,aAAa,KAAb,aAAa,QAaxB;AAED,MAAM,CAAN,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,yBAAyB;IACzB,yEAAyB,CAAA;IACzB,kCAAkC;IAClC,6CAAW,CAAA;IACX,gCAAgC;IAChC,uCAAQ,CAAA;IACR,+BAA+B;IAC/B,2CAAU,CAAA;AACZ,CAAC,EATW,QAAQ,KAAR,QAAQ,QASnB;AA6CD,MAAM,CAAN,IAAY,gBAMX;A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AC;QAClE,CAAC;IACH,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 '../common/common.js';\nimport type * as Root from '../root/root.js';\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport type {AidaClientResult, SyncInformation} from './InspectorFrontendHostAPI.js';\nimport {bindOutputStream} from './ResourceLoader.js';\n\nexport enum Entity {\n UNKNOWN = 0,\n USER = 1,\n SYSTEM = 2,\n}\n\nexport const enum Rating {\n POSITIVE = 'POSITIVE',\n NEGATIVE = 'NEGATIVE',\n}\n\nexport interface Chunk {\n text: string;\n entity: Entity;\n}\n\nexport enum FunctionalityType {\n // Unspecified functionality type.\n FUNCTIONALITY_TYPE_UNSPECIFIED = 0,\n // The generic AI chatbot functionality.\n CHAT = 1,\n // The explain error functionality.\n EXPLAIN_ERROR = 2,\n}\n\nexport enum ClientFeature {\n // Unspecified client feature.\n CLIENT_FEATURE_UNSPECIFIED = 0,\n // Chrome console insights feature.\n CHROME_CONSOLE_INSIGHTS = 1,\n // Chrome freestyler.\n CHROME_FREESTYLER = 2,\n // Chrome DrJones Network Agent.\n CHROME_DRJONES_NETWORK_AGENT = 7,\n // Chrome DrJones Performance Agent.\n CHROME_DRJONES_PERFORMANCE_AGENT = 8,\n // Chrome DrJones File Agent.\n CHROME_DRJONES_FILE_AGENT = 9,\n}\n\nexport enum UserTier {\n // Unspecified user tier.\n USER_TIER_UNSPECIFIED = 0,\n // Users who are internal testers.\n TESTERS = 1,\n // Users who are early adopters.\n BETA = 2,\n // Users in the general public.\n PUBLIC = 3,\n}\n\nexport interface AidaRequest {\n input: string;\n preamble?: string;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n chat_history?: Chunk[];\n client: string;\n options?: {\n temperature?: Number,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n model_id?: string,\n };\n metadata?: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n disable_user_content_logging: boolean,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n string_session_id?: string,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_tier?: UserTier,\n };\n // eslint-disable-next-line @typescript-eslint/naming-convention\n functionality_type?: FunctionalityType;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n client_feature?: ClientFeature;\n}\n\nexport interface AidaDoConversationClientEvent {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n corresponding_aida_rpc_global_id: number;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n disable_user_content_logging: boolean;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n do_conversation_client_event: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_feedback: {\n sentiment?: Rating,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_input?: {\n comment?: string,\n },\n },\n };\n}\n\nexport enum RecitationAction {\n ACTION_UNSPECIFIED = 'ACTION_UNSPECIFIED',\n CITE = 'CITE',\n BLOCK = 'BLOCK',\n NO_ACTION = 'NO_ACTION',\n EXEMPT_FOUND_IN_PROMPT = 'EXEMPT_FOUND_IN_PROMPT',\n}\n\nexport interface Citation {\n startIndex: number;\n endIndex: number;\n url: string;\n}\n\nexport interface AttributionMetadata {\n attributionAction: RecitationAction;\n citations: Citation[];\n}\n\nexport interface AidaResponseMetadata {\n rpcGlobalId?: number;\n attributionMetadata?: AttributionMetadata[];\n}\n\nexport interface AidaResponse {\n explanation: string;\n metadata: AidaResponseMetadata;\n completed: boolean;\n}\n\nexport const enum AidaAccessPreconditions {\n AVAILABLE = 'available',\n NO_ACCOUNT_EMAIL = 'no-account-email',\n NO_INTERNET = 'no-internet',\n // This is the state (mostly enterprise) users are in, when they are automatically logged out from\n // Chrome after a certain time period. For making AIDA requests, they need to log in again.\n SYNC_IS_PAUSED = 'sync-is-paused',\n}\n\nexport const CLIENT_NAME = 'CHROME_DEVTOOLS';\n\nconst CODE_CHUNK_SEPARATOR = '\\n`````\\n';\n\nexport class AidaAbortError extends Error {}\n\nexport class AidaClient {\n static buildConsoleInsightsRequest(input: string): AidaRequest {\n const request: AidaRequest = {\n input,\n client: CLIENT_NAME,\n functionality_type: FunctionalityType.EXPLAIN_ERROR,\n client_feature: ClientFeature.CHROME_CONSOLE_INSIGHTS,\n };\n const config = Common.Settings.Settings.instance().getHostConfig();\n let temperature = -1;\n let modelId = '';\n if (config.devToolsConsoleInsights?.enabled) {\n temperature = config.devToolsConsoleInsights.temperature ?? -1;\n modelId = config.devToolsConsoleInsights.modelId || '';\n }\n const disallowLogging = config.aidaAvailability?.disallowLogging ?? true;\n\n if (temperature >= 0) {\n request.options ??= {};\n request.options.temperature = temperature;\n }\n if (modelId) {\n request.options ??= {};\n request.options.model_id = modelId;\n }\n if (disallowLogging) {\n request.metadata = {\n disable_user_content_logging: true,\n };\n }\n return request;\n }\n\n static async checkAccessPreconditions(): Promise {\n if (!navigator.onLine) {\n return AidaAccessPreconditions.NO_INTERNET;\n }\n\n const syncInfo = await new Promise(\n resolve => InspectorFrontendHostInstance.getSyncInformation(syncInfo => resolve(syncInfo)));\n if (!syncInfo.accountEmail) {\n return AidaAccessPreconditions.NO_ACCOUNT_EMAIL;\n }\n\n if (syncInfo.isSyncPaused) {\n return AidaAccessPreconditions.SYNC_IS_PAUSED;\n }\n\n return AidaAccessPreconditions.AVAILABLE;\n }\n\n async * fetch(request: AidaRequest, options?: {signal?: AbortSignal}): AsyncGenerator {\n if (!InspectorFrontendHostInstance.doAidaConversation) {\n throw new Error('doAidaConversation is not available');\n }\n const stream = (() => {\n let {promise, resolve, reject} = Promise.withResolvers();\n options?.signal?.addEventListener('abort', () => {\n reject(new AidaAbortError());\n });\n return {\n write: async(data: string): Promise => {\n resolve(data);\n ({promise, resolve, reject} = Promise.withResolvers());\n },\n close: async(): Promise => {\n resolve(null);\n },\n read: (): Promise => {\n return promise;\n },\n fail: (e: Error) => reject(e),\n };\n })();\n const streamId = bindOutputStream(stream);\n InspectorFrontendHostInstance.doAidaConversation(JSON.stringify(request), streamId, result => {\n if (result.statusCode === 403) {\n stream.fail(new Error('Server responded: permission denied'));\n } else if (result.error) {\n stream.fail(new Error(`Cannot send request: ${result.error} ${result.detail || ''}`));\n } else if (result.statusCode !== 200) {\n stream.fail(new Error(`Request failed: ${JSON.stringify(result)}`));\n } else {\n void stream.close();\n }\n });\n let chunk;\n const text = [];\n let inCodeChunk = false;\n const metadata: AidaResponseMetadata = {rpcGlobalId: 0};\n while ((chunk = await stream.read())) {\n let textUpdated = false;\n // The AIDA response is a JSON array of objects, split at the object\n // boundary. Therefore each chunk may start with `[` or `,` and possibly\n // followed by `]`. Each chunk may include one or more objects, so we\n // make sure that each chunk becomes a well-formed JSON array when we\n // parse it by adding `[` and `]` and removing `,` where appropriate.\n if (!chunk.length) {\n continue;\n }\n if (chunk.startsWith(',')) {\n chunk = chunk.slice(1);\n }\n if (!chunk.startsWith('[')) {\n chunk = '[' + chunk;\n }\n if (!chunk.endsWith(']')) {\n chunk = chunk + ']';\n }\n let results;\n try {\n results = JSON.parse(chunk);\n } catch (error) {\n throw new Error('Cannot parse chunk: ' + chunk, {cause: error});\n }\n\n for (const result of results) {\n if ('metadata' in result) {\n metadata.rpcGlobalId = result.metadata.rpcGlobalId;\n if ('attributionMetadata' in result.metadata) {\n if (!metadata.attributionMetadata) {\n metadata.attributionMetadata = [];\n }\n metadata.attributionMetadata.push(result.metadata.attributionMetadata);\n }\n }\n if ('textChunk' in result) {\n if (inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = false;\n }\n text.push(result.textChunk.text);\n textUpdated = true;\n } else if ('codeChunk' in result) {\n if (!inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = true;\n }\n text.push(result.codeChunk.code);\n textUpdated = true;\n } else if ('error' in result) {\n throw new Error(`Server responded: ${JSON.stringify(result)}`);\n } else {\n throw new Error('Unknown chunk result');\n }\n }\n if (textUpdated) {\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata,\n completed: false,\n };\n }\n }\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata,\n completed: true,\n };\n }\n\n registerClientEvent(clientEvent: AidaDoConversationClientEvent): Promise {\n const {promise, resolve} = Promise.withResolvers();\n InspectorFrontendHostInstance.registerAidaClientEvent(\n JSON.stringify({\n client: CLIENT_NAME,\n event_time: new Date().toISOString(),\n ...clientEvent,\n }),\n resolve,\n );\n\n return promise;\n }\n}\n\nexport function convertToUserTierEnum(userTier: string|undefined): UserTier {\n if (userTier) {\n switch (userTier) {\n case 'TESTERS':\n return UserTier.TESTERS;\n case 'BETA':\n return UserTier.BETA;\n case 'PUBLIC':\n return UserTier.PUBLIC;\n }\n }\n return UserTier.BETA;\n}\n\nlet hostConfigTrackerInstance: HostConfigTracker|undefined;\n\nexport class HostConfigTracker extends Common.ObjectWrapper.ObjectWrapper {\n #pollTimer?: number;\n #aidaAvailability?: AidaAccessPreconditions;\n\n private constructor() {\n super();\n }\n\n static instance(): HostConfigTracker {\n if (!hostConfigTrackerInstance) {\n hostConfigTrackerInstance = new HostConfigTracker();\n }\n return hostConfigTrackerInstance;\n }\n\n override addEventListener(eventType: Events, listener: Common.EventTarget.EventListener):\n Common.EventTarget.EventDescriptor {\n const isFirst = !this.hasEventListeners(eventType);\n const eventDescriptor = super.addEventListener(eventType, listener);\n if (isFirst) {\n window.clearTimeout(this.#pollTimer);\n void this.pollAidaAvailability();\n }\n return eventDescriptor;\n }\n\n override removeEventListener(eventType: Events, listener: Common.EventTarget.EventListener):\n void {\n super.removeEventListener(eventType, listener);\n if (!this.hasEventListeners(eventType)) {\n window.clearTimeout(this.#pollTimer);\n }\n }\n\n private async pollAidaAvailability(): Promise {\n this.#pollTimer = window.setTimeout(() => this.pollAidaAvailability(), 2000);\n const currentAidaAvailability = await AidaClient.checkAccessPreconditions();\n if (currentAidaAvailability !== this.#aidaAvailability) {\n this.#aidaAvailability = currentAidaAvailability;\n const config = await new Promise(\n resolve => InspectorFrontendHostInstance.getHostConfig(config => resolve(config)));\n Common.Settings.Settings.instance().setHostConfig(config);\n this.dispatchEventToListeners(Events.AIDA_AVAILABILITY_CHANGED);\n }\n }\n}\n\nexport const enum Events {\n AIDA_AVAILABILITY_CHANGED = 'aidaAvailabilityChanged',\n}\n\nexport type EventTypes = {\n [Events.AIDA_AVAILABILITY_CHANGED]: void,\n};\n"]}
\ No newline at end of file
+{"version":3,"file":"AidaClient.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/AidaClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AAEzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,yCAAW,CAAA;IACX,mCAAQ,CAAA;IACR,uCAAU,CAAA;AACZ,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB;AAaD,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,kCAAkC;IAClC,6GAAkC,CAAA;IAClC,wCAAwC;IACxC,yDAAQ,CAAA;IACR,mCAAmC;IACnC,2EAAiB,CAAA;AACnB,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED,MAAM,CAAN,IAAY,aAaX;AAbD,WAAY,aAAa;IACvB,8BAA8B;IAC9B,6FAA8B,CAAA;IAC9B,mCAAmC;IACnC,uFAA2B,CAAA;IAC3B,qBAAqB;IACrB,2EAAqB,CAAA;IACrB,gCAAgC;IAChC,iGAAgC,CAAA;IAChC,oCAAoC;IACpC,yGAAoC,CAAA;IACpC,6BAA6B;IAC7B,2FAA6B,CAAA;AAC/B,CAAC,EAbW,aAAa,KAAb,aAAa,QAa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OAAO,CAC5B,OAAO,CAAC,EAAE,CAAC,6BAA6B,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvF,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC1D,IAAI,CAAC,wBAAwB,kEAAkC,CAAC;QAClE,CAAC;IACH,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 '../common/common.js';\nimport type * as Root from '../root/root.js';\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport type {AidaClientResult, SyncInformation} from './InspectorFrontendHostAPI.js';\nimport {bindOutputStream} from './ResourceLoader.js';\n\nexport enum Entity {\n UNKNOWN = 0,\n USER = 1,\n SYSTEM = 2,\n}\n\nexport const enum Rating {\n SENTIMENT_UNSPECIFIED = 'SENTIMENT_UNSPECIFIED',\n POSITIVE = 'POSITIVE',\n NEGATIVE = 'NEGATIVE',\n}\n\nexport interface Chunk {\n text: string;\n entity: Entity;\n}\n\nexport enum FunctionalityType {\n // Unspecified functionality type.\n FUNCTIONALITY_TYPE_UNSPECIFIED = 0,\n // The generic AI chatbot functionality.\n CHAT = 1,\n // The explain error functionality.\n EXPLAIN_ERROR = 2,\n}\n\nexport enum ClientFeature {\n // Unspecified client feature.\n CLIENT_FEATURE_UNSPECIFIED = 0,\n // Chrome console insights feature.\n CHROME_CONSOLE_INSIGHTS = 1,\n // Chrome freestyler.\n CHROME_FREESTYLER = 2,\n // Chrome DrJones Network Agent.\n CHROME_DRJONES_NETWORK_AGENT = 7,\n // Chrome DrJones Performance Agent.\n CHROME_DRJONES_PERFORMANCE_AGENT = 8,\n // Chrome DrJones File Agent.\n CHROME_DRJONES_FILE_AGENT = 9,\n}\n\nexport enum UserTier {\n // Unspecified user tier.\n USER_TIER_UNSPECIFIED = 0,\n // Users who are internal testers.\n TESTERS = 1,\n // Users who are early adopters.\n BETA = 2,\n // Users in the general public.\n PUBLIC = 3,\n}\n\nexport interface AidaRequest {\n input: string;\n preamble?: string;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n chat_history?: Chunk[];\n client: string;\n options?: {\n temperature?: Number,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n model_id?: string,\n };\n metadata?: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n disable_user_content_logging: boolean,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n string_session_id?: string,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_tier?: UserTier,\n };\n // eslint-disable-next-line @typescript-eslint/naming-convention\n functionality_type?: FunctionalityType;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n client_feature?: ClientFeature;\n}\n\nexport interface AidaDoConversationClientEvent {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n corresponding_aida_rpc_global_id: number;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n disable_user_content_logging: boolean;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n do_conversation_client_event: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_feedback: {\n sentiment?: Rating,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_input?: {\n comment?: string,\n },\n },\n };\n}\n\nexport enum RecitationAction {\n ACTION_UNSPECIFIED = 'ACTION_UNSPECIFIED',\n CITE = 'CITE',\n BLOCK = 'BLOCK',\n NO_ACTION = 'NO_ACTION',\n EXEMPT_FOUND_IN_PROMPT = 'EXEMPT_FOUND_IN_PROMPT',\n}\n\nexport interface Citation {\n startIndex: number;\n endIndex: number;\n url: string;\n}\n\nexport interface AttributionMetadata {\n attributionAction: RecitationAction;\n citations: Citation[];\n}\n\nexport interface AidaResponseMetadata {\n rpcGlobalId?: number;\n attributionMetadata?: AttributionMetadata[];\n}\n\nexport interface AidaResponse {\n explanation: string;\n metadata: AidaResponseMetadata;\n completed: boolean;\n}\n\nexport const enum AidaAccessPreconditions {\n AVAILABLE = 'available',\n NO_ACCOUNT_EMAIL = 'no-account-email',\n NO_INTERNET = 'no-internet',\n // This is the state (mostly enterprise) users are in, when they are automatically logged out from\n // Chrome after a certain time period. For making AIDA requests, they need to log in again.\n SYNC_IS_PAUSED = 'sync-is-paused',\n}\n\nexport const CLIENT_NAME = 'CHROME_DEVTOOLS';\n\nconst CODE_CHUNK_SEPARATOR = '\\n`````\\n';\n\nexport class AidaAbortError extends Error {}\n\nexport class AidaClient {\n static buildConsoleInsightsRequest(input: string): AidaRequest {\n const request: AidaRequest = {\n input,\n client: CLIENT_NAME,\n functionality_type: FunctionalityType.EXPLAIN_ERROR,\n client_feature: ClientFeature.CHROME_CONSOLE_INSIGHTS,\n };\n const config = Common.Settings.Settings.instance().getHostConfig();\n let temperature = -1;\n let modelId = '';\n if (config.devToolsConsoleInsights?.enabled) {\n temperature = config.devToolsConsoleInsights.temperature ?? -1;\n modelId = config.devToolsConsoleInsights.modelId || '';\n }\n const disallowLogging = config.aidaAvailability?.disallowLogging ?? true;\n\n if (temperature >= 0) {\n request.options ??= {};\n request.options.temperature = temperature;\n }\n if (modelId) {\n request.options ??= {};\n request.options.model_id = modelId;\n }\n if (disallowLogging) {\n request.metadata = {\n disable_user_content_logging: true,\n };\n }\n return request;\n }\n\n static async checkAccessPreconditions(): Promise {\n if (!navigator.onLine) {\n return AidaAccessPreconditions.NO_INTERNET;\n }\n\n const syncInfo = await new Promise(\n resolve => InspectorFrontendHostInstance.getSyncInformation(syncInfo => resolve(syncInfo)));\n if (!syncInfo.accountEmail) {\n return AidaAccessPreconditions.NO_ACCOUNT_EMAIL;\n }\n\n if (syncInfo.isSyncPaused) {\n return AidaAccessPreconditions.SYNC_IS_PAUSED;\n }\n\n return AidaAccessPreconditions.AVAILABLE;\n }\n\n async * fetch(request: AidaRequest, options?: {signal?: AbortSignal}): AsyncGenerator {\n if (!InspectorFrontendHostInstance.doAidaConversation) {\n throw new Error('doAidaConversation is not available');\n }\n const stream = (() => {\n let {promise, resolve, reject} = Promise.withResolvers();\n options?.signal?.addEventListener('abort', () => {\n reject(new AidaAbortError());\n });\n return {\n write: async(data: string): Promise => {\n resolve(data);\n ({promise, resolve, reject} = Promise.withResolvers());\n },\n close: async(): Promise => {\n resolve(null);\n },\n read: (): Promise => {\n return promise;\n },\n fail: (e: Error) => reject(e),\n };\n })();\n const streamId = bindOutputStream(stream);\n InspectorFrontendHostInstance.doAidaConversation(JSON.stringify(request), streamId, result => {\n if (result.statusCode === 403) {\n stream.fail(new Error('Server responded: permission denied'));\n } else if (result.error) {\n stream.fail(new Error(`Cannot send request: ${result.error} ${result.detail || ''}`));\n } else if (result.statusCode !== 200) {\n stream.fail(new Error(`Request failed: ${JSON.stringify(result)}`));\n } else {\n void stream.close();\n }\n });\n let chunk;\n const text = [];\n let inCodeChunk = false;\n const metadata: AidaResponseMetadata = {rpcGlobalId: 0};\n while ((chunk = await stream.read())) {\n let textUpdated = false;\n // The AIDA response is a JSON array of objects, split at the object\n // boundary. Therefore each chunk may start with `[` or `,` and possibly\n // followed by `]`. Each chunk may include one or more objects, so we\n // make sure that each chunk becomes a well-formed JSON array when we\n // parse it by adding `[` and `]` and removing `,` where appropriate.\n if (!chunk.length) {\n continue;\n }\n if (chunk.startsWith(',')) {\n chunk = chunk.slice(1);\n }\n if (!chunk.startsWith('[')) {\n chunk = '[' + chunk;\n }\n if (!chunk.endsWith(']')) {\n chunk = chunk + ']';\n }\n let results;\n try {\n results = JSON.parse(chunk);\n } catch (error) {\n throw new Error('Cannot parse chunk: ' + chunk, {cause: error});\n }\n\n for (const result of results) {\n if ('metadata' in result) {\n metadata.rpcGlobalId = result.metadata.rpcGlobalId;\n if ('attributionMetadata' in result.metadata) {\n if (!metadata.attributionMetadata) {\n metadata.attributionMetadata = [];\n }\n metadata.attributionMetadata.push(result.metadata.attributionMetadata);\n }\n }\n if ('textChunk' in result) {\n if (inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = false;\n }\n text.push(result.textChunk.text);\n textUpdated = true;\n } else if ('codeChunk' in result) {\n if (!inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = true;\n }\n text.push(result.codeChunk.code);\n textUpdated = true;\n } else if ('error' in result) {\n throw new Error(`Server responded: ${JSON.stringify(result)}`);\n } else {\n throw new Error('Unknown chunk result');\n }\n }\n if (textUpdated) {\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata,\n completed: false,\n };\n }\n }\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata,\n completed: true,\n };\n }\n\n registerClientEvent(clientEvent: AidaDoConversationClientEvent): Promise {\n const {promise, resolve} = Promise.withResolvers();\n InspectorFrontendHostInstance.registerAidaClientEvent(\n JSON.stringify({\n client: CLIENT_NAME,\n event_time: new Date().toISOString(),\n ...clientEvent,\n }),\n resolve,\n );\n\n return promise;\n }\n}\n\nexport function convertToUserTierEnum(userTier: string|undefined): UserTier {\n if (userTier) {\n switch (userTier) {\n case 'TESTERS':\n return UserTier.TESTERS;\n case 'BETA':\n return UserTier.BETA;\n case 'PUBLIC':\n return UserTier.PUBLIC;\n }\n }\n return UserTier.BETA;\n}\n\nlet hostConfigTrackerInstance: HostConfigTracker|undefined;\n\nexport class HostConfigTracker extends Common.ObjectWrapper.ObjectWrapper {\n #pollTimer?: number;\n #aidaAvailability?: AidaAccessPreconditions;\n\n private constructor() {\n super();\n }\n\n static instance(): HostConfigTracker {\n if (!hostConfigTrackerInstance) {\n hostConfigTrackerInstance = new HostConfigTracker();\n }\n return hostConfigTrackerInstance;\n }\n\n override addEventListener(eventType: Events, listener: Common.EventTarget.EventListener):\n Common.EventTarget.EventDescriptor {\n const isFirst = !this.hasEventListeners(eventType);\n const eventDescriptor = super.addEventListener(eventType, listener);\n if (isFirst) {\n window.clearTimeout(this.#pollTimer);\n void this.pollAidaAvailability();\n }\n return eventDescriptor;\n }\n\n override removeEventListener(eventType: Events, listener: Common.EventTarget.EventListener):\n void {\n super.removeEventListener(eventType, listener);\n if (!this.hasEventListeners(eventType)) {\n window.clearTimeout(this.#pollTimer);\n }\n }\n\n private async pollAidaAvailability(): Promise {\n this.#pollTimer = window.setTimeout(() => this.pollAidaAvailability(), 2000);\n const currentAidaAvailability = await AidaClient.checkAccessPreconditions();\n if (currentAidaAvailability !== this.#aidaAvailability) {\n this.#aidaAvailability = currentAidaAvailability;\n const config = await new Promise(\n resolve => InspectorFrontendHostInstance.getHostConfig(config => resolve(config)));\n Common.Settings.Settings.instance().setHostConfig(config);\n this.dispatchEventToListeners(Events.AIDA_AVAILABILITY_CHANGED);\n }\n }\n}\n\nexport const enum Events {\n AIDA_AVAILABILITY_CHANGED = 'aidaAvailabilityChanged',\n}\n\nexport type EventTypes = {\n [Events.AIDA_AVAILABILITY_CHANGED]: void,\n};\n"]}
\ No newline at end of file
diff --git a/public/core/host/InspectorFrontendHost.js b/public/core/host/InspectorFrontendHost.js
index f0a696b5..fc6f4da4 100644
--- a/public/core/host/InspectorFrontendHost.js
+++ b/public/core/host/InspectorFrontendHost.js
@@ -334,6 +334,10 @@ export class InspectorFrontendHostStub {
devToolsPrivacyUI: {
enabled: false,
},
+ devToolsEnableOriginBoundCookies: {
+ portBindingEnabled: false,
+ schemeBindingEnabled: false,
+ },
isOffTheRecord: false,
};
if ('hostConfigForTesting' in globalThis) {
diff --git a/public/core/host/InspectorFrontendHost.js.map b/public/core/host/InspectorFrontendHost.js.map
index 53ae45b7..5e6c8b3d 100644
--- a/public/core/host/InspectorFrontendHost.js.map
+++ b/public/core/host/InspectorFrontendHost.js.map
@@ -1 +1 @@
-{"version":3,"file":"InspectorFrontendHost.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/InspectorFrontendHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,oEAAoE;AACp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0D;gBAC1D,IAAI,OAAO,IAAI,KAAK,UAAU,IAAI,6BAA6B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACtE,SAAS;gBACX,CAAC;gBAED,OAAO,CAAC,KAAK,CAAC,4DAA4D,IAAI,kCAAkC,CAAC,CAAC;gBAClH,0DAA0D;gBAC1D,6BAA6B,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YAC7C,CAAC;QACH,CAAC;QAED,4BAA4B;QAC5B,6BAA6B,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;IAClF,CAAC;IAED,+GAA+G;IAC/G,wDAAwD;IACxD,+BAA+B,EAAE,CAAC;IAClC,0DAA0D;IAC1D,UAAU,CAAC,oBAAoB,GAAG,IAAI,wBAAwB,EAAE,CAAC;AACjE,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,UAAU,WAAW,CAAC,KAE3B;IACC,6CAA6C;IAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,+BAA+B;IAC/B,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC;IACzC,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE;QACzC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;AACpF,CAAC","sourcesContent":["/*\n * Copyright (C) 2009 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\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport * as Common from '../common/common.js';\nimport * as i18n from '../i18n/i18n.js';\nimport * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport {\n type AidaClientResult,\n type CanShowSurveyResult,\n type ChangeEvent,\n type ClickEvent,\n type ContextMenuDescriptor,\n type DoAidaConversationResult,\n type DragEvent,\n type EnumeratedHistogram,\n EventDescriptors,\n Events,\n type EventTypes,\n type ExtensionDescriptor,\n type HoverEvent,\n type ImpressionEvent,\n type InspectorFrontendHostAPI,\n type KeyDownEvent,\n type LoadNetworkResourceResult,\n type ResizeEvent,\n type ShowSurveyResult,\n type SyncInformation,\n} from './InspectorFrontendHostAPI.js';\nimport {streamWrite as resourceLoaderStreamWrite} from './ResourceLoader.js';\n\ninterface DecompressionStream extends GenericTransformStream {\n readonly format: string;\n}\ndeclare const DecompressionStream: {\n prototype: DecompressionStream,\n new (format: string): DecompressionStream,\n};\n\nconst UIStrings = {\n /**\n *@description Document title in Inspector Frontend Host of the DevTools window\n *@example {example.com} PH1\n */\n devtoolsS: 'DevTools - {PH1}',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/host/InspectorFrontendHost.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst MAX_RECORDED_HISTOGRAMS_SIZE = 100;\nconst OVERRIDES_FILE_SYSTEM_PATH = '/overrides' as Platform.DevToolsPath.RawPathString;\n\n/**\n * The InspectorFrontendHostStub is a stub interface used the frontend is loaded like a webpage. Examples:\n * - devtools://devtools/bundled/devtools_app.html\n * - https://chrome-devtools-frontend.appspot.com/serve_rev/@030cc140435b0152645522b9864b75cac6c0a854/worker_app.html\n * - http://localhost:9222/devtools/inspector.html?ws=localhost:9222/devtools/page/xTARGET_IDx\n *\n * When the frontend runs within the native embedder, then the InspectorFrontendHostAPI methods are provided\n * by devtools_compatibility.js. Those leverage `DevToolsAPI.sendMessageToEmbedder()` which match up with\n * the embedder API defined here: https://source.chromium.org/search?q=f:devtools%20f:dispatcher%20f:cc%20symbol:CreateForDevToolsFrontend&sq=&ss=chromium%2Fchromium%2Fsrc\n * The native implementations live in devtools_ui_bindings.cc: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/devtools_ui_bindings.cc\n */\nexport class InspectorFrontendHostStub implements InspectorFrontendHostAPI {\n readonly #urlsBeingSaved: Map;\n events!: Common.EventTarget.EventTarget;\n #fileSystem: FileSystem|null = null;\n\n recordedCountHistograms:\n {histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number}[] = [];\n recordedEnumeratedHistograms: {actionName: EnumeratedHistogram, actionCode: number}[] = [];\n recordedPerformanceHistograms: {histogramName: string, duration: number}[] = [];\n\n constructor() {\n this.#urlsBeingSaved = new Map();\n\n // Guard against errors should this file ever be imported at the top level\n // within a worker - in which case this constructor is run. If there's no\n // document, we can early exit.\n if (typeof document === 'undefined') {\n return;\n }\n\n function stopEventPropagation(this: InspectorFrontendHostAPI, event: KeyboardEvent): void {\n // Let browser handle Ctrl+/Ctrl- shortcuts in hosted mode.\n const zoomModifier = this.platform() === 'mac' ? event.metaKey : event.ctrlKey;\n if (zoomModifier && (event.key === '+' || event.key === '-')) {\n event.stopPropagation();\n }\n }\n\n document.addEventListener('keydown', event => {\n stopEventPropagation.call(this, (event as KeyboardEvent));\n }, true);\n }\n\n platform(): string {\n const userAgent = navigator.userAgent;\n if (userAgent.includes('Windows NT')) {\n return 'windows';\n }\n if (userAgent.includes('Mac OS X')) {\n return 'mac';\n }\n return 'linux';\n }\n\n loadCompleted(): void {\n }\n\n bringToFront(): void {\n }\n\n closeWindow(): void {\n }\n\n setIsDocked(isDocked: boolean, callback: () => void): void {\n window.setTimeout(callback, 0);\n }\n\n showSurvey(trigger: string, callback: (arg0: ShowSurveyResult) => void): void {\n window.setTimeout(() => callback({surveyShown: false}), 0);\n }\n\n canShowSurvey(trigger: string, callback: (arg0: CanShowSurveyResult) => void): void {\n window.setTimeout(() => callback({canShowSurvey: false}), 0);\n }\n\n /**\n * Requests inspected page to be placed atop of the inspector frontend with specified bounds.\n */\n setInspectedPageBounds(bounds: {\n x: number,\n y: number,\n width: number,\n height: number,\n }): void {\n }\n\n inspectElementCompleted(): void {\n }\n\n setInjectedScriptForOrigin(origin: string, script: string): void {\n }\n\n inspectedURLChanged(url: Platform.DevToolsPath.UrlString): void {\n document.title = i18nString(UIStrings.devtoolsS, {PH1: url.replace(/^https?:\\/\\//, '')});\n }\n\n copyText(text: string|null|undefined): void {\n if (text === undefined || text === null) {\n return;\n }\n void navigator.clipboard.writeText(text);\n }\n\n openInNewTab(url: Platform.DevToolsPath.UrlString): void {\n window.open(url, '_blank');\n }\n\n openSearchResultsInNewTab(query: string): void {\n Common.Console.Console.instance().error(\n 'Search is not enabled in hosted mode. Please inspect using chrome://inspect');\n }\n\n showItemInFolder(fileSystemPath: Platform.DevToolsPath.RawPathString): void {\n Common.Console.Console.instance().error(\n 'Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect');\n }\n\n save(\n url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, content: string, forceSaveAs: boolean,\n isBase64: boolean): void {\n let buffer = this.#urlsBeingSaved.get(url);\n if (!buffer) {\n buffer = [];\n this.#urlsBeingSaved.set(url, buffer);\n }\n buffer.push(content);\n this.events.dispatchEventToListeners(Events.SavedURL, {url, fileSystemPath: url});\n }\n\n append(url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, content: string): void {\n const buffer = this.#urlsBeingSaved.get(url);\n if (buffer) {\n buffer.push(content);\n this.events.dispatchEventToListeners(Events.AppendedToURL, url);\n }\n }\n\n close(url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString): void {\n const buffer = this.#urlsBeingSaved.get(url) || [];\n this.#urlsBeingSaved.delete(url);\n let fileName = '';\n\n if (url) {\n try {\n const trimmed = Platform.StringUtilities.trimURL(url);\n fileName = Platform.StringUtilities.removeURLFragment(trimmed);\n } catch (error) {\n // If url is not a valid URL, it is probably a filename.\n fileName = url;\n }\n }\n\n const link = document.createElement('a');\n link.download = fileName;\n const blob = new Blob([buffer.join('')], {type: 'text/plain'});\n const blobUrl = URL.createObjectURL(blob);\n link.href = blobUrl;\n link.click();\n URL.revokeObjectURL(blobUrl);\n }\n\n sendMessageToBackend(message: string): void {\n }\n\n recordCountHistogram(histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number):\n void {\n if (this.recordedCountHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedCountHistograms.shift();\n }\n this.recordedCountHistograms.push({histogramName, sample, min, exclusiveMax, bucketSize});\n }\n\n recordEnumeratedHistogram(actionName: EnumeratedHistogram, actionCode: number, bucketSize: number): void {\n if (this.recordedEnumeratedHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedEnumeratedHistograms.shift();\n }\n this.recordedEnumeratedHistograms.push({actionName, actionCode});\n }\n\n recordPerformanceHistogram(histogramName: string, duration: number): void {\n if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedPerformanceHistograms.shift();\n }\n this.recordedPerformanceHistograms.push({histogramName, duration});\n }\n\n recordUserMetricsAction(umaName: string): void {\n }\n\n requestFileSystems(): void {\n this.events.dispatchEventToListeners(Events.FileSystemsLoaded, []);\n }\n\n addFileSystem(type?: string): void {\n const onFileSystem = (fs: FileSystem): void => {\n this.#fileSystem = fs;\n const fileSystem = {\n fileSystemName: 'sandboxedRequestedFileSystem',\n fileSystemPath: OVERRIDES_FILE_SYSTEM_PATH,\n rootURL: 'filesystem:devtools://devtools/isolated/',\n type: 'overrides',\n };\n this.events.dispatchEventToListeners(Events.FileSystemAdded, {fileSystem});\n };\n window.webkitRequestFileSystem(window.TEMPORARY, 1024 * 1024, onFileSystem);\n }\n\n removeFileSystem(fileSystemPath: Platform.DevToolsPath.RawPathString): void {\n const removalCallback = (entries: Entry[]): void => {\n entries.forEach(entry => {\n if (entry.isDirectory) {\n (entry as DirectoryEntry).removeRecursively(() => {});\n } else if (entry.isFile) {\n entry.remove(() => {});\n }\n });\n };\n\n if (this.#fileSystem) {\n this.#fileSystem.root.createReader().readEntries(removalCallback);\n }\n\n this.#fileSystem = null;\n this.events.dispatchEventToListeners(Events.FileSystemRemoved, OVERRIDES_FILE_SYSTEM_PATH);\n }\n\n isolatedFileSystem(fileSystemId: string, registeredName: string): FileSystem|null {\n return this.#fileSystem;\n }\n\n loadNetworkResource(\n url: string, headers: string, streamId: number, callback: (arg0: LoadNetworkResourceResult) => void): void {\n // Read the first 3 bytes looking for the gzip signature in the file header\n function isGzip(ab: ArrayBuffer): boolean {\n const buf = new Uint8Array(ab);\n if (!buf || buf.length < 3) {\n return false;\n }\n\n // https://www.rfc-editor.org/rfc/rfc1952#page-6\n return buf[0] === 0x1F && buf[1] === 0x8B && buf[2] === 0x08;\n }\n fetch(url)\n .then(async result => {\n const resultArrayBuf = await result.arrayBuffer();\n let decoded: ReadableStream|ArrayBuffer = resultArrayBuf;\n if (isGzip(resultArrayBuf)) {\n const ds = new DecompressionStream('gzip');\n const writer = ds.writable.getWriter();\n void writer.write(resultArrayBuf);\n void writer.close();\n decoded = ds.readable;\n }\n const text = await new Response(decoded).text();\n return text;\n })\n .then(function(text) {\n resourceLoaderStreamWrite(streamId, text);\n callback({\n statusCode: 200,\n headers: undefined,\n messageOverride: undefined,\n netError: undefined,\n netErrorName: undefined,\n urlValid: undefined,\n });\n })\n .catch(function() {\n callback({\n statusCode: 404,\n headers: undefined,\n messageOverride: undefined,\n netError: undefined,\n netErrorName: undefined,\n urlValid: undefined,\n });\n });\n }\n\n registerPreference(name: string, options: {synced?: boolean}): void {\n }\n\n getPreferences(callback: (arg0: {\n [x: string]: string,\n }) => void): void {\n const prefs: {\n [x: string]: string,\n } = {};\n for (const name in window.localStorage) {\n prefs[name] = window.localStorage[name];\n }\n callback(prefs);\n }\n\n getPreference(name: string, callback: (arg0: string) => void): void {\n callback(window.localStorage[name]);\n }\n\n setPreference(name: string, value: string): void {\n window.localStorage[name] = value;\n }\n\n removePreference(name: string): void {\n delete window.localStorage[name];\n }\n\n clearPreferences(): void {\n window.localStorage.clear();\n }\n\n getSyncInformation(callback: (arg0: SyncInformation) => void): void {\n if ('getSyncInformationForTesting' in globalThis) {\n // @ts-ignore for testing\n return callback(globalThis.getSyncInformationForTesting());\n }\n callback({\n isSyncActive: false,\n arePreferencesSynced: false,\n });\n }\n\n getHostConfig(callback: (arg0: Root.Runtime.HostConfig) => void): void {\n const result: Root.Runtime.HostConfig = {\n aidaAvailability: {\n enabled: true,\n blockedByAge: false,\n blockedByEnterprisePolicy: false,\n blockedByGeo: false,\n disallowLogging: true,\n },\n devToolsConsoleInsights: {\n modelId: '',\n temperature: -1,\n enabled: false,\n },\n devToolsFreestyler: {\n modelId: '',\n temperature: -1,\n enabled: false,\n },\n devToolsVeLogging: {\n enabled: true,\n testing: false,\n },\n devToolsPrivacyUI: {\n enabled: false,\n },\n isOffTheRecord: false,\n };\n if ('hostConfigForTesting' in globalThis) {\n const {hostConfigForTesting} = (globalThis as unknown as {hostConfigForTesting: Root.Runtime.HostConfig});\n for (const key of Object.keys(hostConfigForTesting)) {\n const mergeEntry = (key: K): void => {\n if (typeof result[key] === 'object' && typeof hostConfigForTesting[key] === 'object') {\n // If the config is an object, merge the settings, but preferring\n // the hostConfigForTesting values over the result values.\n result[key] = {...result[key], ...hostConfigForTesting[key]};\n } else {\n // Override with the testing config if the value is present + not null/undefined.\n result[key] = hostConfigForTesting[key] ?? result[key];\n }\n };\n mergeEntry(key as keyof Root.Runtime.HostConfig);\n }\n }\n callback(result);\n }\n\n upgradeDraggedFileSystemPermissions(fileSystem: FileSystem): void {\n }\n\n indexPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, excludedFolders: string): void {\n }\n\n stopIndexing(requestId: number): void {\n }\n\n searchInPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, query: string): void {\n }\n\n zoomFactor(): number {\n return 1;\n }\n\n zoomIn(): void {\n }\n\n zoomOut(): void {\n }\n\n resetZoom(): void {\n }\n\n setWhitelistedShortcuts(shortcuts: string): void {\n }\n\n setEyeDropperActive(active: boolean): void {\n }\n\n showCertificateViewer(certChain: string[]): void {\n }\n\n reattach(callback: () => void): void {\n }\n\n readyForTest(): void {\n }\n\n connectionReady(): void {\n }\n\n setOpenNewWindowForPopups(value: boolean): void {\n }\n\n setDevicesDiscoveryConfig(config: Adb.Config): void {\n }\n\n setDevicesUpdatesEnabled(enabled: boolean): void {\n }\n\n performActionOnRemotePage(pageId: string, action: string): void {\n }\n\n openRemotePage(browserId: string, url: string): void {\n }\n\n openNodeFrontend(): void {\n }\n\n showContextMenuAtPoint(x: number, y: number, items: ContextMenuDescriptor[], document: Document): void {\n throw 'Soft context menu should be used';\n }\n\n isHostedMode(): boolean {\n return true;\n }\n\n setAddExtensionCallback(callback: (arg0: ExtensionDescriptor) => void): void {\n // Extensions are not supported in hosted mode.\n }\n\n async initialTargetId(): Promise {\n return null;\n }\n\n doAidaConversation(request: string, streamId: number, callback: (result: DoAidaConversationResult) => void): void {\n callback({\n error: 'Not implemented',\n });\n }\n\n registerAidaClientEvent(request: string, callback: (result: AidaClientResult) => void): void {\n callback({\n error: 'Not implemented',\n });\n }\n\n recordImpression(event: ImpressionEvent): void {\n }\n recordResize(event: ResizeEvent): void {\n }\n recordClick(event: ClickEvent): void {\n }\n recordHover(event: HoverEvent): void {\n }\n recordDrag(event: DragEvent): void {\n }\n recordChange(event: ChangeEvent): void {\n }\n recordKeyDown(event: KeyDownEvent): void {\n }\n}\n\n// @ts-ignore Global injected by devtools-compatibility.js\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport let InspectorFrontendHostInstance: InspectorFrontendHostStub = globalThis.InspectorFrontendHost;\n\nclass InspectorFrontendAPIImpl {\n constructor() {\n for (const descriptor of EventDescriptors) {\n // @ts-ignore Dispatcher magic\n this[descriptor[1]] = this.dispatch.bind(this, descriptor[0], descriptor[2], descriptor[3]);\n }\n }\n\n private dispatch(name: symbol, signature: string[], runOnceLoaded: boolean, ...params: string[]): void {\n // Single argument methods get dispatched with the param.\n if (signature.length < 2) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n InspectorFrontendHostInstance.events.dispatchEventToListeners(name, params[0]);\n } catch (error) {\n console.error(error + ' ' + error.stack);\n }\n return;\n }\n const data: {\n [x: string]: string,\n } = {};\n for (let i = 0; i < signature.length; ++i) {\n data[signature[i]] = params[i];\n }\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n InspectorFrontendHostInstance.events.dispatchEventToListeners(name, data);\n } catch (error) {\n console.error(error + ' ' + error.stack);\n }\n }\n\n streamWrite(id: number, chunk: string): void {\n resourceLoaderStreamWrite(id, chunk);\n }\n}\n\n(function(): void {\n\nfunction initializeInspectorFrontendHost(): void {\n let proto;\n if (!InspectorFrontendHostInstance) {\n // Instantiate stub for web-hosted mode if necessary.\n // @ts-ignore Global injected by devtools-compatibility.js\n globalThis.InspectorFrontendHost = InspectorFrontendHostInstance = new InspectorFrontendHostStub();\n } else {\n // Otherwise add stubs for missing methods that are declared in the interface.\n proto = InspectorFrontendHostStub.prototype;\n for (const name of Object.getOwnPropertyNames(proto)) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // @ts-expect-error\n const stub = proto[name];\n // @ts-ignore Global injected by devtools-compatibility.js\n if (typeof stub !== 'function' || InspectorFrontendHostInstance[name]) {\n continue;\n }\n\n console.error(`Incompatible embedder: method Host.InspectorFrontendHost.${name} is missing. Using stub instead.`);\n // @ts-ignore Global injected by devtools-compatibility.js\n InspectorFrontendHostInstance[name] = stub;\n }\n }\n\n // Attach the events object.\n InspectorFrontendHostInstance.events = new Common.ObjectWrapper.ObjectWrapper();\n}\n\n// FIXME: This file is included into both apps, since the devtools_app needs the InspectorFrontendHostAPI only,\n// so the host instance should not be initialized there.\ninitializeInspectorFrontendHost();\n// @ts-ignore Global injected by devtools-compatibility.js\nglobalThis.InspectorFrontendAPI = new InspectorFrontendAPIImpl();\n})();\n\nexport function isUnderTest(prefs?: {\n [x: string]: string,\n}): boolean {\n // Integration tests rely on test queryParam.\n if (Root.Runtime.Runtime.queryParam('test')) {\n return true;\n }\n // Browser tests rely on prefs.\n if (prefs) {\n return prefs['isUnderTest'] === 'true';\n }\n return Common.Settings.Settings.hasInstance() &&\n Common.Settings.Settings.instance().createSetting('isUnderTest', false).get();\n}\n"]}
\ No newline at end of file
+{"version":3,"file":"InspectorFrontendHost.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/InspectorFrontendHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;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CAAC,KAAK,CAAC,EAAE,CAAC;gBACrD,oEAAoE;gBACpE,mBAAmB;gBACnB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;gBACzB,0DAA0D;gBAC1D,IAAI,OAAO,IAAI,KAAK,UAAU,IAAI,6BAA6B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACtE,SAAS;gBACX,CAAC;gBAED,OAAO,CAAC,KAAK,CAAC,4DAA4D,IAAI,kCAAkC,CAAC,CAAC;gBAClH,0DAA0D;gBAC1D,6BAA6B,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YAC7C,CAAC;QACH,CAAC;QAED,4BAA4B;QAC5B,6BAA6B,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;IAClF,CAAC;IAED,+GAA+G;IAC/G,wDAAwD;IACxD,+BAA+B,EAAE,CAAC;IAClC,0DAA0D;IAC1D,UAAU,CAAC,oBAAoB,GAAG,IAAI,wBAAwB,EAAE,CAAC;AACjE,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,UAAU,WAAW,CAAC,KAE3B;IACC,6CAA6C;IAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,+BAA+B;IAC/B,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC;IACzC,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE;QACzC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;AACpF,CAAC","sourcesContent":["/*\n * Copyright (C) 2009 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\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport * as Common from '../common/common.js';\nimport * as i18n from '../i18n/i18n.js';\nimport * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport {\n type AidaClientResult,\n type CanShowSurveyResult,\n type ChangeEvent,\n type ClickEvent,\n type ContextMenuDescriptor,\n type DoAidaConversationResult,\n type DragEvent,\n type EnumeratedHistogram,\n EventDescriptors,\n Events,\n type EventTypes,\n type ExtensionDescriptor,\n type HoverEvent,\n type ImpressionEvent,\n type InspectorFrontendHostAPI,\n type KeyDownEvent,\n type LoadNetworkResourceResult,\n type ResizeEvent,\n type ShowSurveyResult,\n type SyncInformation,\n} from './InspectorFrontendHostAPI.js';\nimport {streamWrite as resourceLoaderStreamWrite} from './ResourceLoader.js';\n\ninterface DecompressionStream extends GenericTransformStream {\n readonly format: string;\n}\ndeclare const DecompressionStream: {\n prototype: DecompressionStream,\n new (format: string): DecompressionStream,\n};\n\nconst UIStrings = {\n /**\n *@description Document title in Inspector Frontend Host of the DevTools window\n *@example {example.com} PH1\n */\n devtoolsS: 'DevTools - {PH1}',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/host/InspectorFrontendHost.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst MAX_RECORDED_HISTOGRAMS_SIZE = 100;\nconst OVERRIDES_FILE_SYSTEM_PATH = '/overrides' as Platform.DevToolsPath.RawPathString;\n\n/**\n * The InspectorFrontendHostStub is a stub interface used the frontend is loaded like a webpage. Examples:\n * - devtools://devtools/bundled/devtools_app.html\n * - https://chrome-devtools-frontend.appspot.com/serve_rev/@030cc140435b0152645522b9864b75cac6c0a854/worker_app.html\n * - http://localhost:9222/devtools/inspector.html?ws=localhost:9222/devtools/page/xTARGET_IDx\n *\n * When the frontend runs within the native embedder, then the InspectorFrontendHostAPI methods are provided\n * by devtools_compatibility.js. Those leverage `DevToolsAPI.sendMessageToEmbedder()` which match up with\n * the embedder API defined here: https://source.chromium.org/search?q=f:devtools%20f:dispatcher%20f:cc%20symbol:CreateForDevToolsFrontend&sq=&ss=chromium%2Fchromium%2Fsrc\n * The native implementations live in devtools_ui_bindings.cc: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/devtools_ui_bindings.cc\n */\nexport class InspectorFrontendHostStub implements InspectorFrontendHostAPI {\n readonly #urlsBeingSaved: Map;\n events!: Common.EventTarget.EventTarget;\n #fileSystem: FileSystem|null = null;\n\n recordedCountHistograms:\n {histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number}[] = [];\n recordedEnumeratedHistograms: {actionName: EnumeratedHistogram, actionCode: number}[] = [];\n recordedPerformanceHistograms: {histogramName: string, duration: number}[] = [];\n\n constructor() {\n this.#urlsBeingSaved = new Map();\n\n // Guard against errors should this file ever be imported at the top level\n // within a worker - in which case this constructor is run. If there's no\n // document, we can early exit.\n if (typeof document === 'undefined') {\n return;\n }\n\n function stopEventPropagation(this: InspectorFrontendHostAPI, event: KeyboardEvent): void {\n // Let browser handle Ctrl+/Ctrl- shortcuts in hosted mode.\n const zoomModifier = this.platform() === 'mac' ? event.metaKey : event.ctrlKey;\n if (zoomModifier && (event.key === '+' || event.key === '-')) {\n event.stopPropagation();\n }\n }\n\n document.addEventListener('keydown', event => {\n stopEventPropagation.call(this, (event as KeyboardEvent));\n }, true);\n }\n\n platform(): string {\n const userAgent = navigator.userAgent;\n if (userAgent.includes('Windows NT')) {\n return 'windows';\n }\n if (userAgent.includes('Mac OS X')) {\n return 'mac';\n }\n return 'linux';\n }\n\n loadCompleted(): void {\n }\n\n bringToFront(): void {\n }\n\n closeWindow(): void {\n }\n\n setIsDocked(isDocked: boolean, callback: () => void): void {\n window.setTimeout(callback, 0);\n }\n\n showSurvey(trigger: string, callback: (arg0: ShowSurveyResult) => void): void {\n window.setTimeout(() => callback({surveyShown: false}), 0);\n }\n\n canShowSurvey(trigger: string, callback: (arg0: CanShowSurveyResult) => void): void {\n window.setTimeout(() => callback({canShowSurvey: false}), 0);\n }\n\n /**\n * Requests inspected page to be placed atop of the inspector frontend with specified bounds.\n */\n setInspectedPageBounds(bounds: {\n x: number,\n y: number,\n width: number,\n height: number,\n }): void {\n }\n\n inspectElementCompleted(): void {\n }\n\n setInjectedScriptForOrigin(origin: string, script: string): void {\n }\n\n inspectedURLChanged(url: Platform.DevToolsPath.UrlString): void {\n document.title = i18nString(UIStrings.devtoolsS, {PH1: url.replace(/^https?:\\/\\//, '')});\n }\n\n copyText(text: string|null|undefined): void {\n if (text === undefined || text === null) {\n return;\n }\n void navigator.clipboard.writeText(text);\n }\n\n openInNewTab(url: Platform.DevToolsPath.UrlString): void {\n window.open(url, '_blank');\n }\n\n openSearchResultsInNewTab(query: string): void {\n Common.Console.Console.instance().error(\n 'Search is not enabled in hosted mode. Please inspect using chrome://inspect');\n }\n\n showItemInFolder(fileSystemPath: Platform.DevToolsPath.RawPathString): void {\n Common.Console.Console.instance().error(\n 'Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect');\n }\n\n save(\n url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, content: string, forceSaveAs: boolean,\n isBase64: boolean): void {\n let buffer = this.#urlsBeingSaved.get(url);\n if (!buffer) {\n buffer = [];\n this.#urlsBeingSaved.set(url, buffer);\n }\n buffer.push(content);\n this.events.dispatchEventToListeners(Events.SavedURL, {url, fileSystemPath: url});\n }\n\n append(url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, content: string): void {\n const buffer = this.#urlsBeingSaved.get(url);\n if (buffer) {\n buffer.push(content);\n this.events.dispatchEventToListeners(Events.AppendedToURL, url);\n }\n }\n\n close(url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString): void {\n const buffer = this.#urlsBeingSaved.get(url) || [];\n this.#urlsBeingSaved.delete(url);\n let fileName = '';\n\n if (url) {\n try {\n const trimmed = Platform.StringUtilities.trimURL(url);\n fileName = Platform.StringUtilities.removeURLFragment(trimmed);\n } catch (error) {\n // If url is not a valid URL, it is probably a filename.\n fileName = url;\n }\n }\n\n const link = document.createElement('a');\n link.download = fileName;\n const blob = new Blob([buffer.join('')], {type: 'text/plain'});\n const blobUrl = URL.createObjectURL(blob);\n link.href = blobUrl;\n link.click();\n URL.revokeObjectURL(blobUrl);\n }\n\n sendMessageToBackend(message: string): void {\n }\n\n recordCountHistogram(histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number):\n void {\n if (this.recordedCountHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedCountHistograms.shift();\n }\n this.recordedCountHistograms.push({histogramName, sample, min, exclusiveMax, bucketSize});\n }\n\n recordEnumeratedHistogram(actionName: EnumeratedHistogram, actionCode: number, bucketSize: number): void {\n if (this.recordedEnumeratedHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedEnumeratedHistograms.shift();\n }\n this.recordedEnumeratedHistograms.push({actionName, actionCode});\n }\n\n recordPerformanceHistogram(histogramName: string, duration: number): void {\n if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedPerformanceHistograms.shift();\n }\n this.recordedPerformanceHistograms.push({histogramName, duration});\n }\n\n recordUserMetricsAction(umaName: string): void {\n }\n\n requestFileSystems(): void {\n this.events.dispatchEventToListeners(Events.FileSystemsLoaded, []);\n }\n\n addFileSystem(type?: string): void {\n const onFileSystem = (fs: FileSystem): void => {\n this.#fileSystem = fs;\n const fileSystem = {\n fileSystemName: 'sandboxedRequestedFileSystem',\n fileSystemPath: OVERRIDES_FILE_SYSTEM_PATH,\n rootURL: 'filesystem:devtools://devtools/isolated/',\n type: 'overrides',\n };\n this.events.dispatchEventToListeners(Events.FileSystemAdded, {fileSystem});\n };\n window.webkitRequestFileSystem(window.TEMPORARY, 1024 * 1024, onFileSystem);\n }\n\n removeFileSystem(fileSystemPath: Platform.DevToolsPath.RawPathString): void {\n const removalCallback = (entries: Entry[]): void => {\n entries.forEach(entry => {\n if (entry.isDirectory) {\n (entry as DirectoryEntry).removeRecursively(() => {});\n } else if (entry.isFile) {\n entry.remove(() => {});\n }\n });\n };\n\n if (this.#fileSystem) {\n this.#fileSystem.root.createReader().readEntries(removalCallback);\n }\n\n this.#fileSystem = null;\n this.events.dispatchEventToListeners(Events.FileSystemRemoved, OVERRIDES_FILE_SYSTEM_PATH);\n }\n\n isolatedFileSystem(fileSystemId: string, registeredName: string): FileSystem|null {\n return this.#fileSystem;\n }\n\n loadNetworkResource(\n url: string, headers: string, streamId: number, callback: (arg0: LoadNetworkResourceResult) => void): void {\n // Read the first 3 bytes looking for the gzip signature in the file header\n function isGzip(ab: ArrayBuffer): boolean {\n const buf = new Uint8Array(ab);\n if (!buf || buf.length < 3) {\n return false;\n }\n\n // https://www.rfc-editor.org/rfc/rfc1952#page-6\n return buf[0] === 0x1F && buf[1] === 0x8B && buf[2] === 0x08;\n }\n fetch(url)\n .then(async result => {\n const resultArrayBuf = await result.arrayBuffer();\n let decoded: ReadableStream|ArrayBuffer = resultArrayBuf;\n if (isGzip(resultArrayBuf)) {\n const ds = new DecompressionStream('gzip');\n const writer = ds.writable.getWriter();\n void writer.write(resultArrayBuf);\n void writer.close();\n decoded = ds.readable;\n }\n const text = await new Response(decoded).text();\n return text;\n })\n .then(function(text) {\n resourceLoaderStreamWrite(streamId, text);\n callback({\n statusCode: 200,\n headers: undefined,\n messageOverride: undefined,\n netError: undefined,\n netErrorName: undefined,\n urlValid: undefined,\n });\n })\n .catch(function() {\n callback({\n statusCode: 404,\n headers: undefined,\n messageOverride: undefined,\n netError: undefined,\n netErrorName: undefined,\n urlValid: undefined,\n });\n });\n }\n\n registerPreference(name: string, options: {synced?: boolean}): void {\n }\n\n getPreferences(callback: (arg0: {\n [x: string]: string,\n }) => void): void {\n const prefs: {\n [x: string]: string,\n } = {};\n for (const name in window.localStorage) {\n prefs[name] = window.localStorage[name];\n }\n callback(prefs);\n }\n\n getPreference(name: string, callback: (arg0: string) => void): void {\n callback(window.localStorage[name]);\n }\n\n setPreference(name: string, value: string): void {\n window.localStorage[name] = value;\n }\n\n removePreference(name: string): void {\n delete window.localStorage[name];\n }\n\n clearPreferences(): void {\n window.localStorage.clear();\n }\n\n getSyncInformation(callback: (arg0: SyncInformation) => void): void {\n if ('getSyncInformationForTesting' in globalThis) {\n // @ts-ignore for testing\n return callback(globalThis.getSyncInformationForTesting());\n }\n callback({\n isSyncActive: false,\n arePreferencesSynced: false,\n });\n }\n\n getHostConfig(callback: (arg0: Root.Runtime.HostConfig) => void): void {\n const result: Root.Runtime.HostConfig = {\n aidaAvailability: {\n enabled: true,\n blockedByAge: false,\n blockedByEnterprisePolicy: false,\n blockedByGeo: false,\n disallowLogging: true,\n },\n devToolsConsoleInsights: {\n modelId: '',\n temperature: -1,\n enabled: false,\n },\n devToolsFreestyler: {\n modelId: '',\n temperature: -1,\n enabled: false,\n },\n devToolsVeLogging: {\n enabled: true,\n testing: false,\n },\n devToolsPrivacyUI: {\n enabled: false,\n },\n devToolsEnableOriginBoundCookies: {\n portBindingEnabled: false,\n schemeBindingEnabled: false,\n },\n isOffTheRecord: false,\n };\n if ('hostConfigForTesting' in globalThis) {\n const {hostConfigForTesting} = (globalThis as unknown as {hostConfigForTesting: Root.Runtime.HostConfig});\n for (const key of Object.keys(hostConfigForTesting)) {\n const mergeEntry = (key: K): void => {\n if (typeof result[key] === 'object' && typeof hostConfigForTesting[key] === 'object') {\n // If the config is an object, merge the settings, but preferring\n // the hostConfigForTesting values over the result values.\n result[key] = {...result[key], ...hostConfigForTesting[key]};\n } else {\n // Override with the testing config if the value is present + not null/undefined.\n result[key] = hostConfigForTesting[key] ?? result[key];\n }\n };\n mergeEntry(key as keyof Root.Runtime.HostConfig);\n }\n }\n callback(result);\n }\n\n upgradeDraggedFileSystemPermissions(fileSystem: FileSystem): void {\n }\n\n indexPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, excludedFolders: string): void {\n }\n\n stopIndexing(requestId: number): void {\n }\n\n searchInPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, query: string): void {\n }\n\n zoomFactor(): number {\n return 1;\n }\n\n zoomIn(): void {\n }\n\n zoomOut(): void {\n }\n\n resetZoom(): void {\n }\n\n setWhitelistedShortcuts(shortcuts: string): void {\n }\n\n setEyeDropperActive(active: boolean): void {\n }\n\n showCertificateViewer(certChain: string[]): void {\n }\n\n reattach(callback: () => void): void {\n }\n\n readyForTest(): void {\n }\n\n connectionReady(): void {\n }\n\n setOpenNewWindowForPopups(value: boolean): void {\n }\n\n setDevicesDiscoveryConfig(config: Adb.Config): void {\n }\n\n setDevicesUpdatesEnabled(enabled: boolean): void {\n }\n\n performActionOnRemotePage(pageId: string, action: string): void {\n }\n\n openRemotePage(browserId: string, url: string): void {\n }\n\n openNodeFrontend(): void {\n }\n\n showContextMenuAtPoint(x: number, y: number, items: ContextMenuDescriptor[], document: Document): void {\n throw 'Soft context menu should be used';\n }\n\n isHostedMode(): boolean {\n return true;\n }\n\n setAddExtensionCallback(callback: (arg0: ExtensionDescriptor) => void): void {\n // Extensions are not supported in hosted mode.\n }\n\n async initialTargetId(): Promise {\n return null;\n }\n\n doAidaConversation(request: string, streamId: number, callback: (result: DoAidaConversationResult) => void): void {\n callback({\n error: 'Not implemented',\n });\n }\n\n registerAidaClientEvent(request: string, callback: (result: AidaClientResult) => void): void {\n callback({\n error: 'Not implemented',\n });\n }\n\n recordImpression(event: ImpressionEvent): void {\n }\n recordResize(event: ResizeEvent): void {\n }\n recordClick(event: ClickEvent): void {\n }\n recordHover(event: HoverEvent): void {\n }\n recordDrag(event: DragEvent): void {\n }\n recordChange(event: ChangeEvent): void {\n }\n recordKeyDown(event: KeyDownEvent): void {\n }\n}\n\n// @ts-ignore Global injected by devtools-compatibility.js\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport let InspectorFrontendHostInstance: InspectorFrontendHostStub = globalThis.InspectorFrontendHost;\n\nclass InspectorFrontendAPIImpl {\n constructor() {\n for (const descriptor of EventDescriptors) {\n // @ts-ignore Dispatcher magic\n this[descriptor[1]] = this.dispatch.bind(this, descriptor[0], descriptor[2], descriptor[3]);\n }\n }\n\n private dispatch(name: symbol, signature: string[], runOnceLoaded: boolean, ...params: string[]): void {\n // Single argument methods get dispatched with the param.\n if (signature.length < 2) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n InspectorFrontendHostInstance.events.dispatchEventToListeners(name, params[0]);\n } catch (error) {\n console.error(error + ' ' + error.stack);\n }\n return;\n }\n const data: {\n [x: string]: string,\n } = {};\n for (let i = 0; i < signature.length; ++i) {\n data[signature[i]] = params[i];\n }\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n InspectorFrontendHostInstance.events.dispatchEventToListeners(name, data);\n } catch (error) {\n console.error(error + ' ' + error.stack);\n }\n }\n\n streamWrite(id: number, chunk: string): void {\n resourceLoaderStreamWrite(id, chunk);\n }\n}\n\n(function(): void {\n\nfunction initializeInspectorFrontendHost(): void {\n let proto;\n if (!InspectorFrontendHostInstance) {\n // Instantiate stub for web-hosted mode if necessary.\n // @ts-ignore Global injected by devtools-compatibility.js\n globalThis.InspectorFrontendHost = InspectorFrontendHostInstance = new InspectorFrontendHostStub();\n } else {\n // Otherwise add stubs for missing methods that are declared in the interface.\n proto = InspectorFrontendHostStub.prototype;\n for (const name of Object.getOwnPropertyNames(proto)) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // @ts-expect-error\n const stub = proto[name];\n // @ts-ignore Global injected by devtools-compatibility.js\n if (typeof stub !== 'function' || InspectorFrontendHostInstance[name]) {\n continue;\n }\n\n console.error(`Incompatible embedder: method Host.InspectorFrontendHost.${name} is missing. Using stub instead.`);\n // @ts-ignore Global injected by devtools-compatibility.js\n InspectorFrontendHostInstance[name] = stub;\n }\n }\n\n // Attach the events object.\n InspectorFrontendHostInstance.events = new Common.ObjectWrapper.ObjectWrapper();\n}\n\n// FIXME: This file is included into both apps, since the devtools_app needs the InspectorFrontendHostAPI only,\n// so the host instance should not be initialized there.\ninitializeInspectorFrontendHost();\n// @ts-ignore Global injected by devtools-compatibility.js\nglobalThis.InspectorFrontendAPI = new InspectorFrontendAPIImpl();\n})();\n\nexport function isUnderTest(prefs?: {\n [x: string]: string,\n}): boolean {\n // Integration tests rely on test queryParam.\n if (Root.Runtime.Runtime.queryParam('test')) {\n return true;\n }\n // Browser tests rely on prefs.\n if (prefs) {\n return prefs['isUnderTest'] === 'true';\n }\n return Common.Settings.Settings.hasInstance() &&\n Common.Settings.Settings.instance().createSetting('isUnderTest', false).get();\n}\n"]}
\ No newline at end of file
diff --git a/public/core/i18n/ByteUtilities.d.ts b/public/core/i18n/ByteUtilities.d.ts
new file mode 100644
index 00000000..922a4e3b
--- /dev/null
+++ b/public/core/i18n/ByteUtilities.d.ts
@@ -0,0 +1 @@
+export declare const bytesToString: (bytes: number) => string;
diff --git a/public/core/i18n/ByteUtilities.js b/public/core/i18n/ByteUtilities.js
new file mode 100644
index 00000000..0b123862
--- /dev/null
+++ b/public/core/i18n/ByteUtilities.js
@@ -0,0 +1,57 @@
+// Copyright 2024 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 { defineFormatter } from './NumberFormatter.js';
+const narrowBytes = defineFormatter({
+ style: 'unit',
+ unit: 'byte',
+ unitDisplay: 'narrow',
+ minimumFractionDigits: 0,
+ maximumFractionDigits: 0,
+});
+const narrowKilobytesDecimal = defineFormatter({
+ style: 'unit',
+ unit: 'kilobyte',
+ unitDisplay: 'narrow',
+ minimumFractionDigits: 1,
+ maximumFractionDigits: 1,
+});
+const narrowKilobytesInteger = defineFormatter({
+ style: 'unit',
+ unit: 'kilobyte',
+ unitDisplay: 'narrow',
+ minimumFractionDigits: 0,
+ maximumFractionDigits: 0,
+});
+const narrowMegabytesDecimal = defineFormatter({
+ style: 'unit',
+ unit: 'megabyte',
+ unitDisplay: 'narrow',
+ minimumFractionDigits: 1,
+ maximumFractionDigits: 1,
+});
+const narrowMegabytesInteger = defineFormatter({
+ style: 'unit',
+ unit: 'megabyte',
+ unitDisplay: 'narrow',
+ minimumFractionDigits: 0,
+ maximumFractionDigits: 0,
+});
+export const bytesToString = (bytes) => {
+ if (bytes < 1000) {
+ return narrowBytes.format(bytes);
+ }
+ const kilobytes = bytes / 1000;
+ if (kilobytes < 100) {
+ return narrowKilobytesDecimal.format(kilobytes);
+ }
+ if (kilobytes < 1000) {
+ return narrowKilobytesInteger.format(kilobytes);
+ }
+ const megabytes = kilobytes / 1000;
+ if (megabytes < 100) {
+ return narrowMegabytesDecimal.format(megabytes);
+ }
+ return narrowMegabytesInteger.format(megabytes);
+};
+//# sourceMappingURL=ByteUtilities.js.map
\ No newline at end of file
diff --git a/public/core/i18n/ByteUtilities.js.map b/public/core/i18n/ByteUtilities.js.map
new file mode 100644
index 00000000..3c88d513
--- /dev/null
+++ b/public/core/i18n/ByteUtilities.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ByteUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/i18n/ByteUtilities.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAErD,MAAM,WAAW,GAAG,eAAe,CAAC;IAClC,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,QAAQ;IACrB,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,eAAe,CAAC;IAC7C,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,QAAQ;IACrB,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,eAAe,CAAC;IAC7C,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,QAAQ;IACrB,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,eAAe,CAAC;IAC7C,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,QAAQ;IACrB,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,eAAe,CAAC;IAC7C,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,QAAQ;IACrB,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IACrD,IAAI,KAAK,GAAG,IAAI,EAAE,CAAC;QACjB,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;IAC/B,IAAI,SAAS,GAAG,GAAG,EAAE,CAAC;QACpB,OAAO,sBAAsB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IACD,IAAI,SAAS,GAAG,IAAI,EAAE,CAAC;QACrB,OAAO,sBAAsB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;IACnC,IAAI,SAAS,GAAG,GAAG,EAAE,CAAC;QACpB,OAAO,sBAAsB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,sBAAsB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC,CAAC","sourcesContent":["// Copyright 2024 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 {defineFormatter} from './NumberFormatter.js';\n\nconst narrowBytes = defineFormatter({\n style: 'unit',\n unit: 'byte',\n unitDisplay: 'narrow',\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n});\n\nconst narrowKilobytesDecimal = defineFormatter({\n style: 'unit',\n unit: 'kilobyte',\n unitDisplay: 'narrow',\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n});\n\nconst narrowKilobytesInteger = defineFormatter({\n style: 'unit',\n unit: 'kilobyte',\n unitDisplay: 'narrow',\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n});\n\nconst narrowMegabytesDecimal = defineFormatter({\n style: 'unit',\n unit: 'megabyte',\n unitDisplay: 'narrow',\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n});\n\nconst narrowMegabytesInteger = defineFormatter({\n style: 'unit',\n unit: 'megabyte',\n unitDisplay: 'narrow',\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n});\n\nexport const bytesToString = (bytes: number): string => {\n if (bytes < 1000) {\n return narrowBytes.format(bytes);\n }\n\n const kilobytes = bytes / 1000;\n if (kilobytes < 100) {\n return narrowKilobytesDecimal.format(kilobytes);\n }\n if (kilobytes < 1000) {\n return narrowKilobytesInteger.format(kilobytes);\n }\n\n const megabytes = kilobytes / 1000;\n if (megabytes < 100) {\n return narrowMegabytesDecimal.format(megabytes);\n }\n return narrowMegabytesInteger.format(megabytes);\n};\n"]}
\ No newline at end of file
diff --git a/public/core/i18n/ByteUtilities.test.d.ts b/public/core/i18n/ByteUtilities.test.d.ts
new file mode 100644
index 00000000..cb0ff5c3
--- /dev/null
+++ b/public/core/i18n/ByteUtilities.test.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/public/core/i18n/ByteUtilities.test.js b/public/core/i18n/ByteUtilities.test.js
new file mode 100644
index 00000000..57f88a1e
--- /dev/null
+++ b/public/core/i18n/ByteUtilities.test.js
@@ -0,0 +1,28 @@
+// Copyright 2024 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 { describeWithLocale } from '../../testing/EnvironmentHelpers.js';
+import * as i18n from './i18n.js';
+describeWithLocale('ByteUtilities', () => {
+ describe('bytesToString', () => {
+ it('formats for < 1000 bytes', () => {
+ assert.deepEqual(i18n.ByteUtilities.bytesToString(50), '50\xA0B');
+ });
+ it('formats for < 100 kilobytes', () => {
+ assert.deepEqual(i18n.ByteUtilities.bytesToString(5 * 1000), '5.0\xA0kB');
+ });
+ it('formats for < 1000 kilobytes', () => {
+ assert.deepEqual(i18n.ByteUtilities.bytesToString(500 * 1000), '500\xA0kB');
+ });
+ it('formats for < 100 megabytes', () => {
+ const oneAndAHalfMegabytes = 1500 * 1000;
+ assert.deepEqual(i18n.ByteUtilities.bytesToString(oneAndAHalfMegabytes), '1.5\xA0MB');
+ });
+ it('formats for > 100 megabytes', () => {
+ const oneMegabyte = 1000 * 1000;
+ const twoHundredAndTenMegabytes = oneMegabyte * 210;
+ assert.deepEqual(i18n.ByteUtilities.bytesToString(twoHundredAndTenMegabytes), '210\xA0MB');
+ });
+ });
+});
+//# sourceMappingURL=ByteUtilities.test.js.map
\ No newline at end of file
diff --git a/public/core/i18n/ByteUtilities.test.js.map b/public/core/i18n/ByteUtilities.test.js.map
new file mode 100644
index 00000000..e9f25711
--- /dev/null
+++ b/public/core/i18n/ByteUtilities.test.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ByteUtilities.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/i18n/ByteUtilities.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,EAAC,kBAAkB,EAAC,MAAM,qCAAqC,CAAC;AAEvE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,kBAAkB,CAAC,eAAe,EAAE,GAAG,EAAE;IACvC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;YAClC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACrC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACtC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACrC,MAAM,oBAAoB,GAAG,IAAI,GAAG,IAAI,CAAC;YACzC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,WAAW,CAAC,CAAC;QACxF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACrC,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;YAChC,MAAM,yBAAyB,GAAG,WAAW,GAAG,GAAG,CAAC;YACpD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,yBAAyB,CAAC,EAAE,WAAW,CAAC,CAAC;QAC7F,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2024 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 {describeWithLocale} from '../../testing/EnvironmentHelpers.js';\n\nimport * as i18n from './i18n.js';\n\ndescribeWithLocale('ByteUtilities', () => {\n describe('bytesToString', () => {\n it('formats for < 1000 bytes', () => {\n assert.deepEqual(i18n.ByteUtilities.bytesToString(50), '50\\xA0B');\n });\n\n it('formats for < 100 kilobytes', () => {\n assert.deepEqual(i18n.ByteUtilities.bytesToString(5 * 1000), '5.0\\xA0kB');\n });\n\n it('formats for < 1000 kilobytes', () => {\n assert.deepEqual(i18n.ByteUtilities.bytesToString(500 * 1000), '500\\xA0kB');\n });\n\n it('formats for < 100 megabytes', () => {\n const oneAndAHalfMegabytes = 1500 * 1000;\n assert.deepEqual(i18n.ByteUtilities.bytesToString(oneAndAHalfMegabytes), '1.5\\xA0MB');\n });\n\n it('formats for > 100 megabytes', () => {\n const oneMegabyte = 1000 * 1000;\n const twoHundredAndTenMegabytes = oneMegabyte * 210;\n assert.deepEqual(i18n.ByteUtilities.bytesToString(twoHundredAndTenMegabytes), '210\\xA0MB');\n });\n });\n});\n"]}
\ No newline at end of file
diff --git a/public/core/i18n/NumberFormatter.d.ts b/public/core/i18n/NumberFormatter.d.ts
new file mode 100644
index 00000000..30f7a913
--- /dev/null
+++ b/public/core/i18n/NumberFormatter.d.ts
@@ -0,0 +1,11 @@
+export interface NumberFormatter {
+ format(value: number): string;
+ formatToParts(value: number): Intl.NumberFormatPart[];
+}
+/**
+ * Creates an instance of NumberFormatter.
+ *
+ * Safe to call in top-level of a module, since the creation of Intl.NumberFormat is deferred
+ * until first usage.
+ */
+export declare function defineFormatter(options: Intl.NumberFormatOptions): NumberFormatter;
diff --git a/public/core/i18n/NumberFormatter.js b/public/core/i18n/NumberFormatter.js
new file mode 100644
index 00000000..8627a2c3
--- /dev/null
+++ b/public/core/i18n/NumberFormatter.js
@@ -0,0 +1,62 @@
+// Copyright 2024 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 { DevToolsLocale } from './DevToolsLocale.js';
+/**
+ * Creates an instance of NumberFormatter.
+ *
+ * Safe to call in top-level of a module, since the creation of Intl.NumberFormat is deferred
+ * until first usage.
+ */
+export function defineFormatter(options) {
+ let intlNumberFormat;
+ return {
+ format(value) {
+ if (!intlNumberFormat) {
+ intlNumberFormat = new Intl.NumberFormat(DevToolsLocale.instance().locale, options);
+ }
+ return formatAndEnsureSpace(intlNumberFormat, value);
+ },
+ formatToParts(value) {
+ if (!intlNumberFormat) {
+ intlNumberFormat = new Intl.NumberFormat(DevToolsLocale.instance().locale, options);
+ }
+ return intlNumberFormat.formatToParts(value);
+ },
+ };
+}
+/**
+ * When using 'narrow' unitDisplay, many locales exclude the space between the literal and the unit.
+ * We don't like that, so when there is no space literal we inject an nbsp manually.
+ */
+function formatAndEnsureSpace(formatter, value) {
+ const parts = formatter.formatToParts(value);
+ let hasSpace = false;
+ for (const part of parts) {
+ if (part.type === 'literal') {
+ if (part.value === ' ') {
+ hasSpace = true;
+ part.value = '\xA0';
+ }
+ else if (part.value === '\xA0') {
+ hasSpace = true;
+ }
+ }
+ }
+ if (hasSpace) {
+ return parts.map(part => part.value).join('');
+ }
+ const unitIndex = parts.findIndex(part => part.type === 'unit');
+ // Unexpected for there to be no unit, but just in case, handle that.
+ if (unitIndex === -1) {
+ return parts.map(part => part.value).join('');
+ }
+ // For locales where the unit comes first (sw), the space has to come after the unit.
+ if (unitIndex === 0) {
+ return parts[0].value + '\xA0' + parts.slice(1).map(part => part.value).join('');
+ }
+ // Otherwise, it comes before.
+ return parts.slice(0, unitIndex).map(part => part.value).join('') + '\xA0' +
+ parts.slice(unitIndex).map(part => part.value).join('');
+}
+//# sourceMappingURL=NumberFormatter.js.map
\ No newline at end of file
diff --git a/public/core/i18n/NumberFormatter.js.map b/public/core/i18n/NumberFormatter.js.map
new file mode 100644
index 00000000..97450032
--- /dev/null
+++ b/public/core/i18n/NumberFormatter.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"NumberFormatter.js","sourceRoot":"","sources":["../../../../../../front_end/core/i18n/NumberFormatter.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAOnD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,OAAiC;IAC/D,IAAI,gBAAmC,CAAC;IAExC,OAAO;QACL,MAAM,CAAC,KAAK;YACV,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACtB,gBAAgB,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAA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rB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,qFAAqF;IACrF,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,8BAA8B;IAC9B,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,MAAM;QACtE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright 2024 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 {DevToolsLocale} from './DevToolsLocale.js';\n\nexport interface NumberFormatter {\n format(value: number): string;\n formatToParts(value: number): Intl.NumberFormatPart[];\n}\n\n/**\n * Creates an instance of NumberFormatter.\n *\n * Safe to call in top-level of a module, since the creation of Intl.NumberFormat is deferred\n * until first usage.\n */\nexport function defineFormatter(options: Intl.NumberFormatOptions): NumberFormatter {\n let intlNumberFormat: Intl.NumberFormat;\n\n return {\n format(value) {\n if (!intlNumberFormat) {\n intlNumberFormat = new Intl.NumberFormat(DevToolsLocale.instance().locale, options);\n }\n return formatAndEnsureSpace(intlNumberFormat, value);\n },\n formatToParts(value) {\n if (!intlNumberFormat) {\n intlNumberFormat = new Intl.NumberFormat(DevToolsLocale.instance().locale, options);\n }\n return intlNumberFormat.formatToParts(value);\n },\n };\n}\n\n/**\n * When using 'narrow' unitDisplay, many locales exclude the space between the literal and the unit.\n * We don't like that, so when there is no space literal we inject an nbsp manually.\n */\nfunction formatAndEnsureSpace(formatter: Intl.NumberFormat, value: number): string {\n const parts = formatter.formatToParts(value);\n\n let hasSpace = false;\n for (const part of parts) {\n if (part.type === 'literal') {\n if (part.value === ' ') {\n hasSpace = true;\n part.value = '\\xA0';\n } else if (part.value === '\\xA0') {\n hasSpace = true;\n }\n }\n }\n\n if (hasSpace) {\n return parts.map(part => part.value).join('');\n }\n\n const unitIndex = parts.findIndex(part => part.type === 'unit');\n\n // Unexpected for there to be no unit, but just in case, handle that.\n if (unitIndex === -1) {\n return parts.map(part => part.value).join('');\n }\n\n // For locales where the unit comes first (sw), the space has to come after the unit.\n if (unitIndex === 0) {\n return parts[0].value + '\\xA0' + parts.slice(1).map(part => part.value).join('');\n }\n\n // Otherwise, it comes before.\n return parts.slice(0, unitIndex).map(part => part.value).join('') + '\\xA0' +\n parts.slice(unitIndex).map(part => part.value).join('');\n}\n"]}
\ No newline at end of file
diff --git a/public/core/i18n/i18n-tsconfig.json b/public/core/i18n/i18n-tsconfig.json
index 52a6616e..80298827 100644
--- a/public/core/i18n/i18n-tsconfig.json
+++ b/public/core/i18n/i18n-tsconfig.json
@@ -29,7 +29,9 @@
"useUnknownInCatchVariables": false
},
"files": [
+ "../../../../../../front_end/core/i18n/ByteUtilities.ts",
"../../../../../../front_end/core/i18n/DevToolsLocale.ts",
+ "../../../../../../front_end/core/i18n/NumberFormatter.ts",
"../../../../../../front_end/core/i18n/i18nImpl.ts",
"../../../../../../front_end/core/i18n/i18nTypes.ts",
"../../../../../../front_end/core/i18n/time-utilities.ts",
diff --git a/public/core/i18n/i18n.d.ts b/public/core/i18n/i18n.d.ts
index 2c7a6bad..ba074f24 100644
--- a/public/core/i18n/i18n.d.ts
+++ b/public/core/i18n/i18n.d.ts
@@ -1,4 +1,6 @@
+import * as ByteUtilities from './ByteUtilities.js';
import * as DevToolsLocale from './DevToolsLocale.js';
import * as i18n from './i18nImpl.js';
+import * as NumberFormatter from './NumberFormatter.js';
import * as TimeUtilities from './time-utilities.js';
-export { DevToolsLocale, i18n, TimeUtilities, };
+export { ByteUtilities, DevToolsLocale, i18n, NumberFormatter, TimeUtilities, };
diff --git a/public/core/i18n/i18n.js b/public/core/i18n/i18n.js
index fdb08330..8839e63a 100644
--- a/public/core/i18n/i18n.js
+++ b/public/core/i18n/i18n.js
@@ -1,8 +1,10 @@
// Copyright 2020 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 ByteUtilities from './ByteUtilities.js';
import * as DevToolsLocale from './DevToolsLocale.js';
import * as i18n from './i18nImpl.js';
+import * as NumberFormatter from './NumberFormatter.js';
import * as TimeUtilities from './time-utilities.js';
-export { DevToolsLocale, i18n, TimeUtilities, };
+export { ByteUtilities, DevToolsLocale, i18n, NumberFormatter, TimeUtilities, };
//# sourceMappingURL=i18n.js.map
\ No newline at end of file
diff --git a/public/core/i18n/i18n.js.map b/public/core/i18n/i18n.js.map
index 2a2e5046..13861a02 100644
--- a/public/core/i18n/i18n.js.map
+++ b/public/core/i18n/i18n.js.map
@@ -1 +1 @@
-{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../../../../../front_end/core/i18n/i18n.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AAErD,OAAO,EACL,cAAc,EACd,IAAI,EACJ,aAAa,GACd,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 DevToolsLocale from './DevToolsLocale.js';\nimport * as i18n from './i18nImpl.js';\nimport * as TimeUtilities from './time-utilities.js';\n\nexport {\n DevToolsLocale,\n i18n,\n TimeUtilities,\n};\n"]}
\ No newline at end of file
+{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../../../../../front_end/core/i18n/i18n.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AAErD,OAAO,EACL,aAAa,EACb,cAAc,EACd,IAAI,EACJ,eAAe,EACf,aAAa,GACd,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 ByteUtilities from './ByteUtilities.js';\nimport * as DevToolsLocale from './DevToolsLocale.js';\nimport * as i18n from './i18nImpl.js';\nimport * as NumberFormatter from './NumberFormatter.js';\nimport * as TimeUtilities from './time-utilities.js';\n\nexport {\n ByteUtilities,\n DevToolsLocale,\n i18n,\n NumberFormatter,\n TimeUtilities,\n};\n"]}
\ No newline at end of file
diff --git a/public/core/i18n/locales/en-US.json b/public/core/i18n/locales/en-US.json
index f81b105e..af1ead76 100644
--- a/public/core/i18n/locales/en-US.json
+++ b/public/core/i18n/locales/en-US.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 | eventsource":{"message":"EventSource"},"core/common/ResourceType.ts | fetch":{"message":"Fetch"},"core/common/ResourceType.ts | fetchAndXHR":{"message":"Fetch and XHR"},"core/common/ResourceType.ts | font":{"message":"Font"},"core/common/ResourceType.ts | image":{"message":"Image"},"core/common/ResourceType.ts | img":{"message":"Img"},"core/common/ResourceType.ts | javascript":{"message":"JavaScript"},"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":"Preflight"},"core/common/ResourceType.ts | script":{"message":"Script"},"core/common/ResourceType.ts | signedexchange":{"message":"SignedExchange"},"core/common/ResourceType.ts | stylesheet":{"message":"Stylesheet"},"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":"WebBundle"},"core/common/ResourceType.ts | websocket":{"message":"WebSocket"},"core/common/ResourceType.ts | webtransport":{"message":"WebTransport"},"core/common/ResourceType.ts | ws":{"message":"WS"},"core/common/Revealer.ts | animationsPanel":{"message":"Animations panel"},"core/common/Revealer.ts | applicationPanel":{"message":"Application panel"},"core/common/Revealer.ts | changesDrawer":{"message":"Changes drawer"},"core/common/Revealer.ts | developerResourcesPanel":{"message":"Developer Resources panel"},"core/common/Revealer.ts | elementsPanel":{"message":"Elements panel"},"core/common/Revealer.ts | issuesView":{"message":"Issues view"},"core/common/Revealer.ts | memoryInspectorPanel":{"message":"Memory inspector panel"},"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/Revealer.ts | timelinePanel":{"message":"Performance panel"},"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 | fmsExpanded":{"message":"{PH1} milliseconds"},"core/i18n/time-utilities.ts | fs":{"message":"{PH1} s"},"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/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 styles."},"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 | exception":{"message":"Exception"},"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 | returnValue":{"message":"Return value"},"core/sdk/DebuggerModel.ts | script":{"message":"Script"},"core/sdk/DebuggerModel.ts | withBlock":{"message":"With block"},"core/sdk/NetworkManager.ts | fast4G":{"message":"Fast 4G"},"core/sdk/NetworkManager.ts | fastG":{"message":"Slow 4G"},"core/sdk/NetworkManager.ts | noContentForPreflight":{"message":"No content available for preflight 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":"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 neither did the request URL's domain 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 | exemptionReasonEnterprisePolicy":{"message":"This cookie is allowed by Chrome Enterprise policy. Learn more: goo.gle/ce-3pc"},"core/sdk/NetworkRequest.ts | exemptionReasonScheme":{"message":"This cookie is allowed by the top-level url scheme"},"core/sdk/NetworkRequest.ts | exemptionReasonStorageAccessAPI":{"message":"This cookie is allowed by the Storage Access API. Learn more: goo.gle/saa"},"core/sdk/NetworkRequest.ts | exemptionReasonTopLevelStorageAccessAPI":{"message":"This cookie is allowed by the top-level Storage Access API. Learn more: goo.gle/saa-top"},"core/sdk/NetworkRequest.ts | exemptionReasonTopLevelTPCDDeprecationTrial":{"message":"This cookie is allowed by top-level third-party cookie deprecation trial. Learn more: goo.gle/ps-dt."},"core/sdk/NetworkRequest.ts | exemptionReasonTPCDDeprecationTrial":{"message":"This cookie is allowed by third-party cookie deprecation trial. Learn more: goo.gle/ps-dt."},"core/sdk/NetworkRequest.ts | exemptionReasonTPCDHeuristics":{"message":"This cookie is allowed by third-party cookie heuristics. Learn more: goo.gle/hbe"},"core/sdk/NetworkRequest.ts | exemptionReasonTPCDMetadata":{"message":"This cookie is allowed by a third-party cookie deprecation trial grace period. Learn more: goo.gle/dt-grace."},"core/sdk/NetworkRequest.ts | exemptionReasonUserSetting":{"message":"This cookie is allowed by user preference."},"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 4096 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 and 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 4096 characters."},"core/sdk/NetworkRequest.ts | theSchemeOfThisConnectionIsNot":{"message":"The scheme of this connection is not allowed to store cookies."},"core/sdk/NetworkRequest.ts | thirdPartyPhaseout":{"message":"This cookie was blocked either because of Chrome flags or browser configuration. Learn more in the Issues panel."},"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 to 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 4096 characters."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedDueThirdPartyPhaseout":{"message":"Setting this cookie was blocked either because of Chrome flags or browser configuration. Learn more in the Issues panel."},"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 canceled due to reload of inspected page"},"core/sdk/RehydratingConnection.ts | noSourceText":{"message":"No source text available"},"core/sdk/Script.ts | scriptRemovedOrDeleted":{"message":"Script removed or deleted."},"core/sdk/Script.ts | unableToFetchScriptSource":{"message":"Unable to fetch script source."},"core/sdk/sdk-meta.ts | achromatopsia":{"message":"Achromatopsia (no color)"},"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 | customFormatters":{"message":"Custom formatters"},"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 | emulateAchromatopsia":{"message":"Emulate achromatopsia (no color)"},"core/sdk/sdk-meta.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"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 | 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 | 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 | networkRequestBlocking":{"message":"Network request blocking"},"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 | 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)"},"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":"Unrecognized 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/SourceMapScopeChainEntry.ts | block":{"message":"Block"},"core/sdk/SourceMapScopeChainEntry.ts | closure":{"message":"Closure"},"core/sdk/SourceMapScopeChainEntry.ts | global":{"message":"Global"},"core/sdk/SourceMapScopeChainEntry.ts | local":{"message":"Local"},"core/sdk/SourceMapScopeChainEntry.ts | returnValue":{"message":"Return value"},"entrypoints/inspector_main/inspector_main-meta.ts | autoOpenDevTools":{"message":"Auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | blockAds":{"message":"Block ads on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | colorVisionDeficiency":{"message":"color 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 popups"},"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-color-scheme"},"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency":{"message":"vision deficiency"},"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 | disableAvifImageFormat":{"message":"Disable AVIF image format"},"entrypoints/inspector_main/RenderingOptions.ts | disableLocalFonts":{"message":"Disable local fonts"},"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 | disableWebpImageFormat":{"message":"Disable WebP image format"},"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":"Keep page focused. Commonly used for debugging disappearing elements."},"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-colors 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 & 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 | showsLayerBordersOrangeoliveAnd":{"message":"Shows layer borders (orange/olive) and tiles (cyan)."},"entrypoints/js_app/js_app.ts | main":{"message":"Main"},"entrypoints/js_app/js_app.ts | networkTitle":{"message":"Scripts"},"entrypoints/js_app/js_app.ts | showNode":{"message":"Show Scripts"},"entrypoints/main/main-meta.ts | auto":{"message":"auto"},"entrypoints/main/main-meta.ts | autoTheme":{"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 | dontMatchChromeColorSchemeCommand":{"message":"Don't match Chrome color scheme"},"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 | matchChromeColorScheme":{"message":"Match Chrome color scheme"},"entrypoints/main/main-meta.ts | matchChromeColorSchemeCommand":{"message":"Match Chrome color scheme"},"entrypoints/main/main-meta.ts | matchChromeColorSchemeDocumentation":{"message":"Match DevTools colors to your customized Chrome theme (when enabled)"},"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 | switchToBrowserPreferredTheme":{"message":"Switch to browser's preferred theme"},"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 | theme":{"message":"Theme:"},"entrypoints/main/main-meta.ts | toggleDrawer":{"message":"Toggle drawer"},"entrypoints/main/main-meta.ts | undocked":{"message":"Undocked"},"entrypoints/main/main-meta.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"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/main/MainImpl.ts | customizeAndControlDevtools":{"message":"Customize 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/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/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/worker_app/WorkerMain.ts | main":{"message":"Main"},"generated/Deprecation.ts | AuthorizationCoveredByWildcard":{"message":"Authorization will not be covered by the wildcard symbol (*) in CORS Access-Control-Allow-Headers handling."},"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 standardized API: Navigation Timing 2."},"generated/Deprecation.ts | ChromeLoadTimesFirstPaintAfterLoadTime":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Paint Timing."},"generated/Deprecation.ts | ChromeLoadTimesWasAlternateProtocolAvailable":{"message":"chrome.loadTimes() is deprecated, instead use standardized 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 | CSSCustomStateDeprecatedSyntax":{"message":":--customstatename is deprecated. Please use the :state(customstatename) syntax instead."},"generated/Deprecation.ts | CSSInsetAreaProperty":{"message":"The inset-area property is deprecated. Please use the position-area property instead."},"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 | CSSValueAppearanceSliderVertical":{"message":"CSS appearance value slider-vertical is not standardized and will be removed."},"generated/Deprecation.ts | DataUrlInSvgUse":{"message":"Support for data: URLs in SVGUseElement is deprecated and it 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 | 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 | GetInnerHTML":{"message":"The getInnerHTML() function is deprecated, and will be removed from this browser very soon. Please use getHTML() instead."},"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 behavior."},"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 a permission to use even if the sysex is not specified in the MIDIOptions."},"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 standardized navigator.storage instead."},"generated/Deprecation.ts | PictureSourceSrc":{"message":"