import{Runtime as e}from"../root/root.js";import{ThemeSupport as s}from"../theme_support/theme_support.js";const t=new Map;const o=["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/inspectorStyle.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","console_counters/warningErrorCounter.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"];var c=Object.freeze({__proto__:null,getStyleSheets:function(o,{enableLegacyPatching:c=!1}={}){const i=t.get(o);if(i&&i.enableLegacyPatching===c)return i.sheets;const n=e.cachedResources.get(o)||"";if(!n)throw new Error(o+" not preloaded.");const r=new CSSStyleSheet;r.replaceSync(n);const a=s.instance().themeStyleSheet(o,n);if(!c||!a)return t.set(o,{enableLegacyPatching:c,sheets:[r]}),[r];const u=new CSSStyleSheet;return u.replaceSync(a+"\n"+e.Runtime.resolveSourceURL(o+".theme")),t.set(o,{enableLegacyPatching:c,sheets:[r,u]}),[r,u]},CSS_RESOURCES_TO_LOAD_INTO_RUNTIME:o});var i=Object.freeze({__proto__:null,setup:async function(){const t={get:()=>"default"};s.instance({forceNew:!0,setting:t});const c=o.map((s=>fetch("/front_end/"+s).then((e=>e.text())).then((t=>{e.cachedResources.set(s,t)}))));await Promise.all(c)}});var n=Object.freeze({__proto__:null,set:function(e,s,t){e.style.setProperty(s,t)}});export{i as ComponentServerSetup,c as GetStylesheet,n as SetCSSProperty};
