This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhuyujia-webhopper/collector/adg-linux/gen/devtools/worker_app.js

71 lines
40 KiB
JavaScript
Raw Normal View History

2022-05-05 20:41:28 +08:00
allDescriptors.push(...[{"dependencies":["common","sdk","ui","protocol"],"extensions":[{"defaultValue":[],"type":"setting","settingName":"customNetworkConditions","settingType":"array"},{"category":"Network","tags":"device","title":"Go offline","className":"MobileThrottling.ThrottlingManager.ActionDelegate","actionId":"network-conditions.network-offline","type":"action"},{"category":"Network","tags":"device","title":"Go online","className":"MobileThrottling.ThrottlingManager.ActionDelegate","actionId":"network-conditions.network-online","type":"action"},{"title":"Throttling","settings":["customNetworkConditions"],"id":"throttling-conditions","className":"MobileThrottling.ThrottlingSettingsTab","location":"settings-view","type":"view","order":35}],"name":"mobile_throttling"},{"dependencies":["common","browser_sdk"],"name":"har_importer","scripts":["har_importer_module.js"]},{"dependencies":["browser_components","extensions","inline_editor","color_picker","event_listeners"],"extensions":[{"title":"Elements","id":"elements","className":"Elements.ElementsPanel","location":"panel","type":"view","order":10},{"className":"Elements.ElementsPanel.ContextMenuProvider","contextTypes":["SDK.RemoteObject","SDK.DOMNode","SDK.DeferredDOMNode"],"type":"@UI.ContextMenu.Provider"},{"className":"Elements.ElementsTreeOutline.Renderer","contextTypes":["SDK.DOMNode","SDK.DeferredDOMNode"],"type":"@Common.Renderer"},{"className":"Elements.ElementsPanel.DOMNodeRevealer","contextTypes":["SDK.DOMNode","SDK.DeferredDOMNode","SDK.RemoteObject"],"destination":"Elements panel","type":"@Common.Revealer"},{"className":"Elements.DOMLinkifier.Linkifier","contextTypes":["SDK.DOMNode","SDK.DeferredDOMNode"],"type":"@Common.Linkifier"},{"className":"Elements.ElementsPanel.CSSPropertyRevealer","contextTypes":["SDK.CSSProperty"],"destination":"styles sidebar","type":"@Common.Revealer"},{"category":"Elements","title":"Color format:","defaultValue":"original","options":[{"text":"As authored","value":"original","title":"Set color format as authored"},{"raw":true,"text":"HEX: #dac0de","value":"hex","title":"Set color format to HEX"},{"raw":true,"text":"RGB: rgb(128, 255, 255)","value":"rgb","title":"Set color format to RGB"},{"raw":true,"text":"HSL: hsl(300, 80%, 90%)","value":"hsl","title":"Set color format to HSL"}],"settingName":"colorFormat","settingType":"enum","type":"setting","order":0},{"category":"Elements","title":"Show user agent shadow DOM","defaultValue":false,"settingName":"showUAShadowDOM","settingType":"boolean","type":"setting","order":1},{"category":"Elements","title":"Word wrap","defaultValue":true,"options":[{"value":true,"title":"Enable DOM word wrap"},{"value":false,"title":"Disable DOM word wrap"}],"settingName":"domWordWrap","settingType":"boolean","type":"setting","order":2},{"category":"Elements","title":"Show HTML comments","defaultValue":true,"options":[{"value":true,"title":"Show HTML comments"},{"value":false,"title":"Hide HTML comments"}],"settingName":"showHTMLComments","settingType":"boolean","type":"setting","order":3},{"category":"Elements","title":"Reveal DOM node on hover","defaultValue":true,"settingName":"highlightNodeOnHoverInOverlay","settingType":"boolean","type":"setting","order":4},{"defaultValue":true,"type":"setting","settingName":"showEventListenersForAncestors","settingType":"boolean"},{"className":"Elements.ElementStatePaneWidget.ButtonProvider","type":"@UI.ToolbarItem.Provider","order":1,"location":"styles-sidebarpane-toolbar"},{"className":"Elements.ClassesPaneWidget.ButtonProvider","type":"@UI.ToolbarItem.Provider","order":2,"location":"styles-sidebarpane-toolbar"},{"className":"Elements.StylesSidebarPane.ButtonProvider","type":"@UI.ToolbarItem.Provider","order":100,"location":"styles-sidebarpane-toolbar"},{"className":"Elements.ElementsActionDelegate","contextTypes":["Elements.ElementsPanel"],"bindings":[{"shortcut":"H"}],"type":"action","actionId":"elements.hide-element"},{"className":"Elements.ElementsActionDelegate","contextTypes":["Elements.ElementsPanel"],"bindings":[{"shortcut":"F2"}],"type":"action","ac
self['MobileThrottling']=self['MobileThrottling']||{};MobileThrottling.CPUThrottlingRates={NoThrottling:1,MidTierMobile:4,LowEndMobile:6,};MobileThrottling.Conditions;MobileThrottling.NoThrottlingConditions={title:SDK.NetworkManager.NoThrottlingConditions.title,description:Common.UIString('No throttling'),network:SDK.NetworkManager.NoThrottlingConditions,cpuThrottlingRate:MobileThrottling.CPUThrottlingRates.NoThrottling,};MobileThrottling.OfflineConditions={title:SDK.NetworkManager.OfflineConditions.title,description:Common.UIString('No internet connectivity'),network:SDK.NetworkManager.OfflineConditions,cpuThrottlingRate:MobileThrottling.CPUThrottlingRates.NoThrottling,};MobileThrottling.LowEndMobileConditions={title:Common.UIString('Low-end mobile'),description:Common.UIString('Slow 3G & 6x CPU slowdown'),network:SDK.NetworkManager.Slow3GConditions,cpuThrottlingRate:MobileThrottling.CPUThrottlingRates.LowEndMobile,};MobileThrottling.MidTierMobileConditions={title:Common.UIString('Mid-tier mobile'),description:Common.UIString('Fast 3G & 4x CPU slowdown'),network:SDK.NetworkManager.Fast3GConditions,cpuThrottlingRate:MobileThrottling.CPUThrottlingRates.MidTierMobile,};MobileThrottling.PlaceholderConditions;MobileThrottling.CustomConditions={title:Common.UIString('Custom'),description:Common.UIString('Check Network and Performance panels'),};MobileThrottling.NetworkThrottlingConditionsGroup;MobileThrottling.MobileThrottlingConditionsGroup;MobileThrottling.ConditionsList;MobileThrottling.mobilePresets=[MobileThrottling.MidTierMobileConditions,MobileThrottling.LowEndMobileConditions,MobileThrottling.CustomConditions];MobileThrottling.advancedMobilePresets=[MobileThrottling.OfflineConditions,];MobileThrottling.networkPresets=[SDK.NetworkManager.Fast3GConditions,SDK.NetworkManager.Slow3GConditions,SDK.NetworkManager.OfflineConditions,];MobileThrottling.cpuThrottlingPresets=[MobileThrottling.CPUThrottlingRates.NoThrottling,MobileThrottling.CPUThrottlingRates.MidTierMobile,MobileThrottling.CPUThrottlingRates.LowEndMobile,];;MobileThrottling.MobileThrottlingSelector=class{constructor(populateCallback,selectCallback){this._populateCallback=populateCallback;this._selectCallback=selectCallback;MobileThrottling.throttlingManager().addEventListener(MobileThrottling.ThrottlingManager.Events.RateChanged,this._conditionsChanged,this);SDK.multitargetNetworkManager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChanged,this._conditionsChanged,this);this._options=this._populateOptions();this._conditionsChanged();}
optionSelected(conditions){SDK.multitargetNetworkManager.setNetworkConditions(conditions.network);MobileThrottling.throttlingManager().setCPUThrottlingRate(conditions.cpuThrottlingRate);}
_populateOptions(){const disabledGroup={title:Common.UIString('Disabled'),items:[MobileThrottling.NoThrottlingConditions]};const presetsGroup={title:Common.UIString('Presets'),items:MobileThrottling.mobilePresets};const advancedGroup={title:Common.UIString('Advanced'),items:MobileThrottling.advancedMobilePresets};return this._populateCallback([disabledGroup,presetsGroup,advancedGroup]);}
_conditionsChanged(){const networkConditions=SDK.multitargetNetworkManager.networkConditions();const cpuThrottlingRate=MobileThrottling.throttlingManager().cpuThrottlingRate();for(let index=0;index<this._options.length;++index){const option=this._options[index];if(option&&option.network===networkConditions&&option.cpuThrottlingRate===cpuThrottlingRate){this._selectCallback(index);return;}}
this._selectCallback(this._options.indexOf(MobileThrottling.CustomConditions));}};;MobileThrottling.NetworkPanelIndicator=class{constructor(){if(!UI.inspectorView.hasPanel('network'))
return;const manager=SDK.multitargetNetworkManager;manager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChanged,updateVisibility);manager.addEventListener(SDK.MultitargetNetworkManager.Events.BlockedPatternsChanged,updateVisibility);manager.addEventListener(SDK.MultitargetNetworkManager.Events.InterceptorsChanged,updateVisibility);updateVisibility();function updateVisibility(){let icon=null;if(manager.isThrottling()){icon=UI.Icon.create('smallicon-warning');icon.title=Common.UIString('Network throttling is enabled');}else if(SDK.multitargetNetworkManager.isIntercepting()){icon=UI.Icon.create('smallicon-warning');icon.title=Common.UIString('Requests may be rewritten by local overrides');}else if(manager.isBlocking()){icon=UI.Icon.create('smallicon-warning');icon.title=Common.UIString('Requests may be blocked');}
UI.inspectorView.setPanelIcon('network',icon);}}};;MobileThrottling.NetworkThrottlingSelector=class{constructor(populateCallback,selectCallback,customNetworkConditionsSetting){this._populateCallback=populateCallback;this._selectCallback=selectCallback;this._customNetworkConditionsSetting=customNetworkConditionsSetting;this._customNetworkConditionsSetting.addChangeListener(this._populateOptions,this);SDK.multitargetNetworkManager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChanged,this._networkConditionsChanged,this);this._options;this._populateOptions();}
revealAndUpdate(){Common.Revealer.reveal(this._customNetworkConditionsSetting);this._networkConditionsChanged();}
optionSelected(conditions){SDK.multitargetNetworkManager.setNetworkConditions(conditions);}
_populateOptions(){const disabledGroup={title:Common.UIString('Disabled'),items:[SDK.NetworkManager.NoThrottlingConditions]};const presetsGroup={title:Common.UIString('Presets'),items:MobileThrottling.networkPresets};const customGroup={title:Common.UIString('Custom'),items:this._customNetworkConditionsSetting.get()};this._options=this._populateCallback([disabledGroup,presetsGroup,customGroup]);if(!this._networkConditionsChanged()){for(let i=this._options.length-1;i>=0;i--){if(this._options[i]){this.optionSelected((this._options[i]));break;}}}}
_networkConditionsChanged(){const value=SDK.multitargetNetworkManager.networkConditions();for(let index=0;index<this._options.length;++index){const option=this._options[index];if(option&&option.download===value.download&&option.upload===value.upload&&option.latency===value.latency&&option.title===value.title){this._selectCallback(index);return true;}}
return false;}};;MobileThrottling.ThrottlingSettingsTab=class extends UI.VBox{constructor(){super(true);this.registerRequiredCSS('mobile_throttling/throttlingSettingsTab.css');this.contentElement.createChild('div','header').textContent=Common.UIString('Network Throttling Profiles');const addButton=UI.createTextButton(Common.UIString('Add custom profile...'),this._addButtonClicked.bind(this),'add-conditions-button');this.contentElement.appendChild(addButton);this._list=new UI.ListWidget(this);this._list.element.classList.add('conditions-list');this._list.registerRequiredCSS('mobile_throttling/throttlingSettingsTab.css');this._list.show(this.contentElement);this._customSetting=Common.moduleSetting('customNetworkConditions');this._customSetting.addChangeListener(this._conditionsUpdated,this);this.setDefaultFocusedElement(addButton);this.contentElement.tabIndex=0;}
wasShown(){super.wasShown();this._conditionsUpdated();}
_conditionsUpdated(){this._list.clear();const conditions=this._customSetting.get();for(let i=0;i<conditions.length;++i)
this._list.appendItem(conditions[i],true);this._list.appendSeparator();}
_addButtonClicked(){this._list.addNewItem(this._customSetting.get().length,{title:'',download:-1,upload:-1,latency:0});}
renderItem(item,editable){const conditions=(item);const element=createElementWithClass('div','conditions-list-item');const title=element.createChild('div','conditions-list-text conditions-list-title');const titleText=title.createChild('div','conditions-list-title-text');titleText.textContent=conditions.title;titleText.title=conditions.title;element.createChild('div','conditions-list-separator');element.createChild('div','conditions-list-text').textContent=MobileThrottling.throughputText(conditions.download);element.createChild('div','conditions-list-separator');element.createChild('div','conditions-list-text').textContent=MobileThrottling.throughputText(conditions.upload);element.createChild('div','conditions-list-separator');element.createChild('div','conditions-list-text').textContent=Common.UIString('%dms',conditions.latency);return element;}
removeItemRequested(item,index){const list=this._customSetting.get();list.splice(index,1);this._customSetting.set(list);}
commitEdit(item,editor,isNew){const conditions=(item);conditions.title=editor.control('title').value.trim();const download=editor.control('download').value.trim();conditions.download=download?parseInt(download,10)*(1024/8):-1;const upload=editor.control('upload').value.trim();conditions.upload=upload?parseInt(upload,10)*(1024/8):-1;const latency=editor.control('latency').value.trim();conditions.latency=latency?parseInt(latency,10):0;const list=this._customSetting.get();if(isNew)
list.push(conditions);this._customSetting.set(list);}
beginEdit(item){const conditions=(item);const editor=this._createEditor();editor.control('title').value=conditions.title;editor.control('download').value=conditions.download<=0?'':String(conditions.download/(1024/8));editor.control('upload').value=conditions.upload<=0?'':String(conditions.upload/(1024/8));editor.control('latency').value=conditions.latency?String(conditions.latency):'';return editor;}
_createEditor(){if(this._editor)
return this._editor;const editor=new UI.ListWidget.Editor();this._editor=editor;const content=editor.contentElement();const titles=content.createChild('div','conditions-edit-row');titles.createChild('div','conditions-list-text conditions-list-title').textContent=Common.UIString('Profile Name');titles.createChild('div','conditions-list-separator conditions-list-separator-invisible');titles.createChild('div','conditions-list-text').textContent=Common.UIString('Download');titles.createChild('div','conditions-list-separator conditions-list-separator-invisible');titles.createChild('div','conditions-list-text').textContent=Common.UIString('Upload');titles.createChild('div','conditions-list-separator conditions-list-separator-invisible');titles.createChild('div','conditions-list-text').textContent=Common.UIString('Latency');const fields=content.createChild('div','conditions-edit-row');fields.createChild('div','conditions-list-text conditions-list-title').appendChild(editor.createInput('title','text','',titleValidator));fields.createChild('div','conditions-list-separator conditions-list-separator-invisible');let cell=fields.createChild('div','conditions-list-text');cell.appendChild(editor.createInput('download','text',Common.UIString('kb/s'),throughputValidator));cell.createChild('div','conditions-edit-optional').textContent=Common.UIString('optional');fields.createChild('div','conditions-list-separator conditions-list-separator-invisible');cell=fields.createChild('div','conditions-list-text');cell.appendChild(editor.createInput('upload','text',Common.UIString('kb/s'),throughputValidator));cell.createChild('div','conditions-edit-optional').textContent=Common.UIString('optional');fields.createChild('div','conditions-list-separator conditions-list-separator-invisible');cell=fields.createChild('div','conditions-list-text');cell.appendChild(editor.createInput('latency','text',Common.UIString('ms'),latencyValidator));cell.createChild('div','conditions-edit-optional').textContent=Common.UIString('optional');return editor;function titleValidator(item,index,input){const value=input.value.trim();return value.length>0&&value.length<50;}
function throughputValidator(item,index,input){const value=input.value.trim();return!value||(/^[\d]+(\.\d+)?|\.\d+$/.test(value)&&value>=0&&value<=10000000);}
function latencyValidator(item,index,input){const value=input.value.trim();return!value||(/^[\d]+$/.test(value)&&value>=0&&value<=1000000);}}};MobileThrottling.throughputText=function(throughput,plainText){if(throughput<0)
return'';const throughputInKbps=throughput/(1024/8);const delimiter=plainText?'':' ';if(throughputInKbps<1024)
return Common.UIString('%d%skb/s',throughputInKbps,delimiter);if(throughputInKbps<1024*10)
return Common.UIString('%.1f%sMb/s',throughputInKbps/1024,delimiter);return Common.UIString('%d%sMb/s',(throughputInKbps/1024)|0,delimiter);};;MobileThrottling.ThrottlingManager=class extends Common.Object{constructor(){super();this._cpuThrottlingRate=MobileThrottling.CPUThrottlingRates.NoThrottling;this._cpuThrottlingControls=new Set();this._cpuThrottlingRates=MobileThrottling.cpuThrottlingPresets;this._customNetworkConditionsSetting=Common.moduleSetting('customNetworkConditions');this._currentNetworkThrottlingConditions=SDK.NetworkManager.NoThrottlingConditions;this._lastNetworkThrottlingConditions;SDK.multitargetNetworkManager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChanged,()=>{this._lastNetworkThrottlingConditions=this._currentNetworkThrottlingConditions;this._currentNetworkThrottlingConditions=SDK.multitargetNetworkManager.networkConditions();});SDK.targetManager.observeModels(SDK.EmulationModel,this);}
decorateSelectWithNetworkThrottling(selectElement){let options=[];const selector=new MobileThrottling.NetworkThrottlingSelector(populate,select,this._customNetworkConditionsSetting);selectElement.addEventListener('change',optionSelected,false);return selector;function populate(groups){selectElement.removeChildren();options=[];for(let i=0;i<groups.length;++i){const group=groups[i];const groupElement=selectElement.createChild('optgroup');groupElement.label=group.title;for(const conditions of group.items){const title=conditions.title;const option=new Option(title,title);groupElement.appendChild(option);options.push(conditions);}
if(i===groups.length-1){groupElement.appendChild(new Option(Common.UIString('Add\u2026'),Common.UIString('Add\u2026')));options.push(null);}}
return options;}
function optionSelected(){if(selectElement.selectedIndex===selectElement.options.length-1)
selector.revealAndUpdate();else
selector.optionSelected(options[selectElement.selectedIndex]);}
function select(index){if(selectElement.selectedIndex!==index)
selectElement.selectedIndex=index;}}
createOfflineToolbarCheckbox(){const checkbox=new UI.ToolbarCheckbox(Common.UIString('Offline'),Common.UIString('Force disconnected from network'),forceOffline.bind(this));SDK.multitargetNetworkManager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChanged,networkConditionsChanged);checkbox.setChecked(SDK.multitargetNetworkManager.networkConditions()===SDK.NetworkManager.OfflineConditions);function forceOffline(){if(checkbox.checked())
SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.OfflineConditions);else
SDK.multitargetNetworkManager.setNetworkConditions(this._lastNetworkThrottlingConditions);}
function networkConditionsChanged(){checkbox.setChecked(SDK.multitargetNetworkManager.networkConditions()===SDK.NetworkManager.OfflineConditions);}
return checkbox;}
createMobileThrottlingButton(){const button=new UI.ToolbarMenuButton(appendItems);button.setTitle(Common.UIString('Throttling'));button.setGlyph('');button.turnIntoSelect();button.setDarkText();let options=[];let selectedIndex=-1;const selector=new MobileThrottling.MobileThrottlingSelector(populate,select);return button;function appendItems(contextMenu){for(let index=0;index<options.length;++index){const conditions=options[index];if(!conditions)
continue;if(conditions.title===MobileThrottling.CustomConditions.title&&conditions.description===MobileThrottling.CustomConditions.description)
continue;contextMenu.defaultSection().appendCheckboxItem(Common.UIString(conditions.title),selector.optionSelected.bind(selector,(conditions)),selectedIndex===index);}}
function populate(groups){options=[];for(const group of groups){for(const conditions of group.items)
options.push(conditions);options.push(null);}
return options;}
function select(index){selectedIndex=index;button.setText(options[index].title);button.setTitle(options[index].description);}}
cpuThrottlingRate(){return this._cpuThrottlingRate;}
setCPUThrottlingRate(rate){this._cpuThrottlingRate=rate;for(const emulationModel of SDK.targetManager.models(SDK.EmulationModel))
emulationModel.setCPUThrottlingRate(this._cpuThrottlingRate);let icon=null;if(this._cpuThrottlingRate!==MobileThrottling.CPUThrottlingRates.NoThrottling){Host.userMetrics.actionTaken(Host.UserMetrics.Action.CpuThrottlingEnabled);icon=UI.Icon.create('smallicon-warning');icon.title=Common.UIString('CPU throttling is enabled');}
const index=this._cpuThrottlingRates.indexOf(this._cpuThrottlingRate);for(const control of this._cpuThrottlingControls)
control.setSelectedIndex(index);UI.inspectorView.setPanelIcon('timeline',icon);this.dispatchEventToListeners(MobileThrottling.ThrottlingManager.Events.RateChanged,this._cpuThrottlingRate);}
modelAdded(emulationModel){if(this._cpuThrottlingRate!==MobileThrottling.CPUThrottlingRates.NoThrottling)
emulationModel.setCPUThrottlingRate(this._cpuThrottlingRate);}
modelRemoved(emulationModel){}
createCPUThrottlingSelector(){const control=new UI.ToolbarComboBox(event=>this.setCPUThrottlingRate(this._cpuThrottlingRates[event.target.selectedIndex]));this._cpuThrottlingControls.add(control);const currentRate=this._cpuThrottlingRate;for(let i=0;i<this._cpuThrottlingRates.length;++i){const rate=this._cpuThrottlingRates[i];const title=rate===1?Common.UIString('No throttling'):Common.UIString('%d\xD7 slowdown',rate);const option=control.createOption(title);control.addOption(option);if(currentRate===rate)
control.setSelectedIndex(i);}
return control;}};MobileThrottling.ThrottlingManager.Events={RateChanged:Symbol('RateChanged')};MobileThrottling.ThrottlingManager.ActionDelegate=class{handleAction(context,actionId){if(actionId==='network-conditions.network-online'){SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.NoThrottlingConditions);return true;}
if(actionId==='network-conditions.network-offline'){SDK.multitargetNetworkManager.setNetworkConditions(SDK.NetworkManager.OfflineConditions);return true;}
return false;}};MobileThrottling.throttlingManager=function(){return self.singleton(MobileThrottling.ThrottlingManager);};;self['BrowserComponents']=self['BrowserComponents']||{};BrowserComponents.ImagePreview=class{static build(target,originalImageURL,showDimensions,precomputedFeatures){const resourceTreeModel=target.model(SDK.ResourceTreeModel);if(!resourceTreeModel)
return Promise.resolve((null));let resource=resourceTreeModel.resourceForURL(originalImageURL);let imageURL=originalImageURL;if(!isImageResource(resource)&&precomputedFeatures&&precomputedFeatures.currentSrc){imageURL=precomputedFeatures.currentSrc;resource=resourceTreeModel.resourceForURL(imageURL);}
if(!isImageResource(resource))
return Promise.resolve((null));let fulfill;const promise=new Promise(x=>fulfill=x);const imageElement=createElement('img');imageElement.addEventListener('load',buildContent,false);imageElement.addEventListener('error',()=>fulfill(null),false);resource.populateImageSource(imageElement);return promise;function isImageResource(resource){return!!resource&&resource.resourceType()===Common.resourceTypes.Image;}
function buildContent(){const container=createElement('table');UI.appendStyle(container,'browser_components/imagePreview.css');container.className='image-preview-container';const naturalWidth=precomputedFeatures?precomputedFeatures.naturalWidth:imageElement.naturalWidth;const naturalHeight=precomputedFeatures?precomputedFeatures.naturalHeight:imageElement.naturalHeight;const offsetWidth=precomputedFeatures?precomputedFeatures.offsetWidth:naturalWidth;const offsetHeight=precomputedFeatures?precomputedFeatures.offsetHeight:naturalHeight;let description;if(showDimensions){if(offsetHeight===naturalHeight&&offsetWidth===naturalWidth){description=Common.UIString('%d \xd7 %d pixels',offsetWidth,offsetHeight);}else{description=Common.UIString('%d \xd7 %d pixels (Natural: %d \xd7 %d pixels)',offsetWidth,offsetHeight,naturalWidth,naturalHeight);}}
container.createChild('tr').createChild('td','image-container').appendChild(imageElement);if(description)
container.createChild('tr').createChild('td').createChild('span','description').textContent=description;if(imageURL!==originalImageURL){container.createChild('tr').createChild('td').createChild('span','description').textContent=String.sprintf('currentSrc: %s',imageURL.trimMiddle(100));}
fulfill(container);}}};;self['WorkerMain']=self['WorkerMain']||{};WorkerMain.WorkerMain=class extends Common.Object{run(){const capabilities=SDK.Target.Capability.Browser|SDK.Target.Capability.Log|SDK.Target.Capability.Network|SDK.Target.Capability.Target|SDK.Target.Capability.Inspector;SDK.targetManager.createTarget('main',Common.UIString('Main'),capabilities,this._createMainConnection.bind(this),null);InspectorFrontendHost.connectionReady();new MobileThrottling.NetworkPanelIndicator();}
_createMainConnection(params){return SDK.createMainConnection(params,()=>Components.TargetDetachedDialog.webSocketConnectionLost());}};SDK.ChildTargetManager.install(({target,waitingForDebugger})=>{const parentTarget=target.parentTarget();if(!parentTarget.parentTarget()&&waitingForDebugger){const debuggerModel=target.model(SDK.DebuggerModel);if(debuggerModel)
debuggerModel.pause();}});;;Runtime.cachedResources["mobile_throttling/throttlingSettingsTab.css"]="/*\n * Copyright 2015 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n:host {\n overflow:hidden;\n}\n\n.header {\n padding: 0 0 6px;\n border-bottom: 1px solid #EEEEEE;\n font-size: 18px;\n font-weight: normal;\n flex: none;\n}\n\n.add-conditions-button {\n flex: none;\n margin: 10px 2px;\n min-width: 140px;\n align-self: flex-start;\n}\n\n.conditions-list {\n max-width: 500px;\n min-width: 340px;\n flex: auto;\n}\n\n.conditions-list-item {\n padding: 3px 5px 3px 5px;\n height: 30px;\n display: flex;\n align-items: center;\n position: relative;\n flex: auto 1 1;\n}\n\n.conditions-list-text {\n white-space: nowrap;\n text-overflow: ellipsis;\n flex: 0 0 70px;\n -webkit-user-select: none;\n color: #222;\n text-align: end;\n position: relative;\n}\n\n.conditions-list-title {\n text-align: start;\n flex: auto;\n display: flex;\n align-items: flex-start;\n}\n\n.conditions-list-title-text {\n overflow: hidden;\n flex: auto;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.conditions-list-separator {\n flex: 0 0 1px;\n background-color: rgb(231, 231, 231);\n height: 30px;\n margin: 0 4px;\n}\n\n.conditions-list-separator-invisible {\n visibility: hidden;\n height: 100% !important;\n}\n\n.conditions-edit-row {\n flex: none;\n display: flex;\n flex-direction: row;\n margin: 6px 5px;\n}\n\n.conditions-edit-row input {\n width: 100%;\n text-align: inherit;\n}\n\n.conditions-edit-optional {\n position: absolute;\n bottom: -20px;\n right: 0;\n color: rgb(128, 128, 128);\n}\n\n/*# sourceURL=mobile_throttling/throttlingSettingsTab.css */";Runtime.cachedResources["browser_components/imagePreview.css"]="/*\n * Copyright 2017 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.image-preview-container {\n background: transparent;\n text-align: center;\n border-spacing: 0;\n}\n\n.image-preview-container img {\n margin: 2px auto;\n max-width: 100px;\n max-height: 100px;\n background-image: url(Images/checker.png);\n -webkit-user-select: text;\n -webkit-user-drag: auto;\n}\n\n.image-container {\n padding: 0;\n}\n\n/*# sourceURL=browser_components/imagePreview.css */";