import*as Root from"../root/root.js";import*as ThemeSupport from"../theme_support/theme_support.js";const sheetsCache=new Map;export function getStyleSheets(e,{enableLegacyPatching:s=!1}={}){const t=sheetsCache.get(e);if(t&&t.enableLegacyPatching===s)return t.sheets;const o=Root.Runtime.cachedResources.get(e)||"";if(!o)throw new Error(`${e} not preloaded.`);const c=new CSSStyleSheet;c.replaceSync(o);const i=ThemeSupport.ThemeSupport.instance().themeStyleSheet(e,o);if(!s||!i)return sheetsCache.set(e,{enableLegacyPatching:s,sheets:[c]}),[c];const n=new CSSStyleSheet;return n.replaceSync(i+"\n"+Root.Runtime.Runtime.resolveSourceURL(e+".theme")),sheetsCache.set(e,{enableLegacyPatching:s,sheets:[c,n]}),[c,n]}export const CSS_RESOURCES_TO_LOAD_INTO_RUNTIME=["ui/checkboxTextLabel.css","ui/closeButton.css","ui/confirmDialog.css","ui/dialog.css","ui/dropTarget.css","ui/emptyWidget.css","ui/filter.css","ui/glassPane.css","ui/infobar.css","ui/inlineButton.css","ui/inspectorCommon.css","ui/inspectorScrollbars.css","ui/themeColors.css","ui/inspectorSyntaxHighlight.css","ui/inspectorSyntaxHighlightDark.css","ui/inspectorViewTabbedPane.css","ui/listWidget.css","ui/popover.css","ui/progressIndicator.css","ui/radioButton.css","ui/remoteDebuggingTerminatedScreen.css","ui/reportView.css","ui/rootView.css","ui/searchableView.css","ui/slider.css","ui/smallBubble.css","ui/segmentedButton.css","ui/softContextMenu.css","ui/softDropDown.css","ui/softDropDownButton.css","ui/splitWidget.css","ui/toolbar.css","ui/suggestBox.css","ui/tabbedPane.css","ui/targetCrashedScreen.css","ui/textButton.css","ui/textPrompt.css","ui/tooltip.css","ui/treeoutline.css","ui/viewContainers.css","elements/layoutPane.css","components/imagePreview.css","components/jsUtils.css","persistence/editFileSystemView.css","persistence/workspaceSettingsTab.css","mobile_throttling/throttlingSettingsTab.css","emulation/deviceModeToolbar.css","emulation/deviceModeView.css","emulation/devicesSettingsTab.css","emulation/inspectedPagePlaceholder.css","emulation/locationsSettingsTab.css","emulation/mediaQueryInspector.css","emulation/sensors.css","inline_editor/colorSwatch.css","inspector_main/nodeIcon.css","inspector_main/renderingOptions.css","data_grid/dataGrid.css","help/releaseNote.css","object_ui/customPreviewComponent.css","object_ui/objectPopover.css","object_ui/objectPropertiesSection.css","object_ui/objectValue.css","console/consoleContextSelector.css","console/consolePinPane.css","console/consolePrompt.css","console/consoleSidebar.css","console/consoleView.css","cm/codemirror.css","text_editor/autocompleteTooltip.css","text_editor/cmdevtools.css","text_editor/cmdevtools.darkmode.css"];